5. Vectors

d. Dot Product

5. Vector Projections

It is often useful to write a vector \(\vec v\) as the sum of two vectors, one parallel to a given direction \(\vec u\) and one perpendicular to that direction. (See the application section on computing Work) These are called (vector) projections.

The projection of the vector \(\vec v\) parallel to the direction of \(\vec u\) is denoted by \(\text{proj}_{\vec u}\vec v\) while the projection of the vector \(\vec v\) perpendicular to the direction of \(\vec u\) is denoted by \(\text{proj}_{\perp\vec u} \vec v\). These satisfy \[ \vec v=\text{proj}_{\vec u}\vec v+\text{proj}_{\perp\vec u}\vec v \qquad \text{(*)} \] The figures below show the projections in the cases when the angle between the vectors is acute or obtuse.

def_ProjAcutedef_ProjObtuse
Here   \(\vec p=\text{proj}_{\vec u}\vec v\)   and   \(\vec q=\text{proj}_{\perp\vec u}\vec v\).  

The figure shows the projections of the vector \(\vec a=\left\langle 5,5\right\rangle\) parallel and perpendicular to \(\vec b=\left\langle 9,3\right\rangle\). Here, \(\vec p=\text{proj}_{\vec b}\vec a=\left\langle 6,2\right\rangle\) and \(\vec q=\text{proj}_{\perp\vec b}\vec a=\left\langle -1,3\right\rangle\). \[ \vec a =\left\langle 5,5\right\rangle =\left\langle 6,2\right\rangle+\left\langle -1,3\right\rangle =\text{proj}_{\vec b}\vec a+\text{proj}_{\perp\vec b}\vec a \]

eg_Proj5593

\((6,2)\parallel\vec b\) because \((6,2)=\dfrac{2}{3}(9,3)\) (It's a multiple.) and \((-1,3)\perp\vec b\) because \((-1,3)\cdot(9,3)=0\).

We would like to have formulas for the parallel and perpendicular projections. First \(\text{proj}_{\vec u}\vec v\):

The (vector) projection of \(\vec v\) parallel to \(\vec u\) is \[ \text{proj}_{\vec u}\vec v=\dfrac{\vec v\cdot\vec u}{|\vec u|^2}\vec u \]

You can remember that in the notation \(\text{proj}_{\vec u}\vec v\), \(\vec u\) is a subscript. So \(\vec u\) goes in the bottom.

But, why is it true? If you look at the diagrams, you should see that if the length of \(\vec u\) is changed, the projection of \(\vec v\) does not change. So if we double the length of \(\vec u\), we get: \[ \text{proj}_{2\vec u}\vec v=\dfrac{\vec v\cdot(2\vec u)}{|2\vec u|^2}(2\vec u) =\dfrac{\vec v\cdot\vec u}{|\vec u|^2}\vec u \] The \(2\)'s cancel out. This would not happen if \(\vec v\) were in the bottom.

We want to find a formula for \(\vec p=\text{proj}_{\vec u}\vec v\). Recall that any vector is the product of its magnitude and direction: \[ \vec p=|\vec p|\,\hat p \] So we will separately find \(|\vec p|\) and \(\hat p\) and then combine them.

Let's first look at the acute case.
To find \(|\vec p|\), let \(\theta\) denote the angle between the two vectors. From the right triangle in the diagram, we have: \[ \cos\theta=\dfrac{|\vec p|}{|\vec v|} \qquad \text{or} \qquad |\vec p|=|\vec v|\cos\theta \]

def_ProjAcute

Using the formula \(\cos\theta=\dfrac{\vec v\cdot\vec u}{|\vec v|\,|\vec u|}\) this becomes \[ |\vec p|=\dfrac{\vec v\cdot\vec u}{|\vec u|} \] What about the direction of \(\vec p\)? Since the projection points in the same direction as \(\vec u\), we have \[\hat p=\hat u=\dfrac{\vec u}{|\vec u|}\] Combining these, we get \[ \text{proj}_{\vec u}\vec v=\vec p=|\vec p|\,\hat p =\dfrac{\vec v\cdot\vec u}{|\vec u|}\dfrac{\vec u}{|\vec u|} =\dfrac{\vec v\cdot\vec u}{|\vec u|^2}\,\vec u \]

Now for the obtuse case.
The computations are almost the same except for two minus signs. One is in the formula for the cosine: \[ \cos\theta=\dfrac{-|\vec p|}{|\vec v|} \] which gives the length as: \[ |\vec p|=-|\vec v|\cos\theta=-\,\dfrac{\vec v\cdot\vec u}{|\vec u|} \]

def_ProjObtuse

Take a look at the graph of \(\cos\theta\):

\(\cos\theta \gt 0\ \) if \(\ \theta\ \) is acute, i.e. \(\ \theta \lt 90^\circ\).

\(\cos\theta \lt 0\ \) if \(\ \theta\ \) is obtuse, i.e. \(\ \theta \gt 90^\circ\).

Since the lengths \(|\vec p|\) and \(|\vec v|\) are positive, the minus is needed in the formula \(\cos\theta=\dfrac{-|\vec p|}{|\vec v|}\) for the obtuse case.

def_ProjObtuseCos
\(\cos\theta\)

The other is in the formula for the direction vector: \[ \hat p=-\hat u=-\,\dfrac{\vec u}{|\vec u|} \]

In the obtuse case, \(\vec p\) is in the opposite direction from \(\vec u\). So a minus is needed in the formula \(\hat p=-\hat u\).

Again we combine the formulas: \[ \text{proj}_{\vec u}\vec v=\vec p=|\vec p|\,\hat p =\left(-\dfrac{\vec v\cdot\vec u}{|\vec u|}\right) \left(-\dfrac{\vec u}{|\vec u|}\right) =\dfrac{\vec v\cdot\vec u}{|\vec u|^2}\,\vec u \] The minus signs cancel and we get the same formula as in the acute case.

The formula for \(\text{proj}_{\perp\vec u}\vec v\) is much easier to derive. We just solve equation (*):

The (vector) projection of \(\vec v\) perpendicular to \(\vec u\) is \[ \text{proj}_{\perp\vec u}\vec v=\vec v-\text{proj}_{\vec u}\vec v \]

Resolve the vector \(\vec w=\left\langle -3,11\right\rangle\) into the sum of two vectors, one parallel to \(\vec v=\left\langle 1,3\right\rangle\) and the other perpendicular to \(\vec v\).

The parallel projection is: \[\begin{aligned} \text{proj}_{\vec v}\vec w &=\dfrac{\vec w\cdot\vec v}{|\vec v|^2}\,\vec v =\dfrac{\left\langle -3,11\right\rangle\cdot\left\langle 1,3\right\rangle} {|\left\langle 1,3\right\rangle|^2}\left\langle 1,3\right\rangle \\ &=\dfrac{30}{10}\left\langle 1,3\right\rangle =\left\langle 3,9\right\rangle \end{aligned}\] And the perpendicular projection is: \[\begin{aligned} \text{proj}_{\perp\vec v}\vec w &=\vec w-\text{proj}_{\vec v}\vec w =\left\langle -3,11\right\rangle-\left\langle 3,9\right\rangle \\ &=\left\langle -6,2\right\rangle \end{aligned}\] In summary: \[\begin{aligned} \left\langle -3,11\right\rangle &=\text{proj}_{\vec v}\vec w+\text{proj}_{\perp\vec v}\vec w \\ &=\left\langle 3,9\right\rangle+\left\langle -6,2\right\rangle \end{aligned}\]

We check: \[\begin{aligned} \text{proj}_{\vec v}\vec w+\text{proj}_{\perp\vec v}\vec w &=\left\langle 3,9\right\rangle+\left\langle -6,2\right\rangle \\ &=\left\langle -3,11\right\rangle=\vec w \end{aligned}\] We note that the first summand \(\left\langle 3,9\right\rangle\) is parallel to \(\vec v=\left\langle 1,3\right\rangle\), (It's a multiple.) and the second summand \(\left\langle -6,2\right\rangle\) is perpendicular to \(\vec v=\left\langle 1,3\right\rangle\) since their dot product is zero: \[ \left\langle -6,2\right\rangle\cdot\left\langle 1,3\right\rangle =-6+6=0 \]

It is always useful to check this last dot product!

Resolve the vector \(\vec a=\left\langle 7,-4\right\rangle\) into the sum of two vectors, one parallel to \(\vec b=\left\langle -1,2\right\rangle\) and the other perpendicular to \(\vec b\).

\(\text{proj}_{\vec b}\vec a=\left\langle 3,-6\right\rangle\)

\(\text{proj}_{\perp\vec b}\vec a=\left\langle 4,2\right\rangle\)

The parallel projection is: \[\begin{aligned} \text{proj}_{\vec b}\vec a &=\dfrac{\vec a\cdot\vec b}{|\vec b|^2}\,\vec b =\dfrac{\left\langle 7,-4\right\rangle\cdot\left\langle -1,2\right\rangle} {|\left\langle -1,2\right\rangle|^2}\left\langle -1,2\right\rangle \\ &=\dfrac{-15}{5}\left\langle -1,2\right\rangle =\left\langle 3,-6\right\rangle \end{aligned}\] And the perpendicular projection is: \[\begin{aligned} \text{proj}_{\perp\vec b}\vec a &=\vec a-\text{proj}_{\vec b}\vec a =\left\langle 7,-4\right\rangle-\left\langle 3,-6\right\rangle \\ &=\left\langle 4,2\right\rangle \end{aligned}\] In summary: \[\begin{aligned} \left\langle 7,-4\right\rangle &=\text{proj}_{\vec v}\vec w+\text{proj}_{\perp\vec v}\vec w \\ &=\left\langle 3,-6\right\rangle+\left\langle 4,2\right\rangle \end{aligned}\]

We check: \[ \text{proj}_{\vec b}\vec a+\text{proj}_{\perp\vec b}\vec a =\left\langle 3,-6\right\rangle+\left\langle 4,2\right\rangle =\left\langle 7,-4\right\rangle=\vec a \] We note that the first summand \(\left\langle 3,-6\right\rangle\) is parallel to \(\vec b=\left\langle -1,2\right\rangle\), (It's a multiple.) and the second summand \(\left\langle 4,2\right\rangle\) is perpendicular to \(\vec b=\left\langle -1,2\right\rangle\) since their dot product is zero: \[ \left\langle 4,2\right\rangle\cdot \left\langle -1,2\right\rangle =-4+4=0 \]

© MYMathApps

Supported in part by NSF Grant #1123255