Posts
Least squares, three ways
The normal equations, QR, and the SVD solve the same problem with very different accuracy. The difference is the square of a condition number.
Polynomial fits make the difference visible: with twelve columns, the normal equations lose every digit while QR and the SVD keep eight or nine. One identity about condition numbers explains it, and also says when the fast method is good enough.