The dot product (also called the inner product or scalar product) is a fundamental operation between two vectors that returns a scalar. It captures how much two vectors “align” with each other.
Given two vectors u,v∈Rn, the dot product can be computed in two equivalent ways.
Algebraic Definition
The dot product of u=(u1,…,un)⊤ and v=(v1,…,vn)⊤ in Rn is:
⟨u,v⟩=u⋅v=u⊤v=∑i=1nuivi
This is simply a component-wise multiply-then-sum.
In R3:
⟨(1,2,3)⊤,(4,5,6)⊤⟩=1⋅4+2⋅5+3⋅6=4+10+18=32
Geometric Interpretation
The same operation has a clean geometric meaning:
For u,v∈Rn, the dot product equals:
⟨u,v⟩=∥u∥∥v∥cosθ
where θ∈[0,π] is the angle between the two vectors and ∥⋅∥ denotes the Euclidean norm.
This form makes three key facts immediately visible:
Orthogonality:⟨u,v⟩=0 if and only if θ=90° — the vectors are perpendicular.
Sign: the dot product is positive when θ<90° (vectors point in roughly the same direction), zero at 90°, and negative when θ>90° (vectors point away from each other).
Self-dot-product:⟨v,v⟩=∥v∥2, so the norm of a vector is ∥v∥=⟨v,v⟩.
Key Properties
For all u,v,w∈Rn and α∈R:
Commutativity:⟨u,v⟩=⟨v,u⟩
Linearity:⟨αu+w,v⟩=α⟨u,v⟩+⟨w,v⟩
Positive-definiteness:⟨v,v⟩≥0, with equality only when v=0