Generalized decomposition — compression, PCA, and LoRA
SVD is how modern systems compress information. Image compression, recommendation systems, and — critically for LLMs — LoRA fine-tuning all use SVD or its logic. It generalizes eigendecomposition to non-square matrices, which covers most ML weight matrices.
SVD says: any transformation, no matter how complex, breaks into three clean steps — rotate, stretch, rotate again. The stretch in the middle tells you which directions carry real signal and which are just noise.
A 100×100 image looks like it needs 100 directions. SVD disagrees — only 5 actually matter:
10,000 numbers down to 1,025. Ten times smaller, barely any loss — because you kept the loud directions and dropped the whispers.
Like a song with 100 instruments where only 5 carry the melody. Mute the rest. The song still sounds the same.
Any matrix A of shape (m×n) factors as:
When you compute y = Av, three things happen: Vᵀ rotates input, Σ stretches along each axis, U rotates into output space.
Keep only the top-k singular values to get the best rank-k approximation:
You've compressed the original m×n matrix into m·k + k + k·n numbers. The Eckart-Young theorem proves this is the best possible rank-k approximation — no other rank-k matrix is closer in Frobenius norm.