SVD and Vector Mapping
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).
① Original data in ℝ²
Color-coded grid of points x ∈ [-1, 1]²
② VT rotation (still ℝ²)
Right singular vectors align with the coordinate axes
③ ΣVT scaling (ℝ² → ℝ³)
Singular values stretch axes; third dimension appears (σ₃ = 0)
④ UΣVT = A (final mapping in ℝ³)
Left singular vectors rotate the 3D data to the final position
Interactive: Custom 3×2 Matrix
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.
Original (ℝ²)
VT rotation (ℝ²)
ΣVT (ℝ³)
UΣVT = A (ℝ³)
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)