Math
Singular value decomposition
Any matrix as a rotation, a stretch and another rotation: the unit sphere turns, stretches into the ellipsoid of the singular values and turns into place, one factor at a time, and the one tripod whose images stay orthogonal is measured, not drawn.

What happens
Every matrix, whatever it does, is a rotation, then a stretch along three perpendicular axes, then another rotation - that is the singular value decomposition, and the unit sphere shows it: the matrix turns it into an ellipsoid whose half-axes are the singular values. The largest is how much the matrix can magnify, the smallest how much it can crush, and their ratio is the condition number that decides whether a linear system can be solved with confidence. A shear, which looks like nothing of the sort, stretches diagonally too. Type a matrix, watch the sphere deform, and read the three σ off the axes.
Equations used in the module
Equations A = U Σ V^T, U, V rotations, Σ = diag(σ₁ ≥ σ₂ ≥ σ₃ ≥ 0) A v_i = σ_i u_i; σ₁ = max |Av| on the unit sphere, σ₃ = min σ₁σ₂σ₃ = |det A|; condition number κ = σ₁/σ₃ polar: A = (U V^T)(V Σ V^T) - a rotation times a symmetric stretch


