Part 7: Singular Values and Vectors: and
7.1 Singular Vectors in , and Singular Values in
The Singular Value Decomposition (SVD) exists for every matrix (size , any rank ):
Components:
- : orthogonal matrix. Columns are left singular vectors (span the column space and left nullspace)
- : orthogonal matrix. Columns are right singular vectors (span the row space and nullspace)
- : diagonal matrix with singular values on the diagonal, and zeros elsewhere
Fundamental Equation:
and for , and .
7.2 Reduced SVD / Full SVD / Construct from
Full SVD:
Reduced (Economy) SVD: where:
- is (only the left singular vectors corresponding to nonzero singular values)
- is diagonal
- is
Construction from :
- Compute (size ), which is symmetric positive semidefinite
- Find its eigenvalues
- The eigenvectors of are the right singular vectors
- The singular values are
- Compute the left singular vectors: for
Alternative from : Similarly, eigenvectors of give the left singular vectors with the same eigenvalues .
7.3 The Geometry of the SVD: Rotate - Stretch - Rotate
The SVD reveals that every linear transformation decomposes into three geometric steps:
- Rotate (or reflect) by : maps the standard basis to the right singular vectors
- Stretch by : Scale each axis by (and embed into if )
- Rotate by : Rotate from the stretched axes to the left singular vectors
Circle-to-Ellipse View: When is , the unit circle maps to an ellipse with semi-axes and .
Four-Number SVD for 2x2: Any 2x2 matrix can be expressed as:
where and are rotation matrices by angles and , and is diagonal with .
7.4 is Closest to : Principal Component Analysis (PCA)
Eckart-Young Theorem: The best rank- approximation to (in the Frobenius norm or spectral norm) is obtained by truncating the SVD:
where , contain the first singular vectors, and contains the top singular values. This minimizes over all rank- matrices .
PCA (Principal Component Analysis):
- Center the data: subtract the mean from each column of the data matrix
- Compute the SVD of the centered data
- The first principal component is the direction of maximum variance
- The sample covariance matrix is
- Total variance = sum of eigenvalues of =
- The fraction of variance captured by the first components is
7.5 Computing Eigenvalues of and Singular Values of
QR Algorithm (for eigenvalues):
- Set (symmetric)
- For :
- Factor
- Set
- converges to a diagonal matrix containing the eigenvalues
The QR algorithm uses the fact that , so all are similar and have the same eigenvalues.
Golub-Kahan Algorithm (for SVD): An efficient two-step process:
- Reduce to bidiagonal form using Householder reflections
- Apply an implicit QR iteration to the bidiagonal matrix to find the singular values
Modern numerical linear algebra computes SVD in or operations.
7.6 Compressing Images by the SVD
An image can be represented as a matrix of pixel values. The SVD provides a natural compression scheme:
Truncated SVD Compression: Instead of storing all entries, store only:
- singular values
- left singular vectors (each length )
- right singular vectors (each length )
Total storage: instead of . When is small compared to the rank, this is a significant compression.
Example: A image ( pixels) might be well-approximated by singular values, storing only numbers -- a 10x compression.
7.7 The Victory of Orthogonality
This chapter celebrates the fundamental role of orthogonality throughout linear algebra. Nine key properties:
- -- Orthogonal matrices preserve length
- Eigenvectors of symmetric matrices are orthogonal --
- Singular vectors are orthogonal -- with ,
- Gram-Schmidt produces orthogonal bases from any independent set
- Four fundamental subspaces come in orthogonal pairs -- Row space Nullspace, Column space Left nullspace
- Fourier series uses orthogonal sines/cosines -- The Fourier basis is orthonormal
- Projection matrices are symmetric and idempotent -- ,
- Least squares minimizes error via orthogonality --
- QR factorization combines Gram-Schmidt into matrix form
Polar Decomposition: Every matrix can be factored as:
where is orthogonal and is symmetric positive semidefinite (or positive definite if is invertible). From the SVD: and . This is the matrix analogue of for complex numbers.