You are on page 1of 44

Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Chapter 2: Solving Linear Systems

Sarah Samson Juan, Tiong Wei King, Shapi-ee Abdul Rahman,


Terrin Lim, Sze San Nah, Nuha Loling Othman

Faculty of Computer Science and Information Technology


Universiti Malaysia Sarawak

Sem 2 2018/2019 (UNIMAS) Chap 2 1 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

1 Echelon Form of a Matrix

2 Solving Linear Systems

3 Finding Inverse of a Matrix

Sem 2 2018/2019 (UNIMAS) Chap 2 2 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Echelon Form of a Matrix

Definition
An m × n matrix is said to be in reduced row echelon form if
1. All zero rows, if there are any, appear at the bottom of the matrix.
2. The first nonzero entry from the left of a nonzero row is a 1. This entry
is called the leading one of its row.
3. For each nonzero row, the leading one appears to the right and below
any leading ones in preceding rows.
4. If a column contains a leading one, the all other entries in that column
are zero.
Remark: An m × n matrix satisfying properties 1, 2 and 3 is said to be in
row echelon form. A similar definition can be formulated in the obvious
manner for reduced column echelon form and column echelon form.

Sem 2 2018/2019 (UNIMAS) Chap 2 3 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Echelon Form of a Matrix

Example
Determine whether the following matrices are in reduced row echelon form.
 
  1 0 0 0 −2 4
1 0 0 0  0 1 0 0
 0 1 0 0   4 8 
A=   , B= 0 0 0 1
 7 −2  ,
0 0 1 0   0 0 0 0 0 0 
0 0 0 1
0 0 0 0 0 0

and
 
1 2 0 0 1
C = 0 0 1 2 3 .
0 0 0 0 0

Solution
These matrices are all in reduced row echelon form.
Sem 2 2018/2019 (UNIMAS) Chap 2 4 / 44
Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Echelon Form of a Matrix

Example
Determine whether the following matrices are in reduced row echelon form.
   
1 2 0 4 1 0 3 4
D= 0  0 0 0  , E =  0 2 −2 5  ,
0 0 1 −3 0 0 1 2
   
1 0 3 4 1 2 3 4
 0 1 −2 5   , G =  0 1 −2 5  .
 
F =  0 1 2 2   0 0 1 2 
0 0 0 0 0 0 0 0

Sem 2 2018/2019 (UNIMAS) Chap 2 5 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Echelon Form of a Matrix


Solution
D is not in rref because zero row (second row) is not at the bottom
of the matrix.
E is not in rref because the leading entry in second row is not 1.
F is not in rref because second column contains two leading ones.
G is not in rref because other entries in second and third columns are
not zeroes.

Sem 2 2018/2019 (UNIMAS) Chap 2 6 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Echelon Form of a Matrix

Example
Determine whether the following matrices are in row echelon form.
 
1 5 0 2 −2 4  
 0 1 0 3 1 0 0 0
4 8   0
  1 0 0 
H =   0 0 0 1 7 −2  , I =  0
 ,
 0 0 0 0 0 1 0 
0 0 
0 0 0 1
0 0 0 0 0 0
 
0 0 1 3 5 7 9
 0 0 0 0
 1 −2 3  
J =   0 0 0 0 0 1 2  .
 0 0 0 0 0 0 1 
0 0 0 0 0 0 0

Solution:
All these matrices are in row echelon form.
Sem 2 2018/2019 (UNIMAS) Chap 2 7 / 44
Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Elementary Row (Column) Operation

Definition
An elementary row (column) operation on a matrix A is any one of the
following operations:
Type I: Interchange any two rows (columns)
Type II: Multiply a row (column) by a nonzero number.
Type III: Add a multiple of one row (column) to another.

Sem 2 2018/2019 (UNIMAS) Chap 2 8 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Elementary Row (Column) Operation

Notation
Interchange rows (columns) i and j.

Ri ↔ Rj (Ci ↔ Cj )

Replace row (column) i by k times row (column) i

kRi → Ri (kCi → Ci )

Replace row (column) j by k times row (column) i + row (column) j

kRi + Rj → Rj (kCi + Cj → Cj )

Sem 2 2018/2019 (UNIMAS) Chap 2 9 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Elementary Row (Column) Operation

Example
   
0 0 1 2 3 3 6 −9
R1 ↔R3
 2 3 0 −2  − −−−→  2 3 0 −2  ,
3 3 6 −9 0 0 1 2
   
0 0 1 2 1
R3 →R3
0 0 1 2
 2 3 0 −2  −3−− −−→  2 3 0 −2  ,
3 3 6 −9 1 1 2 −3
   
0 0 1 2 0 0 1 2
−2R +R3 →R3
 2 3 0 −2  −−−−2−−− −−→  2 3 0 −2  .
3 3 6 −9 −1 −3 6 −5

Sem 2 2018/2019 (UNIMAS) Chap 2 10 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Elementary Row (Column) Operation

Definition
An m × n matrix B is said to be row (column) equivalent to an m × n
matrix A if B can be produced by applying a finite sequence of elementary
row (column) operations to A.

Sem 2 2018/2019 (UNIMAS) Chap 2 11 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Elementary Row (Column) Operation

Example
   
1 2 4 3 1 2 4 3
2R2 +R3 →R3 R1 ↔R3
 2 1 3 2 −
 −−−−−−− → 2 1 3 2  −− −−→
1 −2 2 3 5 0 8 7
| {z } | {z }
A B
   
5 0 8 7 5 0 8 7
2R3 →R3
 2 1 3 2 −−−−−→ 2
  1 3 2 
1 2 4 3 2 4 8 6
| {z } | {z }
C D

D is row equivalent to C . C is row equivalent to B. B is row equivalent to


A. Thus, D is also row equivalent to A.

Sem 2 2018/2019 (UNIMAS) Chap 2 12 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Reducing a Matrix into Row Echelon Form

Theorem
Every nonzero m × n matrix A = [aij ] is row (column) equivalent to a
matrix in row (column) echelon matrix.

Remark: It should be noted that a row echelon form of a matrix is not


unique.
Important terms
The first column with a nonzero entry is called the pivot column.
The first nonzero entry in the pivot column is called the pivot.

Sem 2 2018/2019 (UNIMAS) Chap 2 13 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Reducing a Matrix into Row Echelon Form

Example
Let
 
0 0 3 −4 1
 0 0 2 3 4 
A= 
 2 2 −5 2 4 
2 0 −6 9 7

pivot column – column 1 is the first (counting from left to right)


column with a nonzero entry.
pivot – the first (counting from top to bottom) nonzero entry in the
pivot column occurs in the third row, a31 = 2.

Sem 2 2018/2019 (UNIMAS) Chap 2 14 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Reducing a Matrix into Row Echelon Form

Example
Reduce the following matrix into row echelon form.
 
0 2 3 −4 1
 0 0 2 3 4 
A= 
 2 2 −5 2 4 
2 0 −6 9 7

Sem 2 2018/2019 (UNIMAS) Chap 2 15 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Reducing a Matrix into Row Echelon Form


Solution:
   
0 2 3 −4 1 2 2 −5 2 4
 0 0 1
2 3 4 
− R1 ↔R3  0 0 2 3 4  1 →R1
 −2−R−
 −−−→  −−→
 2 2 −5 2 4   0 2 3 −4 1 
2 0 −6 9 7 2 0 −6 9 7
− 25 1 − 52
   
1 1 1 2 1 1 2
 0 0 2 3 4  −2R1 +R4 →R4  0 0 2 3 4  R2 ↔R3
 − −−−−−−−→  − −−−→
 0 2 3 −4 1   0 2 3 −4 1 
2 0 −6 9 7 0 −2 −1 7 3
5
− 25
   
1 1 1 2 1 1 −2 1 2
3
 0 2 3 −4 1  1
2 →R2  0
 −2−R− 1 −2 12  −2R2 +R4 →R4

 0 −−→  2 − −−−−−−−→
0 2 3 4   0 0 2 3 4 
0 −2 −1 7 3 0 −2 −1 7 3

Sem 2 2018/2019 (UNIMAS) Chap 2 16 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Reducing a Matrix into Row Echelon Form


continued...
1 1 − 52 − 52
   
1 2 1 1 1 2
3 1  1 R →R  3 1
 0 1 −2 2 −2 3 3 0 1 −2  2R3 −R4 →R4

 0 0
2 −−−−→  2
3
2  −−−−−−−→
2 3 4   0 0 1 2 2 
0 0 2 3 4 0 0 2 3 4
1 1 − 25
 
1 2
3 1 
 0 1
 2 −2 2 
 0 0 3
1 2 2 
0 0 0 0 0

The matrix
− 52
 
1 1 1 2
3 1
 0
 1 2 −2 2


 0 3
0 1 2 2 
0 0 0 0 0
is in row echelon form and is row equivalent to A.
Sem 2 2018/2019 (UNIMAS) Chap 2 17 / 44
Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Reducing a Matrix into Row Echelon Form

Example
Reduce the following matrix into row echelon form.
 
1 1 −1 −3 −1
 2
 3 −5 −4 1 

A= 1
 0 2 −4 −3 

 −1 −3 7 2 −2 
1 2 −4 0 3

Sem 2 2018/2019 (UNIMAS) Chap 2 18 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Reducing a Matrix into Row Echelon Form


Solution:
   
1 1 −1 −3 −1 1 1 −1 −3 −1
 2
 3 −5 −4 1  −2R1 +R2 →R2 
 −R1 +R3 →R3  0 1 −3 2 3 

 1
 0 2 −4 −3  −−−−−−−−→ 
 R1 +R4 →R4  0 −1 3 −1 −2 

 −1 −3 7 2 −2  −R1 +R5 →R5  0 −2 6 −1 −3 
1 2 −4 0 3 0 1 −3 3 4
 
1 1 −1 −3 −1
 0 1 −3 2 3 
R2 +R3 →R3  
−−−−−−−−→  0 0 0 1 1 
2R2 +R4 →R4  
−R2 +R5 →R5
 0 0 0 3 3 
0 0 0 1 1
 
1 1 −1 −3 −1
 0 1 −3 2 3 
−3R3 +R4 →R4 
−−−−−−−−→  0 0 0 1 1 
−R3 +R5 →R5  
 0 0 0 0 0 
0 0 0 0 0

Sem 2 2018/2019 (UNIMAS) Chap 2 19 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Reducing a Matrix into Reduced Row Echelon Form

Theorem
Every nonzero m × n matrix A = [aij ] is row (column) equivalent to a
unique matrix in reduced row (column) echelon matrix.

Example
Find a matrix in reduced row echelon form that is row equivalent to the
matrix A.
 
0 2 3 −4 1
 0 0 2 3 4 
A=  2 2 −5

2 4 
2 0 −6 9 7

Sem 2 2018/2019 (UNIMAS) Chap 2 20 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Reducing a Matrix into Reduced Row Echelon Form


Solution:
In the previous example, we managed to reduce the matrix in row echelon
form. So now, we continue from the obtained matrix

1 1 − 25
 
1 2
3
 0 1
 2 −2 12  
 0 0 3
1 2 2 
0 0 0 0 0

to reduce the matrix in reduced row echelon form.


1 1 − 52 19
   
1 2 1 1 0 4 7
3 1  − 3 R3 +R2 →R2  17
 0 1
2 −2 2 − 2 0 1 0 −4 − 52 

 0 0 3 −− −−−−−−→  3

1 2 2  25 R3 +R1 →R1  0 0 1 2 2 
0 0 0 0 0 0 0 0 0 0

Sem 2 2018/2019 (UNIMAS) Chap 2 21 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Reducing a Matrix into Reduced Row Echelon Form

 19 
1 0 0 9 2
−R2 +R1 →R1  0 1 0 − 17
4 − 25
−−−−−−−−→   0 3

0 1 2 2 
0 0 0 0 0

The obtained matrix


 19 
1 0 0 9 2
 0
 1 0 − 17
4 − 52

 0 3
0 1 2 2 
0 0 0 0 0

is in rref and is row equivalent to A.

Sem 2 2018/2019 (UNIMAS) Chap 2 22 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Reducing a Matrix into Reduced Row Echelon Form


Example
Find a matrix in reduced row echelon form that is row equivalent to the matrix A.
 
1 1 −1 −3 −1
 2
 3 −5 −4 1 

A=  1 0 2 −4 −3 

 −1 −3 7 2 −2 
1 2 −4 0 3

Solution:
From previous example, we have reduced A into
 
1 1 −1 −3 −1
 0
 1 −3 2 3 

 0 0 0 1 1 
 
 0 0 0 0 0 
0 0 0 0 0

Sem 2 2018/2019 (UNIMAS) Chap 2 23 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Reducing a Matrix into Reduced Row Echelon Form

Thus, we have
   
1 1−1 −3 −1 1 1 −1 0 2
 0
 1−3 2 3  3R3 +R1 →R1 
 0 1 −3 0 1 

 0 0 0 1 1  −−−−−−−−−→ 
 0 0 0 1 1 

 0 −2R3 +R2 →R2  
0 0 0 0   0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0
 
1 0 2 0 1
 0 1 −3 0 1 
−R2 +R1 →R1  
−−−−−−−−→   0 0 0 1 1  
 0 0 0 0 0 
0 0 0 0 0

Sem 2 2018/2019 (UNIMAS) Chap 2 24 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Solving Linear Systems

Two methods to solve linear systems:


Gaussian elimination consists of two steps:
1. Transform the augmented matrix [A|b] to the matrix [C |d] in row
echelon form using elementary row operations.
2. Solution of the linear system corresponding to the augmented matrix
[C |d] using back substitution.
Gauss-Jordan reduction consists of two steps:
1. Transform the augmented matrix [A|b] to the matrix [C |d] in reduced
row echelon form using elementary row operations.
2. Solution of the linear system corresponding to the augmented matrix
[C |d] using back substitution.

Sem 2 2018/2019 (UNIMAS) Chap 2 25 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Solving Linear Systems


Before we discuss in details how to solve linear systems, there are three
types of solutions of the linear system, i.e. unique solution, infinitely many
solution and no solution. We shall look at it one by one.

Case 1: (Unique Solution)


Consider the following linear system

x + 2y + 3z = 9
2x − y + z = 8 .
3x − z = 3

The augmented matrix is given by


 
1 2 3 9
[A|b] =  2 −1 1 8 .
3 0 −1 3

Sem 2 2018/2019 (UNIMAS) Chap 2 26 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Solving Linear Systems

Transforming the matrix to row echelon form, we obtain (left for students
to verify)
 
1 2 3 9
[C |d] =  0 1 1 2  .
0 0 1 3

Using back substitution, we have

z = 3,
y = 2 − z = 2 − 3 = −1,
x = 9 − 2y − 3z = 9 + 2 − 9 = 2.

∴ the linear system has unique solution x = 2, y = −1, z = 3.


Note: no. of variables (no. of nonzero columns) = no. of nonzero rows

Sem 2 2018/2019 (UNIMAS) Chap 2 27 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Solving Linear Systems


Case 2: (Infinitely Many Solutions)
If we have
 
1 2 3 5 9
[C |d] =  0 1 1 4 2 ,
0 0 1 1 3

then we have

x1 = 9 − 2x2 − 3x3 − 5x4 ,


x2 = 2 − x3 − 4x4 ,
x3 = 3 − x4 .

By letting x4 = r , any real number, then the solution is

x1 = 2 + 4r , x2 = −1 − 3r , x3 = 3 − r , x4 = r .

∴ the linear system has infinitely many solutions.


Note: no. of variables (no. of nonzero columns) > no. of nonzero rows
Sem 2 2018/2019 (UNIMAS) Chap 2 28 / 44
Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Solving Linear Systems

Case 3: (No Solution)


If we have
 
1 2 3 5 9
[C |d] = 0
 1 1 4 2 ,
0 0 0 0 3

then the linear system has no solution since the last equation is

0x1 + 0x2 + 0x3 + 0x4 = 3

which can never be satisfied.

Sem 2 2018/2019 (UNIMAS) Chap 2 29 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Solving Linear Systems

Example
Using Gaussian elimination, solve the following linear system

x + 2y + 3z = 6
2x − 3y + 2z = 14 .
3x + y − z = −2

Solution
The augmented matrix is
 
1 2 3 6
[A|b] =  2 −3 2 14  .
3 1 −1 −2

Sem 2 2018/2019 (UNIMAS) Chap 2 30 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Solving Linear Systems


Performing the elementary row operations:
   
1 2 3 6 1 2 3 6
−2R +R2 →R2
[A|b] =  2 −3 2 14  −−−−1−−− −−→  0 −7 −4 2 
−3R1 +R3 →R3
3 1 −1 −2 0 −5 −10 −20
   
1 2 3 6 − 1
R →R
1 2 3 6
R2 ↔R3 2 2
−− −−→  0 −5 −10 −20  −−5−−−−→  0 1 2 4 
0 −7 −4 2 0 −7 −4 2
   
1 2 3 6 1
R →R
1 2 3 6
7R2 +R3 →R3 10 3 3
−−−−−−−−→  0 1 2 4  −− −−−−→  0 1 2 4 
0 0 10 30 0 0 1 3

The matrix is in row echelon form. Therefore, the solution is

z = 3, y = 4 − 6 = −2, x = 6 + 4 − 9 = 1.

Sem 2 2018/2019 (UNIMAS) Chap 2 31 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Solving Linear Systems

Example
Using Gaussian eliminitaion, solve the following linear system

x1 − x2 + x3 = 0
−x1 + x2 − x3 = 0
.
10x2 + 25x3 = 90
20x1 + 10x2 = 80

Solution
The augmented matrix is
 
1 −1 1 0
 −1 1 −1 0 
[A|b] = 
 0
.
10 25 90 
20 10 0 80

Sem 2 2018/2019 (UNIMAS) Chap 2 32 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Solving Linear Systems


Performing the elementary row operations:
   
1 −1 1 0 1 −1 1 0
 −1 1 −1 0  R1 +R2 →R2  0
  0 0 0 
[A|b] =  0 10 25 −−−−−−−−−→ 
90  −20R1 +R4 →R4  0 10 25 90 
20 10 0 80 0 30 −20 80
   
1 −1 1 0 1 −1 1 0
R2 ↔R4  0 30 −20 80  1
30
R 2 ↔R 2  0 1 − 23 8
3

−−−−→   0 10
 −− −−−−→  
25 90   0 10 25 90 
0 0 0 0 0 0 0 0
   
1 −1 1 0 1 −1 1 0
2 8  3 R3 →R3 
−10R +R →R3  0
 1 −3 0 1 − 23 8 
−−−−2−−−3−−→ 3 − 95
− −−−−→  3 
 0 0 2
31 3 63 13   0 0 1 2 
0 0 0 0 0 0 0 0

Sem 2 2018/2019 (UNIMAS) Chap 2 33 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Solving Linear Systems

Therefore, the solution is

x3 = 2
 
8 2
x2 = +2 =4
3 3
x1 = 4 − 2 = 2

Sem 2 2018/2019 (UNIMAS) Chap 2 34 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Solving Linear Systems

Example
Using Gauss-Jordan method, solve the following linear system

x + 2y + 3z = 6
2x − 3y + 2z = 14 .
3x + y − z = −2

Solution
We continue from previous example:
   
1 2 3 6 1 2 0 −3
−2R +R2 →R2 −2R +R1 →R1
 0 1 2 4  −−−−3−−− −−→  0 1 0 −2  −−−−2−−− −−→
−3R3 +R1 →R1
0 0 1 3 0 0 1 3

Sem 2 2018/2019 (UNIMAS) Chap 2 35 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Solving Linear Systems

 
1 0 0 1
 0 1 0 −2 
0 0 1 3

Therefore the solution is

x3 = 3,
x2 = −2,
x1 = 1,

Sem 2 2018/2019 (UNIMAS) Chap 2 36 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Homogeneous Systems
A homogeneous system is in the form of Ax = 0.
Example
Use Gauss-Jordan method to solve the following linear system

x + y + z + w = 0
x + w = 0 .
x + 2y + z = 0

Solution
The augmented matrix is
   
1 1 1 1 0 1 1 1 1 0
−R1 +R2 →R2
[A|b] = 1 0 0
 1 0 −−−−−−−−→ 0
  −1 −1 0 0 
−R1 +R3 →R3
1 2 1 0 0 0 1 0 −1 0

Sem 2 2018/2019 (UNIMAS) Chap 2 37 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Homogeneous Systems

   
1 0 1 1 1 1 1 1 1 0
−R →R2 −R +R3 →R3
−−−2−−→  0 0  −−−2−−−
1 1 0 −−→  0 1 1 0 0 
0 0 1 0 −1 0 0 −1 −1 0
   
1 1 1 1 0 1 1 0 0 0
−R →R3 −R +R2 →R2
−−−3−−→  0 1 1 0 0  −−−3−−− −−→  0 1 0 −1 0 
−R3 +R1 →R1
0 0 1 1 0 0 0 1 1 0
 
1 0 0 1 0
−R +R1 →R1
−−−2−−− −−→  0 1 0 −1 0 
0 0 1 1 0
So the solution is
x = −r , y = r,
z = −r , w = r , any real number.

Sem 2 2018/2019 (UNIMAS) Chap 2 38 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Homogeneous Systems

Example
Use Gaussian Elimination to solve the following linear system

2x + 3y + −z = 0
x − y − 2z = 0 .
3x + y + 3z = 0

Solution
The augmented matrix is
   
2 3 −1 0 1 −1 −2 0
R1 ↔R2
[A|b] = 1 −1 −2
 0 −−−−→ 2
  3 −1 0 
3 1 3 0 3 1 3 0

Sem 2 2018/2019 (UNIMAS) Chap 2 39 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Homogeneous Systems
Solution

  1 
1 −1 −2 0

1 −1 −2 0 R2 →R2
3
0  −5−−−−→  0
−3R +R3 →R3
−−−−1−−− −−→  0 5 3 1 0 
 
−2R1 +R2 →R2
0 4 9 0 5
0 4 9 0
 
1 −1 −2 0 5 
1 −1 −2 0

3 R3 →R3
3
 
−4R +R3 →R3  0
−−−−2−−− −−→  1 0  33
 −−−−−−→  0 1 0 
 
5 5
 33 
0 0 0 0 0 1 0
5
Hence, the solutions are:
z = 0
3
y+ z = 0, ∴ y = 0
5
x − y − 2z = 0, ∴ x = 0
Sem 2 2018/2019 (UNIMAS) Chap 2 40 / 44
Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Finding Inverse of a Matrix

A convenient way to find the inverse of a matrix A:


1 Write down the partitioned matrix [A|In ]
2 Transform the partitioned matrix into [In |A−1 ] by applying elementary
row operations.
Note: If at any point in the computation, we transform [A|In ] to rref,
obtaining [C |D] where C 6= In , then D 6= A−1 , i.e. A is singular.

Example
Find A−1 if
 
1 2 −3
A= 1 −2 1 .
5 −2 −3

Sem 2 2018/2019 (UNIMAS) Chap 2 41 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Finding Inverse of a Matrix


Solution
 
1 2 −3 1 0 0
[A|In ] =  1 −2 1 0 1 0 
5 −2 −3 0 0 1
 
1 2 −3 1 0 0
−R +R2 →R2
−−−1−−− −−→  0 −4 4 −1 1 0 
−5R1 +R3 →R3
0 −12 12 −5 0 1
 
1 2 −3 1 0 0
−3R2 +R3 →R3
−−−− −−−−→  0 −4 4 −1 1 0 
0 0 0 −2 −3 1
At this point A is row equivalent to
 
1 2 −3
B= 0 −4 4 .
0 0 0
Since B has a row of zeros and B 6= I3 , we can conclude that A is a singular
matrix.
Sem 2 2018/2019 (UNIMAS) Chap 2 42 / 44
Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Finding Inverse of a Matrix

Example
Find A−1 if
 
1 1 1
A= 0 2 3 .
5 5 1

Solution
 
1 1 1 1 0 0
−5R +R3 →R3
[A|In ] =  0 2 3 0 1 0  −−−−1−−− −−→
5 5 1 0 0 1
 
1 1 1 1 0 0 1
R →R2
2 2
 0 2 3 0 1 0  −− −−−−→
− 14 R3 →R3
0 0 −4 −5 0 1

Sem 2 2018/2019 (UNIMAS) Chap 2 43 / 44


Echelon Form of a Matrix Solving Linear Systems Finding Inverse of a Matrix

Finding Inverse of a Matrix

 
1 1 1 1 0 0 − 32 R3 +R1 →R1
3 1
 0 1 2 0 2 0  −−− −−−−−−→
5 −R3 +R1 →R1
0 0 1 4 0 − 14
 
1 1 0 − 41 0 1
4
 −R2 +R1 →R1
 0 1 0 − 15 1 3
 −−−−−−−−→

8 2 8
5
0 0 1 4 0 − 14
 13

1 0 0 8 − 21 − 18
 0 1 0 − 15 1 3
 
8 2 8 
5
0 0 1 4 0 − 14
Therefore  
13
8 − 12 − 81
A−1 =  − 15 1 3
 
8 2 8 
5
4 0 − 14
Sem 2 2018/2019 (UNIMAS) Chap 2 44 / 44

You might also like