# Dot product of vectors and projections

Can someone explain to me what this means (figure at the end of the post; original link to image: http://imgur.com/7vvDs). I understand the part that says the scalar projection of vector $u$ onto vector $v$ is $|u|\cos(\theta)$.

But I don't understand what the vector projection means. Why is the dot product of $v$ and $u$ divided by the magnitude of $v$ squared? Why does that give us the vector projection?

-

It has two parts:

1. The direction where you're projecting onto. That's the unit vector direction of $v$, which is computed by dividing $v$ by the length of $v$. That is $\dfrac{v}{|v|}$.

2. The component of $u$ in the direction of $v$. That is, the "shadow" or image of $u$ when you project it onto $v$. This is computed by $\dfrac{u \cdot v}{|v|}$. Why? Let's revisit the definition of the dot product: $u\cdot v = |u||v|\cos(\theta)$. Hence $|u| \cos(\theta) = \dfrac{u \cdot v}{|v|}$ and that gives you (as in the triangle figure in your book), the length of $u$'s projection on the direction of $v$.

Putting it together, the projection of $u$ onto $v$ is a vector of length $\dfrac{u \cdot v}{|v|}$ in the direction of $\dfrac{v}{|v|}$, i.e. $$\dfrac{u \cdot v}{|v|}\dfrac{v}{|v|} = \dfrac{u \cdot v}{|v|^2}v$$

-

The vector projection of $\mathbb{u}$ onto $\mathbb{v}$ is the vector which has magnitude given by the scalar projection $\text{comp}_{\mathbb{u}}(\mathbb{v})$ and points in in the direction of $\mathbb{v}$, which is given by the unit vector $\frac{\mathbb{v}}{|\mathbb{v}|}$ associated to $\mathbb{v}$. Hence we have

$$\text{proj}_{\mathbf{v}}(\mathbf{u}) = \text{comp}_{\mathbb{v}}(\mathbb{u})\frac{\mathbb{v}}{|\mathbb{v}|}= \left(\frac{\mathbb{u}\cdot\mathbb{v}}{|\mathbb{v}|^2}\right)\mathbb{v}.$$ I hope that this helps!

-
@ Jennifer Dylan: Thanks for the edit, how did you get proj and comp in plain text in math mode? –  John Martin Aug 27 '12 at 3:35
1. There's no space between @ and my name. Otherwise, I don't get notified :) 2. Inside math mode, you can surround the plain text with either \mathrm{..} which ignores spaces and changes the font into Roman font, OR bettter use \text{..} which respects the text. For operators and such, you should use \operatorname{..}, which I should I've done, but \text{} is shorter to type! –  user2468 Aug 27 '12 at 3:40