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


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


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:


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


It is distributive over addition:


It is associative over scalar multiplication:


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