Ma · Mathematics

How to Find the Perpendicular Projection of a Vector

Published By the 9to5Science editorial team

At a glance

  1. 1. Choose a direction

    Identify the nonzero vector or subspace that defines what “perpendicular” means.

  2. 2. Find the parallel part

    Project onto the reference vector using the dot product.

  3. 3. Subtract

    Subtract the parallel projection from the original vector to get its perpendicular component.

  4. 4. Check orthogonality

    Take the dot product with the reference vector; the perpendicular component should give zero.

Advertisement

“Perpendicular projection” can mean either the part of a vector perpendicular to a given direction, or a projection onto a specified perpendicular direction or plane. The most common meaning is the perpendicular component relative to a nonzero vector. You find it by removing the part of the vector parallel to that reference vector.

The perpendicular component of a vector

Let vv be the vector you want to decompose, and let uu be a nonzero reference vector. The projection of vv onto uu is its parallel component:

proj⁡u(v)=v⋅uu⋅uu.\operatorname{proj}_u(v)=\frac{v\cdot u}{u\cdot u}u.

Subtract that component from vv to get the perpendicular component:

v⊥=v−proj⁡u(v)=v−v⋅uu⋅uu.v_{\perp}=v-\operatorname{proj}_u(v) =v-\frac{v\cdot u}{u\cdot u}u.

This is sometimes called the orthogonal component of vv relative to uu. It is perpendicular to uu because

v⊥⋅u=(v−v⋅uu⋅uu)⋅u=v⋅u−v⋅uu⋅u(u⋅u)=0.\begin{aligned} v_{\perp}\cdot u &=\left(v-\frac{v\cdot u}{u\cdot u}u\right)\cdot u\\ &=v\cdot u-\frac{v\cdot u}{u\cdot u}(u\cdot u)\\ &=0. \end{aligned}

The denominator is u⋅u=∥u∥2u\cdot u=\|u\|^2, so uu must not be the zero vector. You do not need to normalize uu first; the formula works for any nonzero length.

Worked example

Find the component of v=(3,4)v=(3,4) that is perpendicular to u=(1,2)u=(1,2).

First compute the dot products:

v⋅u=3(1)+4(2)=11,u⋅u=12+22=5.v\cdot u=3(1)+4(2)=11, \qquad u\cdot u=1^2+2^2=5.

The projection of vv onto uu is

proj⁡u(v)=115(1,2)=(115,225).\operatorname{proj}_u(v)=\frac{11}{5}(1,2)=\left(\frac{11}{5},\frac{22}{5}\right).

Subtract it from the original vector:

v⊥=(3,4)−(115,225)=(45,−25).\begin{aligned} v_{\perp} &=(3,4)-\left(\frac{11}{5},\frac{22}{5}\right)\\ &=\left(\frac{4}{5},-\frac{2}{5}\right). \end{aligned}

Check the result:

(45,−25)⋅(1,2)=45−45=0.\left(\frac{4}{5},-\frac{2}{5}\right)\cdot(1,2) =\frac{4}{5}-\frac{4}{5}=0.

So (4/5,−2/5)(4/5,-2/5) is the part of (3,4)(3,4) perpendicular to (1,2)(1,2). The original vector is the sum of its parallel and perpendicular parts:

(3,4)=(115,225)+(45,−25).(3,4)=\left(\frac{11}{5},\frac{22}{5}\right)+\left(\frac{4}{5},-\frac{2}{5}\right).

If you mean projection onto a perpendicular direction

In two dimensions, a vector perpendicular to u=(a,b)u=(a,b) is, for example, n=(−b,a)n=(-b,a). To project vv onto that perpendicular line, use the usual projection formula with nn:

proj⁡n(v)=v⋅nn⋅nn.\operatorname{proj}_n(v)=\frac{v\cdot n}{n\cdot n}n.

This gives the same perpendicular component as v−proj⁡u(v)v-\operatorname{proj}_u(v), because in the plane the line perpendicular to uu is exactly the direction spanned by nn. For the example above, take n=(−2,1)n=(-2,1). Then

proj⁡n(v)=(3,4)⋅(−2,1)(−2)2+12(−2,1)=−25(−2,1)=(45,−25).\operatorname{proj}_n(v) =\frac{(3,4)\cdot(-2,1)}{(-2)^2+1^2}(-2,1) =\frac{-2}{5}(-2,1) =\left(\frac{4}{5},-\frac{2}{5}\right).

In three dimensions, there are many directions perpendicular to a single vector, so “the perpendicular direction” is not unique. The component v−proj⁡u(v)v-\operatorname{proj}_u(v) is still well-defined: it is the projection of vv onto the entire plane perpendicular to uu.

More generally, to project onto a plane through the origin with nonzero normal vector nn, subtract the component along the normal:

proj⁡plane(v)=v−v⋅nn⋅nn.\operatorname{proj}_{\text{plane}}(v)=v-\frac{v\cdot n}{n\cdot n}n.

Common mistakes

  • Using the wrong denominator: divide by u⋅uu\cdot u, not by uu or by ∥u∥\|u\|. If uu is a unit vector, then u⋅u=1u\cdot u=1, and the formula simplifies to (v⋅u)u(v\cdot u)u.
  • Stopping at the parallel projection: proj⁡u(v)\operatorname{proj}_u(v) is parallel to uu. To get the perpendicular component relative to uu, subtract it from vv.
  • Confusing a perpendicular component with a projection onto one perpendicular line: in dimensions higher than two, the perpendicular space to a vector has more than one direction. The perpendicular component is the projection onto that whole space.
  • Forgetting the zero-vector case: the formula cannot use u=0u=0, because its denominator would be zero and a zero vector does not specify a direction.
  • Relying on a picture instead of checking: a quick dot-product check, v⊥⋅u=0v_{\perp}\cdot u=0, confirms the calculation exactly.

Use the subtraction formula when you need the part of a vector orthogonal to a reference vector. If a particular line or subspace is specified instead, project onto that line or subspace directly.

References

  1. Introduction to Linear Algebra, Gilbert Strang

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.