Gauss Elimination
Gauss Elimination
Problem no. 1
10W + 2X +4Y + 3Z = 38
5W + 15X + 3Y 8Z = 76
28W + 3X + 20Y + 7Z = 102
2W + 2X + 8Y + 20Z = 110
10 2 4 3 38 -5/10
R1+R2R2
5 15 3 8 76 -8/10 R1+R3R3
8 3 20 7 102 -2/10 R1+R4R4
2 2 8 20 110
10 2 4 3 38 -1.4/14
R2+R3R3
0 14 1 6.5 57 -1.6/14
R2+R4R4
0 1.4 16.8 4.6 71.6
0 1.6 7.2 19.4 102.4
1 2 2 1 38
0 14 1 6.5 57 -
7.086/16.7R3+R4R4
0 0 16.8 4.6 65.9
0 0 7.2 19.4 95.89
10 2 4 3 38
0 1 5 2 57
0 0 1 1 65.9
0 0 0 2 67.92
1
38 ) 4 ( 3 ) 3 ( 4 ) 2 ( 2 ) 10 (
2
57 ) 4 ( 5 . 6 3 ) 14 (
3
9 . 65 ) 4 ( 95 . 3 ) 7 . 16 (
4
4
981 . 16
92 . 67
=
= + + +
=
= + +
=
= +
=
= =
W
W
X
X
Y
Y
Z
Z
ANSWER:
W=1, X=2, Y=3 & Z= 4
Problem no. 2
a + 2b 3c + 4d = 48
3a + 4b - 3d = 17
2a - b + 2c + d = 24
4b - 7c + 2d = 24
1 2 -3 4 48
3 4 0 -3 17 r2 - 3r1
2 -1 2 1 24 r3 - 2r1
0 4 -7 2 24
1 2 -3 4 48
0 -2 9 -15 -127
0 -5 8 -7 -72 2r3 5r2
0 4 -7 2 24 r4 + 2r2
1 2 -3 4 48
0 -2 9 -15 -127
0 0 -29 61 491
0 0 11 -28 -230 29r4 + 11r3
1 2 -3 4 48
0 -2 9 -15 -127
0 0 -29 61 491
0 0 0 -141 -1269
In equation 4:
-141d = -1269
d = 9
In equation 3 subst. d:
-29c + 61d = 491
-29c + 61(9) = 491
c = 2
In equation 2 subst. d & c:
-2b + 9c -15d = -127
-2b + 9(2) -15(9) = -127
b = 5
In equation 1 subst. b ,c & d
a + 2b -3c + 4d = 48
a + 2(5) -3(2) + 4(9) = 48
a = 8
ANSWER: ( 8, 5, 2, 9 )
Problem no. 3 Solve the following
system by using the Gauss-
Elimination method.
X + Y + Z = 5
2X + 3Y + 5Z = 8
4X + 5Z = 2
Solution: We will perform row
operations on the augmented matrix
of the system until we obtain a
matrix in reduced row echelon
form.
1 1 1 5
2 3 5 8
4 0 5 2
R22R1
1 1 1 5
0 1 3 2
4 0 5 2
R34R1
1 1 1 5
0 1 3 2
0 4 1 18
R3+4R2
1 1 1 5
0 1 3 2
0 0 13 26
1/13R3
1 1 1 5
0 1 3 2
0 0 1 2
Z = -2
Y + 3Z = -2
Y + 3(-2) = -2
Y + (-6) = -2
Y = -2 + 6
Y = 4
X + Y + Z = 5
X + (4) + (-2) = 5
X = 5 -4 + 2
X = 3
Problem no. 4
6a + 8b 6c + 2d = 22
4a 2b + 10d = 52
10b 6c +4d = 26
14a + 4b 4c = 24
Solution:
6 8 -6 2
4 -2 0
10
0 10 -6
4
14 4 -4
0
22
52
26
24
6R 4R
6 8 -6 2
0 -44 24 52
0 10 -6 4
14 4 -6 0
22
224
26
24
6R - 14R
6 8 -6 2
0 -44 24
52
0 10 -6
4
0 -88 60 -
28
22
224
26
-164
44R + 10R
6 8 -6 2
0 -44 24 52
0 0 -24 696
0 -88 60 -28
R - 2R
22
224
3384
-164
6 8 -6 2
0 -44 24 52
0 0 -24 696
0 0 12 -132
22
224
3384
-612
2R + R
6 8 -6 2
0 -44 24
52
0 0 -24
52
0 0 0
432
22
224
3384
2160
Well get;
d= 2160/432 b= 224 52(5)
24(4)
d= 5 -44
b= 3
c= 3384 696(5) a= 22- 2(5) + 6(4)
8(3)
-24 6
c= 4 a= 2
Problem no. 5
Solve the following system by using the
Gauss-Elimination method.
A + B + 2C = 1
2A B + D = 2
A B C 2D = 4
2A B + 2C D = 0
Solution: We will perform row
operations on the augmented matrix of
the system until we obtain a
matrix in reduced row echelon form.
1 1 2 0 1
2 1 0 1 2
1 1 1 2 4
2 1 2 1 0
R22R1
1 1 2 0 1
0 3 4 1 4
1 1 1 2 4
2 1 2 1 0
R3R1
1 1 2 0 1
0 3 4 1 4
0 2 3 2 3
2 1 2 1 0
R42R1
1 1 2 0 1
0 3 4 1 4
0 2 3 2 3
0 3 2 1 2
R4R2
1 1 2 0 1
0 3 4 1 4
0 2 3 2 3
0 0 2 2 2
R2R3
1 1 2 0 1
0 2 3 2 3
0 3 4 1 4
0 0 2 2 2
R3+3R2
1 1 2 0 1
0 1 3/2 1 3/2
0 0 1/2 4 17/2
0 0 2 2 2
2R3
1 1 2 0 1
0 1 3/2 1 3/2
0 0 1 8 17
0 0 2 2 2
R42R3
1 1 2 0 1
0 1 3/2 1 3/2
0 0 1 8 17
0 0 0 18 36
-1/18R4
1 1 2 0 1
0 1 3/2 1 3/2
0 0 1 8 17
0 0 0 1 2
D = -2
C + 8D = -17
C + 8(-2) = -17
C 16 = -17
C = -17 + 16
C = -1
B + 3/2C + D = -3/2
B + 3/2(-1) + (-2) = -3/2
B + (-3/2) + (-2) = -3/2
B = -3/2 +3/2 + 2
B = 2
A + B + 2C = 1
A + (2) + 2(-1) = 1
A + (2) + (-2) = 1
A = 1 -2 + 2
A = 1
Problem no. 6
1 3 2
10 5
5 2 3
3 2 1
3 2
2 1
= + +
=
= +
X X X
X X
X X
1 2 3 -1
0 5 -1 10
3 2 0 5 r1(-3)+r3
1 2 3 -1
0 5 -1 10
0 -4 -9 8 r2(4/5)+r3
1 2 3 -1
0 5 -1 10
0 -4 -9 8 r2(4/5)+r3
1 2 3 -1
0 5 -1 10 r2(1/5)
0 0 -49/5 16 r3(-5/49)
1 2 3 -1
0 1 -1/5 2
0 0 1 -80/49
49
27
1
2
2
3
3 1
1
1
3
3
2
2
1
49
80
2
49
80
5
1
2
2
2
3 5
1
2
49 / 80
3
=
=
= + +
=
+ =
=
=
|
|
|
.
|
\
|
X
X X X
X X X
X
X
X X
X
Gauss Elimination
Solve the following system using Gaussian
Elimination:
The augmented matrix which represent this
system is
First is to produce zeros below the first entry in
the first column
The third row of the final matrix translates into
The solution of this system is therefore
Problem no. 8
Solve the following system using Gaussian
Elimination:
The augmented matrix which represent this
system is
First is to produce zeros below the first entry
in the first column
The third row of the final matrix translates into
The solution of this system is therefore
Problem no. 9
Using gaussian elimination method:
2x + 3y + z = 1
x + y + z = 3
3x + 4y + 2z = 4
SOLUTION:
2 3 1 1
1 1 1 3 r
1
r
2
3 4 2 4
1 1 1 3
2 3 1 1 r
2
2r
1
3 4 2 4 r
3
3r
1
1 1 1 3
0 1 -1 -5
0 1 -1 -5 r
3
r
1
1 1 1 3
0 1 -1 -5
0 0 -2 -8
-2z = -8
z = 4 y z = -5
y 4 = -5
y = -1
x + y + z = 3
x + (-1) + 4 = 3
x = 0
( x, y, z ) = ( 0, -1, 4 )
Problem no. 10
x + -3y + z = 4
2x + -8y +8z = -2
-6x + 3y + -15z = 9
Augmented matrix: Now use -2R1+R2=R2:
1 -3 1 4 1 -3 1 4
2 -8 8 -2 0 -2 6 -10
-6 3 -15 9 -6 3 -15 9
Then use 6R1+R3=R3: Then use
(1/2)R2=R2, and (1/3)R3=R3:
1 -3 1 4 1 -3 1 4
0 -2 6 -10 0 -1 3 -5
0 -15 -9 33 0 -5 -3 11
Then use -5R2+R3=R3: Now turn the
matrix into an
equation:
1 -3 1 4 x + -3y +z = 4
0 -1 3 -5 -y + 3z = -5
0 0 -18 36 -18z = 36
From this point, we can easily solve for (x, y,
z) by substitution:
From the last equation solve for z by dividing
(36/-18), and we can get z=-2.
Then plug the -2 into the z of the 2nd equation
and the new equation is -y -6 = -5.
Then move the -6 to the other side to get -y = 1,
so at the end we get y=-1.
Once we have the values for the y and the z,
just plug them into the first equation and solve
for x.
So the equation looks like this, x +3 -2 = 4, which
is the same as x +1 = 4.
Then move the 1 to the other side and we get
x=3.
The results for the Gaussian elimination example
are:
x=3
y=-1
z=-2
Problem no. 11
2x - 2y + z = 3
3x + y - z = 7
x - 3y + 2z = 0
2 -2 1 3 1 -3 2 0
3 1 -1 7 R
3
R
1
3 1 -1 7 -3R
1
+ R
2
R
2
1 -3 2 0 2 -2 1 3 -2R
1
+ R
3
R
3
1 -3 2 0 1 -3 2 0
0 10 -7 7 (1/10)R
2
R
2
0 1 -7/10 7/10 3R
2
+ R
1
R
1
0 4 -3 3 0 4 -3 3 -4R
2
+ R
3
R
3
1 0 - 1/10 21/10 1 0 -1/10 21/10
0 1 -7/10 7/10 3R
2
+ R
1
R
1
0 1 -7/10 7/10 -5R
3
R
3
0 4 -3 3 -4R
2
+ R
3
R
3
0 0 -1/5 1/5
1 0 -1/10 21/10 1 0 0 2
0 1 -7/10 7/10 (1/10)R
3
+ R
1
R
1
0 1 0 0 Reduced
row-echelon form
0 0 1 -1 (7/10)R
3
+ R
2
R
2
0 0 1 -1
Answer
x
1
= 2, x
2
= 0, x
3
= -1
10
21
10
21
Problem no. 13
Problem:
Solve the following system using Gauss Elimination:
x + 2y + z = 8
2x + y z = 1
x + y 2z = -3
1 2 1 8 -2r
1
+ r
2
2 1 -1 1
1 1 -2 -3
1 2 1 8 -r
1
+ r
3
0 -3 -3 -15
1 1 -2 -3
1 2 1 8 -1/3 r
2
0 -3 -3 -15
0 -1 -3 -11
1 2 1 8 r
2
+ r
3
0 1 1 5
0 -1 -3 -11
1 2 1 8 - r
3
0 1 1 5
0 0 -2 -6
1 2 1 8
0 1 1 5
0 0 1 3
z = 3 x + 2y + z = 8
y + z = 5 x + 2(2) + 3 = 8
y + 3 =5 x = 1
y = 2
The solution of this system is therefore (x, y, z) = (1, 2,
3)
Problem no. 16
2x+4y+7z=15
8x+2y+5z=45
2y+z=25
2 4 7 15
8 2 5 45
0 2 1 25
Solution
2 4 7 15 r2-4r 2 4 7 15
8 2 5 45 0 -14 -23 -15
0 2 1 25 0 2 1 25
2 4 7 15 7r3+r2 2 4 7 15
0 -14 -23 -15 0 -14 -23 -
15
0 2 1 25 0 0 -16
160
14
245
14
14
15 ) 10 ( 23 14
15 23 14
=
=
y
y
z y
5 . 17 = y
16
160
16
16
z
10 = z
2
15
2
2
15 ) 10 ( 7 ) 5 . 17 ( 4 2
15 7 4 2
=
= + +
= + +
x
x
z y x
5 . 7 = x
10
5 . 17
5 . 7
=
=
=
z
y
x
Problem no. 17
Solve the following system using Gaussian
elimination:
4x+y-z=3
7x+3y+z=5
1/2x+y+2z=7
SOLUTION:
Add (-7 * row1) to row2
Divide row1 by 4
1 1/4 -1/4 3/4
0 5/4 11/4 -1/4
1/2 1 2 7
1 1/4 -1/4 3/4
0 5/4 11/4 -1/4
0 7/8 17/8 53/8
1 1/4 -1/4 3/4
0 1 11/5 -1/5
0 7/8 17/8 53/8
Divide row2 by 5/4
Add (-1/2 * row1) to row3
1 1/4 -1/4 3/4
7 3 1 5
1/2 1 2 7
Add (-7/8 * row2) to row3
Equation1:
1/5z = 34/5
z = 34
Equation2:
y+11/5z = -1/5
Substitute the value of z;
y+(11/5)(34) = -1/5
y = -75
Equation3:
x+1/4y-1/4z =
Substitute the value of y and z;
x = 28
1 1/4 -1/4 3/4
0 1 11/5 -1/5
0 0 1/5 34/5
Problem no. 18
x + y + z = 6
2x y +z =3
x + z = 4
(-2)r1+r2
(-1)r1+r3
(-1)r2
(-1)r3
(-3)r2+r3
z = 3
y = 2
x + 2 + 3 = 6
x = 1
(x, y, z) = (1, 2, 3)
Problem no. 19
Problem no. 20
Solve for the values of x, y,
and z.
2x + y 3z = -3
3x 4y + 2z = -7
X + 3y 4z = 1
2 1 -3 -3
3 -4 2 -7
1 3 -4 1
2 1 -3 -3
0 -11 13 -5
1 3 -4 1
-3R
1
+
2R
2
2 1 -3 -3
0 -11 13 -5
0 -5 5 -5
-2R
3
+ R
1
2 1 -3 -3
0 -11 13 -5
0 0 10 30
-11R
3
+ 5R
2
2 1 -3 -
3
0 -11 13 -5
0 0 1 3
1
10
R
3
x = 3
y =
5 13(3)
11
= 4
x =
3 4 +(33)
2
= 1
x = 3; y = 4; z = 1;
Ans.