1. The central idea
A grayscale image is a matrix. SVD writes it as a sum of rank-one visual layers:
Compression keeps only the first k layers:
2. Rank-k image compression simulator
This uses a precomputed low-rank-style synthetic construction in the browser. It demonstrates the same rank-layer idea as SVD compression.
Storage ratio:
Approximate energy captured:
Visual lesson:
3. Singular values: fast decay versus slow decay
If singular values decay quickly, a small rank can capture most of the image. If they decay slowly, information is spread across many layers.
Rank needed for 90% energy:
Rank needed for 99% energy:
4. Compression versus denoising
Small k removes noise but may oversmooth. Large k restores detail but may restore noise too.
5. Storage calculator
Full storage: numbers
SVD storage: numbers
Storage fraction:
Compression worthwhile?
6. Final learning questions
SVDrankenergycompressiondenoising
- Why does the first singular layer often look like a broad shadow of the image?
- Why can a smaller k denoise an image but also remove fine detail?
- Why is a random image hard to compress with low-rank SVD?
- How does this chapter prepare for PCA?