Linear Algebra for Engineers lecture 35: Singular Value Decomposition
Overview
Alex Townsend explains the singular value decomposition (SVD) as a factorization available for every rectangular matrix, A = UΣVᵀ, with orthogonal U and V and nonnegative singular values in descending order. He connects the factors to the four fundamental subspaces, derives singular values and vectors from AᵀA and AAᵀ, and explains why the leading singular vectors are useful for principal component analysis and identifying dominant data directions.
Key takeaways
- Every m × n matrix can be decomposed as A = UΣVᵀ, where U and V are orthogonal and Σ contains the nonnegative singular values.
- The rank of A equals the number of nonzero singular values; A has linearly independent columns exactly when all n singular values are nonzero.
- The first r columns of U and V span Col(A) and Col(Aᵀ), respectively, while their remaining columns span Null(Aᵀ) and Null(A).
- The eigenvalues of AᵀA and AAᵀ are squared singular values; their nonzero eigenvalues coincide even when the two matrices have different dimensions.
- For the lecture's 3 × 2 rank-one example, AᵀA has eigenvalues 2 and 0, giving singular values √2 and 0, while the leading left singular vector is (1, 1, 0)/√2.
- In PCA, the largest singular values identify the strongest data directions, so the corresponding singular vectors provide a compact representation of dominant variation.
Chapters
- Alex Townsend introduces SVD as preparation for a discussion with Gilbert Strang about linear algebra and the four fundamental subspaces.
- He contrasts SVD with eigendecomposition, which applies to square matrices that can be diagonalized.
- Every m × n matrix A has a factorization A = UΣVᵀ, with U an m × m orthogonal matrix and V an n × n orthogonal matrix.
- Σ is an m × n diagonal-shaped matrix whose singular values are nonnegative and conventionally ordered from largest to smallest.
- Unlike eigendecomposition, SVD requires neither a square matrix nor diagonalizability.
- The number of nonzero singular values equals rank(A), so the diagonal of Σ directly reveals the dimension of the column space.
- A has linearly independent columns exactly when all n singular values are nonzero.
- Ordering singular values makes it possible to distinguish dominant directions from directions with little or no contribution.
- For rank r, the first r columns of U form an orthonormal basis for Col(A), while the remaining columns span Null(Aᵀ).
- The first r columns of V form an orthonormal basis for Col(Aᵀ), also called the row space, while the remaining columns span Null(A).
- These bases make the orthogonality relationships among the four fundamental subspaces explicit.
- Writing Ax as UΣVᵀx shows that only the first r columns of U contribute when rank(A) = r.
- Applying the same reasoning to Aᵀ shows that the first r columns of V span its column space.
- The columns associated with zero singular values provide orthonormal bases for Null(A) and Null(Aᵀ), useful for projections and null-space calculations.
- The identity AᵀA = VΣᵀΣVᵀ is an eigendecomposition of the square matrix AᵀA.
- The columns of V are eigenvectors of AᵀA, and its eigenvalues are the squared singular values.
- For the 3 × 2 rank-one example with rows (1, 0), (1, 0), and (0, 0), AᵀA has eigenvalues 2 and 0, so the singular values are √2 and 0.
- The companion identity AAᵀ = UΣΣᵀUᵀ gives an eigendecomposition of the m × m matrix AAᵀ.
- In the 3 × 2 example, AAᵀ has one nonzero eigenvalue, 2, and two zero eigenvalues; its leading unit eigenvector is (1, 1, 0)/√2.
- Combining this U with V = I and Σ having √2 as its only nonzero entry completes the example's SVD.
- AᵀA and AAᵀ can have different sizes, but their nonzero eigenvalues match and equal the squared singular values of A.
- In principal component analysis, the leading columns of U and V identify the strongest directions in a data matrix.
- Because singular values are sorted, retaining the first few vectors prioritizes the largest data variations while omitting weaker or redundant directions.
- A large singular value means the corresponding input direction in V is mapped strongly toward its paired output direction in U.
- Zero singular values identify directions in Null(A), while small singular values indicate directions with weak influence.
- Townsend relates this interpretation to applications in statistics, computer science, and AI, then answers questions about eigenvalues, orthogonal complements, and course logistics.
Transcript excerpt
0:00 Morning. For some reason, people seem to feel like the evening true false were hard. Morning. Okay. Okay. Yeah. Okay. No, I was just understanding if you if you took morning, did you find it did you find the true false? Okay. Or if you took evening, did you find the true false? Okay. We we sometimes take like a bet which one is the harder exam and uh too traumatic. Okay. Come on. It wasn't that bad. [laughter] The true false were okay. Okay. So, it seems like people found the morning true false okay even though they were meant to be
0:49 equally the same. the return of LU. Ah, it was mentioned in one of the uh Yeah, but it was really a question about QR. If you know QR, you didn't need to know that Ala penultimate lecture time. Yeah. Okay. Um so today so remember on on uh Wednesday not in this session but in the morning session at 10:20 uh Gil Gil Strang will join us. Okay. So, and we're gonna just have some relaxed conversation, talk about linear algebra, but during that conversation, I'm imagining he's going to talk about the four I'm going to maybe lead him
1:37 into talking about his four fundamental subspaces, which was his whole idea anyway. And he might he likes the singular value decomposition. So, he's probably going to mention that. So today I'm just gonna hopefully tell you a little bit um about yeah the lecture will be recorded and you can watch it at any point. Um so I was going to tell you about the singular value decomposition and so that if he says something around like related to it you kind of half know what the words mean and therefore uh you'll get you might be able to get more out of the
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Alex Townsend.