LINEAR-ALGEBRA ยท Interactive Practice

SVD in Action: When Singular Values Vanish (and Why Signs Matter)

IKey Formulas Reference

Formula Name Description
A=UฮฃVโŠคA = U \Sigma V^\top SVD factorization Orthonormal U,VU, V; diagonal ฮฃโ‰ฅ0\Sigma \geq 0
AโŠคAโ€‰vi=ฯƒi2โ€‰viA^\top A \, v_i = \sigma_i^2 \, v_i Right singular vectors Eigenvectors of AโŠคAA^\top A; eigenvalues are ฯƒi2\sigma_i^2
Avi=ฯƒiuiA v_i = \sigma_i u_i Sign-locked UU Defines uiu_i from viv_i โ€” fixes the sign
rank(A)=#{ฯƒi>0}\text{rank}(A) = \#\{\sigma_i > 0\} Rank from spectrum Zero singular values โ‡”\Leftrightarrow null space

IIVisualization 1 โ€” The Unit Circle Becomes an Ellipse

A matrix stretches the unit circle into an ellipse whose semi-axis lengths are its singular values.

When ฯƒ2=0\sigma_2 = 0 the input direction v2v_2 maps to the origin โ€” the ellipse degenerates to the column space of AA, a single line.

IIIVisualization 2 โ€” The Four Fundamental Subspaces

SVD hands you orthonormal bases for all four fundamental subspaces at once โ€” sorted by which singular values vanish.

The number of zero singular values equals the dimension of the null space โ€” and of the left null space.

IVVisualization 3 โ€” Why Signs Matter in U

The equation Avi=ฯƒiuiA v_i = \sigma_i u_i fixes the sign of uiu_i; the wrong sign breaks the factorization.

The wrong-sign u2u_2 is still a unit eigenvector of AAโŠคAA^\top โ€” always anchor UU through Avi=ฯƒiuiA v_i = \sigma_i u_i, not AAโŠคAA^\top alone.

VQuiz Questions

Question 1

For the matrix A=[4386]A = \begin{bmatrix} 4 & 3 \\ 8 & 6 \end{bmatrix}, we computed AโŠคA=[80606045]A^\top A = \begin{bmatrix} 80 & 60 \\ 60 & 45 \end{bmatrix}.

Its eigenvalues are 125125 and 00. What are the singular values of AA?

โœ… Correct! Singular values are square roots of AโŠคAA^\top A's eigenvalues, and 0=0\sqrt{0} = 0.

โŒ Not quite. Remember: ฯƒi=ฮปi\sigma_i = \sqrt{\lambda_i}, not ฮปi\lambda_i itself.

Show solution

Solution:

The eigenvalues of AโŠคAA^\top A are the squared singular values: ฮปi=ฯƒi2โŸนฯƒi=ฮปi.\lambda_i = \sigma_i^2 \quad\Longrightarrow\quad \sigma_i = \sqrt{\lambda_i}.

So ฯƒ1=125\sigma_1 = \sqrt{125} and ฯƒ2=0=0\sigma_2 = \sqrt{0} = 0. A zero singular value is perfectly well-defined โ€” it's just telling you the matrix has a 1-dimensional null space.

Question 2

In Example 1, we found v2=12(1,โˆ’1)v_2 = \tfrac{1}{\sqrt{2}}(1, -1) and ฯƒ2=18\sigma_2 = \sqrt{18}. Computing Av2A v_2 gave 12(0,โˆ’6)\tfrac{1}{\sqrt{2}}(0, -6).

A student writes u2=(0,1)u_2 = (0, 1) because that's a unit eigenvector of AAโŠคA A^\top. Is this a valid SVD column?

โœ… Correct! Signs in UU are locked by Avi=ฯƒiuiA v_i = \sigma_i u_i, not free.

โŒ Not quite. Both (0,1)(0, 1) and (0,โˆ’1)(0, -1) are unit eigenvectors of AAโŠคAA^\top, but only one satisfies the SVD constraint.

Show solution

Solution:

We need Av2=ฯƒ2u2A v_2 = \sigma_2 u_2. With ฯƒ2=18\sigma_2 = \sqrt{18} and Av2=12(0,โˆ’6)A v_2 = \tfrac{1}{\sqrt{2}}(0, -6):

u2=Av2ฯƒ2=(0,โˆ’6/2)18=(0,โˆ’1).u_2 = \frac{A v_2}{\sigma_2} = \frac{(0, -6/\sqrt{2})}{\sqrt{18}} = (0, -1).

The vector (0,1)(0, 1) is also a unit eigenvector of AAโŠคA A^\top (eigenvectors come in ยฑ\pm pairs), but it gives the wrong sign โ€” assembling UฮฃVโŠคU \Sigma V^\top with u2=(0,1)u_2 = (0, 1) does not reproduce AA.

โŒ Wrong: u2=(0,1)u_2 = (0, 1) โ€” sign mismatch.
The correct choice is u2=(0,โˆ’1)u_2 = (0, -1).

Question 3

A 3ร—53 \times 5 matrix AA has singular values ฯƒ1=7\sigma_1 = 7, ฯƒ2=2\sigma_2 = 2, ฯƒ3=0\sigma_3 = 0.

What is the dimension of the null space of AA?

โœ… Correct! dimโก(null(A))=nโˆ’rank(A)=5โˆ’2=3\dim(\text{null}(A)) = n - \text{rank}(A) = 5 - 2 = 3.

โŒ Not quite. Use rank-nullity: dimโก(null)=nโˆ’rank\dim(\text{null}) = n - \text{rank}, where rank\text{rank} = number of nonzero singular values.

Show solution

Solution:

The rank-nullity theorem says dimโก(null(A))=nโˆ’rank(A)\dim(\text{null}(A)) = n - \text{rank}(A), where nn is the number of columns.

  • Number of columns: n=5n = 5.
  • rank(A)=\text{rank}(A) = number of nonzero singular values =2= 2.
  • dimโก(null(A))=5โˆ’2=3\dim(\text{null}(A)) = 5 - 2 = 3.

Don't be fooled by the "3" listed singular values โ€” for a 3ร—53 \times 5 matrix there are minโก(3,5)=3\min(3, 5) = 3 singular values, but the null space of AA lives in R5\mathbb{R}^5 and has dimension 5โˆ’rank=35 - \text{rank} = 3. The columns of VV corresponding to zero singular values plus the columns beyond the listed ones (here, v4v_4 and v5v_5, which automatically have ฯƒ=0\sigma = 0) all span the null space.

Question 4

For the rank-one matrix A=[4386]A = \begin{bmatrix} 4 & 3 \\ 8 & 6 \end{bmatrix} with ฯƒ1=125\sigma_1 = \sqrt{125}, ฯƒ2=0\sigma_2 = 0, u1=15(1,2)u_1 = \tfrac{1}{\sqrt 5}(1,2), v1=(0.8,0.6)v_1 = (0.8, 0.6):

Which expression correctly reconstructs AA?

โœ… Correct! A zero singular value kills its rank-one piece โ€” that's how SVD records rank deficiency.

โŒ Not quite. Multiply out โˆ‘iฯƒiuiviโŠค\sum_i \sigma_i u_i v_i^\top and notice what happens to the term with ฯƒ2=0\sigma_2 = 0.

Show solution

Solution:

The SVD expands AA as a sum of rank-one outer products: A=โˆ‘iฯƒiโ€‰uiviโŠค.A = \sum_{i} \sigma_i\, u_i v_i^\top.

When ฯƒ2=0\sigma_2 = 0, that term vanishes, so only one rank-one piece remains: A=ฯƒ1โ€‰u1v1โŠค=125โ‹…15(12)โ€‰(0.8,ย 0.6)=5[0.80.61.61.2]=[4386].A = \sigma_1\, u_1 v_1^\top = \sqrt{125} \cdot \tfrac{1}{\sqrt 5}\binom{1}{2}\, (0.8,\ 0.6) = 5 \begin{bmatrix} 0.8 & 0.6 \\ 1.6 & 1.2 \end{bmatrix} = \begin{bmatrix} 4 & 3 \\ 8 & 6 \end{bmatrix}.

Note the order: uiviโŠคu_i v_i^\top (column times row) gives a matrix, while viuiโŠคv_i u_i^\top has the wrong shape pattern. This "one term suffices" idea is exactly why SVD powers low-rank approximation and PCA.

Solved: 0 / 4