One of the most useful applications of the dot product is the idea of a projection. A projection is an operation that allows us to determine, given two vectors, and , how much the vector is in the direction of .
Suppose that we have two vectors, and , that exist in some arbitrary direction in .
If we wanted to determine how much points in the direction of , we first need to extend to match the length of . Once we have done this, we can draw a line directly perpendicular to connecting it to , creating a right triangle.
This gives us a picture of what a projection looks like from a geometric point of view. From here, we can derive a formula to calculate the projection. In order to extend to reach , we can utilize the dot product, and then divide by the length of the vector to keep it to a unit size. From here, we can apply the scalar to vector , and end up with a vector that is the length of , in the direction of .
The actual formula for the projection is the following:
Example: Determine the value of where and
We can easily solve this problem just by substituting in the appropriate values for the projection equation.
Often, you may also want to find a vector that is perpendicular to the vector . To do this, we can use a projection, as calculated above, to determine the projection of which is perpendicular to .
The reason we want to be able to do this mostly stems from Physics applications. In Physics, we often want to componentize forces which can be done with projections. From here, we may want to find a force that acts perpendicular to vector, which we will show how to calculate now.
If we want to find the projection of perpendicular to , we can use the formula . To get an intuition of why this works, consider what exactly we get when we calculate the projection of onto . We get a vector that is the length of , in the same direction as . If we subtract the vector from the projection, we would end up with a vector perpendicular to the projection.
One further application of projections is to be able to find the minimum distance from a line to a given point. The shortest line between any line and a point is a line that is perpendicular to the line. Due to this, we can apply the perp operation to be able to find such a value.
Example: Find the distance from Q(4,3) to the line
First, we are going to draw a line between Q and a point on , which we will call P. The easiest point to use is the y-intercept, which is . This would give us .
From here, we can find the projection that is perpendicular to PQ.
What we have learned from this is that the vector is the vector with the shortest distance from the line to the point Q. We can find that distance by taking the magnitue of the vector, which is equal to