well you start with the scalar dot product
#vec A * vec B = abs vec A abs vec B cos phi#, where #phi# is the angle between the vectors
then you insist that #vec B # be the unit vector #hat B = (vec B)/(abs vec B)# so that
#abs hat B = 1#
and
#vec A * hat B = abs vec A (1) cos phi = abs vec A cos phi # which is the length of #vec A# in the #\hat B# direction
so that we can actually say that
# (vec A * (vec B)/(abs vec B) = vec A * hat B = abs vec A cos phi )\ hat B #
so with #vec A = <4,-1,6 >#
and #vec B = <1,3,-2 ># meaning #hat B = 1/sqrt(14) <1,3,-2 >#
# (vec A * hat B = 1/sqrt(14) ( <4,-1,6 > * <1,3,-2 > ) )hat B#
#= 1/sqrt(14) (4 - 3 - 12 ) hat B#
#= - (11)/sqrt(14) hat B#