Gaussian Elimination Method
Gaussian Elimination Method
(1)
In matrix writing, this system is written AX=B , where
Example
Use the Gaussian elimination method to solve the following system:
x+y+3z=−2
2x +y+ 5z=−5
x+3y +2z=6
Solution:
The augmented matrix of this system is
[ ]
1 1 3 . −2
2 1 5 . −5
1 3 2 . 6
[ ] [ ]
1 1 3 . −2 1 1 3 . −2
2 1 5 . −5 0 −1 −1 . −1
1 3 2 . 6 ~ 0 2 −1 . 6
L → L1 ;L 2 →L2 ;L 3 →L3 +2L2
Let us make the following changes: 1
We have
[ ][ ]
1 1 3 . −2 1 1 3 . −2
0 −1 −1 . −1 0 −1 −1 . −1
0 2 −1 . 8 ~ 0 0 −3 . 6
At this stage, we have a step matrix and this matrix represents a system
equivalent to the starting system.
x+y+3z=−2
− y−z=−1
−3z=6
In the last equation, we find, z=−2 using this value in the 2nd equation we
find y= 3 and by replacing these values in the 1st equation, we obtain. x=1
Example
Using the method of Gauss-Jordan elimination, solve the following system:
x+y+3z=−2
2x +y+ 5z=−5
x+3y +2z=6
Solution
This is the same system were addressed in the example of the step matrix
method, where the augmented matrix has been transformed into a following
step matrix:
[ ]
1 1 3 . −2
0 −1 −1 . −1
0 0 −3 . 6 .
The method of Gauss Jordan elimination is to continue the elementary
transformations on the lines so as to bring 1 to the diagonal elements and
zeros appear above and below the 1.
[ ] [ ]
1 1 3 . −2 L1 → L1 −2L3 1 0 2 . −3
0 −1 −1 . −1 L2 → L2 −L3 0 1 1 . 1
0 0 −3 . 6 ~ L3 →L3 0 0 1 . −2 ~
Note that the left portion of the final matrix is an identity matrix. In the last
column, we read in the order the solution. x=1, y= 3, z=−2 .
Note
The Gaussian and Gauss-Jordan elimination are methods that can be used to
solve any system of linear equations; they require no condition on the
starting system. Therefore, using these methods that address the resolution
of a system of linear equations in all its generality.
Moreover, these methods can determine the whole solution of a system that
admits an infinite number of solutions. Give examples where the methods of
Cramer and the inverse matrix does not apply but where the method of
Gauss-Jordan applies.
Example
Solve the following system
Cramer's methods and the inverse matrix does not resolve it. However using
the method of Gauss-Jordan elimination, we have:
[ ] [ ] [ ]
−1 2 . 5 L1 → L1 −1 2 . 5 −1 2 . 5
2 3 . 4 L 2 → L 2 + 2L1 0 7 . 14 0 7 . 14
3 1 . −1 L3 →L3 +3L1 ~ 0 7 . 14 ~ 0 0 . 0
from the 2nd line of the last matrix we have7y=14 , y= 2 and from the 1st line
we have: −x+ 2y=5, where x=−1 .
Therefore the solution of the system S= { (−1,2 ) }