Interactive visualization of the Singular Value Decomposition (SVD)

The Singular Value Decomposition (SVD) factors any real \(2\times 2\) matrix \(A\) as \[ A = U \Sigma V^\top, \] where \(U\) and \(V\) are orthogonal and \(\Sigma\) is diagonal with singular values \(\sigma_1 \ge \sigma_2 \ge 0\).

Geometrically, SVD describes the action of \(A\) in three clear steps:

  1. Rotate/reflect the input space by \(V^\top\),
  2. Stretch along coordinate axes by \(\Sigma=\mathrm{diag}(\sigma_1,\sigma_2)\),
  3. Rotate/reflect the result by \(U\).

Equivalently, \(A V = U \Sigma\), so the columns of \(V\) form an orthonormal basis of the input space, and the columns of \(U\) form an orthonormal basis of the output space.

Try it: Adjust the sliders to change the entries of \(A\). You can also move the thick magenta and yellow dots on the unit circle with the mouse to explore how arbitrary directions are transformed by \(A\).

Unit circle with \(v_1,v_2\) and test directions
After \(U\): final image \(U\Sigma V^\top\)
After \(V^\top\): rotated test directions
After \(\Sigma\): principal axes \(\textcolor{darkblue}{\sigma_1}\), \(\textcolor{darkviolet}{\sigma_2}\)