Mathwords logoMathwords

Projection — Definition, Formula & Examples

Projection is the operation of mapping a vector onto another vector (or subspace) by dropping a perpendicular from the original vector. The result is the component of the original vector that lies in the direction of the target.

Given vectors u\mathbf{u} and v\mathbf{v} in an inner product space, the orthogonal projection of u\mathbf{u} onto v\mathbf{v} is the vector projvu=uvvvv\text{proj}_{\mathbf{v}}\mathbf{u} = \frac{\mathbf{u} \cdot \mathbf{v}}{\mathbf{v} \cdot \mathbf{v}}\,\mathbf{v}. More generally, the projection onto a subspace WW is the unique decomposition u=w+w\mathbf{u} = \mathbf{w} + \mathbf{w}^\perp where wW\mathbf{w} \in W and wW\mathbf{w}^\perp \perp W.

Key Formula

projvu=uvvvv\text{proj}_{\mathbf{v}}\mathbf{u} = \frac{\mathbf{u} \cdot \mathbf{v}}{\mathbf{v} \cdot \mathbf{v}}\,\mathbf{v}
Where:
  • u\mathbf{u} = The vector being projected
  • v\mathbf{v} = The vector onto which you project
  • uv\mathbf{u} \cdot \mathbf{v} = Dot product of u and v

How It Works

To project vector u\mathbf{u} onto vector v\mathbf{v}, you compute the scalar coefficient uvvv\frac{\mathbf{u} \cdot \mathbf{v}}{\mathbf{v} \cdot \mathbf{v}} and then multiply it by v\mathbf{v}. This scalar measures how much of u\mathbf{u} points in the direction of v\mathbf{v}. The difference uprojvu\mathbf{u} - \text{proj}_{\mathbf{v}}\mathbf{u} is the component of u\mathbf{u} orthogonal to v\mathbf{v}. When projecting onto a subspace spanned by multiple vectors, you can use projection matrices: if AA has columns forming a basis for the subspace, the projection matrix is P=A(ATA)1ATP = A(A^T A)^{-1}A^T.

Worked Example

Problem: Find the projection of u = (3, 4) onto v = (1, 0).
Step 1: Compute the dot product of u and v.
uv=(3)(1)+(4)(0)=3\mathbf{u} \cdot \mathbf{v} = (3)(1) + (4)(0) = 3
Step 2: Compute the dot product of v with itself.
vv=(1)(1)+(0)(0)=1\mathbf{v} \cdot \mathbf{v} = (1)(1) + (0)(0) = 1
Step 3: Multiply the scalar ratio by v to get the projection.
projvu=31(1,0)=(3,0)\text{proj}_{\mathbf{v}}\mathbf{u} = \frac{3}{1}(1, 0) = (3, 0)
Answer: The projection of (3, 4) onto (1, 0) is (3, 0), which is the horizontal component of u.

Why It Matters

Projections are central to least-squares regression, where you project a data vector onto the column space of a matrix to find the best-fit solution. They also underpin the Gram-Schmidt process for constructing orthonormal bases and appear in computer graphics for rendering 3D scenes onto 2D screens.

Common Mistakes

Mistake: Dividing by the magnitude of v instead of the dot product of v with itself.
Correction: The denominator must be vv=v2\mathbf{v} \cdot \mathbf{v} = \|\mathbf{v}\|^2, not v\|\mathbf{v}\|. Dividing by just the magnitude gives the scalar component (a number), not the vector projection.