◄ WORLD V · SONNY 5DART 305 · a helldive at the net

THE NORMAL EQUATIONS the residual is smallest when it is orthogonal to the fit

How do you reconstruct the best line through scattered points? Least squares: minimize the sum of squared residuals. The minimum has a clean geometric characterization — the residual vector is orthogonal to the space of fits — which gives the normal equations AᵀA x = Aᵀb. Solve them and you have the coefficients of the best fit. This is the workhorse of regression, curve fitting, and calibration: reconstructing the underlying trend from noisy data. The name is literal — “normal” means perpendicular — and the structure is that the best reconstruction is the projection of the data onto what the model can represent.

THE TECHNIQUE AᵀA x = Aᵀb; the residual ⊥ the fit

Three points, fit a line through the origin y=ax. The demo solves the normal equations for the best slope: live demo


HISTORY & CREDIT Gauss 1795 · Legendre 1805

“The best fit is a matter of taste.” — least squares makes it a projection: the residual perpendicular to the model, one unique answer from the normal equations. Geometry, not taste. cited

1805 · Adrien-Marie Legendre — first published least squares.
1809 · Carl Friedrich Gauss — published it too, claiming use since 1795 (a priority dispute), and tied it to the normal distribution.
now · regression, calibration, and the pseudoinverse (dart 304) made concrete.

Minimize the squared residual and it comes out perpendicular to the fit — the normal equations. The best reconstruction is the projection; the geometry names it. Gauss-Legendre

RECOMMEND FOR I-13 best-fit slope from the normal equations, computed

On the canonical compiler, points (1,2),(2,4),(3,5) fit y=ax with slope a = Σxy / Σx² = 25/14 ≈ 1.786:

$ i13 run rec_normal.i13 # a = Sxy / Sxx sxy = 25 sxx = 14 a = 1.7857142857142858 -- the least-squares slope: the best reconstruction of the trend
Recommend: the normal equations are reconstruction of a trend by projection, and i13 solves the one-parameter case exactly: the best slope through (1,2),(2,4),(3,5) is Σxy/Σx² = 25/14. The load-bearing structure is orthogonality — the residual is perpendicular to the fit, which is what makes this slope the best rather than one of many. It is the pseudoinverse (dart 304) written as arithmetic, and the noisy-world counterpart to exact interpolation (dart 294): recover the underlying line even though no line passes through all three points. Reconstruction as projection onto what the model can hold.