Dot Product

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,vRn\mathbf{u}, \mathbf{v} \in \mathbb{R}^n, the dot product can be computed in two equivalent ways.

Algebraic Definition

The dot product of u=(u1,,un)\mathbf{u} = (u_1, \ldots, u_n)^\top and v=(v1,,vn)\mathbf{v} = (v_1, \ldots, v_n)^\top in Rn\mathbb{R}^n is:

u,v=uv=uv=i=1nuivi\langle \mathbf{u}, \mathbf{v} \rangle = \mathbf{u} \cdot \mathbf{v} = \mathbf{u}^\top \mathbf{v} = \sum_{i=1}^{n} u_i v_i

This is simply a component-wise multiply-then-sum.

In R3\mathbb{R}^3:

(1,2,3),(4,5,6)=14+25+36=4+10+18=32\langle (1, 2, 3)^\top,\, (4, 5, 6)^\top \rangle = 1 \cdot 4 + 2 \cdot 5 + 3 \cdot 6 = 4 + 10 + 18 = 32

Geometric Interpretation

The same operation has a clean geometric meaning:

For u,vRn\mathbf{u}, \mathbf{v} \in \mathbb{R}^n, the dot product equals:

u,v=uvcosθ\langle \mathbf{u}, \mathbf{v} \rangle = \|\mathbf{u}\| \, \|\mathbf{v}\| \cos \theta

where θ[0,π]\theta \in [0, \pi] is the angle between the two vectors and \|\cdot\| denotes the Euclidean norm.

This form makes three key facts immediately visible:

  • Orthogonality: u,v=0\langle \mathbf{u}, \mathbf{v} \rangle = 0 if and only if θ=90°\theta = 90° — the vectors are perpendicular.
  • Sign: the dot product is positive when θ<90°\theta < 90° (vectors point in roughly the same direction), zero at 90°90°, and negative when θ>90°\theta > 90° (vectors point away from each other).
  • Self-dot-product: v,v=v2\langle \mathbf{v}, \mathbf{v} \rangle = \|\mathbf{v}\|^2, so the norm of a vector is v=v,v\|\mathbf{v}\| = \sqrt{\langle \mathbf{v}, \mathbf{v} \rangle}.

Key Properties

For all u,v,wRn\mathbf{u}, \mathbf{v}, \mathbf{w} \in \mathbb{R}^n and αR\alpha \in \mathbb{R}:

  • Commutativity: u,v=v,u\langle \mathbf{u}, \mathbf{v} \rangle = \langle \mathbf{v}, \mathbf{u} \rangle
  • Linearity: αu+w,v=αu,v+w,v\langle \alpha\mathbf{u} + \mathbf{w},\, \mathbf{v} \rangle = \alpha \langle \mathbf{u}, \mathbf{v} \rangle + \langle \mathbf{w}, \mathbf{v} \rangle
  • Positive-definiteness: v,v0\langle \mathbf{v}, \mathbf{v} \rangle \geq 0, with equality only when v=0\mathbf{v} = \mathbf{0}