Linear algebra · Orthogonality and least squares

Orthogonal projection

The closest point to a vector on a line or subspace is found by projection, and the leftover error has a special direction.