Project DelphiTensors Workshop

The normal equations square the condition number

Because κ(XᵀX) = κ(X)², QR’s error scales with κ(X)·ε while the normal equations’ scales with κ(X)²·ε.

Same data, same objective, error squared. The cost is one line of code: writing X.T @ X at all.

On the real degree-10 airline Vandermonde:

  • κ(X) = 2.16e7
  • κ(XᵀX) = 4.65e14 — the square, to one digit
  • coefficient error by the normal equations: 1.95e-03
  • coefficient error by QR: 2.04e-14

Eleven orders of magnitude apart.