Comparative numerical laboratory
Least Squares: Normal Equations vs QR Thinking — Chapter 7
Fit a line to the same data and compare residual and conditioning warnings.
\[
\min_{\alpha,\beta}\sum_i(\alpha+\beta x_i-y_i)^2.
\]
Methods compared
| Method | Convenience | Inconvenience / warning |
|---|---|---|
| Normal equations | Short derivation and small system. | Squares the condition number. |
| QR viewpoint | More stable for serious least squares. | More computational structure. |
| SVD viewpoint | Best rank and sensitivity diagnostic. | More expensive. |
Illustrative plot / animation
Numerical diagnostics
What the student must compare
- least-squares residual
- data scale
- rank/conditioning warning
- fit visualization