THE WHOLE UNIT · ONE REFERENCE

Orthogonality and Least Squares
Cheat sheet.

The key rules, formulas and reminders from all 3 topics, gathered into reference cards.

Choose “Save as PDF” in the print dialog.

Key formulas, conditions and traps · Read down each column.

Dot Products and Orthogonal Projection

Core rule

p=aTbaTaa,r=b−p,aTr=0,∥b∥2=∥p∥2+∥r∥2.p=\frac{a^Tb}{a^Ta}a,\quad r=b-p,\quad a^Tr=0,\quad \|b\|^2=\|p\|^2+\|r\|^2.

Watch for

The direction vector must be nonzero. Projection onto a line is a vector, not just its scalar coefficient.

Gram–Schmidt and QR Factorization

Core rule

Subtract earlier projections, then normalize. For full column rank, A=QRA=QR with QTQ=IQ^TQ=I and upper triangular invertible RR.

Watch for

Zero residuals indicate dependence. Rectangular QQ does not satisfy QQT=IQQ^T=I on the entire output space.

Least Squares and Data Fitting

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.

01

Dot Products and Orthogonal Projection

2 reference blocks

Read lesson ↗

Core rule

p=aTbaTaa,r=b−p,aTr=0,∥b∥2=∥p∥2+∥r∥2.p=\frac{a^Tb}{a^Ta}a,\quad r=b-p,\quad a^Tr=0,\quad \|b\|^2=\|p\|^2+\|r\|^2.

Watch for

The direction vector must be nonzero. Projection onto a line is a vector, not just its scalar coefficient.

02

Gram–Schmidt and QR Factorization

2 reference blocks

Read lesson ↗

Core rule

Subtract earlier projections, then normalize. For full column rank, A=QRA=QR with QTQ=IQ^TQ=I and upper triangular invertible RR.

Watch for

Zero residuals indicate dependence. Rectangular QQ does not satisfy QQT=IQQ^T=I on the entire output space.

03

Least Squares and Data Fitting

2 reference blocks

Read lesson ↗

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.