Least Squares and Normal Equations
Least squares projects the data onto attainable outputs. The normal equations express orthogonality of the residual.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 1
- Reading time
- 1 min
For a matrix \(A\) and data \(b\), minimizing \(\|Ax-b\|^2\) is equivalent to projecting \(b\) onto the column space of \(A\) by orthogonal projection.
\[A^*Ax=A^*b.\]
Fitting a constant to data
For \(A=(1,1,1)^{\mathsf T}\) and \(b=(1,2,6)^{\mathsf T}\), the equation becomes \(3x=9\). The fitted value is \(3\), and the residual entries sum to zero. When columns are dependent the fitted vector \(Ax\) is still unique, but the coefficient vector can move by any element of \(\ker A\). Solving using QR avoids squaring the spectral condition number for full column rank. A pseudoinverse selects minimum-norm coefficients.[1]