Least Squares and Data Fitting — Cheat sheet

Choose “Save as PDF” in the print dialog.
On this page

Core rule

min⁡x∥Ax−b∥2⟹AT(b−Ax^)=0.\min_x\|Ax-b\|^2\quad\Longrightarrow\quad A^T(b-A\hat x)=0.

Watch for

Full column rank gives unique coefficients. QR or SVD is generally safer numerically than forming normal equations.