Wize University Linear Algebra Textbook > Products of Vectors

Projection (Proj) and Perpendicular (Perp)

0:00 / 0:00

Projection and Perpendicular

The projection of u\vec{u} onto v\vec{v} is denoted by projvu\text{proj}_{\vec{v}}\vec{u} and is obtained by calculating:
projvu=(uvvv)v\boxed{\quad \text{proj}_{\colorTwo{\vec v} } \colorOne{\vec u} = \left( \dfrac{ \colorOne{\vec u} \cdot \colorTwo{\vec v}} {\colorTwo{\vec v} \cdot \colorTwo{\vec v}} \right) \colorTwo{\vec v} \quad}
Notes
  • The projection of u\vec{u} onto v\vec{v} is the "shadow" that u\colorOne{\vec u} casts onto v\colorTwo{\vec v}
  • projvu\text{proj}_{\vec v}\vec u is a scalar multiple of v\colorTwo{\vec v}
  • projvu\text{proj}_{\vec v}\vec u is also called the vector component of u\colorFour{\vec{u}} parallel to v\colorFour{\vec{v}}
The perpendicular of u\vec{u} onto v\vec{v} is denoted by perpvu\text{perp}_{\vec{v}}\vec{u} and is obtained by calculating:
perpvu = uprojvu\boxed{\quad \text{perp}_{\vec v}\vec u \ =\ \vec u - \text{proj}_{\vec v}\vec u \quad}
The perpendicular is the vector component of u\colorFour{\vec{u}} orthogonal to v\colorFour{\vec{v}}

0:00 / 0:00

Example: Projection

Let u=3,1,4\vec{u}=\lang 3,-1,4 \rang and v=9,0,2\vec{v}=\lang 9,0,2 \rang.

Part A)

Find projv u\text{proj}_{\vec{v}}\ \vec{u}.
projvu=uvvvv=3,1,49,0,29,0,29,0,29,0,2=(3)(9)+(1)(0)+(4)(2)92+02+229,0,2=35859,0,2=7179,0,2=6317, 0, 1417\begin{aligned} \text{proj}_{\vec{v}}\vec{u} &= \dfrac{\vec{u}\cdot\vec{v}}{\vec{v}\cdot\vec{v}}\vec{v}\\[1.5em] &= \dfrac{\lang 3,-1,4\rang\cdot\lang 9,0,2\rang}{\lang 9,0,2\rang \cdot\lang 9,0,2\rang}\lang 9,0,2\rang \\[1.5em] &= \dfrac{(3)(9)+(-1)(0)+(4)(2)}{9^2+0^2+2^2}\lang 9,0,2 \rang\\[1.5em] &= \dfrac{35}{85}\lang 9,0,2\rang \\[1.5em] &= \dfrac{7}{17}\lang 9,0,2 \rang\\[1.5em] &= \left\lang \dfrac{63}{17}, \ 0,\ \dfrac{14}{17}\right\rang \\[1.5em] \end{aligned}


Part B)

Find proju v\text{proj}_{\vec{u}}\ \vec{v}.

projuv=vuuuu=9,0,23,1,43,1,43,1,43,1,4=(9)(3)+(0)(1)+(2)(4)32+(1)2+423,1,4=35263,1,4=35263,1,4=10526,3526,7013\begin{aligned} \text{proj}_{\vec{u}}\vec{v} &= \dfrac{\vec{v} \cdot \vec{u}}{\vec{u} \cdot \vec{u}}\vec{u}\\[1.5em] &= \dfrac{\lang 9,0,2\rang \cdot \lang 3,-1,4\rang }{\lang 3,-1,4\rang \cdot \lang 3,-1,4\rang }\lang 3,-1,4\rang \\[1.5em] &= \dfrac{(9)(3)+(0)(-1)+(2)(4)}{3^2+(-1)^2+4^2}\lang 3,-1,4\rang\\[1.5em] &= \dfrac{35}{26}\lang 3,-1,4\rang\\[1.5em] &= \dfrac{35}{26}\lang 3,-1,4\rang\\[1.5em] &= \left\lang \dfrac{105}{26},-\dfrac{35}{26},\dfrac{70}{13} \right\rang\\[1.5em] \end{aligned}

0:00 / 0:00

Example: Projection and Perpendicular

Let u=[42], v=[31]R2\vec u = \begin{bmatrix} 4\\2 \end{bmatrix},\ \vec v = \begin{bmatrix} -3\\1 \end{bmatrix} \in \reals^2.

Part A)

Sketch vectors u\vec u and v\vec v and guess whether proju v\text{proj}_{\vec u}\ \vec v is in the same direction or the opposite direction of u\vec u.
Calculate proju v\text{proj}_{\vec u}\ \vec v to check your guess.
We can see that projecting v\vec v onto u\vec u will require us to extend u\vec u in the opposite direction.

projuv=vuuu u=[31][42][42][42][42]=(3)(4)+(1)(2)(4)2+22[42]=1020[42]=12[42]=[21]\begin{aligned} \text{proj}_{\vec u} \vec v &= \dfrac{\vec{v} \cdot \vec{u}}{\vec{u} \cdot \vec{u}}\ \vec{u}\\[1em] &= \frac{ \begin{bmatrix} -3\\1 \end{bmatrix} \cdot \begin{bmatrix} 4\\2 \end{bmatrix} }{ \begin{bmatrix} 4\\2 \end{bmatrix} \cdot \begin{bmatrix} 4\\2 \end{bmatrix} } \begin{bmatrix} 4\\2 \end{bmatrix}\\[3em] &= \dfrac{ (-3)(4) + (1)(2)} {(4)^2 + 2^2} \begin{bmatrix} 4\\2 \end{bmatrix}\\[1.5em] &= \dfrac{-10} {20} \begin{bmatrix} 4\\2 \end{bmatrix}\\[1.5em] &= -\dfrac{1} {2} \begin{bmatrix} 4\\2 \end{bmatrix}\\[1.5em] &= \boxed{ \begin{bmatrix} -2\\ -1 \end{bmatrix} } \end{aligned}
Since the scalar multiple of u\vec u is negative (12)(-\frac{1}{2}), we have confirmed that projuv\text{proj}_{\vec u} \vec v is in the opposite direction of u\vec u.


PAGE BREAK

Part B)

Calculate perpuv\text{perp}_{\vec u} \vec v.
We can use our answer from Part A):
projuv=[21]\text{proj}_{\vec u} \vec v = \begin{bmatrix} -2\\ -1 \end{bmatrix}
So calculating perpuv\text{perp}_{\vec u} \vec v is as simple as:
perpuv=vprojuv=[31][21]=[12]\begin{aligned} \text{perp}_{\vec{u}}\vec{v} &=\vec v - \text{proj}_{\vec{u}}\vec{v}\\ &= \begin{bmatrix} -3\\ 1 \end{bmatrix} - \begin{bmatrix} -2\\ -1 \end{bmatrix}\\ &= \boxed{ \begin{bmatrix} -1\\ 2 \end{bmatrix} } \end{aligned}
Notice that, as usual, this result is a position vector: if the vector were translated to start at the origin, it would go left 1 and up 2.

Practice: Projection

Find the projection of a=2,3,6\vec a=\lang -2,3,6 \rang onto b=5,1,4\vec b=\lang -5,-1,4 \rang.

Practice: Projection and Perpendicular

Let u=[2140]\vec{u}= \begin{bmatrix} -2\\ -1\\ 4\\ 0 \end{bmatrix}, v=[3014]\vec v= \begin{bmatrix} -3\\ 0\\ 1\\ 4 \end{bmatrix}, and w=[0011]\vec{w}= \begin{bmatrix} 0\\ 0\\ 1\\ 1 \end{bmatrix}

Find perpv  w (u+v)\text{perp}_{\vec v \ -\ \vec w} \ (\vec u + \vec v).
(Enter your answer as a column vector)

Practice: Projection

True or False

There exist vectors u,vRn\vec u, \vec v \in \reals^n such that projv u=proju v\text{proj}_{\vec{v}}\ \vec{u} = \text{proj}_{\vec{u}}\ \vec{v}.

Extra Practice