SVD Forms Comparison
Run the SVD Forms Comparison Fullscreen
Edit the MicroSim in the p5.js Editor
About This MicroSim
This infographic compares the three main forms of the Singular Value Decomposition:
- Full SVD: Complete decomposition with all singular vectors
- Compact SVD: Only keeps non-zero singular values
- Truncated SVD: Keeps only the top k singular values
SVD Forms Summary
| Form | Matrices | Exact? | Use Case |
|---|---|---|---|
| Full | U(m×m), Σ(m×n), Vᵀ(n×n) | Yes | Complete subspace analysis |
| Compact | U(m×r), Σ(r×r), Vᵀ(r×n) | Yes | Efficient exact storage |
| Truncated | U(m×k), Σ(k×k), Vᵀ(k×n) | No | Low-rank approximation |
Visual Legend
- Blue blocks: Kept components (contain information)
- Gray blocks: Discarded components (zeros or truncated)
- Light gray: Structural zeros
How to Use
- Adjust m and n to change matrix dimensions
- Set rank r to see how many singular values are non-zero
- Set k to control truncation level
- Compare storage requirements between forms
Learning Objectives
After using this MicroSim, students will be able to:
- Distinguish between Full, Compact, and Truncated SVD
- Calculate storage requirements for each form
- Choose the appropriate SVD form for a given application
- Understand the tradeoff between accuracy and storage
References
- Chapter 7: Matrix Decompositions - SVD section
- NumPy documentation:
np.linalg.svd(full_matrices=False) - scikit-learn:
TruncatedSVD