The dot product
Another way to find the dot product is:
Projections of a vector u onto a vector v are found in two ways I can see so far:
Which is 100% equal to:
WHERE is a unit vector pointing in the same direction as v.
SO we can also say:
Where v has become a unit vector, totally.
Keep in mind the difference between equations 4 and 5 is in 4, v isn’t necessarily normalized when its used in the dot product operation, so you need to divided by |v| to “cancel its effect” on the final result. notice in all of these, we divide by v enough times so that the actual magnitude of v PLAYS NO ROLE in projvu, only the direction of v matters.
Finally you’ll see the following definition usually in physics books:
Where t is the angle between vectors u and v.
This 6th formula follows if you study formula 3 and move things around a bit..
taking formula 3:
Notice that from formula 1, we have:
So, re-arranging formula 3 a bit now..
All I did there was add a |u| to the denominator, and separate the |v|2 into |v||v|
Next, sub in
Then we get:
Now notice that , (v as a unit vector), so
where is a unit vector pointing in the direction of the vector v you are trying to project u onto.