6 Lecture Notes 14 Gauss Jordan Method
6 Lecture Notes 14 Gauss Jordan Method
Lecture Notes-14
by
Prof. Santwana Mukhopadhyay
1 Preliminaries
2 Direct Methods
Definition:
Consider a system of m linear equations in n (unknown) variables:
Write
a11 a12 ..... a1n b1 x1
a21 a22 ..... a2n b2 x2
A= , b = , x =
... ... ... ... ... ...
am1 am2 ... amn bm xn
Then, A is called the coefficient matrix of the system (1.1). We also
write A = (aij ).
In matrix form, the system (1.1) is written as
Ax = b (1.2)
If b = 0, then the system (1.2) would be called a homogeneous
system. So,
Ax = 0 (1.3)
is a homogeneous system of linear equation.
Then, x = 0 is a solution of the homogeneous system (1.3), to be
called the trivial solution.
Prof. S. Mukhopadhyay (Department of Mathematical
Numerical
SciencesTechnique
IIT(BHU),(MA-201)
Varanasi) 4 / 19
System of equations contd...
In deed, the system (1.1) and the augmented matrix (1.4) has the
same information/data. The row operations performed on system
(1.1), can be performed on the augmented matrix (1.4), instead.
Example:
Use Gaussian elimination with partial pivoting to solve the following system
Solution contd...
Adding 1.31 times the first row to the second row produces a new second row
1.00 −0.384 −0.0540 0.395
!
0.00 0.408 1.92 −4.94
0.143 0.357 2.01 −5.17
Adding – 0.143 times the first row to the third row produces a new third row
1.00 −0.384 −0.0540 0.395
!
0.00 0.408 1.99 −4.94
0.00 0.412 2.02 −5.23
This completes the first step. We consider the submatrix formed by deleting the first
row and first column. In this matrix the pivot is 0.412, which means that the second and
third rows should be interchanged (interchange the second and third rows)
1.00 −0.384 −0.054 0.395
!
0.00 [0.412] 2.02 −5.23
0.00 0.408 1.92 −4.94
Solution contd...
Adding –0.408 times the second row to the third row produces a new third row
This completes the second step. By using back substitution, the solution can be
obtained as
x3 = −3.00, x2 = 2.00, x1 = 1.00
which agrees with the exact solution of x1 = 1, x2 = 2 and x3 = −3 when rounded to
three significant digits.
1 Swap the rows so that all rows with all zero entries are on the bottom.
2 Swap the rows so that the row with the largest, leftmost nonzero
entry is on top.
3 Multiply the top row by a scalar so that top row’s leading entry
becomes 1.
4 Add/subtract multiples of the top row to the other rows so that all
other entries in the column containing the top row’s leading entry are
all zero.
5 Repeat steps 2-4 for the next leftmost nonzero entry until all the
leading entries are 1.
6 Swap the rows so that the leading entry of each nonzero row is to the
right of the leading entry of the row above it.
Prof. S. Mukhopadhyay (Department of Mathematical
Numerical
SciencesTechnique
IIT(BHU),(MA-201)
Varanasi) 12 / 19
Gauss-Jordan elimination method contd...
Example 1:
Find the inverse of the matrix
2 1 1
A= 3 2 1
2 1 2
by Gauss-Jordan method.
Solution:
Solution contd...
1
R1 →R1 −R3 0 0 3 −1 −1
R2 →R2 +R3
−−−−−−−→ 0 1 0 −4 2 1
0 0 1 −1 0 1
3 −1 −1
So, A−1 = −4 2 1 .
−1 0 1
Example 2:
Find the inverse of the matrix
1 2 1
A = 2 3 −1
2 −1 3
by Gauss-Jordan
method.
−8 7 5
Hint: A−1 = 161
8 −1 −3 .
8 −5 1
Example 3:
Solve the system by Gauss-elimination method and Gauss-Jordan method:
x1 + x2 + x3 = 1
4x1 + 3x2 − x3 = 4
3x1 + 5x2 + 3x3 = 6
Answer: Do by yourself
Next class
****************