数值计算本身就是一个独立的研究方向,不要学一点线性代数就谈什么大规模矩阵运算。

计算机进行具体数值计算时,需要注意两点:

  • 数值的精度只有有限位
  • 尽量减少运算量和内存消耗

LU分解:三角分解

给定矩阵 AA,将 AA 表示成下三角矩阵 LL 和 三角角矩阵 UU 的乘积,称为 LU 分解(也叫 LR 分解)。也就是说,在下面矩阵中,要快速确定 \blacksquare 位置的数值,

A=(0000000000)(0000000000)LUA=\left( \begin{matrix} \blacksquare & 0 & 0 & 0 & 0\\ \blacksquare & \blacksquare & 0 & 0 & 0 \\ \blacksquare & \blacksquare & \blacksquare & 0 & 0 \\ \blacksquare & \blacksquare & \blacksquare & \blacksquare & 0 \\ \blacksquare & \blacksquare & \blacksquare & \blacksquare & \blacksquare\\ \end{matrix} \right)\left( \begin{matrix} \blacksquare & \blacksquare & \blacksquare & \blacksquare & \blacksquare\\ 0 & \blacksquare & \blacksquare & \blacksquare & \blacksquare \\ 0 & 0 & \blacksquare & \blacksquare & \blacksquare \\ 0 & 0 & 0 & \blacksquare & \blacksquare \\ 0 & 0 & 0 & 0 & \blacksquare \\ \end{matrix} \right)\equiv LU

进一步说,我们希望 LL 的对角线元素都是 1(如果是 U 的对角线也可以),这样需要求解的数量就少了 5 个:

A=(100001000100101)(0000000000)LUA=\left( \begin{matrix} 1 & 0 & 0 & 0 & 0\\ \blacksquare & 1 & 0 & 0 & 0 \\ \blacksquare & \blacksquare & 1 & 0 & 0 \\ \blacksquare & \blacksquare & \blacksquare & 1 & 0 \\ \blacksquare & \blacksquare & \blacksquare & \blacksquare & 1\\ \end{matrix} \right)\left( \begin{matrix} \blacksquare & \blacksquare & \blacksquare & \blacksquare & \blacksquare\\ 0 & \blacksquare & \blacksquare & \blacksquare & \blacksquare \\ 0 & 0 & \blacksquare & \blacksquare & \blacksquare \\ 0 & 0 & 0 & \blacksquare & \blacksquare \\ 0 & 0 & 0 & 0 & \blacksquare \\ \end{matrix} \right)\equiv LU

参考资料

  1. 平冈和幸,堀玄.程序员的数学.3,线性代数[M].人民邮电出版社,2016.