Linear Algebra
Singular Value Decomposition
Every matrix is three clean steps: rotate, stretch along the axes, rotate again. Watch the unit circle become an ellipse one step at a time, then use the same idea to compress a picture.
v₁ → σ₁u₁v₂ → σ₂u₂unit circle and its imagethe letter F, carried along
singular values keptsingular values droppedk, the cut
Singular values σ1, σ2—
—
View
Matrix A
1.200.800.301.10
circleVᵀ · Σ · U
Picture (64 × 64)
164 (exact)
Presets
condition σ1/σ2—
det A = ±σ1σ2—
rank—
numbers stored—
error ‖A − Ak‖ / ‖A‖—
next σk+1 / σ1—
rank of the picture—
What to observe
- Animate the stages: Vᵀ turns v₁, v₂ onto the axes, Σ stretches along the axes by σ₁ and σ₂, U turns them onto u₁, u₂. The result is exactly the ellipse A makes of the circle.
- On Flip, det A < 0 and the F comes out mirrored. Two rotations and a stretch cannot do that, so one of U, V must be a reflection: here U flips the plane over before it turns.
- On Rank 1, σ₂ = 0: the Σ step squashes the circle and the F onto a segment. A whole direction is lost, σ₁/σ₂ is infinite and A cannot be inverted.
- Compress the house: keeping the first 8 terms σᵢuᵢvᵢᵀ stores a quarter of the numbers and the picture is already clear, because the singular values fall off fast.
Shortcuts:space animate · f fullscreen