QR分解

QR分解
【QR分解】QR分解基于施密特正交化,对向量 a 1 , a 2 , . . . , a n \mathbf{a}_1,\mathbf{a}_2,...,\mathbf{a}_n a1?,a2?,...,an?,其施密特正交化为
b i = a i ? ∑ k = 1 i ? 1 q k q k T a i \mathbf{b}_i = \mathbf{a}_i-\sum_{k=1}^{i-1}\mathbf{q}_k\mathbf{q}_k^T\mathbf{a}_i bi?=ai??k=1∑i?1?qk?qkT?ai?
其中
q i = b i ∣ b i ∣ \mathbf{q}_i=\frac{\mathbf{b}_i}{\mid \mathbf{b}_i \mid} qi?=∣bi?∣bi??
为单位化的正交向量,将求和项移到另一边得
a i = b i + ∑ k = 1 i ? 1 q k q k T a i \mathbf{a}_i=\mathbf{b}_i+\sum_{k=1}^{i-1}\mathbf{q}_k\mathbf{q}_k^T\mathbf{a}_i ai?=bi?+k=1∑i?1?qk?qkT?ai?
b i \mathbf{b}_i bi?是 a i \mathbf{a}_i ai?在 q i \mathbf{q}_i qi?的投影,即
b i = q i q i T a i \mathbf{b}_i=\mathbf{q}_i\mathbf{q}_i^T\mathbf{a}_i bi?=qi?qiT?ai?
综上所述
a i = ∑ k = 1 i q k q k T a i \mathbf{a}_i=\sum_{k=1}^{i}\mathbf{q}_k\mathbf{q}_k^T\mathbf{a}_i ai?=k=1∑i?qk?qkT?ai?
这显然是矩阵和列向量的乘积,不失一般性,假设矩阵 A = [ a 1 a 2 a 3 ] \mathbf{A}=\begin{bmatrix}\mathbf{a}_1& \mathbf{a}_2& \mathbf{a}_3\end{bmatrix} A=[a1??a2??a3??],其QR分解可表示为
A = [ q 1 q 2 q 3 ] [ q 1 T a 1 q 1 T a 2 q 1 T a 3 q 2 T a 1 q 2 T a 2 q 2 T a 3 q 3 T a 1 q 3 T a 2 q 3 T a 3 ] = [ q 1 q 2 q 3 ] [ q 1 T a 1 q 1 T a 2 q 1 T a 3 0 q 2 T a 2 q 2 T a 3 0 0 q 3 T a 3 ] \mathbf{A}=\begin{bmatrix}\mathbf{q}_1& \mathbf{q}_2& \mathbf{q}_3\end{bmatrix} \begin{bmatrix} \mathbf{q}^T_1\mathbf{a}_1& \mathbf{q}^T_1\mathbf{a}_2& \mathbf{q}^T_1\mathbf{a}_3 \\ \mathbf{q}^T_2\mathbf{a}_1& \mathbf{q}^T_2\mathbf{a}_2& \mathbf{q}^T_2\mathbf{a}_3 \\ \mathbf{q}^T_3\mathbf{a}_1& \mathbf{q}^T_3\mathbf{a}_2& \mathbf{q}^T_3\mathbf{a}_3 \end{bmatrix} =\begin{bmatrix}\mathbf{q}_1& \mathbf{q}_2& \mathbf{q}_3\end{bmatrix} \begin{bmatrix} \mathbf{q}^T_1\mathbf{a}_1& \mathbf{q}^T_1\mathbf{a}_2& \mathbf{q}^T_1\mathbf{a}_3 \\ 0& \mathbf{q}^T_2\mathbf{a}_2& \mathbf{q}^T_2\mathbf{a}_3 \\ 0& 0& \mathbf{q}^T_3\mathbf{a}_3 \end{bmatrix} A=[q1??q2??q3??]???q1T?a1?q2T?a1?q3T?a1??q1T?a2?q2T?a2?q3T?a2??q1T?a3?q2T?a3?q3T?a3?????=[q1??q2??q3??]???q1T?a1?00?q1T?a2?q2T?a2?0?q1T?a3?q2T?a3?q3T?a3?????
QR分解要求矩阵必须列满秩,Q是正交化后的原矩阵,R是上三角矩阵,满足 R i j = q i T a j R_{ij}=\mathbf{q}^T_i\mathbf{a}_j Rij?=qiT?aj?

    推荐阅读