Singular Value Decomposition, visualized
The Singular Value Decomposition writes any matrix as a rotation, a set of stretches, and another rotation: A = UΣVᵀ. The cleanest way to see it is what a matrix does to the unit circle — it always turns it into an ellipse. The lengths of that ellipse's two semi-axes are exactly the singular values.
SVD is the most useful decomposition in data science: it powers PCA, image and data compression, recommender systems, and the pseudoinverse that solves least squares. Drag the matrix and watch the singular values grow, shrink, and — when one hits zero — collapse the ellipse to a line.
Drag the matrix — the circle becomes an ellipse
Singular values σ₁, σ₂
2.29, 0.87
the longest and shortest stretch — the ellipse's semi-axes
Area scale σ₁ · σ₂
2
equals |determinant| — how much area grows
Free · runs entirely in your browser · nothing to install
How to use it
- Drag the four matrix entries and watch the faint unit circle map to a solid ellipse.
- Read the two singular values — they are the lengths of the ellipse's longest and shortest semi-axes.
- Shrink the matrix until the smaller singular value hits zero and the ellipse flattens to a line (a rank-1 matrix).
What you'll take away
- Why every matrix maps the unit circle to an ellipse.
- What the singular values mean geometrically — the stretch factors.
- How a zero singular value signals a rank-deficient (singular) matrix.
Want to actually build this?
This demo is one moment inside a full Math to Machine lesson — predict, build, and explain the concept, with an AI tutor that gives hints, not answers. The first five lessons are free.
FAQ
- What is singular value decomposition?
- SVD factors any matrix into three simple steps — a rotation, a scaling along perpendicular axes, and another rotation. The scaling amounts are the singular values, and they reveal the matrix's rank and most important directions.
- Why is SVD important in machine learning?
- Keeping only the largest singular values gives the best low-rank approximation of a matrix, which underlies PCA, data and image compression, recommender systems, and numerically stable least-squares solutions.