Given two vectors vecV→V and vecW−→W, the projection of vecV→V onto vecW−→W is given by:
(vecV * vecW)vecW/||vecW||(→V⋅−→W)−→W∣∣∣∣∣∣−→W∣∣∣∣∣∣
The inner product gives the component of VecVVecV in the direction of VecWVecW, and the fraction performs the same function as multiplying this magnitude by a unit vector in the direction of vecW−→W.
So plugging in given values:
vecV = (3,4,-1)→V=(3,4,−1)
vecW = (-1,3,-6)−→W=(−1,3,−6)
||vecW|| = sqrt(1 + 9 + 36) = sqrt(46)∣∣∣∣∣∣−→W∣∣∣∣∣∣=√1+9+36=√46
vecV*vecW = (3*-1) + (4*3) + (-1*-6)→V⋅−→W=(3⋅−1)+(4⋅3)+(−1⋅−6)
= -3 + 12 + 6 = 15=−3+12+6=15
So plugging everything in, the projection is:
(15*(-1,3,-6))/sqrt(46) = (-15/sqrt46 , 45/sqrt46 , -90/sqrt46)15⋅(−1,3,−6)√46=(−15√46,45√46,−90√46)