LINEAR-ALGEBRA ยท Interactive Practice | Unit 28 ยท Video 4

The Perfect Basis: SVD and the Four Fundamental Subspaces

IKey Formulas

Formula Name Description
Avi=ฯƒiuiA v_i = \sigma_i u_i SVD pairing Matrix sends viv_i to scaled uiu_i
ATAโ€‰vi=ฮปiviA^T A\, v_i = \lambda_i v_i Right singular vectors viv_i are eigenvectors of ATAA^T A
ฯƒi=ฮปi\sigma_i = \sqrt{\lambda_i} Singular values Square roots of ATAA^T A eigenvalues
ui=Aviฯƒiu_i = \dfrac{A v_i}{\sigma_i} Left singular vectors Automatically orthonormal in column space
A=UฮฃVTA = U \Sigma V^T Full SVD Diagonalizes AA across two spaces

IIVisualization 1 โ€” Orthonormal Pairs Under AA

A perpendicular input pair usually lands non-perpendicular after AA โ€” except at two special angles.

input ยท unit circle (drag qโ‚)

output ยท multiply by A

๐Ÿ’ก The two input angles whose output stays perpendicular are the right singular vectors v1,v2v_1, v_2.

IIIVisualization 2 โ€” The Unit Circle Becomes an Ellipse

AA sends the unit circle to an ellipse whose semi-axes ฯƒ1u1,ฯƒ2u2\sigma_1 u_1, \sigma_2 u_2 are the images of v1,v2v_1, v_2.

input ยท unit circle + vโ‚,vโ‚‚

output ยท ellipse + ฯƒโ‚uโ‚,ฯƒโ‚‚uโ‚‚

๐Ÿ’ก Drive the rows nearly parallel so ฯƒ2โ†’0\sigma_2 \to 0: the ellipse flattens to a segment โ€” a rank-1, singular matrix.

IVVisualization 3 โ€” Three Steps of A=UฮฃVTA = U \Sigma V^T

AA acts in three moves: rotate by VTV^T, stretch by ฮฃ\Sigma, rotate by UU.

Stage 0 โ€” Start
Unit circle carrying the orthonormal pair v1,v2v_1, v_2 (right singular vectors).
Stage 1 โ€” Apply VTV^T
Rotation sending viโ†’eiv_i \to e_i; a circle stays a circle.
Stage 2 โ€” Apply ฮฃ\Sigma
Stretch axis ii by ฯƒi\sigma_i (ฯƒ1=35โ‰ˆ6.71\sigma_1 = 3\sqrt{5} \approx 6.71, ฯƒ2=5โ‰ˆ2.24\sigma_2 = \sqrt{5} \approx 2.24): an axis-aligned ellipse.
Stage 3 โ€” Apply UU
Rotation sending eiโ†’uie_i \to u_i, so Avi=ฯƒiuiA v_i = \sigma_i u_i: the final tilted ellipse.

VQuiz Questions

Question 1

For an mร—nm \times n matrix AA of rank rr, the SVD produces vectors v1,โ€ฆ,vnv_1, \ldots, v_n and u1,โ€ฆ,umu_1, \ldots, u_m. Which statement correctly identifies the four fundamental subspaces?

โœ… Correct! The first rr vv's sit in the row space, the first rr uu's sit in the column space.

โŒ Not quite. Remember: vv's live in Rn\mathbb{R}^n (input side, row/null space) and uu's live in Rm\mathbb{R}^m (output side, column/left-null space). The first rr of each are the active directions.

Show solution

Solution:

The first rr singular vectors give orthonormal bases for the spaces AA actually "uses":

  • v1,โ€ฆ,vrv_1, \ldots, v_r span the row space (in Rn\mathbb{R}^n)
  • vr+1,โ€ฆ,vnv_{r+1}, \ldots, v_n span the null space (in Rn\mathbb{R}^n)
  • u1,โ€ฆ,uru_1, \ldots, u_r span the column space (in Rm\mathbb{R}^m)
  • ur+1,โ€ฆ,umu_{r+1}, \ldots, u_m span the left null space (in Rm\mathbb{R}^m)

This is why people call the SVD the "perfect" factorization: one decomposition gives orthonormal bases for all four fundamental subspaces simultaneously.

Question 2

Suppose AA is a matrix with ATAA^T A having eigenvalues ฮป1=45\lambda_1 = 45 and ฮป2=5\lambda_2 = 5. What are the singular values ฯƒ1\sigma_1 and ฯƒ2\sigma_2 of AA?

โœ… Correct! ฯƒi=ฮปi\sigma_i = \sqrt{\lambda_i} โ€” singular values are square roots of the ATAA^T A eigenvalues.

โŒ Not quite. A common error is to forget the square root. The eigenvalues of ATAA^T A measure โˆฅAviโˆฅ2\|A v_i\|^2, not โˆฅAviโˆฅ\|A v_i\|.

Show solution

Solution:

Singular values are the square roots of the eigenvalues of ATAA^T A: ฯƒi=ฮปi\sigma_i = \sqrt{\lambda_i}

So: ฯƒ1=45=35,ฯƒ2=5\sigma_1 = \sqrt{45} = 3\sqrt{5}, \qquad \sigma_2 = \sqrt{5}

Why square roots? Take Avi=ฯƒiuiA v_i = \sigma_i u_i and compute the squared length: โˆฅAviโˆฅ2=(Avi)T(Avi)=viTATAvi=ฮปiviTvi=ฮปi\|A v_i\|^2 = (A v_i)^T (A v_i) = v_i^T A^T A v_i = \lambda_i v_i^T v_i = \lambda_i So โˆฅAviโˆฅ=ฮปi\|A v_i\| = \sqrt{\lambda_i}, which equals ฯƒi\sigma_i since uiu_i is a unit vector.

Question 3

True or False: Once you choose viv_i as eigenvectors of ATAA^T A, the resulting ui=Avi/ฯƒiu_i = A v_i / \sigma_i are automatically orthogonal in the column space โ€” no separate Gram-Schmidt step is needed.

โœ… Correct! The eigenvector orthogonality of ATAA^T A forces (Avi)โ‹…(Avj)=ฮปjviTvj=0(Av_i) \cdot (Av_j) = \lambda_j v_i^T v_j = 0 automatically.

โŒ Not quite. Try the computation (Avi)T(Avj)=viTATAvj(Av_i)^T(Av_j) = v_i^T A^T A v_j. Since vjv_j is an eigenvector of ATAA^T A, this simplifies to ฮปjviTvj\lambda_j v_i^T v_j, which is zero when iโ‰ ji \neq j.

Show solution

Solution:

True. This is the entire reason the SVD works so cleanly. For iโ‰ ji \neq j:

(Avi)T(Avj)=viTATAvj=viT(ฮปjvj)=ฮปj(viTvj)=0(A v_i)^T (A v_j) = v_i^T A^T A v_j = v_i^T (\lambda_j v_j) = \lambda_j (v_i^T v_j) = 0

The orthogonality of the vv's as eigenvectors of ATAA^T A automatically forces orthogonality of AviA v_i and AvjA v_j in the column space. Dividing by ฯƒi\sigma_i just normalizes them to unit length:

ui=Aviฯƒiu_i = \frac{A v_i}{\sigma_i}

So the SVD gives you "orthogonality that survives multiplication by AA" for free โ€” no Gram-Schmidt required.

Question 4

For the matrix A=[3045]A = \begin{bmatrix} 3 & 0 \\ 4 & 5 \end{bmatrix}, the right singular vector v1=12(1,1)Tv_1 = \tfrac{1}{\sqrt{2}}(1, 1)^T and ฯƒ1=35\sigma_1 = 3\sqrt{5}. What is the corresponding left singular vector u1u_1?

โœ… Correct! Av1=(1/2)(3,9)TA v_1 = (1/\sqrt{2})(3, 9)^T, and dividing by ฯƒ1=35\sigma_1 = 3\sqrt{5} gives (1/10)(1,3)T(1/\sqrt{10})(1, 3)^T.

โŒ Not quite. Carefully compute Av1A v_1 first, then divide by ฯƒ1\sigma_1. Watch out for swapping coordinates or sign errors.

Show solution

Solution:

Use u1=Av1ฯƒ1u_1 = \dfrac{A v_1}{\sigma_1}.

Step 1. Compute Av1A v_1: Av1=[3045]โ‹…12[11]=12[39]A v_1 = \begin{bmatrix} 3 & 0 \\ 4 & 5 \end{bmatrix} \cdot \frac{1}{\sqrt{2}}\begin{bmatrix} 1 \\ 1 \end{bmatrix} = \frac{1}{\sqrt{2}}\begin{bmatrix} 3 \\ 9 \end{bmatrix}

Step 2. Divide by ฯƒ1=35\sigma_1 = 3\sqrt{5}: u1=135โ‹…12[39]=110[13]u_1 = \frac{1}{3\sqrt{5}} \cdot \frac{1}{\sqrt{2}}\begin{bmatrix} 3 \\ 9 \end{bmatrix} = \frac{1}{\sqrt{10}}\begin{bmatrix} 1 \\ 3 \end{bmatrix}

Check. โˆฅu1โˆฅ=(1/10)2+(3/10)2=1/10+9/10=1\|u_1\| = \sqrt{(1/\sqrt{10})^2 + (3/\sqrt{10})^2} = \sqrt{1/10 + 9/10} = 1. Unit vector as expected.

Solved: 0 / 4