Professional Documents
Culture Documents
Solution of The Linear Algebraic System
Solution of The Linear Algebraic System
Ax = b
2 −1 0 0 1 Divide row1 by 2
−1 3 −1 0 0
0 −1 3 −1 0
0 0 −1 2 1
Gaussian elimination
step 1)
1 −1/2 0 0 1/2
−1 3 −1 0 0 row2=row1 +row2
0 −1 3 −1 0
0 0 −1 2 1
Step 2)
1 −1/2 0 0 1/2
row2*(2/5)
0 5/2 −1 0 1/2
0 −1 3 −1 0
0 0 −1 2 1
Gaussian elimination
Step 3)
1 −1/2 0 0 1/2 row3=row2 +row3
0 1 − 2/5 0 1/5
0 −1 3 −1 0
0 0 −1 2 1
Step 4)
row3 *(5/13)
1 −1/2 0 0 1/2
0 1 − 2/5 0 1/5
0 0 13/5 −1 1/5
0 0 −1 2 1
Gaussian elimination
Step 5)
1 −1/2 0 0 1/2
0 1 − 2/5 0 1/5 row4=row3 +row4
0 0 1 −5/13 1/13
0 0 −1 2 1
Step 6)
1 −1/2 0 0 1/2
row4 *(13/21)
0 1 − 2/5 0 1/5
0 0 1 −5/13 1/13
0 0 0 21/13 14/13
Gaussian elimination
Step 7
1 −1/2 0 0 1/2
0 1 − 2/5 0 1/5
0 0 1 −5/13 1/13
0 0 0 1 2/3
We can obtain the L matrix from the values that appeared on and
below the main diagonal immediately before their normalization (for
the main diagonal elements).
LU Factorization
A U L
2 −1 0 0 2
−1 3 −1 0 −1
0 −1 3 −1 0
0 0 −1 2 0
Step 1) and 2)
1 −1/2 0 0 2
R1/2
0 5/2 −1 0 −1 5/2
0 −1 3 −1 R2=R2+R1 0 −1
0 0 −1 2 0 0
LU Factorization
Step 3) and 4)
1 −1/2 0 0 R2*(2/5) 2
0 1 − 2/5 0 R3=R3+R2 −1 5/2
0 0 13/5 −1 0 −1 13/5
0 0 −1 2 0 0 −1
Step 5) and 6)
𝟐
1 −1/2 0 0 −𝟏
𝟎
𝟓/𝟐
−𝟏 𝟏𝟑/𝟓
𝟐𝟏/𝟏𝟑
0 1 − 2/5 0 𝟎 𝟎 −𝟏
0 0 1 −5/13 R3*(5/13)
21/13 R4=R4+R3
0 0 0
LU Factorization
Step 7
1 −1/2 0 0 2 0 0 0
−1 5/2 0 0
0 1 − 2/5 0 0 −1 13/5 0
0 0 1 −5/13 0 0 −1 21/13
0 0 0 1 R4*(13/21)
U L
Returning once again to the original problem, perform first the Forward
Substitution:
Ly=b
𝟐 𝟎 𝟎 𝟎 𝑦1 1
−𝟏 𝟓/𝟐 𝟎 𝟎 𝑦2 0
𝟎 −𝟏 𝟏𝟑/𝟓 𝟎 = 0
𝟎 𝟎 −𝟏 𝟐𝟏/𝟏𝟑
𝑦3
𝑦4 1
LU Factorization
2 y1=1 y1=1/2
-y1+5/2y2=0 y2=1/5
-y2+13/5y3=0 y3=1/13
-y3+21/13y4=1 y4=2/3
Perform the Back Substitution.
Uv=y
1 −1/2 0 0 𝑣1 1/2
0 1 − 2/5 0 𝑣2 1/5
=
0 0 1 −5/13 𝑣3 1/13
0 0 0 1 𝑣4 2/3
LU Factorization