Undoing a map
A square matrix A has an inverse A−1, with A−1A=AA−1=I, exactly when its map loses no information: different inputs give different outputs. The determinant measures how A scales volumes (with a sign for flips), so A is invertible exactly when detA=0. For a 2×2 matrix, A−1=ad−bc1(d−c−ba). Useful rules: det(AB)=detAdetB and det(A−1)=1/detA.
κ(A)=∥A∥∥A−1∥=σminσmax,∥x∥∥δx∥≲κ(A)∥b∥∥δb∥(1) Invertible is not the same as safe. The condition number κ(A) says how much a small relative error in b (or in the entries of A) can be magnified in the solution x. A rule of thumb: you lose about log10κ of your roughly 16 digits of double precision. A small determinant alone proves nothing, because it depends on the scale: 0.001I has a tiny determinant but κ=1. Nearly collinear columns are what make κ huge.
An inverse and a near missFor
A=(4276):
detA=24−14=10, so
A−1=101(6−2−74). Now compare
B=(1111.0001): its columns are almost equal,
detB=0.0001 and
κ(B) is about
4×104, so a
10−6 relative error in the data can become an error of about
4% in the solution.
- Invertible: square with detA=0; no information is lost.
- Condition number: how much errors in the data are magnified; large means a fragile solve.
- Never form A−1 to solve: a factorisation solve is faster and more accurate.
Collinear assets break covariance matricesTwo ETFs that track nearly the same index give a covariance matrix with nearly equal rows. Its κ is huge, so a minimum-variance optimiser built on its inverse swings wildly with tiny changes in the data. Check κ (or drop or combine the near-duplicates) before you trust the weights. Lab · what's graded
- The inverse of a 2 by 2 matrix20 pts
- A 3 by 3 determinant10 pts
- Find the singular matrix15 pts
- Digits you can trust15 pts
- Good numerical practice15 pts
- Determinant rules10 pts
- Why not invert15 pts