SVD: Singular Value Decomposition
这次我们从结论出发反推。
SVD 即任意 matrix
其中:
is orthogonal is diagonal- 因为
不一定是 square,所以不一定有
- 因为
is orthogonal
当
注意到可以有如下两式:
这个很像是 eigen-decomposition 啊……对的,它其实就是 eigen-decomposition!
所以我们先 eigen-decompose
1. Gram matrixPermalink
A Gram matrix of vectors
If matrix
A Gram matrix is positive definite and symmetric.
2. Rank–nullity theoremPermalink
我们在 Kernel in Linear Algebra / Inner Product Space / Hyperplane / SVM / Kernel Function / Normed vector space / Metric Space 里其实讲到了这个 Rank–nullity theorem,但是我当时还不知道它可以和 eigen-decomposition 联系起来。
假设有一个线性变换
我们把 matrix
然后关键来了:
- The nullity is the dimension of the kernel of the matrix.
- 然后 kernel 可以看成什么?kernel 其实就是 eigenvalue
的 eigenspace 呀 - 所以
3. Rank of and Permalink
首先一点:
- 然后
。
所以必定有
我们可以进一步证明
根据 rank-nullity theorem:
假设
问题来了:
- 如果不考虑 uniqueness 的话,能否说明
比 多 个值为 0 的 eigenvalues?- 答案是可以,但是你不能用 “针对同一个 eigenvalue
, 比 多了 个 eigenvectors” 这个理由,因为 eigenvector 的数量是 geometric multiplicity - 而 eigenvalue 的数量是 algebraic multiplicity
- 答案是可以,但是你不能用 “针对同一个 eigenvalue
- 那么其他
的 eigenvalues 的情况如何?
看下一节
4. Sylvester’s determinant identityPermalink
If
我们借此研究一下 characteristic polynomial of
Amazing!我们可以推论 (记得我们仍然在
- 如果
是 ( ) 的 eigenvalue 那它也一定是 ( ) 的 eigenvalue- 且 algebraic multiplicity 相同
( ) 不一定有 的 eigenvalue- 假设
( ) 中 eigenvalue 的 algebraic multiplicity 为 ( 表示 no such eigenvalue) ( ) 中 eigenvalue 的 algebraic multiplicity 为 - 换言之,
and share the same non-zero eigenvalues!
5. SVDPermalink
我们回头看
对角线上是 的 eigenvalues (且按惯例是降序排列,下同) 对角线上是 的 eigenvalues
所以
考虑到
- 考虑 general 的情况,sigular value 的个数应该是
考虑到
然后有:
的 eigenvectors (即 的 columns) 称为 的 left singular vectors 的 eigenvectors (即 的 columns) 称为 的 right singular vectors
一个题外话:Theorem: If
Proof:
Comments