There's a section in Gibson's "Elementary Geometry of Differentiable Curves:An Undergraduate Introduction" book on page 6:

"Example 1.4: Recall that the component of a vector in the direction of a unit vector is the vector . (Example 1.1)

It is useful to express this in complex notation. Note that for any vectors we have : in particular when

b is a unit vector (i.e. ) we have ."

What I don't understand is why and how is: ?

The author said(given above) and I quote "for any vectors" this is true.

Can anyone kindly shed light on this and explain a bit why this is so?