9. Dot Product

The dot product (or scalar product) of two vectors of the same dimension returns a scalar — the sum of componentwise products.

𝑎𝑏=[𝑎1𝑎2𝑎𝑛][𝑏1𝑏2𝑏𝑛]=𝑎1𝑏1+𝑎2𝑏2++𝑎𝑛𝑏𝑛=𝑖=1𝑛𝑎𝑖𝑏𝑖
Example

𝑎=[213], 𝑏=[452]:

𝑎𝑏=24+(1)5+3(2)=856=3

9.1. Geometric formula

𝑎𝑏=𝑎𝑏cos𝜃

where 𝜃 is the angle between 𝑎 and 𝑏 — and is the norm.

This links the algebraic dot product to geometric intuition: the dot product measures how much the vectors point in the same direction.

9.2. Connection to norm

The square of the norm is the dot product of a vector with itself:

𝑎2=𝑎𝑎

See Norm for the full story.

9.3. Properties

Commutative:

𝑣𝑤=𝑤𝑣

Distributive over vector addition:

(𝑣+𝑤)𝑥=𝑣𝑥+𝑤𝑥

Compatible with scalar multiplication:

(𝑐𝑣)𝑤=𝑐(𝑣𝑤)

Bilinear: linear in each argument separately (the three properties above combined).

9.4. Matrix form

For column vectors, the dot product is just matrix multiplication of 𝑎𝑇 with 𝑏:

𝑎𝑏=𝑎𝑇𝑏

(See Transpose.)

9.5. See also