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)
> 
> 
> ![](https://i.stack.imgur.com/1MAjC.png)
> 
> 
> 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$).
> 
> 
>