Respuesta :

The component of v that is parallel to b is called the vector projection of v onto b (vb)

To find vb, we need to first find the unit vector of b (b1).  This is a vector parallel to b, but with length (or magnitude) of unity (1).  It is found by dividing b by the magnitude of b (||b||)
b1=b/||b||=<1,2,-1>/sqrt(1^2+2^2+(-1)^2)
=<1/sqrt(6),2/sqrt(6),-1/sqrt(6)>.............unit vector of b

Then we need to find the scalar projection of v onto b (v1), which is given by
v1=v.b1   (dot product)
=<1,0,-1>. <1/sqrt(6),2/sqrt(6),-1/sqrt(6)>
=1/sqrt(6)+1/sqrt(6)
=2/sqrt(6)

Finally, to find the vector projection of v onto b (i.e. the component of v that is along b), we multiply v1 by the unit vector b1, or
vb=v1(b1)
=2/sqrt(6)<1/sqrt(6),2/sqrt(6),-1/sqrt(6)>
=<1/3,2/3,-1/3>

The component of v perpendicular to b (vp) is simply the difference between v and vb, i.e.
vp=v-vb
=<1,0,-1>-<1/3,2/3,-1/3>
=<2/3,-2/3,-2/3>

Check: to make sure we have things correctly, we find the dot product between the two perpendicular vectors vb and vp.
vb.vp=<1/3,2/3,-1/3> . <2/3,-2/3,-2/3>
=(2/9 -4/9 +2/9)
=0   which shows that the two vectors are perpendicular.