Intuition
Dropping a perpendicular from a point to a line finds the point of the line that is closest. The same construction works for any subspace: split a vector into the part inside the subspace and the part at right angles to it, and the first part is the best approximation the subspace can offer.
At noon the shadow of a ball falls straight down onto the floor. The shadow is where the ball would be if it were forced to lie on the floor with as little movement as possible.
The projection of onto the line through is . The error , dashed, is perpendicular to the line, and is the point of the line closest to .
Projection onto a subspace
Let have an orthogonal basis . The orthogonal projection of onto is the vector below. Then is orthogonal to , since its dot product with each is . So splits into a part in and a part in , and the split is unique.
Working with projections
- Onto a line through : .
- The formula needs an orthogonal basis of ; for any other basis the sum is not the projection.
The projection is the closest point
Let and take any in . Going from to through splits into , orthogonal to , and , inside . Pythagoras adds their squared lengths, so is at least as long as , and strictly longer unless .
Proof steps
Go from to through .
The first part is orthogonal to by construction, and the second lies in .
Pythagoras, because the two parts are orthogonal.
The extra term is never negative, and it is zero only when .
Applications
Practice
Projecting Onto a Line
The projection of onto the line through is a multiple of , chosen so that what is left over is orthogonal to .
Try it
What is the projection of onto the line through ?
Try it
What is the first component of the projection of onto the line through ?
Onto a Subspace
With an orthogonal basis of , project onto each basis vector separately and add. The parts do not interfere, because the basis vectors are orthogonal.
Try it
The plane has the orthogonal basis , . What is the projection of onto it?
Try it
What is the distance from to the plane ? Give a decimal.
Try it
Projecting onto twice gives the same result as projecting once.
Try it
The formula gives the projection onto for any basis of .
Try it
The columns of are an orthonormal basis of . Which matrix projects onto ?
Try it
What is the distance from to the line through ? Give a decimal.
What You Learned
- for an orthogonal basis of .
Final checkpoint
Try it
What is the projection of onto the line through ?
Try it
is the orthogonal projection of onto , and is any vector of . What is ?
Try it
The matrix of an orthogonal projection is symmetric.
Completion
Lesson complete
Great work! You now know how to:
- project onto a line and onto a subspace with an orthogonal basis;
- split a vector into parts in W and orthogonal to W;
- find the closest point of a subspace and the distance to it;
- use the projection matrix .