3.2 Matrix Inverse: Zar97/09/03 Numerical Methods For Engineers Page 3-22

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

zar97/09/03

Numerical Methods For Engineers

page 3-22

3.2 Matrix Inverse


In this section, we investigate new methods for solving sets of LAEs. The first
technique is an extension of Gauss elimination method: Gauss-Jordan elimination
method which can be used to invert a matrix..
Gauss-Jordan Elimination. The method can be illustrated by starting with the upper
triangular form of the matrix produced by Gauss elimination. Using the three basic
row operations, we further reduce eq.(3.16) into the new form
1 0 0 b1*

*
0 1 0 b2
0 0 1 b*
3

(3.17)

Therefore, the values of the solution are


x1 = b*1

x2 = b*2

x3 = b*3

Procedures:
'
1 a12

0 1
0 0

'
a13

a'23
1

'
b1' R1' R1 a12
R2

'
b2
b'3

''
'
1 0 a13
b1'' R1'' R1' a13
R3

'
' ''
'
0 1 a 23 b2 R2 R2 a23R3
0 0 1 b'
3

''
1 0 a13
b1''

'
'
0 1 a 23 b2
0 0 1 b'
3

1 0 0 b1*

*
0 1 0 b2
0 0 1 b'
3

zar97/09/03

Numerical Methods For Engineers

page 3-23

Example 3.6: Gauss-Jordan Elimination with partial pivoting


Problem Statement: Solve the following system of linear algebraic equations by
Gauss-Jordan elimination method with partial pivoting.
2x2 + x3 = 5
4x1 + x2 - x3 = -3
-2x1 + 3x2 - 3x3 = 5
Solution:

Rearrange in the augmented form,


0 2 1
[ A| b] 4 1 1
2 3 3

5
3
5

From example 3.3, the upper triangular matrix of the above augmented matrix is
1 1 1
4
4

0
1

0 0 1

1 1 1
4
4

0
1

0 0 1

3
4

1
1

3 R' R 1 R
1
1
4 2
4
'
1 R2 R2 R 3

Thus, the solution vector is x1 = -1 , x2 = 2, and x3 = 1.

1 0 0 1
0 1 0 2

0 0 1 1

zar97/09/03

Numerical Methods For Engineers

page 3-24

Matrix Inversion
The elimination method can be used to get the inverse of the matrix. In the case of
our interest, If the matrix of the coefficient A is nonsingular, then there exists the
inverse of A denoted by A-1 such that
A-1 A = A A-1 = I
Then, we can show that (from

where I is an identity matrix.

Ax = b ),

A-1 Ax = A-1 b
I x = A-1 b
x = A-1 b

(3.18)

From Gauss-Jordan elimination, we can represent the entire processes in the form

[A:I]

[ I : A-1 ]

(3.19)

in other words, the Gauss-Jordan elimination is used primarily for obtaining the
inverse of the matrix. Lets illustrate the method of matrix inverse through the
following example.
Remark:
The computation of an inverse requires about 3 times as many operations as the
Gauss elimination method and the effect of RErs is more pronounced. Therefore, it
is only used in cases when the matrix inverse is actually needed.1

zar97/09/03

Numerical Methods For Engineers

page 3-25

Example 3.7: Matrix inverse by Gauss-Jordan elimination.


Problem Statement: Solve the following set of linear algebraic equations using
matrix inverse by Gauss-Jordan elimination.
5x1 + 2x2 + x3 = 3
4x1 + x2 - x3 = -3
-2x1 + 3x2 - 3x3 = 5
Solution:

Arrange matrices A and I in the augmented form,


5 2 1 1 0 0
[ A| I] 4 1 1 0 1 0
2 3 3 0 0 1

Original matrix

Operation

5 2 1 1 0 0
4 1 1 0 1 0

2 3 3 0 0 1
Starting matrix
Operation
2
1
1
1
0 0
5
5
5

3
9
4
1 0
0 5
5
5
0 19 13 2 0 1
5
5
5

Starting matrix
Operation
1 2 1 1 0
0
5
5
5

4
5
0
0 1 3 3
3
0 0 1 1 19 1
3
42
14

Starting matrix
1 0 1 1
3

1
0
1
0

3
0 0 1 1
3

Answer:

2
3
13
42
19
42

Operation
0
3
14
1
14

Resultant matrix
1
1
1 2
5
5
5

3
9
4
0

5
5
5
0 19 13 2
5
5
5

0 0

1 0
0 1

Resultant matrix
1
1
1 2
5
5
5

4
0
1
3

3
0 0 14 14
3

Resultant matrix
1 0 1 1
3

1
0
1
0

3
0 0 1 1
3

0
1

0
5
3
19
3
2
3
13
42
19
42

Resultant matrix
1 0 0 0 3
14

1
13
0
1
0

3
42
0 0 1 1 19
3
42

0
3
14
1
14
1
14
3
14
1
14

zar97/09/03

Numerical Methods For Engineers

page 3-25.2

Matrix Conditioning
Matrix conditioning is a concept introduced to avoid any ill-conditioned system.
Vector and matrix norms:
n
2
x
xi
i 1

n
A

i 1

Euclidean norm

Frobenius norm

aij

j 1

Condition number of a nonsigular matrix A:


cond( A ) A A 1

If the cond(A) is a large number (i.e > 1000), a matrix A is ill-conditioned.

Yakowitz, S.,An Introduction to Numerical Computations, 1989, Macmillan


Publishing company, Inc., p.72,ISBN 0-02-430821-8.

You might also like