Professional Documents
Culture Documents
x
A
y
-3
11
-9
1
6
8
A-1
- 3/ 5
1/ 7
71/140
X=(A-1)*b
x
y
z
Use mmult
3 3/5
- 8/9
-2 1/3
0/ 1
1/ 14
3/ 56
z
4
4
12
1/ 5
- 1/ 14
- 29/280
b
-3
2
9
=
=
=
use minverse
- 3/ 5
1/ 7
71/140
-280
~ -7/3
Gauss- Jordan
[A:b]
x1
1
6
8
x2
-3
11
-9
x3
4
4
12
b
-3
2
9
R2-6*R1
1
0
0
R3-8*R1
-3
29
15
4
-20
-20
-3
20
33
4
- 2/3
-20
-3
2/3
33
1 8/9
- 2/3
-9 2/3
- 8/9
2/3
22 2/3
0
1
0
1 8/9
- 2/3
1
- 8/9
2/3
-2 1/3
0
1
0
R2+.68966*R3
0
0
1
3 3/5
- 8/9
-2 1/3
R2/29
1
0
0
R1+3*R2
1
0
0
-3
1
15
R3-15*R2
0
1
0
1
0
0
R1-1.93103*R3
1
0
0
GAUSSIAN ELIMINATION
x1=18/5
x2=-1
x3=-7/3
2.33
[A:b]
R3
R2
x1
1
6
8
x2
-3
11
-9
x3
4
4
12
b
-3
2
9
R2-6*R1
1
0
0
R3-8*R1
-3
29
15
4
-20
-20
-3
20
33
29*R3-15*R2
1
0
0
x1
-3
29
0
x2
4
-20
-280
x3
-3
20
657
B
By back substituion,
x3
-2 1/3
x2
-0.93
x1
3.6
LU-Decomposition
A
L11=
U11=
L22=
L32=
U23 =
L33=
L
3
1
2
3
3/3 = 1
-1
2
-2
2
3
-1
L21=
U12=
1
- 1/3
j1
ij=aij i
L31=
U13=
2 1/3
-1 1/3
-1
1
0
0
- 1/3
1
0
2/3
1
1
A=L*U
3
1
2
[A:b]
-1
2
-2
y
-1
2
3
-1
z
2
k =1
2
2/3
i1
aij
k =1
uij=
ii
i1
u1 j=
b
12
a1 j
11
[U:b']
b'1=
b'2=
b'3=
1
2
2
-2
3
-1
1
0
0
- 1/3
1
0
2/3
1
1
11
2
b'
4
3
2
b1/L11=12/3=4
(b2-L21*b'1)/L22=(11-(1)(4))/(7/3) = 3
(b3-L31*b'1-L32*b'2)/L33 = (2-2*4-(-4/3)*3)/-1 = 2
back substitution
z
2
y
1
x
3
ans
x1
x2
x3
2
1.8333333
0.7142857
1/ 5
3
4
2.03809524
1.18095238
0.85238095
etc
9
2
1
1
Gauss-Seidel Method
1. solve each equation for one of the variables in terms of the others as in the Jacobi method.
2. Use the most recent approximations to the values of the variables.
x1
x2
x3
x1
x1
x2
x3
k
6
-2
1
-11
1
2
-5
1
-2
7
2
5
x1
x2
x3
K
0
0.3333333 -0.1666667 1.8333333
0.2857143
0
-0.2857143 0.7142857
0.2
0.4
0
0.2
1
2
3
4
1
0
2
3
4
1.8333333 2.06904762
5
1.99999
6
2
T
1.999990
x2
x3
0
0
1.2380952 1.00204082
1.0619048 1.01462585
1.00000
1.00000
1
1
1.000000
1.000000
0/ 1
1/ 14
3/ 56
1/ 5
- 1/ 14
- 29/280
j1
ij=aij ik ukj ,
j i ,
i =1,2, .. . , n
k =1
i1
aij ik ukj
k =1
uij=
ii
i 1 =ai 1
iv) For i=1,
u1 j=
a1 j
11
a1 j
a11
i j ,
j=2,3, . .. , n
x=Tx+C
x1=0-x2-x3+k
x1=0-x2-x3+k
1
x1
x2
x3
0
1/9
- 1/6
2
0
0
0
1 5/6
5/7
1/5
0
1/7
1/9
2
1
1
0.1703056769 0.048034934 0.034934498
0.0349344978 0.061135371 0.135371179
0.0480349345 -0.16593886 0.061135371
T
0.00001
2
1
1
2
2.084920635
1 1/6 1.053061224
6/7
1.08
0.00000
0.00000
1.99997801
0.999978844
0.99997773
x
A
y
-3
11
-9
1
6
8
z
4
4
12
=
=
=
B
-3
2
9
inv(A)=
1
6
8
A=
x
X= y
z
-3
2
9
B=
-0.6
0
0.2
0.142857 0.07142857 -0.07143
0.507143 0.05357143 -0.10357
(minverse)
fraction
18/ 5
18/5
- 13/ 14
- 657/280 -657/280
-3
1
15
R3/-9.65517
1
0
-0
x1=
x2=
x3=
#3:
1
6
8
4
- 2/3
-20
-3
2/3
33
0 1.931034 -0.9310345
1 -0.68966 0.68965517
-0
1
-2 1/3
3.6
ANS.
-0.92858316
-2.34642916
-3
11
-9
4
4
12
-3
2
9
R1+3R2
1
R3-15R2
0
1 8/9
0
1 -0.68966
0
0 -9.65517
R1-1.931034*R3
1
0
0
1
0
0
x1
x2
R2+.68966*R3
0
0
1
x3
GAUSSIAN ELIMINATION - transforms the augmented matrix into an upper triangular matrix.
R2-6R1
R3-8R1
1
0
0
R3-15*R2
1
0
0
R2 /29
-3
29
15
-3
20
33
1
0
0
-3
4
1 -0.68966
15
-20
-3
4
-3
1 -0.68966 0.68965517
0 -9.65517 22.6551724
1
0
0
-3
4
1 -0.68966
0
1
4
-20
-20
-3
11
-9
4
4
12
-3
20
33
- 8/9
0.689655
22.65517
R2+.68966*R3
3 3/5
- 8/9
-2 1/3
-3
0.689655
33
-3
0.689655
-2.34643
EXERCISE #1
PART I
x
A
1
6
8
z
-3
11
-9
k
4
4
12
=
=
=
PART 2 (Homewrork)
Solve the system by the following methods.
x
y
z
A
0.20000 -1.80000 2.10000
=
1.30000 -0.45000 1.70000
=
2.50000 1.13000 0.48000
=
#1: LU decomposition method.
#2: Jacobi Method
#3: Gauss-Seidel Method
-3
2
9
k
1.50000
2.50000
0.50000