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

uv=|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
uv>0 0º<θ<90º acute
uv<0 90º<θ<180º obtuse
uv=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:

aa=|a|2.

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

ab=ba.

It is distributive over addition:

a(b+c)=ab+ac.

It is associative over scalar multiplication:

kab=k(ab)=akb.

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

a0=0.