Advanced Mathematics

Singular Value Decomposition

Every matrix, of any shape, is a rotation, then a stretch along perpendicular axes, then another rotation.

Needs a step first: 13

The singular value decomposition writes any m×nm\times n matrix as A=UΣVTA=U\Sigma V^{\mathsf T}, with UU and VV orthogonal and the singular values σ1≥σ2≥⋯≥0\sigma_1\ge\sigma_2\ge\dots\ge0 down the diagonal of Σ\Sigma; they are the square roots of the eigenvalues of ATAA^{\mathsf T}A. Keeping only the largest few gives the best low-rank approximation of AA, which is how data, images and models are compressed. It works where eigenvectors fail: for matrices that are not square or not symmetric.

Where it shows up: PCA is the SVD of a centred data matrix, and LoRA fine-tunes a large language model by learning a low-rank update to its weights.

How to hold it: Give it to the machine, then check

Let a computer compute the SVD; know that it turns the unit circle into an ellipse with semi-axes σ1,σ2\sigma_1, \sigma_2, and check that UU and VV are orthogonal, that UΣVTU\Sigma V^{\mathsf T} rebuilds AA, and that dropping the small singular values changes little.

What knowing it looks like

  • Find the singular values of a 2×22\times2 matrix from the eigenvalues of ATAA^{\mathsf T}A.
  • Build the best rank-one approximation σ1u1v1T\sigma_1u_1v_1^{\mathsf T} and say how large its error is.
  • Describe what a matrix does to the unit circle: it becomes an ellipse with semi-axes σ1\sigma_1 and σ2\sigma_2.

Test yourself

Let A=(3045)A=\begin{pmatrix}3&0\\4&5\end{pmatrix}. Find its singular values and its best rank-one approximation.
Show the worked answer
ATA=(25202025)A^{\mathsf T}A=\begin{pmatrix}25&20\\20&25\end{pmatrix} has eigenvalues 4545, with unit eigenvector v1=(1,1)/2v_1=(1,1)/\sqrt2, and 55, with v2=(1,−1)/2v_2=(1,-1)/\sqrt2. So σ1=35\sigma_1=3\sqrt5 and σ2=5\sigma_2=\sqrt5; check σ1σ2=15=∣det⁡A∣\sigma_1\sigma_2=15=|\det A|. Then u1=Av1/σ1=(1,3)/10u_1=Av_1/\sigma_1=(1,3)/\sqrt{10} and σ1u1v1T=32(1133)=(1.51.54.54.5)\sigma_1u_1v_1^{\mathsf T}=\tfrac32\begin{pmatrix}1&1\\3&3\end{pmatrix}=\begin{pmatrix}1.5&1.5\\4.5&4.5\end{pmatrix}. What is left, (1.5−1.5−0.50.5)\begin{pmatrix}1.5&-1.5\\-0.5&0.5\end{pmatrix}, has size σ2=5\sigma_2=\sqrt5: the square root of the sum of its squared entries.

Needs a step first: 13

Learn it with an AI

Copy this prompt into any AI assistant. It will take you through step by step at your level and finish with the test above.

Be my maths tutor. I'm learning "Singular Value Decomposition" (Undergraduate II tier): Every matrix, of any shape, is a rotation, then a stretch along perpendicular axes, then another rotation.
I already know: The Spectral Theorem.
Teach it Socratically: first ask what I already know; then explain the core idea with one concrete example and why it's true; then give me three problems, one at a time, easy to hard. Wait for my answer, check every step, and point out mistakes without giving the answer away.
Finish by testing me with this: Let $A=\begin{pmatrix}3&0\\4&5\end{pmatrix}$. Find its singular values and its best rank-one approximation.
Use LaTeX for formulas. When you say where it's used later (machine learning, quantum mechanics), be specific.

Recommended