Interactive reproduction of Figure 4.9 from Mathematics for Machine Learning (Deisenroth, Faisal & Ong). The Singular Value Decomposition A = UΣVT decomposes any matrix into three geometric steps: a rotation in the input space (VT), a scaling into the output space (Σ), and a rotation in the output space (U). Here a 3×2 matrix maps ℝ² → ℝ³, shown as four panels following the anti-clockwise structure of Figure 4.8.
Each panel shows the same color-coded grid of points, transformed step by step: original 2D data → VT rotation (2D) → ΣVT scaling into 3D → UΣVT = A (3D).
Color-coded grid of points x ∈ [-1, 1]²
Right singular vectors align with the coordinate axes
Singular values stretch axes; third dimension appears (σ₃ = 0)
Left singular vectors rotate the 3D data to the final position
Enter your own 3×2 matrix entries. The SVD is computed in-browser and all four panels update as you type. Try different values to see how the singular values and rotations change.
Reference: Deisenroth, M.P., Faisal, A.A., Ong, C.S. Mathematics for Machine Learning, Figure 4.9 (Example 4.12). Cambridge University Press, 2020. Python companion (MML-Companion)