Professional Documents
Culture Documents
by EMCS 257
May Pyae Phyo Thu
4x1 + x2 − x3 = 9
3x1 + 2x2 − 6x3 = −2
x1 − 5x2 + 3x3 = 1
(a) Matrix Method
4 1
A= 3 2
1 -5
x = A−1b
4 1
3 2
1 -5
1 0.25
0 1.25
0 -5.25
1 0.25
0 1
0 0
1 0
0 1
0 0
1 0
0 1
0 0
1 0
0 1
0 0
0.2553
−1
A = 0.1596
0.1809
x1=
x2=
x3=
.
-1 x1 9
-6 x= x2 b= -2
3 x3 1
-1 1 0 0
-6 0 1 0
3 0 0 1
-0.25 0 0.25 0 0
-5.25 0 -0.75 1 0
3.25 0 -0.25 0 1
-0.25 0.25 0 0
-4.2 -0.6 0.8 0
-18.8 -3.4 4.2 1
-0.0213 0.0426 9
-0.1383 -0.2234 b= -2
-0.2234 -0.0532 1
2.3830
1.4894
2.0213
1. Solve the following set of equations by
(a) matrix method
(b) Cramer’s rule
(c) Gauss elimination method
(d) Gauss–Jordan elimination method.
4x1 + x2 − x3 = 9
3x1 + 2x2 − 6x3 = −2
x1 − 5x2 + 3x3 = 1
(b) Cramer’s rule
4 1
A= 3 2
1 -5
det(A)= -94
9 1
A1 -2 2
1 -5
det(A1)= -224
4 9
A= 3 -2
1 1
det(A2)= -140
4 1
A= 3 2
1 -5
det(A3)= -190
x1= det(A1)/det(A)
x2= det(A2)/det(A)
x3= det(A3)/det(A)
.
-1 x1 9
-6 x= x2 b= -2
3 x3 1
-94
-1
-6
3
-1
-6
3
9
-2
1
2.3830
1.4894
2.0213
1. Solve the following set of equations by
(a) matrix method
(b) Cramer’s rule
(c) Gauss elimination method
(d) Gauss–Jordan elimination method.
4x1 + x2 − x3 = 9
3x1 + 2x2 − 6x3 = −2
x1 − 5x2 + 3x3 = 1
(c) Gauss elimination method
4 1
3 2
1 -5
1 0.25
0 1.25
0 -5.25
1 0.25
0 1
0 0
.
-1 9
-6 -2
3 1
-0.25 2.25
-5.25 -8.75
3.25 -1.25
-0.25 2.25
-4.2 -7
-18.8 -38
-18.8x3 = -38
x3 = 2.0213
x2 - 4.2 x3 = -7
x2 = 1.4894
x1= 1.3723
x2= 1.4894
x3= 2.0213
1. Solve the following set of equations by
(a) matrix method
(b) Cramer’s rule
(c) Gauss elimination method
(d) Gauss–Jordan elimination method.
4x1 + x2 − x3 = 9
3x1 + 2x2 − 6x3 = −2
x1 − 5x2 + 3x3 = 1
(d) Gauss–Jordan elimination method.
4
3
1
1
0
0
1
0
0
1
0
0
.
1 -1 9 4 1 -1
2 -6 -2 3 2 -6
-5 3 1 1 -5 3
0 0 2.3830
1 0 1.4894
0 1 2.0213
x1 = 2.3830
x2 = 1.4894
x3 = 2.0213
9
-2
1
2.25
-8.75
-1.25
1. Solve the following set of equations by
(a) matrix method
(b) Cramer’s rule
(c) Gauss elimination method
(d) Gauss–Jordan elimination method.
x1-x2=0
(-x1+2x2-x3=1)
x = A−1b
1 -1 0 1
-1 2 -1 0
0 -1 1.1 0
1 -1 0 1
0 1 -1 1
0 -1 1.1 0
1 -1 0 1
0 1 -1 1
0 0 0.1 1
1 0 -1 2
0 1 -1 1
0 0 0.1 1
1 0 -1 2
0 1 -1 1
0 0 1 10
1 0 0 12
0 1 0 11
0 0 1 10
A-1 = 12.0000
11.0000
10.0000
x1 = 11.0000
x2 = 11.0000
x3 = 10.0000
.
x1 0
x= x2 b= 1
x3 0
0 0
1 0
0 1
0 0
1 0
0 1
0 0
1 0
1 1
1 0
1 0
1 1
1 0
1 0
10 10
11 10
11 10
10 10
11.0000 10.0000 b= 0
11.0000 10.0000 1
10.0000 10.0000 0
1. Solve the following set of equations by
(a) matrix method
(b) Cramer’s rule
(c) Gauss elimination method
(d) Gauss–Jordan elimination method.
x1-x2=0
(-x1+2x2-x3=1)
1 -1 0
A -1 2 -1
0 -1 1.1
0 -1 0
A 1 2 -1
0 -1 1.1
1 0 0
A -1 1 -1
0 0 1.1
1 -1 0
A -1 2 1
0 -1 0
det (A3)= 1
x1-x2=0
(-x1+2x2-x3=1)
1 -1 0
0 1 -1
0 -1 1.1
1 -1 0
0 1 -1
0 0 0.1
0.1x3 =
x3 =
x2 - x3 =
x2 =
x1 - x2 =
x1 =
x1 = 11.0000
x2 = 11.0000
x3 = 10.0000
.
0
1
0
0
1
0
0
1
1
10
1
10.0000
1
11.0000
0
11.0000
1. Solve the following set of equations by
(a) matrix method
(b) Cramer’s rule
(c) Gauss elimination method
(d) Gauss–Jordan elimination method.
x1-x2=0
(-x1+2x2-x3=1)
1 -1 0 0
0 1 -1 0
0 -1 1.1 0
1 0 -1 0
0 1 -1 0
0 0 0.1 0
1 0 0 0
0 1 0 0
0 0 1 0
x1 =
x2 =
x3 =
.
0
1
0
0
1
0
1
1
1
11
11
10
11.0000
11.0000
10.0000
Decompose the following matrix into L and U matrices
2 -1 1
a= -3 4 -1
1 -1 1 2 -1 1
-3 4 -1
1 -1 1
u11 = 2
u22 = a22-(l21*u12)
u23 = a23-(l21*u13)
l32 = (a32-(l31*u12))/u22
u33 = a33-(l31*u13)-(l32*
Therefore
1.0000 0.0000
L= -1.5000 1.0000
0.5000 -0.2000
2.0000 -1.0000
U= 0.0000 2.5000
0.0000 0.0000
u12= -1 u13= 1
2.5
0.5
-0.2
0.6
0.0000
0.0000
1.0000
1.0000
0.5000
0.6000
Decompose the following matrix into L and U matrices
2 1 -3
b= -1 3 2
3 1 -3
2 1 -3
-1 3 2
3 1 -3
u11 = 2 u12=
Therefore
1.0000 0.0000 0.0000
L= -0.5000 1.0000 0.0000
1.5000 -0.1429 1.0000