数值分析 6.Direct Methods for Solving Linear Systems

求解线性方程组Ax=b

1. Gaussian Elimination 

高斯消除法,首先将矩阵化为上三角阵,然后从后解未知数

Step 1:如果a11不为0,则

,

(第2到n行减去mi1*row1)

Step k:如果aii不为0,则

从第k行到n行减去上一行乘n

得到上三角矩阵:

Backward-substitution:

 

次数计算:

消元法:共执行n-1步,

乘法:a:(n-k)(n-k)次,

b:(n-k)次,

除法:m:(n-k)次

乘除法:

向后替代:

除法:xn:1次

除法:xi:n-i+1次

2.Pivoting Strategies

较小的aii会导致系数变大,需要预先进行处理

 Partial Pivoting (or maximal column pivoting)

1.在第k行准备往下减前,首先找到下方k列绝对值最大的元素的列p

2.将p和k行进行交换

  O(n^2)的比较

Scaled Partial Pivoting

1.算法开始前将每行进行归一(除每行最大的元素)

2.和上方的算法一样

 O(n^2)的比较和O(n^2)的除法

Complete Pivoting (or maximal pivoting)

1.对于第i行,寻找其下方矩阵中绝对值最大的元素

2.将该元素通过行列交换到aii位置

 O(n^3/3)的比较

 3.LU分解

如果不需要行互换就可以完成高斯分解,则可以LU分解

LU分解的具体步骤:

https://blog.csdn.net/qq_40688707/article/details/89256737

4.Special Types of Matrices

Strictly Diagonally Dominant Matrix:

主对角元的绝对值严格大于该行的其他元素值

1. A strictly diagonally dominant matrix A is nonsingular. 

2.Gaussian elimination can be performed without row or column interchanges, and the computations will be stable with respect to the growth of roundoff errors.

Positive Definite Matrix:

正定阵:对称且任意x,x^TAx>0

1.(=>)逆矩阵正定,主对角线大于0.

2.(=>)max | aij | <=max | akk |;  ( aij )^2 < aiiajj  for each i 不等于 j.

3.(<=>)Each of A’s leading principal submatrices Ak has a positive determinant.

4.<=>可以分解为LDL^t,L为unitary lower-triangular matrix,D为diagonal matrix with positive diagonal entries.

5.<=>A can be factored in the form LL^T, where L is lower-triangular with nonzero diagonal entries.

Algorithm: Choleski’s Method(正定阵进行LLT分解)

To factor the symmetric positive definite  n*n matrix  A into LLt, where L is lower-triangular.

Input: the dimension n; entries aij for 1<=i, j <=n of A.

Output: the entries lij for 1<=j <=i and 1<=i <=n of L.

Step 1  Set      

Step 2  For j = 2, …, n, set    

Step 3  For i = 2, …, n-1do  steps 4 and 5

Step 4  Set         

Step 5  For j = i+1, …, n, set  

Step 6  Set

Step 7  Output ( lij  for j = 1, …, i and i = 1, …, n );

            STOP.  

Crout Reduction for Tridiagonal Linear System(三对角矩阵求解)

Step 1: Find the Crout factorization of A(LU分解)

           

Step 2: Solve =>

 Step 3: Solve=>

  • 3
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值