Professional Documents
Culture Documents
Objectives
Solve system of Linear equations using
Elimination Methods
LU Decomposition
Matrix Multiplication
MMULT(A_mat,B_mat), press CTRL-SHIFT-ENTER
Matrix Inverse
MINVERSE(A_mat), press CTRL-SHIFT-ENTER
Matrix Transpose
TRANSPOSE(B_mat), press CTRL-SHIFT-ENTER
Matrix Determinant
MDETERM(C_mat), press ENTER
Matrix Inversion
a11 a12 a13 x1 b1
a
a
a23 x2 = b 2
21 22
[A]{x} = {b}
1
{x} = [A ] {b}
Solution
Gauss-Jordan
Express as augmented matrix
Reduce coefficient matrix to identity matrix
No back substitution needed.
Figure 9_09.jpg
LU Decomposition
[A]{x}={b} can be decomposed into two matrices [L]
and [U] such that
[L][U]=[A]
[L][U]{x}={b}
Similar to first phase of Gauss elimination, consider
[U]{x}={d}
[L]{d}={b}
[L]{d}={b} is used to generate an intermediate vector
{d} by forward substitution
Then, [U]{x}={d} is used to get {x} by back
substitution
LU Decomposition
LU Decomposition
Ax=b
System of equation
A=LU
LU Decomposition
Ld=b
Solve for d
Ux=d
Solve for x
LU Decomposition
Example:
Solve the ff. system using LU decomposition
0.1
7
0.3 x2 = 19.3
{x}
{b}
LU Decomposition
U
0.1
0.2
3
0 7.00333 0.29333
0
10.01200
0
Upper
Triangular
Matrix
LU Decomposition
L
0
0
1
0.03333
1
0
0.1000 0.02713 1
Lower
Triangular
Matrix
0.1
f 21 =
= 0.03333
3
0.19
0.3
= 0.02713
f 31 =
= 0.1000 f 32 =
7.00333
3
LU Decomposition
[L][U]=[A]
0
0 3
0.1
0.2
1
0.03333
1
0 0 7.00333 0.29333 =
0.02713 1 0
0.1
0
10.01200
3 0.1 0.2
0 .1
7
0 .3
0.3 0.2 10
LU Decomposition
[L]{d}={b}
0
0 d1 7.85
1
0.03333
1
0 d 2 = 19.3
0.1
0.02713 1 d 3 71.4
[L]
{d}
{b}
[U]{x}={d}
0.1
0.2 x1 d1
3
0 7.00333 0.2933 x = d
2 2
0
0
10.0120 x3 d 3
[U]
{x}
{d}
LU Decomposition
[L]{d}={b}
0
0 d1 7.85
1
0.03333
1
0 d 2 = 19.3
0.1
0.02713 1 d 3 71.4
[L]
{d}
{b}
By forward substitution
d1 = 7.85
LU Decomposition
[U]{x}={d}
0.1
0.2 x1 7.85
3
0 7.00333 0.2933 x = 19.5617
2
0
0
10.0120 x3 70.0843
[U]
{x}
{d}
By back substitution
F e = a +b +c
x i2
i =1
i =1
Frobenius norm
j =1
a i2, j
16
Cond [A] = A A
Iterative Methods
Recall Techniques for Root finding of Single Equations
Initial Guess
New Estimate
Error Calculation
Repeat until Convergence
Gauss Seidel
a11 a12 a13 x1 b1
a
a22 a23 x2 = b2
21
b3 a31x1 a32 x2
x3 =
a33
Gauss Seidel
Initial guesses:
x1 = 0, x2 = 0, x3 = 0
b1 a12 0 a13 0 b1
x =
=
a11
a11
1
1
1
21 1
b2 a x a23 0
x =
a22
1
2
1
31 1
1
32 2
b3 a x a x
1
x3 =
a33
Better Estimate
Better Estimate
Better Estimate
Gauss Seidel
1
1
x, x, x
Second Iteration:
1
12 2
1
13 3
b1 a x a x
x =
a11
2
1
2
21 1
1
23 3
2
31 1
2
32 2
b2 a x a x
x =
a22
2
2
1
2
b3 a x a x
2
x3 =
a33
1
3
Better Estimate
Better Estimate
Better Estimate
Jacobi Iteration
a11 a12 a13 x1 b1
a
a22 a23 x2 = b2
21
b3 a31x1 a32 x2
x3 =
a33
Jacobi Iteration
First Iteration:
x1 = 0, x2 = 0, x3 = 0
b1 a12 0 a13 0 b1
x =
=
a11
a11
1
1
b2 a21 0 a23 0
x =
a22
1
2
b3 a31 0 a32 0
x =
a33
1
3
Better Estimate
Better Estimate
Better Estimate
Jacobi Iteration
1
1
Second Iteration:
1
12 2
x, x, x
1
13 3
b1 a x a x
x =
a11
2
1
Better Estimate
1
23 3
Better Estimate
1
31 1
1
32 2
Better Estimate
b3 a x a x
x =
a33
2
3
1
3
1
21 1
b2 a x a x
x =
a22
2
2
1
2
Example
3 0.1 0.2 x1 7.85
0.1
7
0.3 x2 = 19.3
a ,i =
xi
j 1
xi
< s
100
%
j
xi
Convergence Criterion:
SUMMARY
a11 a12 a13 x1 b1
a
a
a23 x2 = b 2
21 22
[A]{x} = {b}
1
{x} = [A ] {b}
Solution
CASE STUDIES
CASE STUDIES