If **u** is orthogonal to **v**, then
**u · v** = 0

We want **u** and k**v** such that k**v** + **u** = **w**,
with the condition that **u** is orthogonal to **v**.
Using trigonometry:

The length of kv=| w |cos θ The orientation of kvisv_{u}

Remember that unit vectors are used to represent
orientation in 3D space.
The orientation of **v** is **v _{u}**.
(In the picture, this happens to be horizontal, but that is just for convenience).
Since
cos θ
is

kv= |w| (w)_{u}· v_{u}v_{u}

This formula may look awful, but it is not. This part:

|w| (w)_{u}· v_{u}

is a scalar.
It adjusts **v** to to required length.
In the picture this is the length of the horizontal baby blue line.

The remaining part: **v _{u}**, just says,
"same orientation as

(Review: ) How do you compute a unit vector?