You are on page 1of 6

Numerical Methods

Solution of System of Linear Algebraic equations


å Matrix Inverse via Gauss-Jordan Method

Jayandra Raj Shrestha


September 2020

Institute of Engineering,
Tribhuvan University, Nepal
Matrix Inverse via Gauss Jordan Method

 Which can be written as:


a11 a12 a13

a11 a12 a13 x11 1
    
Given a non-singular square matrix, A = a21 a22 a23 
 
a21 a22 a23  x21  = 0
    
a31 a32 a33
a31 a32 a33 x31 0
a11 a12 a13 x12 0
    
x11 x12 x13
 
a21 a22 a23  x22  = 1
    
Let X = A−1 = x21 x22 x23 
 
a31 a32 a33 x32 0
x31 x32 x33
a11 a12 a13 x13 0
    

a21 a22 a23  x23  = 0


    

∴ AX = I a31 a32 a33 x33 1

i.e.,

a11 a12 a13 x11 x12 x13 1 0 0


    

a21 a22 a23  x21 x22 x23  = 0 1 0


    
a31 a32 a33 x31 x32 x33 0 0 1
JRS\IOE 1
Augmented coefficient matrices: Procedure:

a11 a12 a13 : 1 0 0


 
x11 a11 a12 a13 : 1
   

x a21 a22 a23 : 0 a21 a22 a23 : 0 1 0


 
 21  ⇒
   
x31 a31 a32 a33 : 0 a31 a32 a33 : 0 0 1

x12 a11 a12 a13 : 0


   

x22  ⇒ a21 a22 a23 :


  
1
 ⇓
x32 a31 a32 a33 : 0 a11 0 0 0 : a14 a15 a16
 

x13 a11 a12 a13 : 0  0 a22 0 0 : a24 a25 a26 


     

x
 23 
 
⇒ a21 a22 a23 :

0
 0 0 a33 0 : a34 a35 a36
x33 a31 a32 a33 : 1

Combining:
1 0 0 : x11 x12 x13
 
a11 a12 a13 : 1 0 0
 
0 1 0 : x21 x22 x23 
 
a21 a22 a23 : 0 1 0 0 0 1 : x31 x32 x33
 
a31 a32 a33 : 0 0 1
JRS\IOE 2
Example
2 −3 −2
h i
Find the inverse of the following matrix using the Gauss Jordan Method: −1 −1 −3 .
3 −2 3
Solution:

2
 
−3 −2
A = −1 −1 −3
 
3 −2 3

x11 x12 x13


 

Let A−1 = X = x21 x22 x23 


 
x31 x32 x33

∴ AX = I

2 x11 x12 x13 1 0 0


    
−3 −2
−1 −1 −3 x21 x22 x23  0
= 1 0
    
JRS\IOE 3 −2 3 x31 x32 x33 0 0 1 3
2 1 0 0
 
−3 −2 :
Augmented coefficient matrix: −1 −1 −3 : 0 1 0
 
3 −2 3 : 0 0 1

2 1 0 0
 
−3 −2 :
R2 ← R2 + (1/2) ∗ R1
∼ 0 −5/2 −4 : 1/2 1 0
 
R3 ← R3 − (3/2) ∗ R1
0 5/2 6 : −3/2 0 1
2 0 14/5 2/5 0
 
: −6/5
R1 ← R1 − (6/5) ∗ R2
∼ 0 −5/2 −4 : 1/2 1 0
 
R3 ← R3 + R2
0 0 2 : −1 1 1
2 0 0 9/5
 
: −13/5 −7/5
R1 ← R1 − (7/5) ∗ R3
∼ 0 −5/2 0 : −3/2 3 2 
 
R2 ← R2 + (2) ∗ R3
0 0 2 : −1 1 1
R1 ← R1/2 1 0 0 : 9/10 10
   
−13/10 −7/10 −13/10 −7/10
R2 ← (−2/5)R2 ∼ 0 1 0 : 3/5 −4/5  ∴ A =  3/5
−1
−6/5 −6/5 −4/5 
   
R3 ← R3/2 0 0 1 : −1/2 1/2 1/2 −1/2 1/2 1/2

JRS\IOE 4
Assignments

1. Construct a 4 × 4 non-singular square matrix of your own and compute its inverse
using the Gauss Jordan Method and verify the correctness of the computation.
2. Write algorithm/pseudo-code and program to find the inverse of a given square
matrix of any order using the Gauss-Jordan Method. Verify your program with second,
third, fourth, and fifth order matrices.

JRS\IOE 5

You might also like