Dot product

The dot product, also known as the scalar product or inner product, is an operation that takes two vectors and produces a scalar. Geometrically, we define the dot product of u→ and v→ with

u→⋅v→=|u→||v→|cosθ,

where θ is the angle between the vectors in standard position. The dot product has a few useful properties that arise from the cosine term:

If Then Therefore
u→⋅v→>0 0º<θ<90º acute
u→⋅v→<0 90º<θ<180º obtuse
u→⋅v→=0 θ=90º perpendicular

Algebraically, we define the dot product in ℝ3 with

[u1,u2,u3]⋅[v1,v2,v3]=u1v1+u2v2+u3v3.

Essentially, we get the product of the first components, of the second components, etc., and then take the sum of the products. It works in the same way with ℝ2 and any other Euclidean space.

The dot product has a few properties that are worth committing to memory. First, the dot product of a vector with itself is equivalent to the square of its magnitude:

a→⋅a→=|a→|2.

The dot product is commutative—order doesn’t matter:

a→⋅b→=b→⋅a→.

It is distributive over addition:

a→⋅(b→+c→)=a→⋅b→+a→⋅c→.

It is associative over scalar multiplication:

ka→⋅b→=k(a→⋅b→)=a→⋅kb→.

Finally, any dot product with the zero vector produces the scalar zero:

a→⋅0→=0.