AoZai
AoZai

Reading Notice

These are personal study and translation notes for reference only; the original course materials belong to MIT OpenCourseWare and their respective rights holders.

ZoomNotes for Linear Algebra

Gilbert Strang, MIT 18.06 · Ch.7 / 11

Part 7: Singular Values and Vectors: Av=σuAv = \sigma u and A=UΣVTA = U\Sigma V^T

7.1 Singular Vectors in UU, VV and Singular Values in Σ\Sigma

The Singular Value Decomposition (SVD) exists for every matrix AA (size m×nm \times n, any rank rr):

A=UΣVTA = U \Sigma V^T

Components:

  • UU: m×mm \times m orthogonal matrix. Columns are left singular vectors u1,,umu_1, \dots, u_m (span the column space and left nullspace)
  • VV: n×nn \times n orthogonal matrix. Columns are right singular vectors v1,,vnv_1, \dots, v_n (span the row space and nullspace)
  • Σ\Sigma: m×nm \times n diagonal matrix with singular values σ1σ2σr>0\sigma_1 \geq \sigma_2 \geq \cdots \geq \sigma_r > 0 on the diagonal, and zeros elsewhere

Fundamental Equation:

Avk=σkukfor k=1,,rA v_k = \sigma_k u_k \quad \text{for } k = 1, \dots, r

and for k>rk > r, Avk=0A v_k = 0 and ATuk=0A^T u_k = 0.


7.2 Reduced SVD / Full SVD / Construct UΣVTU\Sigma V^T from ATAA^T A

Full SVD: A=Um×mΣm×nVn×nTA = U_{m \times m} \Sigma_{m \times n} V_{n \times n}^T

Reduced (Economy) SVD: A=UrΣrVrTA = U_r \Sigma_r V_r^T where:

  • UrU_r is m×rm \times r (only the rr left singular vectors corresponding to nonzero singular values)
  • Σr\Sigma_r is r×rr \times r diagonal
  • VrV_r is n×rn \times r

Construction from ATAA^T A:

  1. Compute ATAA^T A (size n×nn \times n), which is symmetric positive semidefinite
  2. Find its eigenvalues σ12σ22σr2>0\sigma_1^2 \geq \sigma_2^2 \geq \cdots \geq \sigma_r^2 > 0
  3. The eigenvectors of ATAA^T A are the right singular vectors v1,,vrv_1, \dots, v_r
  4. The singular values are σk=λk(ATA)\sigma_k = \sqrt{\lambda_k(A^T A)}
  5. Compute the left singular vectors: uk=Avk/σku_k = A v_k / \sigma_k for k=1,,rk = 1, \dots, r

Alternative from AATAA^T: Similarly, eigenvectors of AATAA^T give the left singular vectors uku_k with the same eigenvalues σk2\sigma_k^2.


7.3 The Geometry of the SVD: Rotate - Stretch - Rotate

The SVD reveals that every linear transformation decomposes into three geometric steps:

A=UΣVTA = U \Sigma V^T
  1. Rotate (or reflect) by VTV^T: VTV^T maps the standard basis to the right singular vectors
  2. Stretch by Σ\Sigma: Scale each axis by σk\sigma_k (and embed into Rm\mathbb{R}^m if mnm \neq n)
  3. Rotate by UU: Rotate from the stretched axes to the left singular vectors

Circle-to-Ellipse View: When AA is 2×22 \times 2, the unit circle maps to an ellipse with semi-axes σ1u1\sigma_1 u_1 and σ2u2\sigma_2 u_2.

Four-Number SVD for 2x2: Any 2x2 matrix can be expressed as:

A=QθΣQϕA = Q_\theta \, \Sigma \, Q_\phi

where QθQ_\theta and QϕQ_\phi are rotation matrices by angles θ\theta and ϕ\phi, and Σ\Sigma is diagonal with σ1,σ2\sigma_1, \sigma_2.


7.4 AkA_k is Closest to AA: Principal Component Analysis (PCA)

Eckart-Young Theorem: The best rank-kk approximation to AA (in the Frobenius norm or spectral norm) is obtained by truncating the SVD:

Ak=UkΣkVkT=i=1kσiuiviTA_k = U_k \Sigma_k V_k^T = \sum_{i=1}^k \sigma_i u_i v_i^T

where UkU_k, VkV_k contain the first kk singular vectors, and Σk\Sigma_k contains the top kk singular values. This minimizes AB\|A - B\| over all rank-kk matrices BB.

PCA (Principal Component Analysis):

  • Center the data: subtract the mean from each column of the data matrix AA
  • Compute the SVD of the centered data
  • The first principal component u1u_1 is the direction of maximum variance
  • The sample covariance matrix is S=AAT/(n1)S = AA^T / (n-1)
  • Total variance = sum of eigenvalues of SS = σi2\sum \sigma_i^2
  • The fraction of variance captured by the first kk components is (i=1kσi2)/(i=1mσi2)(\sum_{i=1}^k \sigma_i^2) / (\sum_{i=1}^m \sigma_i^2)

7.5 Computing Eigenvalues of SS and Singular Values of AA

QR Algorithm (for eigenvalues):

  1. Set S0=SS_0 = S (symmetric)
  2. For k=1,2,k = 1, 2, \dots:
    • Factor Sk1=QkRkS_{k-1} = Q_k R_k
    • Set Sk=RkQkS_k = R_k Q_k
  3. SkS_k converges to a diagonal matrix containing the eigenvalues

The QR algorithm uses the fact that Sk=QkTSk1QkS_k = Q_k^T S_{k-1} Q_k, so all SkS_k are similar and have the same eigenvalues.

Golub-Kahan Algorithm (for SVD): An efficient two-step process:

  1. Reduce AA to bidiagonal form using Householder reflections
  2. Apply an implicit QR iteration to the bidiagonal matrix to find the singular values

Modern numerical linear algebra computes SVD in O(mn2)O(mn^2) or O(m2n)O(m^2 n) operations.


7.6 Compressing Images by the SVD

An image can be represented as a matrix AA of pixel values. The SVD provides a natural compression scheme:

Truncated SVD Compression: Instead of storing all m×nm \times n entries, store only:

  • kk singular values σ1,,σk\sigma_1, \dots, \sigma_k
  • kk left singular vectors u1,,uku_1, \dots, u_k (each length mm)
  • kk right singular vectors v1,,vkv_1, \dots, v_k (each length nn)

Total storage: k(1+m+n)k(1 + m + n) instead of mnmn. When kk is small compared to the rank, this is a significant compression.

Example: A 1000×10001000 \times 1000 image (10610^6 pixels) might be well-approximated by k=50k=50 singular values, storing only 50×(1+1000+1000)100,00050 \times (1 + 1000 + 1000) \approx 100,000 numbers -- a 10x compression.


7.7 The Victory of Orthogonality

This chapter celebrates the fundamental role of orthogonality throughout linear algebra. Nine key properties:

  1. Qx=x\|Qx\| = \|x\| -- Orthogonal matrices preserve length
  2. Eigenvectors of symmetric matrices are orthogonal -- S=QΛQTS = Q\Lambda Q^T
  3. Singular vectors are orthogonal -- A=UΣVTA = U\Sigma V^T with UTU=IU^T U = I, VTV=IV^T V = I
  4. Gram-Schmidt produces orthogonal bases from any independent set
  5. Four fundamental subspaces come in orthogonal pairs -- Row space \perp Nullspace, Column space \perp Left nullspace
  6. Fourier series uses orthogonal sines/cosines -- The Fourier basis is orthonormal
  7. Projection matrices are symmetric and idempotent -- PT=PP^T = P, P2=PP^2 = P
  8. Least squares minimizes error via orthogonality -- AT(bAx^)=0A^T(b - A\hat{x}) = 0
  9. QR factorization combines Gram-Schmidt into matrix form

Polar Decomposition: Every matrix AA can be factored as:

A=QSA = Q S

where QQ is orthogonal and SS is symmetric positive semidefinite (or positive definite if AA is invertible). From the SVD: Q=UVTQ = UV^T and S=VΣVTS = V\Sigma V^T. This is the matrix analogue of z=reiθz = re^{i\theta} for complex numbers.

Previous Next
© MIT OpenCourseWare  |  18.06 Linear Algebra  |  Gilbert Strang  |  Spring 2010
ocw.mit.edu  ·  CC BY-NC-SA 4.0