文章目录
矩阵的因子分解1-奇异值分解
题型:对 A ∈ C m × n A \in \mathbb{C}^{m \times n} A∈Cm×n 进行奇异值分解 A = U Σ V H A = U \Sigma V^H A=UΣVH
题目中为简化计算,都是取 C m × n \mathbb{C}^{m\times n} Cm×n的特殊情形: R m × n \mathbb{R}^{m\times n} Rm×n,如下也是按照 R m × n \mathbb{R}^{m\times n} Rm×n 来展开的
求法归纳
-
求 A H A A^HA AHA 的特征值和特征向量 α 1 , α 2 , … {\alpha_1,\alpha_2,\dots} α1,α2,…
单位化特征向量得到 V V V -
用非零特征值求 : A A A 的奇异值 和 将奇异值按从大到小的顺序排列并形成对角矩阵 Σ \Sigma Σ
-
求 A A H AA^H AAH 的特征值和特征向量 β 1 , β 2 , … {\beta_1,\beta_2,\dots} β1,β2,…
单位化特征向量得到 U U U -
A = U ( Σ 0 0 0 ) V H A =U \begin{pmatrix} \Sigma&0\\ 0&0 \end{pmatrix} V^H A=U(Σ000)VH
注:
-
A H A A^HA AHA 和 A A H AA^H AAH 均为对称矩阵,特征值均非负,且二者的非零特征值相同;不同特征值对应的特征向量正交
-
计算量大但推荐,不用通过 Gram-Schmidt 正交化方法补充单位向量
例1. 对矩阵 A = ( 0 1 − 1 0 0 2 1 0 ) A = \begin{pmatrix} 0 & 1 \\ -1 & 0 \\ 0 & 2 \\ 1 & 0 \end{pmatrix} A= 0−1011020 进行奇异值分解
1. 计算 A H A A^H A AHA 的特征值和特征向量
A H A = ( 0 − 1 0 1 1 0 2 0 ) ( 0 1 − 1 0 0 2 1 0 ) = ( 2 0 0 5 ) A^H A = \begin{pmatrix} 0 & -1 & 0 & 1 \\ 1 & 0 & 2 & 0 \end{pmatrix} \begin{pmatrix} 0 & 1 \\ -1 & 0 \\ 0 & 2 \\ 1 & 0 \end{pmatrix} = \begin{pmatrix} 2 & 0 \\ 0 & 5 \end{pmatrix} AHA=(01−100210) 0−1011020 =(2005)
特征值为:
λ 1 = 5 , λ 2 = 2 \lambda_1 = 5, \quad \lambda_2 = 2 λ1=5,λ2=2
对应的特征向量为:
α 1 = ( 0 1 ) , α 2 = ( 1 0 ) \alpha_1 = \begin{pmatrix} 0 \\ 1 \end{pmatrix}, \quad \alpha_2 = \begin{pmatrix} 1 \\ 0 \end{pmatrix} α1=(01),α2=(10)
将特征向量单位化:
v 1 = α 1 ∥ α 1 ∥ = ( 0 1 ) , v 2 = α 2 ∥ α 2 ∥ = ( 1 0 ) v_1 = \frac{\alpha_1}{\|\alpha_1\|} = \begin{pmatrix} 0 \\ 1 \end{pmatrix}, \quad v_2 = \frac{\alpha_2}{\|\alpha_2\|} = \begin{pmatrix} 1 \\ 0 \end{pmatrix} v1=∥α1∥α1=(01),v2=∥α2∥α2=(10)
V = ( 0 1 1 0 ) V = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} V=(0110)
2. 将奇异值按从大到小排列,并构造对角矩阵 Σ \Sigma Σ
奇异值是特征值的平方根
σ 1 = 5 , σ 2 = 2 \sigma_1 = \sqrt{5}, \quad \sigma_2 = \sqrt{2} σ1=5,σ2=2
则
Σ = ( 5 0 0 2 0 0 0 0 ) \Sigma = \begin{pmatrix} \sqrt{5} & 0 \\ 0 & \sqrt{2} \\ 0 & 0 \\ 0 & 0 \end{pmatrix} Σ= 50000200
3. 计算 A A H A A^H AAH 的特征值和特征向量
A A H = ( 0 1 − 1 0 0 2 1 0 ) ( 0 − 1 0 1 1 0 2 0 ) = ( 1 0 2 0 0 1 0 − 1 2 0 4 0 0 − 1 0 1 ) A A^H = \begin{pmatrix} 0 & 1 \\ -1 & 0 \\ 0 & 2 \\ 1 & 0 \end{pmatrix} \begin{pmatrix} 0 & -1 & 0 & 1 \\ 1 & 0 & 2 & 0 \end{pmatrix} = \begin{pmatrix} 1 & 0 & 2 & 0 \\ 0 & 1 & 0 & -1 \\ 2 & 0 & 4 & 0 \\ 0 & -1 & 0 & 1 \end{pmatrix} AAH= 0−1011020 (01−100210)= 1020010−120400−101
特征值为:
λ 1 = 5 , λ 2 = 2 , λ 3 = 0 , λ 4 = 0 \lambda_1 = 5, \quad \lambda_2 = 2, \quad \lambda_3 = 0, \quad \lambda_4 = 0 λ1=5,λ2=2,λ3=0,λ4=0
对应的特征向量为:
β 1 = ( 1 0 2 0 ) , β 2 = ( 0 − 1 0 1 ) , β 3 = ( 0 1 0 1 ) , β 4 = ( − 2 0 1 0 ) \beta_1 = \begin{pmatrix} 1 \\ 0 \\ 2 \\ 0 \end{pmatrix}, \quad \beta_2 = \begin{pmatrix} 0 \\ -1 \\ 0 \\ 1 \end{pmatrix}, \quad \beta_3 = \begin{pmatrix} 0 \\ 1 \\ 0 \\ 1 \end{pmatrix}, \quad \beta_4 = \begin{pmatrix} -2 \\ 0 \\ 1 \\ 0 \end{pmatrix} β1= 1020 ,β2= 0−101 ,β3= 0101 ,β4= −2010
一定要确保所有的特征向量两两正交!!!特征值相同求出的特征向量不一定正交!!!这题易得特征值为零的两个特征向量正交!
将特征向量单位化:
u 1 = β 2 ∥ β 2 ∥ = ( 1 5 0 2 5 0 ) , u 2 = β 1 ∥ β 1 ∥ = ( 0 − 1 2 0 1 2 ) , u 3 = β 3 ∥ β 3 ∥ = ( 0 1 2 0 1 2 ) , u 4 = β 4 ∥ β 4 ∥ = ( − 2 5 0 1 5 0 ) u_1 = \frac{\beta_2}{\|\beta_2\|} = \begin{pmatrix} \frac{1}{\sqrt{5}} \\ 0 \\ \frac{2}{\sqrt{5}} \\ 0 \end{pmatrix}, \quad u_2 = \frac{\beta_1}{\|\beta_1\|} = \begin{pmatrix} 0 \\ -\frac{1}{\sqrt{2}} \\ 0 \\ \frac{1}{\sqrt{2}} \end{pmatrix}, \quad \\ u_3 = \frac{\beta_3}{\|\beta_3\|} = \begin{pmatrix} 0 \\ \frac{1}{\sqrt{2}} \\ 0 \\ \frac{1}{\sqrt{2}} \end{pmatrix}, \quad u_4 = \frac{\beta_4}{\|\beta_4\|} = \begin{pmatrix} -\frac{2}{\sqrt{5}} \\ 0 \\ \frac{1}{\sqrt{5}} \\ 0 \end{pmatrix} u1=∥β2∥β2= 510520 ,u2=∥β1∥β1= 0−21021 ,u3=∥β3∥β3= 021021 ,u4=∥β4∥β4= −520510
U = ( 1 5 0 0 − 2 5 0 − 1 2 1 2 0 2 5 0 0 1 5 0 1 2 1 2 0 ) U = \begin{pmatrix} \frac{1}{\sqrt{5}} & 0 & 0 & -\frac{2}{\sqrt{5}} \\ 0 & -\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} & 0 \\ \frac{2}{\sqrt{5}} &0 & 0 & \frac{1}{\sqrt{5}} \\ 0 &\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} & 0 \end{pmatrix} U= 5105200−21021021021−520510
u 3 u_3 u3 和 u 4 u_4 u4 的顺序与结果无关
4. 构造分解结果
此时得到的 U U U 和 V V V 不一定符合要求!需要进行调整(特征向量需要乘以“-1”)
要验证 A i j < 0 A_{ij}<0 Aij<0 的元素,验证公式如下:
A i j = U i _ Σ V _ j A_{ij} =U_{i\_}\Sigma V_{\_j} Aij=Ui_ΣV_j
其中:
- A i j A_{ij} Aij为矩阵 A A A中 i i i 行 j j j 列元素
- U i _ U_{i\_} Ui_为矩阵 U U U中 第 i i i
- V _ j V_{\_j} V_j为矩阵 V V V中第 j j j 列
本题需验证
A 21 = − 1 A_{21} = -1 A21=−1
( 0 − 1 2 0 1 2 ) ( 5 0 0 2 0 0 0 0 ) ( 0 1 ) = − 1 \begin{pmatrix} 0 & -\frac{1}{\sqrt{2}} & 0 & \frac{1}{\sqrt{2}} \end{pmatrix} \begin{pmatrix} \sqrt{5} & 0 \\ 0 & \sqrt{2} \\ 0 & 0 \\ 0 & 0 \end{pmatrix}\begin{pmatrix} 0 \\ 1 \end{pmatrix} = -1 (0−21021) 50000200 (01)=−1
不需要调整
故 A = U Σ V H A=U\Sigma V^H A=UΣVH
例2. 对矩阵 A = ( 0 − 1 1 2 0 0 ) A = \begin{pmatrix} 0 & -1&1 \\ 2 & 0 & 0 \end{pmatrix} A=(02−1010) 进行奇异值分解
1. 计算 A H A A^HA AHA 的特征值和特征向量
A H A = ( 0 2 − 1 0 1 0 ) ( 0 − 1 1 2 0 0 ) = ( 4 0 0 0 1 − 1 0 − 1 1 ) A^H A = \begin{pmatrix} 0 & 2 \\ -1 & 0 \\ 1 & 0 \end{pmatrix} \begin{pmatrix} 0 & -1 & 1 \\ 2 & 0 & 0 \end{pmatrix} = \begin{pmatrix} 4 & 0 & 0 \\ 0 & 1 & -1 \\ 0 & -1 & 1 \end{pmatrix} AHA= 0−11200 (02−1010)= 40001−10−11
特征值为:
λ 1 = 4 , λ 2 = 2 , λ 3 = 0 \lambda_1 = 4, \quad \lambda_2 = 2, \quad \lambda_3 = 0 λ1=4,λ2=2,λ3=0
对应的特征向量为:
v 1 = ( 1 0 0 ) , v 2 = ( 0 1 − 1 ) , v 3 = ( 0 1 1 ) \mathbf{v}_1 = \begin{pmatrix} 1 \\ 0 \\ 0 \end{pmatrix} , \quad \mathbf{v}_2 = \begin{pmatrix} 0 \\ 1 \\ -1 \end{pmatrix} , \quad \mathbf{v}_3 = \begin{pmatrix} 0 \\ 1 \\ 1 \end{pmatrix} v1= 100 ,v2= 01−1 ,v3= 011
将特征向量单位化:
V = ( 1 0 0 0 1 2 1 2 0 − 1 2 1 2 ) V = \begin{pmatrix} 1 & 0 & 0 \\ 0 & \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\ 0 & -\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \end{pmatrix} V= 100021−2102121
2. 将奇异值按从大到小排列,并构造对角矩阵 Σ \Sigma Σ
σ 1 = 4 = 2 , σ 2 = 2 \sigma_1 = \sqrt{4}=2, \quad \sigma_2 = \sqrt{2} σ1=4=2,σ2=2
则
Σ = ( 2 0 0 0 2 0 ) \Sigma = \begin{pmatrix} 2 & 0 &0\\ 0 & \sqrt{2}&0 \\ \end{pmatrix} Σ=(200200)
2. 计算 A A H AA^H AAH 的特征值和特征向量
A A T = ( 0 − 1 1 2 0 0 ) ( 0 2 − 1 0 1 0 ) = ( 2 0 0 4 ) A A^T = \begin{pmatrix} 0 & -1 & 1 \\ 2 & 0 & 0 \end{pmatrix} \begin{pmatrix} 0 & 2 \\ -1 & 0 \\ 1 & 0 \end{pmatrix} = \begin{pmatrix} 2 & 0 \\ 0 & 4 \end{pmatrix} AAT=(02−1010) 0−11200 =(2004)
特征值为:
λ 1 = 4 , λ 2 = 2 \lambda_1 = 4 , \quad \lambda_2 = 2 λ1=4,λ2=2
对应的特征向量为:
u 1 = ( 0 1 ) , u 2 = ( 1 0 ) \mathbf{u}_1 = \begin{pmatrix} 0 \\ 1 \end{pmatrix} , \quad \mathbf{u}_2 = \begin{pmatrix} 1 \\ 0 \end{pmatrix} u1=(01),u2=(10)
将特征向量单位化:
U = ( 0 1 1 0 ) U = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} U=(0110)
4. 构造分解结果
本题需验证
A 12 = − 1 A_{12} = -1 A12=−1
( 0 1 ) ( 2 0 0 0 2 0 ) ( 0 1 2 − 1 2 ) = 1 \begin{pmatrix} 0 & 1 \end{pmatrix} \begin{pmatrix} 2 & 0 &0\\ 0 & \sqrt{2}&0 \\ \end{pmatrix}\begin{pmatrix} 0\\ \frac{1}{\sqrt{2}} \\ -\frac{1}{\sqrt{2}} \end{pmatrix} = 1 (01)(200200) 021−21 =1
需要调整, V _ 2 = − V _ 2 = ( 0 − 1 2 1 2 ) V_{\_2}= - V_{\_2} = \begin{pmatrix} 0\\ -\frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \end{pmatrix} V_2=−V_2= 0−2121
V = ( 1 0 0 0 − 1 2 1 2 0 1 2 1 2 ) V = \begin{pmatrix} 1 & 0 & 0 \\ 0 & -\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\ 0 & \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \end{pmatrix} V= 1000−212102121
故 A = U Σ V H A=U\Sigma V^H A=UΣVH