Example 4. Determine The Inverse of Matrix A
Example 4. Determine The Inverse of Matrix A
1 0 0 10 2 1
LU 0.3 1
0 0 5.4 1.7
0.1 0.148148 1 0 0 5.351852
1
2 nd
step The first column of the matrix inverse can be found by use b 0 .
0
Thus the lower-triangular system, Ld b, can be setup as
1 0 0 d1 1
0.3
1 0 d 2 0
0.1 0.148148 1 d 3 0
1
Solved with forward substitution for d 0.3 .
0.055556
Use this vector as the right-hand side of the upper-triangular system
10 2 1 x1 1
0 5.4
1.7 x 2 0.3
0 0 5.351852 x3 0.055556
0.110727
Solved by back substitution for x 0.058824
0.010381
0.110727 0 0
A 0.058824 0 0
1
Therefore
0.010381 0 0
0
3rd step Determine the second column by use b 1
0
1 0 0 d1 0
0.3
1 0 d 2 1
0.1 0.148148 1 d 3 0
By S. TACHASOMBOONSUK
ii
0
Solved with forward substitution for d 1 and use
0.148148
10 2 1 x1 0
0 5.4
1.7 x 2 1
0 0 5.351852 x3 0.148148
0.038062
determine x 0.176471 by back substitution.
0.027682
0.110727 0.038062 0
Therefore A 0.058824 0.176471 0
1
0.010381 0.027682 0
0
4th step Determine the third column by use b 0
1
0 0.00692
Solved with forward substitution for d 0 and determine x 0.058824 by
1 0.186851
back substitution.
0.110727 0.038062 0.00692
A 0.058824 0.176471 0.058824
1
Therefore Ans.
0.010381 0.027682 0.186851
By S. TACHASOMBOONSUK
iii
5 43 0.2
x1 1.6333
4
4 1.25 0.2
2nd iteration: x2 0.9833
3
1 21.25 2 1.3333
x3 0.2333
5
1.6333 1.25
a, x 100% 23.4694%
1
1.6333
0.9833 1.3333
a, x 100% 35.5932%
2
0.9833
0.2333 0.2
a, x 100% 14.2857%
3
0.2333
a, max 35.5932%
The computation proceeds until all error fall below 5%.
i x1 x2 x3 a ,x
1
a ,x 2
a ,x 3 a ,max
0 0 0 0
1 1.25 -1.3333 0.2 100 100 100 100
2 1.6333 -0.9833 0.2333 23.4694 35.5932 14.2857 35.5932
3 1.5542 -0.8667 -0.0600 5.0938 13.4615 488.8889 488.8889
4 1.4517 -0.7953 -0.0750 7.0608 8.9766 20.0000 20.0000
5 1.4301 -0.8244 -0.0626 1.5102 3.5377 19.8934 19.8934
6 1.4405 -0.8358 -0.0423 0.7222 1.3577 48.0605 48.0605
7 1.4484 -0.8391 -0.0419 0.5463 0.3934 0.9022 0.9022
By S. TACHASOMBOONSUK
iv
5 0.9167 0.0667
x1 1.4958
4
4 1.4958 0.0667
2nd iteration: x2 0.8569
3
1 21.4958 2 0.8569
x3 0.0556
5
1.4958 1.25
a, x 100% 16.4345%
1
1.4958
0.8569 0.9167
a, x 100% 6.9692%
2
0.8569
0.0556 0.0667
a, x 100% 220%
3
0.0556
a, max 220%
The computation proceeds until all error fall below 5%.
i x1 x2 x3 a ,x
1
a ,x 2
a ,x 3 a ,max
0 0 0 0
1 1.25 -0.9167 0.0667 100 100 100 100
2 1.4958 -0.8569 -0.0556 16.4345 6.9692 220.0000 220.0000
3 1.4503 -0.8314 -0.0476 3.1362 3.0767 16.7315 16.7315
4 1.4459 -0.8355 -0.0442 0.3046 0.4934 7.7192 7.7192
5 1.4478 -0.8360 -0.0447 0.1301 0.0609 1.2287 1.2287
1st iteration:
500
x1 1.25
4
Relaxation yields : x1 1.1(1.25) (1 1.1)(0) 1.3750
4 1.3750 0
x2 0.8750
3
Relaxation yields : x2 1.1(0.8750) (1 1.1)(0) 0.9625
1 21.3750 2 0.9625
x3 0.0350
5
By S. TACHASOMBOONSUK
v
2nd iteration:
5 0.9625 0.0385
x1 1.5003
4
Relaxation yields : x1 1.1(1.5003) (1 1.1)(1.3750) 1.5128
4 1.5128 0.0385
x2 0.8419
3
Relaxation yields : x2 1.1(0.8419) (1 1.1)(0.9625) 0.8298
1 21.5128 2 0.8298
x3 0.0732
5
Relaxation yields : x3 1.1(0.0732) (1 1.1)(0.0385) 0.0843
1.5128 1.3750
a,x 100% 9.1074%
1
1.5128
0.8298 0.9625
a,x 100% 15.9849%
2
0.8298
0.0843 0.0385
a,x 100% 145.6500%
3
0.0843
a,max 145.65%
0 0 0 0 0 0 0
1 1.25 1.3750 -0.8750 -0.9625 0.0350 0.0385 100 100 100 100
2 1.5003 1.5128 -0.8419 -0.8298 -0.0732 -0.0843 9.1074 15.9849 145.6500 145.6500
3 1.4364 1.4287 -0.8290 -0.8289 -0.0399 -0.0355 5.8819 0.1160 137.5657 137.5657
4 1.4483 1.4503 -0.8381 -0.8390 -0.0445 -0.0454 1.4872 1.2032 21.8621 21.8621
5 1.4484 1.4482 -0.8355 -0.8351 -0.0452 -0.0452 0.1459 0.4642 0.4798 0.4798
By S. TACHASOMBOONSUK
vi
Exercise
1. Find the matrix inverse of A. Use 4 decimal digit for all computation.
3 1 1
a) A 3 6 2
3 3 7
3 6 1
b) A 7 1 2
3 3 7
2. Find the first two iterations of the following methods for this linear
system:
3x y z 1
3x 6 y 2 z 0
3x 3 y 7 z 4
a) The Jacobi method.
b) The Gauss-seidel method.
c) The SOR method with 1.1 .
Use 4 decimal digit.
3x1 6 x 2 x3 5
7 x1 x 2 2 x3 10
3x1 3x 2 7 x3 4
a) The Jacobi method.
b) The Gauss-seidel method.
c) The SOR method with 1.1 .
Use s = 10 % and 6 decimal digit.
By S. TACHASOMBOONSUK
vii
f1 f1
1 2 x1
Z xf 1 xf 2
4
2 2 2x1 2 42 x 2 3
x1 x 2
The corrector vector, x, can be found by solving following system of
linear equation:
Z xi f
1st iteration: Initial guesses are x1,0 0 and x2,0 3
1 20
Z 1 4
4
The Jacobian matrix:
20 2 423 3 4 12
01 0 43 12 0
The matrix of function: f
0 2 20 3 25 12
2 2
1 4 x1,1 0
4 12 x 12
2,1
Solve this system of linear equation to find the corrector.
x1,1 1.71429 x2,1 0.42857
Add old value with the corrector, yields
x1,1 x1,0 x1,1 0 1.71429 1.71429
x2,1 x2,0 x2,1 3 0.42857 3.42857
2nd iteration:
1 2 1.71429
Z 4.42857
4 4
2 1.71429 2 423.42857 3 7.42857 15.42857
1.714291 1.71429 43.42857 12 2.93878
f
1.71429 2 23.42857 3 25 3.67347
2 2
By S. TACHASOMBOONSUK
viii
Follow by yourself.
By S. TACHASOMBOONSUK