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 projv⃗u⃗\text{proj}_{\vec{v}}\vec{u} and is obtained by calculating:
projv⃗u⃗=(u⃗⋅v⃗v⃗⋅v⃗)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}
  • projv⃗u⃗\text{proj}_{\vec v}\vec u is a scalar multiple of v⃗\colorTwo{\vec v}
  • projv⃗u⃗\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 perpv⃗u⃗\text{perp}_{\vec{v}}\vec{u} and is obtained by calculating:
perpv⃗u⃗ = u⃗−projv⃗u⃗\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}.
projv⃗u⃗=u⃗⋅v⃗v⃗⋅v⃗v⃗=⟨3,−1,4⟩⋅⟨9,0,2⟩⟨9,0,2⟩⋅⟨9,0,2⟩⟨9,0,2⟩=(3)(9)+(−1)(0)+(4)(2)92+02+22⟨9,0,2⟩=3585⟨9,0,2⟩=717⟨9,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}.

proju⃗v⃗=v⃗⋅u⃗u⃗⋅u⃗u⃗=⟨9,0,2⟩⋅⟨3,−1,4⟩⟨3,−1,4⟩⋅⟨3,−1,4⟩⟨3,−1,4⟩=(9)(3)+(0)(−1)+(2)(4)32+(−1)2+42⟨3,−1,4⟩=3526⟨3,−1,4⟩=3526⟨3,−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.

proju⃗v⃗=v⃗⋅u⃗u⃗⋅u⃗ u⃗=[−31]⋅[42][42]⋅[42][42]=(−3)(4)+(1)(2)(4)2+22[42]=−1020[42]=−12[42]=[−2−1]\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 proju⃗v⃗\text{proj}_{\vec u} \vec v is in the opposite direction of u⃗\vec u.


PAGE BREAK

Part B)

Calculate perpu⃗v⃗\text{perp}_{\vec u} \vec v.
We can use our answer from Part A):
proju⃗v⃗=[−2−1]\text{proj}_{\vec u} \vec v = \begin{bmatrix} -2\\ -1 \end{bmatrix}
So calculating perpu⃗v⃗\text{perp}_{\vec u} \vec v is as simple as:
perpu⃗v⃗=v⃗−proju⃗v⃗=[−31]−[−2−1]=[−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⃗=[−2−140]\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⃗,v⃗∈Rn\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