Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 48

DEPARTMENT OF

MATHEMATICS
[YEAR OF ESTABLISHMENT –
1997]

DEPARTMENT OF MATHEMATICS, CVRCE


MATHEMATICS-I

Lecture : 8
GAUSS ELLIMINATION METHOD
GAUSS JORDAN ELLIMINATION METHOD
AND CRAMERS RULE

DEPARTMENT OF MATHEMATICS, CVRCE

DEPARTMENT OF MATHEMATICS, CVRCE


GAUSS ELIMINATION METHOD

This is a standard elimination method to solve the linear


system of equations. Let us solve the linear system of
equation using gauss elimination method followed by
certain steps.
Example: Solve the following system using Gauss
elimination method.
x1  x2  x3  0
 x1  x2  x3  0
10 x2  25 x3  90
20 x1  10 x2  80
DEPARTMENT OF MATHEMATICS, CVRCE
CONTINUED
Step-1: First we have to write the augmented matrix
for the system of equation. For this case the
augmented matrix is
 1 1 1 0 
 1 1 1 0 
 
 0 10 25 90 
 
 20 10 0 80 

Step-2:Then we have to reduced the matrix to row


echelon form by using row elementary operation.

DEPARTMENT OF MATHEMATICS, CVRCE


CONTINUED
Elementary row operation for matrices:

(i) Interchange of two rows


(ii) Addition of a constant multiple of one row to
another row.
(iii)Multiplication of a row by a nonzero constant c

Echelon form: Reduction of a matrix to row echelon


form means the first entry of the first row will be
nonzero then the first entry of 2nd row will be zero then
the first two entries of the 3rd row will be zero and the
no. of zeros will increase row by row upto the last row
till it is reduced to row echelon form.
DEPARTMENT OF MATHEMATICS, CVRCE
CONTINUED
Let us reduce the matrix to echelon form…
 1 1 1 0 
 1 1 1 0 
 
 0 10 25 90 
 
 20 10 0 80 
R2  R2  R1
R4  R4  20 R1

 1 1 1 0 
 0 0 0 
0 

 0 10 25 90 
 
 0 30 20 80 
DEPARTMENT OF MATHEMATICS, CVRCE
CONTINUED
R2  R4

 1 1 1 0 
 0 30 20 80 

 0 10 25 90 
 
 0 0 0 0 

R3  3 R3  R1

 1 1 1 0 
 0 30 20 
80 

 0 0 95 190 
 
 0 0 0 0 
DEPARTMENT OF MATHEMATICS, CVRCE
CONTINUED
Now the matrix reduced to echelon form…
Step-3:Then we have to write the equations of this
triangular system by backward substitution and by
solving the equations we will get the values of the
unknowns.
Now the equations are…
95 x3  190
10 x2  25 x3  90
x1  x2  x3  0

So by solving we will get


x3  2, x2  4, x1  2.( Ans )
DEPARTMENT OF MATHEMATICS, CVRCE
CASES OF GAUSS ELIMINATION
METHOD

Unique solution

Example: Solve the system 2x+5y=2,4x+3y=18


Sol: Here the augmented matrix is
2 5 2
 4 3 18
  R R 2R
2 2 1

2 5 2

0 7 14 
CONTINUED

Now the equations are


2x+5y=2
-7y=14
Solving the equations we get x=6,y= -2.
Since we are getting unique values of x,y so the
system has unique solution. Geometrically we can
say that the two equations represent two intersecting
straight lines that is there is only one intersecting
point so it has unique solution.
CASES OF GAUSS ELIMINATION
METHOD

Infinite solution

Example: Solve the system 2x+5y=2,4x+10y=4


Sol: Here the augmented matrix is
2 5 2
 4 10 4 
  R R 2R
2 2 1

2 5 2
 
 0 0 0 
CONTINUED

Now the equations are


2x+5y=2
0.x+0.y=0
Here if y=k then x=(2-5k)/2.
Since we are getting infinitely many values of x,y so
the system has infinite solution. Geometrically we
can say that the two equations represent two straight
lines which are coincident. so it has unique solution.
CONTINUED

Q. Find the value of k for which the system 2x-3y=4


and 4x-ky=8 has infinitely many solution.
Sol: Here the system represents two lines. So it has
infinitely many solution if the lines are coincident
that is
a1 b1 c1 2 3 4
    
a2 b2 c2 4 k 8
3 1
  k 6
k 2
CASES OF GAUSS ELIMINATION
METHOD

No solution

Example: Solve the system 2x+5y=2,4x+10y=6


Sol: Here the augmented matrix is
2 5 2
 4 10 6 
  R R 2R
2 2 1

2 5 2

0 0 2 
CONTINUED

Now the equations are


2x+5y=2
0.x+0.y=2
Which is not possible so it has no solution.
Geometrically we can say that the two equations
represent two straight lines which are parallel. so it
has no points in common .So it has no solution.
PROBLEMS FOR PRACTICE

Example: - Solve the following system of equations


by Gauss elimination method
-x+y+2z = 2, 3x-y+z = 6, -x+3y+4z = 4.
Sol: Augmented matrix is
 1 1 2 2 
 3 1 1 6 
 
 1 3 4 4  R2  R2  3R1
R3  R3  R1

 1 1 2 2
  0 2 7 12 
 0 2 2 2  R3  R3  R2
DEPARTMENT OF MATHEMATICS, CVRCE
CONTINUED

 1 1 2 2 
  0 2 7 12 
 0 0 5 10 

Now the equations are


-5z=-10
2y+7z=12
-x+y+2z=2
So by solving the equations we get
z=2,y=-1,x=1
So the system has unique solution.(ans)
DEPARTMENT OF MATHEMATICS, CVRCE
PROBLEMS FOR PRACTICE

Example: - Solve the following system of equations


by Gauss elimination method
x+y-z =9 , 8y+6z = -6, -2x+4y-6z = 40.
Sol: Augmented matrix is
1 1 1 9
0 8 6 6 

 2 4 6 40  R  R
3 3  2 R1

1 1 1 9
  0 8 6 6 
 0 6 8 58  R3  4 R3 3R2
DEPARTMENT OF MATHEMATICS, CVRCE
CONTINUED

 1 1 1 9 
  0 8 6 6 
 0 0 50 250 

Now the equations are


-50z=250
8y+6z=-6
x+y-z=9
So by solving the equations we get
z=-5,y=3,x=1
So the system has unique solution.(ans)
DEPARTMENT OF MATHEMATICS, CVRCE
PROBLEMS FOR PRACTICE

Example: - Solve the following system of equations


by Gauss elimination method
-x+2y-5z =-21 , 4x-8y+3z = 16, 3x-6y+z = 7.
Sol: Augmented matrix is
 1 2 5 21
 4 8 3 16 

 3 6 1 7  R2  R2  4 R1
R3  R3  3 R1

 1 2 5 21

 0 0 
17 68 
 0 0 14 56  R 17 R
3 3 14 R2
DEPARTMENT OF MATHEMATICS, CVRCE
CONTINUED

 1 2 5 21
  0 0 17 68 
 0 0 0 0 

Now the equations are


-17z=-68
-x+2y-5z=-21
So by solving the equations we get
z=4,y=(k-1)/2,x=k
So the system has infinitely many solution.(ans)

DEPARTMENT OF MATHEMATICS, CVRCE


PROBLEMS FOR PRACTICE

Example: - Solve the following system of equations


by Gauss elimination method
2w-3x-3y+6z =2 , 5x+5y-10z = 0, 4w+x+y-2z =4.
Sol: Augmented matrix is
 2 3 3 6 2 
 0 5 5 10 0 

 4 1 1 2 4  R  R
3 3  2 R1

 2 3 3 6 2 

 0 5 5 10 0 
 0 7 7 14 0  R 5 R
3 3  7 R2
DEPARTMENT OF MATHEMATICS, CVRCE
CONTINUED

 2 3 3 6 2 
  0 5 5 10 0 
 0 0 0 0 0 

Now the equations are


2w-3x-3y+6z=2
5x+5y-10z=0
So by solving the equations we get
W=1,z=k,y=m,x=2k-m
So the system has infinitely many solution.(ans)

DEPARTMENT OF MATHEMATICS, CVRCE


PROBLEMS FOR PRACTICE

Example: - Solve the following system of equations


by Gauss elimination method
4x+y =4 , 5x-3y+z = 2, -9x+2y-z =5.
Sol: Augmented matrix is
4 1 0 4
 5 3 1 2 
 
 9 2 1 5  R2 4 R2 5 R1
R3  4 R3  9 R1

 4 1 0 4 

 0 17 4 
12 
 0 17 4 56  R3  R3  R2
DEPARTMENT OF MATHEMATICS, CVRCE
CONTINUED

 4 1 0 4 

 0 17 4 
12 
 0 0 0 44 

Now the equations are


4x+y+0z=4
0x-17y+4z=-12
0.x+0.y+0.z=44
Which is not possible.
So the system has no solution.(ans)

DEPARTMENT OF MATHEMATICS, CVRCE


PROBLEMS FOR PRACTICE

Example: - Solve the following system of equations


by Gauss elimination method
2x-z = 2, 4y+3z =8 , 3x+2y=5.
Sol: Augmented matrix is
 2 0 1 2 
0 4 3 8
 
 3 2 0 5 
R  2 R 3 R
3 3 1

2 0 1 2

0 4 3 8 
 0 4 3 4  R  R
3 3  R2
DEPARTMENT OF MATHEMATICS, CVRCE
CONTINUED

2 0 1 2 
  0 4 3 8 
 0 0 0 4 

Now the equations are


2x+0.y-z=2
0x+4y+3z=8
0.x+0.y+0.z=-4
Which is not possible.
So the system has no solution.(ans)

DEPARTMENT OF MATHEMATICS, CVRCE


GAUSS JORDAN ELIMINATION METHOD

To avoid the back substitution we will reduce the matrix


to diagonal form instead of triangular form in gauss
elimination. This method is known as Gauss-Jordan
elimination method and here the form is
DX=B
Where D is the diagonal matrix, X is the solution vector.
It will be easy for calculation if we make the diagonal
matrix to a identity matrix. Let us solve some examples
involving this method.

DEPARTMENT OF MATHEMATICS, CVRCE


PROBLEMS FOR PRACTICE

Example: - Solve the following system of equations


by Gauss-jordan elimination method.
2x+y+2z+w =6 ,6x-6y+6z+12w =36,4x+3y+3z-3w=-1,
2x+2y-z+w=10
Sol: Here the Augmented matrix is
 2 1 26 1
 6 
6 6 12 36 

 4 3 3 3 1
 
 2 2 1 1 10 

Let us reduce the co-efficient matrix to a identity matrix


using row elementary operations.
DEPARTMENT OF MATHEMATICS, CVRCE
 2 1 2 6
1
 6 6 6 36 
12

 4 3 3 3 1
 
 2 2 1 1 10  R  1 R
1 1
2

 1 1/ 2 1 1/ 2 3 
 6 6 6 12 36 

 4 3 3 3 1 
  R  R 6 R
 2 2 1 1 10  R2  R2  4 R1
3 3 1
R4  R4  2 R1

 1 1/ 2 1 1/ 2 3 
 0 9 0 9 18 

 0 1 1 5 13
 
 0 1 3 0 4  R2  1  R2
 9 

DEPARTMENT OF MATHEMATICS, CVRCE


 1 1/ 2 1 1/ 2 3 
 0 1 0 1 2 

 0 1 1 5 13 1
  1 1  2  R2
R  R 
 0 1 3 0 4  R R R
3 3 2
R4  R4  R2

 1 0 1 1 4 
 0 1 0 1 
2 

 0 0 1 4 11
 
 0 0 3 1 6  R  1 R
3 3

DEPARTMENT OF MATHEMATICS, CVRCE


1 0 1 1 4
0 1 0 1 2 

0 0 1 4 11 
 
0 0 3 1 6  R1  R1  R3
R4  R4  3 R3

 1 0 0 3 7 
 0 1 0 
1 2 

 0 0 1 4 11 
 
 0 0 0 13 39  R  1  R
4   4
 13 

DEPARTMENT OF MATHEMATICS, CVRCE


 1 0 0 3 7 
 0 1 0 1 2 

 0 0 1 4 11 
  R  R 3R
 0 0 0 1 3  R1  R1  R 4
2 2 4
R3  R3  4 R4

1 0 0 0 2
0 1 0 0 1 

0 0 1 0 1
 
0 0 0 1 3

So here x=2,y=1,z=-1,w=3.

DEPARTMENT OF MATHEMATICS, CVRCE


PROBLEMS FOR PRACTICE

Example: - Solve the following system of equations


by Gauss-jordan elimination method.
2x+y+4z=11 ,x+5y+7z=15,3x+11y+13z=25

Sol: Here the Augmented matrix is

2 1 11 4
1 5 7 15 

 3 11 13 25

Let us reduce the co-efficient matrix to a identity matrix


using row elementary operations.
DEPARTMENT OF MATHEMATICS, CVRCE
2 1 11 
4
1 5 
7
15 

 3 11 13 25 R  1  R
1 2 1
 

 1 1/ 2 2 11/ 2 
  1 5 7 15 
 3 11 13 25  R2  R2  R1
R3  R3 3 R1

 1 1/ 2 2 11/ 2 
  0 9/ 2 5 19 / 2 
 0 19 / 2 7 17 / 2  2
R2   R2
9
DEPARTMENT OF MATHEMATICS, CVRCE
 1 1/ 2 2 11/ 2 
  0 1 10 / 9 19 / 9 
1
 0  
19 / 2 7 17 / 2  1 1  2  R2
R R
 19 
R3  R3    R2
 2

 1 0 13 / 9 40 / 9 
  0 1 10 / 9 19 / 9 
 0 0 32 / 9 104 / 9   9 
R3   R3
 32 

 1 0 13 / 9 40 / 9 
  0 1 10 / 9 19 / 9 
 13 
 0  
0 1 13 / 4  1 1  9  R3
R R
 10 
R2  R2   R3
 9 

DEPARTMENT OF MATHEMATICS, CVRCE


 1 0 0 1/ 4 
  0 1 0 3 / 2 
 0 0 1 13 / 4 

So here x=-1/4,y=-3/2,z=13/4.

DEPARTMENT OF MATHEMATICS, CVRCE


PROBLEMS FOR PRACTICE

Example: - Solve the following system of equations


by Gauss-jordan elimination method.
x-y+2z=3,x+2y+3z=5,3x-4y-5z=-13

Sol: Here the Augmented matrix is

 1 1 2 3 
 1 2 3 5 

 3 4 5 13

Let us reduce the co-efficient matrix to a identity matrix


using row elementary operations.
DEPARTMENT OF MATHEMATICS, CVRCE
 1 1 2 3 
 1 2 3 5 

 3 4 5 13 R2  R2  R1
R3  R3 3 R1

 1 1 2 3 
  0 3 1 2 
 0 1 11 22  R 1
2   3  R2
 

 1 1 2 3 
  0 1 1/ 3 2 / 3
 0 1 11 22  R1  R1  R2
R3  R3  R2

DEPARTMENT OF MATHEMATICS, CVRCE


 1 0 7/3 11/ 3 
  0 1 1/ 3 2 / 3 
 0 0 32 / 3 64 / 3 R  3  R
3  32  3
 

 1 0 7 / 3 11/ 3
  0 1 1/ 3 2 / 3 
7
 0  
0 1 2  1 1  3  R3
R R
1
R2  R2   R3
3

1 0 0 1
So here
  0 1 0 0 
x=-1,
 0 0 1 2 
y=0,z=2

DEPARTMENT OF MATHEMATICS, CVRCE


CRAMERS RULE
If a linear system of n equations in the same no. of
unknowns x1 , x2 ....xn a x  a x  ...a x  b
11 1 12 2 1n n 1

La21 xf1 (ta)22 x2=F  s


...a2 n xn  b2
.........................................
am1 x1  am 2 x2  ...amn xn  bm

has a non zero coefficient determinant D=det A then


the solution of the system is x  D1 , x  D2 ... x  Dn ,
1 2 n
D D D

Where Dk is the determinant obtained from D by


replacing in D the kth column by the column with the
entries b1 , b2 ...bn .
PROBLEMS FOR PRACTICE

Q.1. Solve the following system by cramers rule.


3x+7y+8z=-13,2x+9z=-5,-4x+y-26z=2
Sol:
3 7 8
Here D= 2 0 9  101  0
-4 1 -26

-13 7 8
D1  -5 0 9  707
2 1 -26
PROBLEMS FOR PRACTICE

3 -13 8
D2  2 -5 9 0
-4 2 -26

3 7 -13
D3 = 2 0 -5  101
-4 1 2

D1 707 D2 D3 101
x   7, y   0, z   1
D 101 D D 101
PROBLEMS FOR PRACTICE

Q.2. Solve the following system by cramers rule.


3x-y+z=11,x+y+3z=13,2x-3y+4z=23
Sol:
3 -1 1
Here D= 1 1 3  32  0
2 -3 4

11 -1 1
D1  13 1 3  64
23 -3 4
PROBLEMS FOR PRACTICE

3 11 1
D2  1 13 3  32
2 23 4
3 -1 11
D3 = 1 1 13  128
2 -3 23

D1 64 D2 32 D3 128
x   2, y    1, z   4
D 32 D 32 D 32
DEFINITION
Echelon form: The matrix in the last step of Gauss
elimination is called as echelon form, which is in the
form: a x  a x  ................a x  b
11 1 12 2 1n n 1

c22 x2  ................c2 n xn  b2


.........................................

krr xr  ............k rn xn  br

0  br 1
.......

0  bm
DEPARTMENT OF MATHEMATICS, CVRCE
DEFINITION
Conditions: -  
1. If r < m and one of br 1 ......... bm is not zero
then it has no solution.
 
2. If r = n and br 1 ......... bm if present are zero then it
has unique solution.
 
3. If r < n and br 1 ......... bm if present are zero then
it has infinite many solutions.

DEPARTMENT OF MATHEMATICS, CVRCE


ASSIGNMENT
1. Solve the following system of equations by Gauss
Jordan Elimination method
2w – x+y - z =-10 , 2w+3x -y -z = 0,
w+x+y-z =20,3w+x-y+z =60
2. Find the value of k for which the system has infinitely
many solution.
2x-3y=4,4x-ky=8
3. Solve the following system of linear equations using
Cramer’s rule.
5x-3y=37,-2x+7y=-38
4. Solve the following system of linear equations using
Cramer’s rule.
(i) x+2y+3z=20,7x+3y+z=13,x+6y+2z=0.
(ii) x+y =3, 2x-y+2z=-2, 3x +y =3.

DEPARTMENT OF MATHEMATICS, CVRCE

You might also like