The idea
Key formulas
Vector projection
Loading lessons…
Just a moment, getting everything ready. The first load can take up to a minute.
Linear algebra
A projection keeps the component along a chosen direction and leaves a perpendicular residual.
The projection of onto a nonzero vector is the closest point to on the line in direction :
The residual is orthogonal to the direction: . This perpendicularity is the defining condition of a least-squares fit.