【矩阵论】2. 矩阵分解——QR分解

矩阵论
1. 准备知识——复数域上的矩阵与换位公式)
1. 准备知识——复数域上的内积域正交阵
1. 准备知识——相似对角化与合同&正定阵
2. 矩阵分解—— SVD准备知识——奇异值
2. 矩阵分解——SVD
2. 矩阵分解——QR分解
2. 矩阵分解——乔利斯分解&平方根公式
2. 矩阵分解——正规谱分解——正规阵
2. 矩阵分解——正规分解
2. 矩阵分解——单阵及特征值特征向量一些求法


4.1 Schmidt正交化

设有3个n阶向量 α 1 , α 2 , α 3 \alpha_1,\alpha_2,\alpha_3 α1,α2,α3 线性无关
令 β 1 = α 1 β 2 = α 2 − ( α 2 , β 1 ) ∣ β 1 ∣ 2 β 3 = α 3 − ( α 3 , β 2 ) ∣ β 2 ∣ 2 − ( α 1 , β 2 ) ∣ β 2 ∣ 2 \begin{aligned} 令&\beta_1=\alpha_1\\ &\beta_2=\alpha_2-\frac{(\alpha_2,\beta_1)}{\vert \beta_1\vert^2}\\ &\beta_3=\alpha_3-\frac{(\alpha_3,\beta_2)}{\vert \beta_2\vert^2}-\frac{(\alpha_1,\beta_2)}{\vert \beta_2\vert^2} \end{aligned} β1=α1β2=α2β12(α2,β1)β3=α3β22(α3,β2)β22(α1,β2)
用 Schmidt 方法可构造半U阵 Q = ( β 1 ∣ β 1 ∣ , β 2 ∣ β 2 ∣ , β 3 ∣ β 3 ∣ ) Q=\left(\frac{\beta_1}{\vert \beta_1\vert},\frac{\beta_2}{\vert \beta_2\vert},\frac{\beta_3}{\vert \beta_3\vert}\right) Q=(β1β1,β2β2,β3β3) 是半U阵,可知 Q H Q = I Q^HQ=I QHQ=I

4.2 QR分解

4.2.1 定义

case1

设 A = ( α 1 , ⋯   , α p ) n × p ,列无关 ( 高阵 ) ,则有分解 A = Q R ,其中 Q = ( ϵ 1 , ⋯   , ϵ p ) n × p 为半 U 阵, R = ( b 1 ∗ ⋱ 0 b p ) 是上三角 , b p > 0 \begin{aligned} &设A=\left(\alpha_1,\cdots,\alpha_p\right)_{n\times p},列无关(高阵),则有分解A=QR,其中\\ &Q=\left(\epsilon_1,\cdots,\epsilon_p \right)_{n\times p}为半U阵,R=\left( \begin{matrix} b_1&&*\\ &\ddots&\\ 0&&b_p \end{matrix} \right)是上三角,b_p>0 \end{aligned} A=(α1,,αp)n×p,列无关(高阵),则有分解A=QR,其中Q=(ϵ1,,ϵp)n×p为半U阵,R= b10bp 是上三角,bp>0

Q阵求法

由 S c h m i d t 公式,产生正交向量组 β 1 , β 2 , ⋯   , β p , ϵ 1 = β 1 ∣ β 1 ∣ , ⋯   , ϵ 1 = β p ∣ β p ∣ ,则 Q 是半 U 阵, Q H Q = I \begin{matrix} &由Schmidt公式,产生正交向量组\beta_1,\beta_2,\cdots,\beta_p,\\ &\epsilon_1=\frac{\beta_1}{\vert \beta_1\vert},\cdots,\epsilon_1=\frac{\beta_p}{\vert \beta_p\vert},则Q是半U阵,Q^HQ=I \end{matrix} Schmidt公式,产生正交向量组β1,β2,,βpϵ1=β1β1,,ϵ1=βpβp,则Q是半U阵,QHQ=I

R阵求法

A = Q R , 则 Q H A = Q H Q R = R ⇒ R = Q H A \begin{aligned} A=QR,则Q^HA=Q^HQR=R\Rightarrow R=Q^HA \end{aligned} A=QR,QHA=QHQR=RR=QHA

case2

设方阵 A = ( α 1 , ⋯   , α n ) 可逆,则有 A = Q R ,其中 Q = Q n × n 是 U 阵, R = ( b 1 ∗ ⋱ 0 b p ) 是上三角,且 b i > 0 \begin{aligned} &设方阵A=\left(\alpha_1,\cdots,\alpha_n\right)可逆,则有A=QR,其中\\ &Q=Q_{n\times n} 是U阵,R=\left( \begin{matrix} b_1&&*\\ &\ddots&\\ 0&&b_p \end{matrix} \right)是上三角,且b_i>0 \end{aligned} 设方阵A=(α1,,αn)可逆,则有A=QR,其中Q=Qn×nU阵,R= b10bp 是上三角,且bi>0

case 3

任一方阵 A = A n × n 都有 A = Q R , Q 是 U 阵, R = ( b 1 ∗ ⋱ 0 b p ) 是上三角 \begin{aligned} 任一方阵A=A_{n\times n}都有A=QR,Q是U阵,R=\left( \begin{matrix} b_1&&*\\ &\ddots&\\ 0&&b_p \end{matrix} \right)是上三角 \end{aligned} 任一方阵A=An×n都有A=QRQU阵,R= b10bp 是上三角

4.2.2 QR分解步骤

  1. 先用 Schmidt 公式,求U阵Q或半U阵Q
  2. 在用 R = Q H A R=Q^HA R=QHA,求上三角阵R
  3. 写出分解A=QR

eg
A = ( 1 2 i i 1 i 0 ) = ( α 1 , α 2 ) ,求 Q R 分解 \begin{aligned} &A=\left( \begin{matrix} 1&2i\\ i&1\\ i&0 \end{matrix} \right)=\left(\alpha_1,\alpha_2\right),求QR分解 \end{aligned} A= 1ii2i10 =(α1,α2),求QR分解


β 1 = α 1 = ( 1 i i ) , β 2 = α 1 − ( α 2 , β 1 ) ∣ β 2 ∣ 2 β 1 = 1 3 ( 5 i 4 1 ) ϵ 1 = β 1 ∣ β 1 ∣ = 1 3 ( 1 i i ) , ϵ 2 = β 2 ∣ β 2 ∣ = 1 42 ( 5 i 4 1 ) , 令 Q = ( ϵ 1 , ⋯   , ϵ 2 ) = ( 1 3 5 i 42 i 3 4 42 i 3 1 42 ) 为半 U 阵 R = Q H A = ( 1 3 − i 3 − i 3 − 5 i 42 4 42 1 42 ) A = ( 3 i 3 0 14 3 ) 为上三角 , 可得 A = Q R = ( 1 3 5 i 42 i 3 4 42 i 3 1 42 ) ( 3 i 3 0 14 3 ) \begin{aligned} &\beta_1=\alpha_1=\left( \begin{matrix} 1\\i\\i \end{matrix} \right),\beta_2=\alpha_1-\frac{(\alpha_2,\beta_1)}{\vert \beta_2 \vert^2}\beta_1=\frac{1}{3}\left( \begin{matrix} 5i\\4\\1 \end{matrix} \right)\\ &\epsilon_1=\frac{\beta_1}{\vert \beta_1 \vert}=\frac{1}{\sqrt{3}}\left( \begin{matrix} 1\\i\\i \end{matrix} \right),\epsilon_2=\frac{\beta_2}{\vert \beta_2\vert}=\frac{1}{42}\left( \begin{matrix} 5i\\4\\1 \end{matrix} \right),\\ &令Q=\left(\epsilon_1,\cdots,\epsilon_2\right)=\left( \begin{matrix} \frac{1}{\sqrt{3}}&\frac{5i}{\sqrt{42}}\\ \frac{i}{3}&\frac{4}{\sqrt{42}}\\ \frac{i}{3}&\frac{1}{\sqrt{42}} \end{matrix} \right)为半U阵\\ &R=Q^HA=\left( \begin{matrix} \frac{1}{\sqrt{3}}&\frac{-i}{3}&\frac{-i}{3}\\ \frac{-5i}{\sqrt{42}}&\frac{4}{\sqrt{42}}&\frac{1}{\sqrt{42}}\\ \end{matrix} \right)A=\left( \begin{matrix} \sqrt{3}&\frac{i}{\sqrt{3}}\\ 0&\frac{\sqrt{14}}{\sqrt{3}} \end{matrix} \right)为上三角,\\ &可得A=QR=\left( \begin{matrix} \frac{1}{\sqrt{3}}&\frac{5i}{\sqrt{42}}\\ \frac{i}{3}&\frac{4}{\sqrt{42}}\\ \frac{i}{3}&\frac{1}{\sqrt{42}} \end{matrix} \right)\left( \begin{matrix} \sqrt{3}&\frac{i}{\sqrt{3}}\\ 0&\frac{\sqrt{14}}{\sqrt{3}} \end{matrix} \right) \end{aligned} β1=α1= 1ii ,β2=α1β22(α2,β1)β1=31 5i41 ϵ1=β1β1=3 1 1ii ,ϵ2=β2β2=421 5i41 ,Q=(ϵ1,,ϵ2)= 3 13i3i42 5i42 442 1 为半UR=QHA=(3 142 5i3i42 43i42 1)A=(3 03 i3 14 )为上三角,可得A=QR= 3 13i3i42 5i42 442 1 (3 03 i3 14 )

4.2.3 例题

case2

A = ( 1 i i 1 ) = ( α 1 , α 2 ) \begin{aligned} &A=\left( \begin{matrix} 1&i\\ i&1 \end{matrix} \right)=\left(\alpha_1,\alpha_2\right) \end{aligned} A=(1ii1)=(α1,α2)


令 β 1 = α 1 = ( 1 i ) , ∣ β 1 ∣ 2 = 2 , ∣ β 1 ∣ = 2 β 2 = α 2 − ( α 2 , β 1 ) ∣ β 1 ∣ 2 β 1 = ( i 1 ) 单位化,令 ϵ 1 = β 1 ∣ β 1 ∣ = 1 2 β 1 , ϵ 2 = β 2 ∣ β 2 ∣ = 1 2 β 2 令 Q = ( ϵ 1 , ϵ 2 ) = ( 1 2 i 2 i 2 1 2 ) , R = Q H A = ( 2 0 0 2 ) 可得 A = Q R = ( 1 2 i 2 i 2 1 2 ) ( 2 0 0 2 ) \begin{aligned} &令\beta_1=\alpha_1=\left( \begin{matrix} 1\\i \end{matrix} \right),\vert \beta_1\vert^2=2,\vert \beta_1\vert=\sqrt{2}\\ &\beta_2=\alpha_2-\frac{(\alpha_2,\beta_1)}{\vert \beta_1\vert^2}\beta_1=\left( \begin{matrix} i\\1 \end{matrix} \right)\\ &单位化,令\epsilon_1=\frac{\beta_1}{\vert \beta_1\vert}=\frac{1}{\sqrt{2}}\beta_1,\epsilon_2=\frac{\beta_2}{\vert \beta_2\vert}=\frac{1}{\sqrt{2}}\beta_2\\ &令Q=\left( \begin{matrix} \epsilon_1,\epsilon_2 \end{matrix} \right)=\left( \begin{matrix} \frac{1}{\sqrt{2}}&\frac{i}{\sqrt{2}}\\ \frac{i}{\sqrt{2}}&\frac{1}{\sqrt{2}} \end{matrix} \right),R=Q^HA=\left( \begin{matrix} \sqrt{2}&0\\ 0&\sqrt{2} \end{matrix} \right)\\ &可得A=QR=\left( \begin{matrix} \frac{1}{\sqrt{2}}&\frac{i}{\sqrt{2}}\\ \frac{i}{\sqrt{2}}&\frac{1}{\sqrt{2}} \end{matrix} \right)\left( \begin{matrix} \sqrt{2}&0\\ 0&\sqrt{2} \end{matrix} \right) \end{aligned} β1=α1=(1i),β12=2,β1=2 β2=α2β12(α2,β1)β1=(i1)单位化,令ϵ1=β1β1=2 1β1,ϵ2=β2β2=2 1β2Q=(ϵ1,ϵ2)=(2 12 i2 i2 1),R=QHA=(2 002 )可得A=QR=(2 12 i2 i2 1)(2 002 )

case1

A = ( α 1 , α 2 , α 3 ) = ( 1 − 1 4 1 4 − 2 1 4 2 1 − 1 0 ) 4 × 3 , 求 A = Q R \begin{aligned} &A=\left( \alpha_1,\alpha_2,\alpha_3 \right)=\left( \begin{matrix} 1&-1&4\\ 1&4&-2\\ 1&4&2\\ 1&-1&0 \end{matrix} \right)_{4\times 3},求A=QR \end{aligned} A=(α1,α2,α3)= 111114414220 4×3,A=QR


令 β 1 = α 1 = ( 1 1 1 1 ) , ∣ β 1 ∣ 2 = 4 , ∣ β 1 ∣ = 2 β 2 = α 2 − ( α 2 , β 1 ) ∣ β 1 ∣ 2 β 1 = 5 2 ( − 1 1 1 − 1 ) , ∣ β 2 ∣ = 5 , β 3 = α 3 − ( α 3 , β 2 ) ∣ β 2 ∣ 2 β 2 − ( α 3 , β 1 ) ∣ β 1 ∣ 2 = 2 ( 1 − 1 1 − 1 ) , ∣ β 3 ∣ = 4 ϵ 1 = β 1 ∣ β 1 ∣ = 1 2 ( 1 1 1 1 ) , ϵ 2 = β 2 ∣ β 2 ∣ = 1 2 ( − 1 1 1 − 1 ) , ϵ 3 = β 3 ∣ β 3 ∣ = 1 2 ( 1 − 1 1 − 1 ) 令 Q = ( ϵ 1 , ϵ 2 , ϵ 3 ) = 1 2 ( 1 − 1 1 1 1 − 1 1 1 1 1 − 1 − 1 ) , 为半 U 阵 . R = Q H A = ( 2 3 2 0 5 − 2 0 0 4 ) 则 A = Q R = 1 2 ( 1 − 1 1 1 1 − 1 1 1 1 1 − 1 − 1 ) ( 2 3 2 0 5 − 2 0 0 4 ) \begin{aligned} &令\beta_1=\alpha_1=\left( \begin{matrix} 1\\1\\1\\1 \end{matrix} \right),\vert \beta_1\vert^2=4,\vert \beta_1\vert=2\\ &\beta_2=\alpha_2-\frac{(\alpha_2,\beta_1)}{\vert \beta_1\vert^2}\beta_1=\frac{5}{2}\left( \begin{matrix} -1\\1\\1\\-1 \end{matrix} \right),\vert \beta_2\vert=5,\\ &\beta_3=\alpha_3-\frac{(\alpha_3,\beta_2)}{\vert \beta_2\vert^2}\beta_2-\frac{(\alpha_3,\beta_1)}{\vert \beta_1\vert^2}=2\left( \begin{matrix} 1\\-1\\1\\-1 \end{matrix} \right),\vert \beta_3\vert=4\\ &\epsilon_1=\frac{\beta_1}{\vert \beta_1\vert}=\frac{1}{2}\left( \begin{matrix} 1\\1\\1\\1 \end{matrix} \right),\epsilon_2=\frac{\beta_2}{\vert \beta_2\vert}=\frac{1}{2}\left( \begin{matrix} -1\\1\\1\\-1 \end{matrix} \right),\epsilon_3=\frac{\beta_3}{\vert \beta_3\vert}=\frac{1}{2}\left( \begin{matrix} 1\\-1\\1\\-1 \end{matrix} \right)\\ & 令Q=\left(\epsilon_1,\epsilon_2,\epsilon_3\right)=\frac{1}{2}\left( \begin{matrix} 1&-1&1\\ 1&1&-1\\ 1&1&1\\ 1&-1&-1 \end{matrix} \right),为半U阵.R=Q^HA=\left( \begin{matrix} 2&3&2\\ 0&5&-2\\ 0&0&4 \end{matrix} \right)\\ &则A=QR=\frac{1}{2}\left( \begin{matrix} 1&-1&1\\ 1&1&-1\\ 1&1&1\\ 1&-1&-1 \end{matrix} \right)\left( \begin{matrix} 2&3&2\\ 0&5&-2\\ 0&0&4 \end{matrix} \right) \end{aligned} β1=α1= 1111 ,β12=4,β1=2β2=α2β12(α2,β1)β1=25 1111 ,β2=5,β3=α3β22(α3,β2)β2β12(α3,β1)=2 1111 ,β3=4ϵ1=β1β1=21 1111 ,ϵ2=β2β2=21 1111 ,ϵ3=β3β3=21 1111 Q=(ϵ1,ϵ2,ϵ3)=21 111111111111 ,为半U.R=QHA= 200350224 A=QR=21 111111111111 200350224

【矩阵论】2. 矩阵分解——QR分解_第1张图片

4.2.4 QR分解证明

有 S c h m i d t 公式,可将 A 的列向量写为 : { β 1 = α 1 ⋮ β p = α p − ( α p , β 1 ) ∣ β 1 ∣ 2 β 1 − ⋯ − ( α p , β p − 1 ) ∣ β p − 1 ∣ 2 β p − 1 可知 α 向量组与 β 向量组可互相表出: { α 1 = β 1 α 2 = ( ∗ ) β 2 + β 1 ⋮ α p = ( ∗ ) β 1 + ( ∗ ) β 2 + ⋯ + β p ⇒ ( α 1 , ⋯   , α p ) = ( β 1 , β 2 , ⋯   , β p ) ( 1 ∗ ⋯ ∗ 0 1 ⋯ ∗ ⋮ ⋮ ⋱ ⋮ 0 0 ⋯ 1 ) 若将 β 向量组单位化: ϵ 1 = β 1 ∣ β 1 ∣ , ϵ = β 2 ∣ β 2 ∣ , ⋯   , ϵ p = β p ∣ β p ∣ 则 ( β 1 , β 2 , ⋯   , β p ) = ( ∣ β 1 ∣ ϵ 1 , ∣ β 2 ∣ ϵ 2 , ⋯   , ∣ β p ∣ ϵ p ) = ( ϵ 1 , ϵ 2 , ⋯   , ϵ p ) ( ∣ β 1 ∣ ∣ β 2 ∣ ⋱ ∣ β p ∣ ) 故 A = ( β 1 , β 2 , ⋯   , β p ) ( 1 ∗ ⋯ ∗ 0 1 ⋯ ∗ ⋮ ⋮ ⋱ ⋮ 0 0 ⋯ 1 ) = ( ϵ 1 , ϵ 2 , ⋯   , ϵ p ) ( ∣ β 1 ∣ ∣ β 2 ∣ ⋱ ∣ β p ∣ ) ( 1 ∗ ⋯ ∗ 0 1 ⋯ ∗ ⋮ ⋮ ⋱ ⋮ 0 0 ⋯ 1 ) = ( ϵ 1 , ϵ 2 , ⋯   , ϵ p ) ( ∣ β 1 ∣ ∗ ⋯ ∗ 0 ∣ β 2 ∣ ⋯ ∗ ⋮ ⋮ ⋱ ⋮ 0 0 ⋯ ∣ β p ∣ ) = Q R \begin{aligned} &有Schmidt公式,可将A的列向量写为:\\ &\left\{ \begin{aligned} &\beta_1=\alpha_1\\ &\vdots\\ &\beta_p=\alpha_p-\frac{(\alpha_p,\beta_1)}{\vert \beta_1\vert^2}\beta_1-\cdots-\frac{(\alpha_p,\beta_{p-1})}{\vert \beta_{p-1}\vert^2}\beta_{p-1}\\ \end{aligned} \right.\\ &可知 \alpha向量组与\beta向量组可互相表出:\\ &\left\{ \begin{aligned} &\alpha_1=\beta_1\\ &\alpha_2=(*)\beta_2+\beta_1\\ &\vdots\\ &\alpha_p=(*)\beta_1+(*)\beta_2+\cdots+\beta_p \end{aligned} \right.\\ &\Rightarrow \left(\alpha_1,\cdots,\alpha_p\right)=\left(\beta_1,\beta_2,\cdots,\beta_p\right)\left( \begin{matrix} 1&*&\cdots&*\\ 0&1&\cdots&*\\ \vdots&\vdots&\ddots&\vdots\\ 0&0&\cdots&1 \end{matrix} \right)\\ &若将\beta向量组单位化:\epsilon_1=\frac{\beta_1}{\vert \beta_1\vert},\epsilon=\frac{\beta_2}{\vert \beta_2\vert},\cdots,\epsilon_p=\frac{\beta_p}{\vert \beta_p\vert}\\ &则\left(\beta_1,\beta_2,\cdots,\beta_p\right)=\left( \vert \beta_1\vert\epsilon_1,\vert \beta_2\vert\epsilon_2,\cdots,\vert \beta_p\vert\epsilon_p \right)\\ &=\left(\epsilon_1,\epsilon_2,\cdots,\epsilon_p\right)\left( \begin{matrix} \vert \beta_1\vert &&\\ &&\vert \beta_2\vert& \\ &&&\ddots&\\ &&&&\vert \beta_p\vert \end{matrix} \right)\\ &故A=\left(\beta_1,\beta_2,\cdots,\beta_p\right)\left( \begin{matrix} 1&*&\cdots&*\\ 0&1&\cdots&*\\ \vdots&\vdots&\ddots&\vdots\\ 0&0&\cdots&1 \end{matrix} \right)\\ &=\left(\epsilon_1,\epsilon_2,\cdots,\epsilon_p\right)\left( \begin{matrix} \vert \beta_1\vert &&\\ &&\vert \beta_2\vert& \\ &&&\ddots&\\ &&&&\vert \beta_p\vert \end{matrix} \right)\left( \begin{matrix} 1&*&\cdots&*\\ 0&1&\cdots&*\\ \vdots&\vdots&\ddots&\vdots\\ 0&0&\cdots&1 \end{matrix} \right)\\ &=\left(\epsilon_1,\epsilon_2,\cdots,\epsilon_p\right)\left( \begin{matrix} \vert \beta_1\vert&*&\cdots&*\\ 0&\vert \beta_2\vert&\cdots&*\\ \vdots&\vdots&\ddots&\vdots\\ 0&0&\cdots&\vert \beta_p\vert \end{matrix} \right)\\ &=QR \end{aligned} Schmidt公式,可将A的列向量写为: β1=α1βp=αpβ12(αp,β1)β1βp12(αp,βp1)βp1可知α向量组与β向量组可互相表出: α1=β1α2=()β2+β1αp=()β1+()β2++βp(α1,,αp)=(β1,β2,,βp) 100101 若将β向量组单位化:ϵ1=β1β1,ϵ=β2β2,,ϵp=βpβp(β1,β2,,βp)=(β1ϵ1,β2ϵ2,,βpϵp)=(ϵ1,ϵ2,,ϵp) β1β2βp A=(β1,β2,,βp) 100101 =(ϵ1,ϵ2,,ϵp) β1β2βp 100101 =(ϵ1,ϵ2,,ϵp) β100β20βp =QR

4.2.5 QR分解的平移性质

若方阵 A n × n 不可逆, ( ∣ A ∣ = 0 ) ,令 A ϵ = ( A + ϵ I ) , A ϵ 可逆 ⇒ A ϵ = Q ϵ R ϵ 若 ϵ → 0 ⇒ A = Q R , Q 为 U 阵, R 为上三角阵 \begin{aligned} &若方阵A_{n\times n}不可逆,(\vert A\vert =0),令A_{\epsilon}=(A+\epsilon I),A_{\epsilon}可逆\Rightarrow A_\epsilon=Q_\epsilon R_{\epsilon}\\ &若\epsilon\rightarrow 0\Rightarrow A=QR,Q为U阵,R为上三角阵 \end{aligned} 若方阵An×n不可逆,(A=0),令Aϵ=(A+ϵI),Aϵ可逆Aϵ=QϵRϵϵ0A=QR,QU阵,R为上三角阵

你可能感兴趣的:(#,矩阵论,数学,矩阵,线性代数,算法)