Solve Ax = b via QR factorization with Householder reflectors — handles exact square systems and overdetermined least-squares problems step by step.
QRx = b → Rx = Qᵀb → solve by back-substitution
Any matrix A can be factored as A = QR where Q is orthogonal (Qᵀ = Q⁻¹) and R is upper triangular. To solve Ax = b, substitute and back-substitute through the triangular system.
For overdetermined systems (more equations than unknowns), no exact solution exists. QR finds the least-squares solution x̂ that minimizes ‖Ax − b‖₂ — the best approximate fit.
One-on-one linear algebra tutoring — from least squares through singular value decomposition, PCA, and numerical methods.