Linear algebra · Orthogonality and least squares
Projection gives the closest point to a subspace, and the proof uses the Pythagorean theorem.