Singular Value
Decomposition
Learn how any matrix can be broken into three elegant pieces: a rotation, a scaling, and another rotation. SVD is the Swiss Army knife of linear algebra.
What is SVD?
Every matrix \( A \) (any size, any entries) can be factored into three special matrices:
The Geometric Intuition
Any linear transformation \( A \) applied to a unit circle produces an ellipse. SVD decomposes this into three steps:
Why Does SVD Matter?
SVD is one of the most widely used tools in applied mathematics, data science, and engineering. It works on every matrix: square or rectangular, real or complex.
The SVD Theorem
Structure of \( \Sigma \)
The singular value matrix \( \Sigma \) is a rectangular diagonal matrix. For an \( m \times n \) matrix with rank \( r \):
SVD vs Eigendecomposition
| SVD | Eigendecomposition | |
|---|---|---|
| Works on | Any matrix (\( m \times n \)) | Square matrices only |
| Always exists? | Yes, always | Not always |
| Factored form | \( U\Sigma V^T \) | \( PDP^{-1} \) |
| Diagonal entries | Singular values (\( \geq 0 \)) | Eigenvalues (can be negative/complex) |
| Factor matrices | Orthogonal (\( U^T U = I \)) | Not necessarily orthogonal |
How to Compute SVD
Example: \( 2 \times 2 \) Matrix
Step 1: Compute \( A^T A = \begin{pmatrix} 9 & 0 \\ 0 & 1 \end{pmatrix} \)
Step 2: Eigenvalues of \( A^T A \): \( \lambda_1 = 9 \), \( \lambda_2 = 1 \)
Step 3: Singular values: \( \sigma_1 = 3 \), \( \sigma_2 = 1 \)
Example: Non-Diagonal Matrix
Example: Rectangular Matrix
Step 1: \( A^T A = \begin{pmatrix} 2 & 0 \\ 0 & 1 \end{pmatrix} \). Eigenvalues: \( \lambda_1 = 2, \lambda_2 = 1 \)
Step 2: Singular values: \( \sigma_1 = \sqrt{2} \approx 1.41 \), \( \sigma_2 = 1 \)
Step 3: \( V = I_2 \), and \( \Sigma \) is \( 3 \times 2 \) with \( \sqrt{2} \) and \( 1 \) on the diagonal, zeros in the third row.
Low-Rank Approximation
The Eckart-Young theorem says: the best rank-\( k \) approximation of \( A \) (in the Frobenius or operator norm) is obtained by keeping only the top \( k \) singular values:
Rank and Singular Values
The singular values encode fundamental information about the matrix:
The Pseudoinverse via SVD
If \( A \) is not invertible (or not even square), SVD lets us define the Moore-Penrose pseudoinverse:
where \( \Sigma^+ \) is formed by reciprocating each nonzero singular value and transposing \( \Sigma \):
Common Mistakes
SVD At a Glance
| Property | Detail |
|---|---|
| Formula | \( A = U \Sigma V^T \) |
| Applies to | Any \( m \times n \) matrix |
| \( U \) comes from | Eigenvectors of \( AA^T \) |
| \( V \) comes from | Eigenvectors of \( A^T A \) |
| \( \sigma_i \) comes from | \( \sqrt{\lambda_i(A^T A)} \) |
| Rank of \( A \) | Number of nonzero \( \sigma_i \) |
| Best rank-\( k \) approx. | Keep top \( k \) singular values |
| Pseudoinverse | \( A^+ = V \Sigma^+ U^T \) |
Question 1 of 5
In the SVD \( A = U\Sigma V^T \), what are the diagonal entries of \( \Sigma \)?
Question 2 of 5
Which of the following is true about SVD but not about eigendecomposition?
Question 3 of 5
A \( 4 \times 3 \) matrix \( A \) has singular values \( \sigma_1 = 5 \), \( \sigma_2 = 2 \), \( \sigma_3 = 0 \). What is the rank of \( A \)?
Question 4 of 5
To find the best rank-1 approximation of a matrix \( A \) using SVD, you should:
Question 5 of 5
If \( A \) is a \( 3 \times 2 \) matrix, what are the dimensions of \( \Sigma \) in the SVD \( A = U\Sigma V^T \)?