Benjamin T. answered 09/01/22
Physics Professor, and Former Math Department Head
The vector projection is a vector with magnitude of the scalar projection and the direction of the vector you project onto. In this case we need to get the component of b in the direction of a and then multiply it by a unit vector in the a direction. The length of the component of vector b in the direction of the of a from geometry is
|b| cosθ (draw a generic diagram),
and using the dot product formula gives,
|b| cosθ = a ⋅b/|a|. (scalar projection)
This agrees with your answer. Great work! To transform it into the vector projection we need to multiply by a unit vector in the a direction.
a ⋅b/|a| (a/|a|) = ( a ⋅b)/|a|2 a.
This is the equation for the vector projection
proja(b) = ( a ⋅b)/|a|2 a,
and,
( a ⋅b)/|a|2 a = -20/33 <2,2,-5> = <-40/33,-40/33,100/33>.
Of course as always double check the algebra and arithmetic.