# Dot product of vectors and projections

Can someone explain to me what this means? 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?

Thomas Calculus Early Transcendentals 12th txtbk.pdf (page 713 of 1211) Figure 12.25 The length of $\text{proj}_v\mathbf u$is (a) $|\mathbf u|\cos\theta$ if $\cos\theta\ge0$ and (b) $-|\mathbf u|\cos\theta$ if $\cos\theta<0$

The number $|\mathbf u|\cos\theta$ is called the scalar component of $\mathbf u$ in the direction of $\mathbf v$ (or of $\mathbf u$ onto $\mathbf v$). To summarize,

The vector projection of $\mathbf u$ onto $\mathbf v$ is the vector $$\text{proj}_v\mathbf u=\left(\frac{\mathbf u\cdot\mathbf v}{|\mathbf v|^2}\right)\mathbf v\tag1$$

The scalar component of $\mathbf u$ in the direction of $\mathbf v$ is the scalar $$|\mathbf u|\cos\theta=\frac{\mathbf u\cdot\mathbf v}{|\mathbf v|}=\mathbf u\cdot\frac{\mathbf v}{|\mathbf v|}\tag2$$

Note that both the vector projection of $\mathbf u$ onto $\mathbf v$ and the scalar component of $\mathbf u$ onto $\mathbf v$ depend only on the direction of the vector $\mathbf v$ and not its length (because we dot $\mathbf v$ with $\mathbf v/|\mathbf v|$, which is the direction of $\mathbf v$).

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