# What is the projection of < 5 ,- 3, 9 > onto < 5, -2 , -4 >?

Oct 10, 2016

${\text{proj}}_{v} u = \textcolor{g r e e n}{< - \frac{5}{9} , \frac{2}{9} , \frac{4}{9} >}$

#### Explanation:

In general for vectors $\vec{u}$ and $\vec{v}$
the projection of $\vec{u}$ unto $\vec{v}$ is given by
color(white)("XXX")"proj_v u = ( (vecu * vecv)/(abs(abs(vecv))^2)) * vecv

$\textcolor{w h i t e}{\text{XXXXXXXXXXXX}}$[If you need a derivation of this equation,
$\textcolor{w h i t e}{\text{XXXXXXXXXXXXX}}$ask as a separate question.]

For the given case
$\textcolor{w h i t e}{\text{XXX}} \vec{u} = < 5 , - 3 , 9 >$ and
$\textcolor{w h i t e}{\text{XXX}} \vec{v} = < 5 , - 2 , - 4 >$

$\vec{u} \cdot \vec{v} = \left(5 \cdot 5\right) + \left(\left(- 3\right) \cdot \left(- 2\right)\right) + \left(9 \cdot \left(- 4\right)\right)$
$\textcolor{w h i t e}{\text{XXXX}} = 25 + 6 - 36$
$\textcolor{w h i t e}{\text{XXXX}} = - 5$

${\left\mid \left\mid \vec{v} \right\mid \right\mid}^{2} = {5}^{2} + {\left(- 2\right)}^{2} + {\left(- 4\right)}^{2}$
$\textcolor{w h i t e}{\text{XXX}} = 25 + 4 + 16$
$\textcolor{w h i t e}{\text{XXX}} = 45$

$\left(\frac{\vec{u} \cdot \vec{v}}{{\left\mid \left\mid \vec{v} \right\mid \right\mid}^{2}}\right) = \frac{- 5}{45}$
$\textcolor{w h i t e}{\text{XXXXXX}} = - \frac{1}{9}$

${\text{proj}}_{v} u = \left(- \frac{1}{9}\right) \vec{v}$
$\textcolor{w h i t e}{\text{XXX}} = \left(- \frac{1}{9}\right) \cdot < 5 , - 2 , - 4 >$
$\textcolor{w h i t e}{\text{XXX}} = < - \frac{5}{9} , \frac{2}{9} , \frac{4}{9} >$