Seyed Masoud Hosseini · Overview · Study log · Ideas · Transcript · RSS feed
Matrix Methods for Data Analysis & ML · Lecture 8 of 36 · 53:33
Lecture 6: Singular Value Decomposition (SVD)
Study guide
What this lecture covers
Since a rectangular matrix has no eigenvalues in the usual sense, Strang introduces a replacement that works for every matrix: the singular value decomposition, A = UΣV^T. He builds it from A^T A, a symmetric positive definite matrix whose eigenvectors become the right singular vectors V, while the corresponding U = AV/σ vectors turn out to be the eigenvectors of AA^T and, crucially, orthogonal to each other.
The lecture also gives the geometric picture of the SVD as rotate, stretch, rotate, counts how many parameters each factor contributes, and derives the polar decomposition as a quick corollary. It ends by identifying the leading rank-one piece σ1 u1 v1^T as the most important part of a data matrix, setting up the next lecture on principal components. After watching you should be able to state what the SVD factors are, explain why the singular vectors are orthogonal, and describe the rotate-stretch-rotate geometric picture.
Key ideas
- Why eigenvalues fail for rectangular matrices:
Ax = λxrequiresAto map a space to itself, which is impossible whenAis not square, so the SVD uses two different sets of vectors instead. A^T Ais the key matrix: it is always square, symmetric, and positive semidefinite, so it factors asVΛV^T, giving the right singular vectorsVas its eigenvectors and the singular valuesσas the square roots of its eigenvalues.AA^Tgives the left singular vectors: this matrix (a different size thanA^T A) is also symmetric positive semidefinite, and its eigenvectors are theUvectors; the two matrices share the same nonzero eigenvalues.- Orthogonality of AV: choosing
U_i = AV_i / σ_iand using that theV_iare orthogonal eigenvectors ofA^T Aproves the resultingU_ivectors are also orthogonal, which is the key fact making the SVD work. - Rotate, stretch, rotate:
A = UΣV^Tmeans multiplying byAfirst rotates (viaV^T), then stretches along axes by the singular values (viaΣ), then rotates again (viaU). - Parameter counting: for a 2x2 matrix, 4 entries split into 1 rotation angle (
V), 2 stretch factors (Σ), and 1 rotation angle (U), matching the 4 degrees of freedom of the original matrix. - Polar decomposition: inserting
U^T U = IintoA = UΣV^TgivesA = (UΣU^T)(UV^T), a symmetric matrix times an orthogonal matrix, the matrix analog of writing a complex number as a magnitude timese^(iθ). - Leading rank-one piece:
σ1 u1 v1^T, built from the largest singular value, is the single most important rank-one piece of a data matrix, the starting point for principal component analysis.
Walkthrough
Why rectangular matrices need singular vectors, not eigenvectors (0:01)
Strang explains that Ax = λx cannot hold for a rectangular matrix since Ax lands in a different-dimensional space than x. The SVD replaces one set of eigenvectors with two: left singular vectors U and right singular vectors V, connected by singular values σ on a diagonal matrix in between, generalizing the spectral theorem to every matrix.
Building V and sigma from A^T A (4:04)
Strang shows A^T A is always symmetric and positive semidefinite, so it factors as VΛV^T, giving the eigenvectors V and eigenvalues λ = σ^2. Separately, AA^T, a different-sized matrix with the same nonzero eigenvalues, gives the eigenvectors U. Substituting A = UΣV^T into A^T A and using U^T U = I confirms this matches the eigendecomposition of A^T A exactly.
Proving the U vectors are orthogonal (17:12)
To handle repeated eigenvalues correctly, Strang defines U_i = A V_i / σ_i directly rather than relying only on AA^T. He then proves U1^T U2 = 0 by substituting the definitions, using that V2 is an eigenvector of A^T A with eigenvalue σ2^2, and that V1 and V2 are orthonormal, so the singular vectors in the column space inherit orthogonality from the singular vectors in the row space. He also notes that computing the SVD in practice avoids forming A^T A directly, since doing so squares the matrix's sensitivity to rounding error.
The rotate-stretch-rotate picture and parameter counts (28:23)
Strang draws the geometric picture: multiplying a unit circle by V^T rotates it, multiplying by Σ stretches it into an ellipse along the singular value directions, and multiplying by U rotates the ellipse again. He counts parameters for a 2x2 matrix (1 rotation angle from V, 2 stretch factors from Σ, 1 rotation angle from U, totaling 4, matching the matrix's 4 entries) and notes that U = V exactly when the original matrix is symmetric positive definite, in which case the SVD reduces to the spectral theorem.
Polar decomposition and the leading rank-one piece (45:39)
Inserting U^T U = I into A = UΣV^T gives A = (UΣU^T)(UV^T), the polar decomposition of A into a symmetric matrix times an orthogonal matrix, paralleling the magnitude-times-rotation form of a complex number. Strang closes by identifying σ1 u1 v1^T, built from the largest singular value, as the most important rank-one piece of a data matrix, the starting point for finding principal components in the next lecture.
Before you watch
- Watch Lecture 4 on eigenvalues and symmetric matrices and Lecture 5 on positive definite matrices first, since the SVD is built directly from the fact that
A^T Ais symmetric positive semidefinite. - Comfort with the spectral theorem
S = QΛQ^Tis assumed throughout.
Check your understanding
- Why can't a rectangular matrix have eigenvalues in the usual sense, and what replaces them in the SVD?
- How do the eigenvectors of
A^T Abecome the right singular vectorsV, and where do the singular values come from? - What is the key step in proving that the vectors
U_i = A V_i / σ_iare orthogonal to each other? - What does each of the three factors
U,Σ, andV^Tdo geometrically to a unit circle? - How does the polar decomposition
A = SQfollow directly from the SVD?
Chapters
- 0:00 <Untitled Chapter 1>
- 7:48 Start on the Singular Value Decomposition
- 28:31 Geometry
- 33:36 Positive Definite Symmetric Matrix
- 37:58 Rotation in 3d
- 38:51 Four Dimensions
- 46:18 Pole Decomposition of a Matrix
- 51:04 Principal Components
From the YouTube description
MIT 18.065 Matrix Methods in Data Analysis, Signal Processing, and Machine Learning, Spring 2018
Instructor: Gilbert Strang
View the complete course: https://ocw.mit.edu/18-065S18
YouTube Playlist: https://www.youtube.com/playlist?list=PLUl4u3cNGP63oMNUHXqIUcrkS2PivhN3k
Singular Value Decomposition (SVD) is the primary topic of this lecture. Professor Strang explains and illustrates how the SVD separates a matrix into rank one pieces, and that those pieces come in order of importance.
License: Creative Commons BY-NC-SA
More information at https://ocw.mit.edu/terms
More courses at https://ocw.mit.edu
← Lecture 5: Positive Definite and Semidefinite Matrices · Lecture 7: Eckart-Young, the Closest Rank k Matrix to A →
