Projection of Two Vectors
The dot product can be used to perform a projection.
The vector projection of a vector onto a non-zero vector results in a straight line which is parallel to , which includes a vector orthogonal to .
I've done my best to show this visualization here:
Note to self: Learn how to use some graphing software, or something. 😄
We can think of the projection of onto as the shadow that casts on when rays of light are perpendicular to .
Going back to the diagram, we want to know:
Where does intersect with so that can be a perpendicular to ?
- As in, what is the displacement of from ?
We also want to know where meets with .
We'll need to find 2 things:
- The vector
- The vector
We can begin to find by using this formula:
Then, we can say that is the projection of onto .
Note: If is orthogonal to , then .
Here is the step-by-step process in finding projection of two vectors.
Step 1 - Find the Length of
Back to that diagram above the page, we can find the length of using trigonometry. Assume that we know :
Step 2 - Normalize , and
Knowing that for unit vectors , and , the dot products of these unit vectors is:
Then, we know that finding the unit vector of to be , and the unit vector of to be , we can write an expression like this:
Since evaluate to due to them being unit vectors, we can simplify to have the formula be written without it.
Step 3 - Rewrite
We can now rewrite the equation for from to:
We read this as two components:
- is a scalar, and will adjust to be the required length. It is the .
- will indicate the result to be in the same orientation as .
Step 4 - Find
Now, we can find the orthogonal vector to . This will be the vector . We can rewrite our expression to be
Since w know , and now , the process then becomes an exercise of vector subtraction.
I ripped this one off from here.
Suppose we have two vectors:
We now want to find the projection of onto . In order to do that, we have to:
- Find .
First let's normalize the vectors , and to unit vectors.
And, for :
Now, we find by
Now, it becomes a scalar multiplication:
So, we know that the displacement .
Next, let's find .
So, , meaning that this is the displacement starting from . If we plot this, we will find that is orthogonal to .
Now, excuse the crappy picture
It is important to know that projected onto is NOT the same as projected onto .
The vector resulting from a projection is oriented in the same direction as the vector projected onto.
Since the cosine function is never more than , the length of the projection will NEVER be longer than the projected vector.