任意矩阵都能分解为 A = UΣVᵀ;右奇异向量来自 AᵀA,左奇异向量来自 AAᵀ,奇异值是特征值的平方根,本质是同时为正交的输入基与输出基。
Singular Value Decomposition: The Right Bases for All Four Subspaces
Every matrix factors as A = UΣVᵀ; right singular vectors come from AᵀA, left ones from AAᵀ, singular values are square roots of eigenvalues, and the point is an orthonormal input basis mapped to an orthonormal output basis.
参考答案:把 V 的第 1 列换成 −v1,同时把 U 的第 1 列换成 −u1,Σ 不变。理由是 A=∑iσiuiviT,第 1 项为 σ1u1v1T;当 v1→−v1 时,同时令 u1→−u1,乘积 (−u1)(−v1)T=u1v1T 不变。若只改 V 不改 U,整个和式会差一个符号。注意 σ1 必须保持正号——不能靠把 σ1 变为负数来吸收符号,因为 SVD 约定奇异值非负。
与前后课程的关系
上一讲用相似与 Jordan 形刻画了「同一变换换基」。这一讲进一步允许输入、输出使用不同的正交基,得到对所有矩阵都成立的分解。下一讲回到更基础的视角:线性变换本身是什么,矩阵如何由基的选择构造出来。
What SVD fixes
Eigen-decomposition A=SΛS−1 has two limitations: the matrix must be square, and it must have enough eigenvectors. Worse, even when it diagonalizes, S is usually not orthogonal, so changing basis distorts lengths and angles.
SVD drops the requirement that input and output share a basis. It allows a separate orthonormal basis on each side:
A=UΣVT.
U is m×m orthogonal; its columns are the left singular vectors.
V is n×n orthogonal; its columns are the right singular vectors.
Σ is m×n diagonal with σ1≥σ2≥⋯≥σr>0.
This holds for everym×n matrix, square or not, symmetric or not, diagonalizable or not.
One-sentence summary: SVD finds an orthonormal input basis that A maps to an orthonormal output basis, stretching each direction without coupling them.
Timeline
Time
Topic
0:14
The SVD extends good-matrix ideas to any matrix
1:29
The four subspaces and orthonormal bases
3:05
The geometry of an arbitrary linear map
5:48
Choosing v1,…,vr with Avi=σiui
8:31
The matrix form AV=UΣ
11:02
Splitting dimensions between row space and nullspace
13:48
ATA is symmetric and positive definite
15:17
The σi2 are eigenvalues of ATA
17:12
Get V from the eigenvectors of ATA
21:22
Then get U from AAT
28:15
A singular example: a rank-one matrix
31:05
Matching nullspace with left nullspace
32:57
Computing u and σ from v
37:39
Bases and dimensions in general
40:14
Summary of the SVD and the four subspaces
The geometric goal
View A as a linear map from Rn to Rm. Its row space is an r-dimensional subspace of Rn; its column space is an r-dimensional subspace of Rm.
We want orthonormal bases
v1,…,vr in the row space,u1,…,ur in the column space,
such that
Av1=σ1u1,Av2=σ2u2,…,Avr=σrur.
In matrix form,
A[v1⋯vr]=[u1⋯ur]σ1⋱σr.
Completing both sides with the null spaces gives the full A=UΣVT.
Why null spaces are not the difficulty
The n−r dimensions outside the row space form the null space, and A sends them to zero. The m−r dimensions outside the column space form the left null space, the null space of AT. Any orthonormal bases there will do; their singular values are zero.
So the real task is only this: find paired orthonormal directions in the row and column spaces that A stretches into each other.
How to compute: eliminate U
Starting from
A=UΣVT,
multiply by the transpose to build an equation containing only V:
ATA=(UΣVT)T(UΣVT)=VΣTUTUΣVT.
Since UTU=I,
ATA=VΣTΣVT=Vσ12⋱σn2VT.
This is exactly the eigen-decomposition of ATA:
the columns of V are eigenvectors of ATA;
σi2 are its eigenvalues;
σi=λi, the positive square root.
Similarly, AAT eliminates V:
AAT=UΣΣTUT,
so the columns of U are eigenvectors of AAT.
Both ATA and AAT are symmetric positive semidefinite, so their eigenvalues are nonnegative and square roots exist. Their nonzero eigenvalues coincide, a special case of the fact that AB and BA share eigenvalues.
Example one: an invertible 2×2
A=[4−343].
Compute ATA
ATA=[44−33][4−343]=[257725].
Eigenvalues and eigenvectors
For [257725], the eigenvectors are [11] and [1−1]:
A minus sign appears. The correct choice is u2=[0−1], giving Av2=32u2.
Background: an eigenvector times −1 is still an eigenvector, so the columns of V have a sign freedom. U must be chosen consistently with that sign, or UΣVT is off by a sign. The sign puzzle left open in the lecture is resolved by taking u2=[0−1].
Finally,
A=[100−1][420032]21[111−1].
Example two: rank one
A=[4836].
The rows are proportional, so the rank is one.
Row space and null space
Every row is a multiple of [43], so the row space is one-dimensional:
v1=51[43]=[0.80.6].
The null space is orthogonal to it:
v2=[0.6−0.8].
Column space and left null space
Every column is a multiple of [48], whose direction is [12]:
u1=51[12].
The left null space is orthogonal:
u2=51[2−1].
Singular values
ATA=[4386][4836]=[80606045].
The rank is one, so one eigenvalue is zero and the other follows from the trace:
SVD hands you orthonormal bases for all four fundamental subspaces at once:
Subspace
Lives in
Dimension
Basis
Row space
Rn
r
v1,…,vr
Null space
Rn
n−r
vr+1,…,vn
Column space
Rm
r
u1,…,ur
Left null space
Rm
m−r
ur+1,…,um
The difference from Gram-Schmidt is that Gram-Schmidt can orthogonalize any basis, but it will not make A diagonal in that basis. SVD adds the requirement that A send each vi in the direction of ui, and that is why eigenvalues are unavoidable.
Common mistakes
Choosing U and V independently. They must be paired; flipping the sign of vi requires flipping ui.
Confusing singular values with eigenvalues. For non-symmetric matrices they differ, and singular values are never negative.
Assuming ATA is positive definite. With rank deficiency it has zero eigenvalues; it is only semidefinite.
Forgetting the ordering. The standard form requires σ1≥σ2≥⋯, with the columns of U and V reordered in step.
Takeaways
Every matrix has an SVD: A=UΣVT.
The columns of V are eigenvectors of ATA; the columns of U are eigenvectors of AAT; σi are positive square roots of the eigenvalues.
For symmetric positive definite A, U=V=Q and SVD reduces to A=QΛQT.
SVD's essence is choosing orthonormal input and output bases so that A only stretches.
It produces orthonormal bases for all four fundamental subspaces in one step.
Check your understanding
1. Why must the eigenvalues of ATA be nonnegative?
Reference answer: Let ATAv=λv with v=0. Left-multiplying by vT,
λvTv=vTATAv=(Av)T(Av)=∥Av∥2≥0.
Since vTv=∥v∥2>0, we get λ=∥Av∥2/∥v∥2≥0. The same computation shows ATA is positive semidefinite, and positive definite exactly when N(A)={0} (independent columns). The singular values are σi=λi precisely because the eigenvalues are nonnegative and the real square root exists.
2. In example one, why must u2 be [0−1] rather than [01]?
Reference answer: SVD requires Avi=σiui with σi>0. In example one,
Av2=21[4−343][1−1]=[0−32].
With u2=(0,1)T this reads Av2=−32u2, a sign mismatch with Av2=σ2u2=32u2; taking u2=(0,−1)T gives Av2=32u2. Any column of V may be negated (it is still an eigenvector), but the corresponding column of U must be negated with it, otherwise UΣVT carries an extra sign.
3. How many nonzero singular values does a rank-one matrix have, and why?
Reference answer: Exactly one. The number of nonzero singular values equals rankA, because A maps the r-dimensional row space isomorphically onto the column space, one positive stretch factor per direction, while null-space directions give σ=0. In example two, A=[4836] gives ATA=[80606045] with trace 125 and rank 1, so the eigenvalues are 125 and 0, giving σ1=55 and σ2=0.
4. How does the SVD of a symmetric positive definite matrix relate to its eigen-decomposition?
Reference answer: They coincide. A symmetric positive definite matrix has the spectral decomposition A=QΛQT with Q orthogonal, Λ=diag(λi) and all λi>0. Matching this with A=UΣVT gives U=V=Q and Σ=Λ, because positive eigenvalues satisfy σi=λi2=λi. Thus the left and right singular vectors coincide and SVD reduces to orthogonal diagonalization; for a general matrix the singular values differ from the eigenvalues, and singular values are always nonnegative.
5. If v1 changes sign, how must U, Σ, and V adjust to keep the factorization valid?
Reference answer: Replace the first column of V by −v1 and simultaneously replace the first column of U by −u1; leave Σ unchanged. The reason is A=∑iσiuiviT, whose first term is σ1u1v1T; under v1→−v1, setting u1→−u1 gives (−u1)(−v1)T=u1v1T, so the sum is unchanged. Changing only V would flip the sign of the whole sum. Note that σ1 must stay positive: absorbing the sign into Σ is not allowed, since SVD requires nonnegative singular values.
How this connects to the course
The previous lecture characterized "one transformation, many bases" through similarity and Jordan form. This one allows different orthonormal bases on the input and output sides, producing a factorization valid for every matrix. The next lecture steps back to the more basic question: what a linear transformation is, and how a matrix is constructed once bases are chosen.