ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

矩阵论 - 4 - LU分解

2021-10-07 22:03:21  阅读:203  来源: 互联网

标签:begin end 21 矩阵 cdots LU bmatrix 分解


LU分解

乘积的逆

乘积\(AB\)的逆为\(B^{-1}A^{-1}\)

\((AB) \cdot (B^{-1}A^{-1}) = A(BB^{-1})A^{-1} = AA^{-1}=I\)

乘积的转置

乘积\(AB\)的转置为\(B^TA^T\)。对于任何可逆的矩阵,有\(A^T\)的逆为\((A^{-1})^T\),即$(AT){-1} =(A{-1})T $。(逆和转置的运算可以交换顺序)

\[\begin{aligned}(A \cdot A^{-1})^{T} & = I^{T}\\(A^{-1})^{T} \cdot A^{T} & = I\\\textrm{则} A^{T} \textrm{的逆矩阵为} & (A^{-1})^{T}\end{aligned} \]

LU分解

LU分解:将矩阵\(A\)分解成2个矩阵(\(L\) 和 \(U\))的乘积。

where ‘LU’ stands for ‘lower upper’

\(L\) - 下三角阵,\(U\) - 上三角阵(下三角阵下三角不全为0,上三角反之)。

经过一系列初等变换, \(A\) → \(E_{21}A\) → \(E_{31}E_{21}A\) → ··· → \(U\),在2D下就是下面的样子:

\(\begin{aligned}E_{21}A = U \\\ \begin{bmatrix}1&0\\-4&1\end{bmatrix}\begin{bmatrix}2&1\\8&7\end{bmatrix}=\begin{bmatrix}2&1\\0&3\end{bmatrix}\end{aligned}\)

将上面式子化为\(A=LU\)形式:

\(\begin{aligned}E_{21}A = U \\ E_{21}^{-1}E_{21}A = E_{21}^{-1} U\\A=E_{21}^{-1}U \end{aligned}\)

即:

\(\begin{aligned}A = LU \\\ \begin{bmatrix}2&1\\8&7\end{bmatrix}=\begin{bmatrix}1&0\\4&1\end{bmatrix}\begin{bmatrix}2&1\\0&3\end{bmatrix}\end{aligned}\)

计算代价

  1. 将\(a_{11}\)作为主元,需要的运算量约为\(n^2\)。

\[x\begin{bmatrix}a_{11} & a_{12} & \cdots & a_{1n} \\a_{21} & a_{22} & \cdots & a_{2n} \\\vdots & \vdots & \ddots & \vdots \\a_{n1} & a_{n2} & \cdots & a_{nn} \\\end{bmatrix}\underrightarrow{消元}\begin{bmatrix}a_{11} & a_{12} & \cdots & a_{1n} \\0 & a_{22} & \cdots & a_{2n} \\0 & \vdots & \ddots & \vdots \\0 & a_{n2} & \cdots & a_{nn} \\\end{bmatrix} \]

  1. 以此类推,接下来每一步计算量约为\((n-1)^2、(n-2)^2、\cdots、2^2、1^2\)。

  2. 将 \(A\) 变换为 \(LU\) 的总运算量应为\(O(n^2+(n-1)^2+\cdots+2^2+1^2)\),即\(O(\frac{n^3}{3})\)。

行交换-置换矩阵

置换矩阵(Permutation Matrix),\(n\)阶方阵的置换矩阵有\(\binom{n}{1}=n!\)个,3阶方阵的置换矩阵有6个:

\[\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{bmatrix} \begin{bmatrix} 0 & 1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \\ \end{bmatrix} \begin{bmatrix} 0 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 0 \\ \end{bmatrix} \begin{bmatrix} 1 & 0 & 0 \\ 0 & 0 & 1 \\ 0 & 1 & 0 \\ \end{bmatrix} \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 1 & 0 & 0 \\ \end{bmatrix} \begin{bmatrix} 0 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \\ \end{bmatrix} \]

为了交换两行,我们在左边乘以一个置换矩阵。

例如右乘 $$P_{12} = \begin{bmatrix}
0 & 1 & 0 \
1 & 0 & 0 \
0 & 0 & 1 \
\end{bmatrix}$$以交换3 × 3矩阵的第一和第二行。

有一个比较重要的性质是:任何置换矩阵的逆等于它的转置,即\(P^{-1} = P^T\)。

A matrix \(A\) is symmetric if \(AT=A\). Given any matrix \(R\) (not necessarily square) the product \(R^TR\) is always symmetric, because \((R^TR)T=R^T(R^T)^T=R^TR\).

reference

[1] textbook

[2] mit18.06学习笔记

标签:begin,end,21,矩阵,cdots,LU,bmatrix,分解
来源: https://www.cnblogs.com/cxl-/p/15377263.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有