Least squares has two complementary geometric interpretations — fitting a line in data space and projecting a vector onto a column space.
Loading…
Data-space picture beside vector-space picture
Draw the points, the best-fit line and the vertical errors next to in with its projection and the error .
The orthogonality condition
Compute and , take the dot products of with and with each column and , and get zero.
Dual role of the coefficients and
State that the same pair fixes the best-fit line in the first picture and the combination of columns forming in the second.