0% found this document useful (0 votes)
6 views

Topic 4 Matrices (4)

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Topic 4 Matrices (4)

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Topic 4: Matrices and System of Linear Equations

TOPIC 4: MATRICES AND SYSTEM OF LINEAR


EQUATIONS

4.1 Matrices
LEARNING OUTCOMES

At the end of the lecture, students should be able to:


• identify the different types of matrices.
• perform operations on matrices.
• define the transpose of a matrix and use the properties.

4.1.1 Definition

A matrix of order m  n is a rectangular array consisting of entries in m (horizontal)


rows and n (vertical) columns, as shown below,

 a11 a12 a13  a1n 


a a 22 a 23  a 2 n 
 21
 a31 a32 a33  a3n  m rows
 
      
a m1 am2 a m3  a mn 

n columns

➢ a11 , a12 ,......, amn are the elements of the matrix.


➢ A matrix is called m  n , if it has m rows and n columns.
➢ A matrix for which the entry is in row i and in column j is denoted by [ a ij ].
➢ An expression m  n is called the order of the matrix.
➢ A matrix with only one column is called column matrix.
➢ A matrix with only one row is called row matrix.

Page | 60
Topic 4: Matrices and System of Linear Equations

Types of Matrices

Square Matrix
A matrix with an equal number of rows and columns is a square matrix.
For example :
1 3 2 
 2 3
A=  , B = 3 1 2
 −1 5 2 3 1 

Zero Matrix
A matrix with elements that are all 0’s.
For example :
0 0 0  0 0 

A = 0 0 0 , B = 0 0 0 , C = 0 0 

0 0 0 0 0 

Diagonal Matrix
A square matrix is where all the elements are zero except the elements in the principal
diagonal.
For example:
1 0 0   a 0 0
2 0  
A=   B = 0 2 0  C = 0 0 0
 0 3  0 0 3 0 0 b 

Identity Matrix

Identity Matrix is a matrix with all entries in the main diagonal are 1 and others are
zero.
1 0 0 
1 0 
A=   B = 0 1 0
 0 1  0 0 1

Page | 61
Topic 4: Matrices and System of Linear Equations

Lower Triangular Matrix


A square matrix where elements aij = 0 for i < j
For example:
1 0 0 a 0 0
A = 3 2 0 , B = b
 f 0
3 2 3  c d e 

Upper Triangular Matrix


A square matrix where elements aij = 0 for i >j
For example:
1 2 3  a b c
A = 0 2 4 , B = 0 d
 e 
0 0 3  0 0 f 

Equal Matrices
Two m  n matrices are equal if they have the same dimension and their
corresponding entries are equal.

Example
Which matrices below are the same?
1 2 1 2  2 1
A= B = 1 2 , C = 2 1 , D =  , E=
1    ,
,
2 2 1  2 1
1 2
F = 2 1  .
2 1 

SOLUTION
A=D

Page | 62
Topic 4: Matrices and System of Linear Equations

EXAMPLE 4.1

3 − a 6 4  9 6 − c 4
Let A =  =
4b 2 2 − 3d − 8 2
, and B .
 8 
If A = B, find value of a, b, c, and d.

SOLUTION

3− a = 9 4b = −8 6−c = 6 2 − 3d = 8
a = −6 b = −2 c=0 3d = −6
d = −2

4.1.2 Operation on Matrices

a) Addition and Subtraction of Matrices


For m  n matrices A = [ a ij ] and B = [ bij ],
✓ A + B is the m  n matrix [ c ij ], where cij = aij + bij .
✓ A – B is the m  n matrix [ d ij ], where d ij = aij − bij .

NOTE

We cannot define matrix addition or subtraction


unless the matrices are in the same order.

EXAMPLE 4.2
1 2  4 3
Simplify the given quantity for A =   , B= 
3 4 − 5 6
(a) A + B (b) A – B

SOLUTION

1 2  4 3  1+ 4 2 + 3 5 5
(a) A + B =   +   =   =  
3 4 − 5 6 3 + (−5) 4 + 6 − 2 10

1 2  4 3  1− 4 2 − 3 − 3 − 1 
(b) A – B =   -   =   =  
3 4 − 5 6 3 − (−5) 4 − 6  8 − 2

Try this!  p q − p q   3p − 2q 
If A =  , B =   and C =   , find 2A – 3B + 4C.
r s  r − s  − 4r 5s 
 17 p − 9q 
Ans:  
 − 17 r 25s 

Page | 63
Topic 4: Matrices and System of Linear Equations

b) Scalar Multiplication

If c is a real or complex number and A = [ a ij ],


then cA = [ bij ], where bij = caij

EXAMPLE 4.3

 2 − 4
1 
Compute − ·  8 5 
2
− 6 7 
SOLUTION
 2 − 4  (− 12 )2 (− 12 )(−4) −1 2 
1   
5  =  (− 2 )8 (− 2 )5  = − 4 − 52 

− · 8 1 1
2
− 6 7  (− 12 )(−6) (− 12 )7   3 − 72 

(iii) Multiplication Of Two Matrices

Multiplication of a row and a column.


 b1 
b 
 2
If, R = a1 a2 a3  an  and C = b3 
 

bn 
then, RC = a1b1 + a2 b2 + a3b3  + an bn.

ATTENTION! A row and a column must have the same


number of entries in order to be multiplied.

EXAMPLE 4.4
 2 1
 1 2 3 
Multiply    − 3 4
− 2 0 5  2 1
 
SOLUTION

 2 1
 1 2 3    1(2) + 2(−3) + 3(2) 1(1) + 2(4) + 3(1) 
− 2 0 5  − 3 4 = − 2(2) + 0(−3) + 5(2) − 2(1) + 0(4) + 5(1)
   2 1  
 

2 12
=  
6 3 

Page | 64
Topic 4: Matrices and System of Linear Equations

4.1.3 Properties of Matrices

For all matrices A, B and C where the sum and product of matrices are defined

(a) Multiplication of matrices is associative.


A ( BC ) = ( AB ) C

(b) Multiplication of matrices is distributive over addition.

A ( B + C ) = AB + AC

(c) Multiplication of matrices is not commutative.


AB  BA

(d) Multiplication of matrices by identity matrix is commutative.


AI = IA = A

where A is a square matrix and I is an identity matrix.

NOTE
If A is a square matrix, then A2 = AA, A3 = AAA

4.1.4 Tranpose of a Matrix

The transpose of a m  n matrix A is the n  m matrix AT, obtained by interchanging


the rows and columns of A. That is, the i th column of AT is the i th row of A for all i.

The properties of the transpose of a matrix

(A )T T
=A

( A + B ) = AT + BT and ( A − B ) = AT − BT
T T

( AB ) = BT AT
T

( kA) = kAT
T

Page | 65
Topic 4: Matrices and System of Linear Equations

EXAMPLE 4.5

1 2  3 4 1 4
Let A =   , B=  and C= .
3 4 2 1  3 2

Show that, (a) (A + B + C)T = AT + BT + CT (b) (BC)T = CTBT

SOLUTION
 1 + 3 + 1 2 + 4 + 4 5 10
A+B+C =  =  
3 + 2 + 3 4 + 1 + 2  8 7 

 5 8
Therefore (A + B + C)T =   and
10 7 

1 3   3 2  1 3   5 8 
AT + BT + CT =  + + =  
2 4 4 1  4 2 10 7 

Thus (A + B + C)T = AT + BT + CT

T
3 4 1 4  3 + 12 12 + 8
T T
15 20
(b) (BC)T =      =   =  
2 1 3 2  2+3 8+2  5 10 
15 5 
=  
20 10

T T
1 4 3 4
 
T T
CB =  
3 2 2 1
1 3   3 2 
=   
 4 2 4 1 
3 + 12 2 + 3
=  
12 + 8 8 + 2
15 5 
=  
20 10

 (BC)T = CTBT

Page | 66
Topic 4: Matrices and System of Linear Equations

A Symmetrical Matrix of matrix A

A square matrix, A = [ a ij ], is symmetric if it is equal to its own transpose,

A = AT and aij = aji .

 1 a − b
1 2 
Example A=   , B =  a 3 c 
2 3 − b c 2 
Solution:
 1 a − b
1 2 
T
A =   , B =  a 3 c 
T

2 3 − b c 2 

Since A = AT and B = BT , therefore A and B are Symmetrical Matrix.

NOTE

In a symmetric matrix, the elements are symmetrical about the leading diagonal
.

A Skew Symmetrical Matrix of Matrix A

A square matrix, A = [ aij ] is a skewed symmetrical matrix if

A = − AT and aij = −a ji and aii = 0

Example  0 2 − 1
 0 2
A=   B = − 2 0 − 3
− 2 0  1 3 0 

Solution: leading diagonal


 0 −2   0 2 
− AT = −  = =A
 2 0   −2 0 

 0 −2 1   0 2 −1
− B = −  2 0 3 =  −2 0 −3 = B
T

 −1 −3 0   1 3 0 

Therefore, A and B are skew symmetrical matrix.

Page | 67
Topic 4: Matrices and System of Linear Equations

More examples on matrix

EXAMPLE 4.6

 5 − 1 1 1 
Find A and B if AT + 2 B T =   and 2 AT + B T =  .
− 2 3   2 0
− 1 2   3 − 2
Ans: A =   , B= 
 1 − 1 − 1 2 
SOLUTION

EXAMPLE 4.7
 − 1 0 − 3  3 9 3
   
If C = ( A − B ) where A =  6 9 2  and B =  0 8 1  , find matrix C.
T

7 0 1   7 6 8
   
Ans: ( A − B ) = AT − BT
T

SOLUTION

Page | 68
Topic 4: Matrices and System of Linear Equations

EXAMPLE 4.8

 1 0 0
Given H =  −1 −2 0  , find the real number of p and q if H 2 = pH + qI where I is
 −1 −3 1 
the identity matrix of order 3 x 3. Hence, show that H 4 = −5 H + 6 I

Ans : p = -1 , q = 2
SOLUTION

Page | 69
Topic 4: Matrices and System of Linear Equations

4.2 Determinant of Matrices


LEARNING OUTCOMES

At the end of the lecture, students should be able to:


• find the minors and cofactors of a square matrix.
• find the determinant of a 3  3 matrix using cofactors.

The determinant is an algebraic operation that transforms a square matrix into a


scalar. Only square matrix has determinant.

If A is a square matrix, then the determinant of A is denoted by det A or A .

4.2.1 For 1  1 order matrix


The determinant is equal to the elements itself.
det a = a

Example
Given A = [-2], so det A = A = -2

4.2.2 For 2  2 matrix :


a a12  a a12
det  11  = 11 = a11a22 − a21a12
 a21 a22  a21 a22

Example  2 5
Given A =  ,
 3 8
2 5
so det A = A = = [(2)(8) − (3)(5)] = 16 − 15 = 1
3 8

Page | 70
Topic 4: Matrices and System of Linear Equations

4.2.3 For a 3  3 matrix


4.2.3.1 Diagonal Expansion Formula
 a11 a12 a13 
If A =  a21 a22 a23 
 a31 a32 a33 

then det A can be obtained by the following diagonal expansion. Form a 3 x 5 matrix
by augmenting A on the right with its first two columns. Then obtain the sum of
multiplication of elements in every arrow to the right minus the sum of multiplication
of elements in every arrow to the left.
a11 a12 a13 a11 a12
Det A = A = a21 a22 a23 a21 a22
a31 a32 a33 a31 a32

=  a11  a22  a33 + a12  a23  a31 + a13  a21  a32  −  a13  a22  a31 + a11  a23  a32 + a12  a21  a33 

EXAMPLE 4.9

Evaluate the determinant of


 2 −4 −2   −2 −1 −3
A =  −2 0 4  and B =  5 −2 3 
 
 4 3 −3  4 −3 7 

Ans : | B | = (28 -12 + 45 ) – ( 24 + 18 – 35 ) = 54


SOLUTION
2 −4 −2 2 −4
A = −2 0 4 −2 0
4 3 −3 4 3

= ( 2.0.3) + ( −4.4.4 ) + ( −2. − 2.3)  − ( 4.0. − 2 ) + ( 3.4.2 ) + ( −3. − 2. − 2 ) 

= 0 − 64 + 12 − 0 + 24 − 24
= -52

Page | 71
Topic 4: Matrices and System of Linear Equations

4.2.3.2 Using Cofactor

Minor and Cofactor

Let A be n  n matrix,
1. The minor of the element aij in A denoted by M ij is the determinant of the sub-

matrix obtained from A ,by deleting the ith row and jth column of A.
For example: Consider determinant of matrix A of order 3.
1 2 −1
A = 3 4 2 , the minor of element a11 is M 11 .
1 4 3

M11 is the determinant of the sub-matrix obtained by deleting the first row and the
first column from A.

M11 = 1 2 −1 = 4 2 = 4.3 – 4.2 = 4


3 4 2 4 3
1 4 3

Similarly
M32 = 1 2 −1 = 1 − 1 = 1.2 – 3(-1) = 5
3 4 2 3 2
1 4 3

2. The cofactor cij of the element aij is denoted by cij and defined by

cij = ( - 1 )i +j Mij

then, c11 = (-1)1+1 M11 = 4

c32 = (-1)3+2 M32 = -5


and generally

 M ij if i + j = even
cij = 
− M ij if i + j = odd

Page | 72
Topic 4: Matrices and System of Linear Equations

Determinant

n
Let A be a n  n matrix, then A =  aij cij for any row i or
j =1

n
A =  aij cij for any column j.
i =1

EXAMPLE 4.10
 2 −2 0 
By using cofactor, find the determinant of A =  −3 1 3  by using the elements
 −2 −4 −1
in (i) the first row (ii) the third column
SOLUTION

(i)
2 −2 0
A = −3 1 3
−2 −4 −1
1 3 −3 3 −3 1
= 2  (−1)1+1 + (−2)  (−1)1+ 2 + (0)  (−1)1+3
−4 −1 −2 −1 −2 −4
= 2(−1 + 12) + 2(3 + 6) + 0
= 22 + 18
= 40
(ii)
2 −2 0
A = −3 1 3
−2 −4 −1
−3 1 2 −2 2 −2
= 0  (−1)1+3 + (3)  (−1) 2+3 + (−1)  (−1)3+1
−2 −4 −2 −4 −3 1
= 0(12 + 2) − 3(−8 − 4) − 1(2 − 6)
= 36 + 4
= 40

NOTE

1. Usually, to evaluate the determinant of matrix A, we always choose the


row or column that have the most elements which are zero.
2. If A is a singular matrix, det A = A = 0

Page | 73
Topic 4: Matrices and System of Linear Equations

4.2.4 Properties of Determinant

1. Multiplying a Row or Column by a Constant

If each element of any row (or column) of a determinant is multiplied by a constant k, the new
determinant is k times the original.
ka11 ka12 ka13 a11 a12 a13
a21 a22 a23 = k a21 a22 a23
a31 a32 a33 a31 a32 a33

1 2 3 1 2 3
Example
4 8 −4 = 4 1 2 −1
1 1 0 1 1 0

2. Row or Column of Zero

If every element in a row (or column) is 0, the value of the determinant is 0.

Example 3 −2 5
0 0 0 =0
−1 4 9

3. Interchanging Rows or Columns

If two rows (or columns) of a determinant are interchanged, the sign of the determinant is
changed.
1 0 9 1 9 0
Example −2 1 5 = − −2 5 1 Second and third
3 0 7 3 7 0 column are
interchanged

4. Identical Rows or Columns

If two rows or column are identical, the value of the determinant is 0.


3 2 3
Example 2 2
= 0, −2 2 −2 = 0
1 1
1 1 1

5. Determinant of matrix A and matrix transpose AT are equal.

2 3 2 −1
Example = = 4+3= 7
−1 2 3 2

Page | 74
Topic 4: Matrices and System of Linear Equations

6. If A and B are two square matrices, then A B = A B

7. If A is a triangular matrix, then A is the product of the elements on the main


diagonal.
4 7 8
Example 0 2 8 = 4  2  2 = 16
0 0 2

8. If each element of any row (or column) of A is the sum of two terms,

then A can be expressed as the sum of two determinants.

Example a + b+ a b  
= +
c d c d c d

EXAMPLE 4.11

1 −1 0 
 
If A =  −3 x − 2 2  and A = −5 , find
0 −2 x + 1

(a) the value of x (b) AT (c) A3

SOLUTION

1 −1 0
(a) A = −3 x − 2 2
0 −2 x + 1
x−2 2 −3 2 −3 x − 2
=1 − (−1) +0 (using row 1)
−2 x + 1 0 x +1 0 −2
= [( x − 2)( x + 1) − (−4)] + [−3( x + 1) − 0] + 0
− 5 = x 2 − x − 2 + 4 − 3x − 3
x2 − 4 x + 4 = 0
( x − 2) 2 = 0
x=2

(b) AT = A = −5 [ by properties no (5)]

(c) A3 = A A A = A A A = (−5)(−5)(−5) = −125 [by properties no (6)]

Page | 75
Topic 4: Matrices and System of Linear Equations

EXAMPLE 4.12

 1 2 2
 
Given that P =  m 1 2  where m and n are integers. Using the determinant
 2 2 n
 
2m 1 2
properties, find the value of 2 2 2 in terms of t if P = t.
4 2 n

Ans: -2t
SOLUTION

Page | 76
Topic 4: Matrices and System of Linear Equations

4.3 Inverse Matrices


LEARNING OUTCOMES

At the end of the lecture, students should be able to:


• find the inverse of matrix using
(a) adjoint matrix
(b) elementary row operations.

4.3.1 Definition

If A and B are square matrices of order n, such that AB = BA = I, where I is identity


matrix of n also then B is called the inverse of A ( i.e. B = A−1 ) and A is called the
inverse of B (i.e. A = B−1 )

Theorem:
If A is a square matrix of order n  n , then A-1 exist if and only if
determinant (det) A  0 or A is non-singular matrix.

Theorem:
If A and B are two non-singular matrices of order
n  n , then ( AB ) = B −1 A−1
−1

Proof:

Let C = AB
multiply C by B −1 A−1
CB −1 A−1 = AB( B −1 A−1 ) , ( B −1 A−1 ) C = ( B −1 A−1 ) AB
= ABB −1 A−1 = B −1 A−1 AB
= AIA−1 = B −1 IB
= AA−1 = B −1 B
=I =I

Since, C ( B−1 A−1 ) = ( B−1 A−1 )C = I , therefore


C −1 = B −1 A−1
(shown)
( AB)−1 = B −1 A−1

Page | 77
Topic 4: Matrices and System of Linear Equations

NOTE

The multiplication of A and its inverse A -1 is commutative, that is AA−1 = A−1 A = I

EXAMPLE 4.13

 1 2 3  11 −3 −10 
   
Let A =  0 4 1  and B =  1 0 −1  . Show that AB = BA and hence,
 1 1 3  −4 1 4 
  
find A −1 .
 11 −3 −10 
−1  
Ans: A =  1 0 −1 
 −4 1 4 

SOLUTION

EXAMPLE 4.14
1 2 1
 
Given that matrix A =  1 −1 0  , find the matrix A2 . If A 3 − A 2 − 6 A = I , where I
3 1 1
 
is an identity matrix, find the inverse matrix of A.
 6 1 2 −1 −1 1 
  −1  
Ans: A =  0 3 1 , A =  − 1 − 2 1 
2

 7 6 4 4 5 − 3 
  
SOLUTION

Page | 78
Topic 4: Matrices and System of Linear Equations

4.3.2 Adjoint Matrices

 a11 a12 a13 


 
If A =  a21 a22 a23  , the cofactor of the elements of A are denoted by c11 , c12 , c13 ,
a 
 31 a32 a33 
and so on. The matrix that is formed with the cofactors as its elements is called the
matrix of cofactors.
 c11 c12 c13   + M 11 − M 12 + M 13 
   
Thus, the matrix of cofactors is C =  c21 c22 c23  or C =  − M 21 + M 22 − M 23 
c   +M − M 32 + M 33 
 31 c32 c33   31

where Mij is minor of element aij.


The transpose of this matrix is defined as the adjoint matrix of A and is denoted by
adj A.
T
 c11 c12 c13   c11 c21 c31 
   
adj ( A ) = [ C ij ]T =  c21 c22 c23  =  c12 c22 c32 
c c33   c13 c23 c33 
 31 c32

EXAMPLE 4.15

Find adjoint matrix for each matrix below:


1 2 3 
A = 3 2 4 
1 1 3 

SOLUTION

2 4 3 4 3 2
c11 = (-1)1+1 c12 = (-1)1+2 c13 = (-1)1+3
1 3 1 3 1 1
= 6 -4 = 2 = - ( 9 – 4) = -5 = 3 -2 =1

2 3 1 3 1 2
c21 = (-1)2+1 c22 = (-1)2+2 c23 = (-1)2+3
1 3 1 3 1 1
= - (6 – 3 ) = -3 =3–3=0 = - (1 – 2 ) = 1

2 3 1 3 1 2
c31 = (-1)3+1 c32 = (-1)3+2 c33 = (-1)3+3
2 4 3 4 3 2
=8–6 = - (4 – 9 ) = 2 -6
=2 =5 = -4
−T
 2 −5 1   2 −3 2 
Therefore, adj ( A) =  −3 0 1  =  −5 0 5 
 2 5 −4   1 1 −4
Page | 79
Topic 4: Matrices and System of Linear Equations

4.3.3 Method of Finding Inverse Matrix

(i) Using Adjoint Matrix


(ii) Using Elementary Row Operations

4.3.3.1 Adjoint Matrix

If A  0 , then A has an inverse A −1 given by


1
A −1 = adj A
A

EXAMPLE 4.16
1 1 − 1
Find an inverse matrix of A = 2 − 3 1 
2 1 2 
SOLUTION

A = 1( −6 − 1) − 1( 4 − 2 ) − 1( 2 + 6 )
= −17

 −3 1 2 1 2 −3 
 − 
 1 2 2 2 2 1  − 7 − 2 8 
 1 −1 1 −1 
=  − 3 4 1 
1 1
Cofactor A= C ij =  − − 
 1 2 2 2 2 1  − 2 − 3 − 5
 1 −1 1 −1 1 1 
 − 
 − 3 1 2 1 2 −3 

 − 7 − 3 − 2
adj A = [Cij ] = − 2 4 − 3
T

 8 1 − 5

 − 7 − 3 − 2 7 3 2
1 
2 − 4 3
−11 1  
A = adj A =  − 2 4 − 3 = 
A − 17 17
 8 1 − 5 − 8 − 1 5

7 3 2 1 1 − 1 17 0 0 
1   1 
Check!
−1
A A= 
 
2 − 4 3  2 − 3 1  =  0 17 0  = I
17 17
− 8 − 1 5 2 1 2   0 0 17

Page | 80
Topic 4: Matrices and System of Linear Equations

EXAMPLE 4.17

 1 −1 0 
Find an inverse matrix of A =  2 3 − 2 .
− 2 0 1 
 3 1 2

−1 
Ans: A =  2 1 2 
6 2 5
 
SOLUTION

Page | 81
Topic 4: Matrices and System of Linear Equations

4.3.3.2 By Using Elementary Row Operations (ERO)

 1 2 3
 
Consider matrix A =  − 1 2 0 
 3 1 1
 

There are three elementary row operations:

1. Interchanged any two rows.


Example interchanging the first row and the third row.

 1 2 3  3 1 1
  R1  R3
*  
 −1 2 0  −1 2 0
 3 1 1  1 2 3
   

2. Multiply all the elements of a row by a scalar.


Example multiplying the second row by 2.

 1 2 3  1 2 3
  2 R2 → R2  
*

 −1 2 0  − 2 4 0
 3 1 1  3 1 1
   

3. Multiply all the elements of a row by a scalar and add the product to another
row.
Example
multiplying the first row by –3 and adding the product to the
third row.
 1 2 3 1 2 3 
  *  
 −1 2 0 − 3R1 + R3 → R3  − 1 2 0 
 3 1 1  0 − 5 − 8
   

NOTE Ri* means become a new ith row.

To Find the Inverse Matrix Using Elementary Row Operations


When a matrix A is changed into another matrix B after using elementary row
operations, the matrices A and B are said to be equivalent.

To find the inverse of a matrix A, start by writing the matrix in the form ( A I ) and
changed it by elementary row operations into ( I B ) . The resulting matrix B is the
inverse of A.

Page | 82
Topic 4: Matrices and System of Linear Equations

EXAMPLE 4.18

 2 −1 1 
If A = 1 −1 −1 . Find A−1 by using elementary row operation.
 2 −2 −1

SOLUTION
 2 −1 1 1 0 0 1 −1 −1 0 1 0
( A I ) = 1 −1 −1  R1  R2 
0 1 0  ⎯⎯⎯→  2 −1 1 1 0 0 
 2 −2 −1 0 0 1   2 −2 −1 0 0 1 
1 −1 −1 0 1 0
Procedure: 
Step1: Obtain a 1 in the first
( −2) R1 + R2 → R2 *
⎯⎯⎯⎯⎯→  0 1 3 1 −2 0 
position on the leading diagonal.  2 −2 −1 0 0 1 
Step 2: Obtain zeros under 1 in
the first column. 1 −1 −1 0 1 0

Step 3: Obtain a 1 in the second
( −2) R1 + R3 → R3 *
⎯⎯⎯⎯⎯→ 0 1 3 1 −2 0 
position on the leading diagonal. 0 0 1 0 −2 1 

Step 4: Obtain a zero under 1


in the second column.
Step 5: Obtain a 1 in the third 1 0 2 1 −1 0 

position on the leading ⎯⎯⎯⎯R2 + R1 → R1*
→ 0 1 3 1 −2 0 
diagonal. 0 0 1 0 −2 1 
Finally obtain zeros above all
the 1’s. 1 0 2 1 −1 0 

1 4 −3
Step 3
( −3) R3 + R2 → R2*
⎯⎯⎯⎯⎯→ 0 1 0
Step 1 1 0 0 0 0 1 0 −2 1 
 
0 1 0 1 0 0 1 3 −2 
Step 2 0 0 1

  ( −2) R3 + R1 → R1*
1 4 −3
Step 5
⎯⎯⎯⎯⎯→ 0 1 0
0 0 1 0 −2 1 
=( I B)
Step 4

1 3 −2 
Therefore A = B = 1 4 −3
−1

0 −2 1 

Page | 83
Topic 4: Matrices and System of Linear Equations

EXAMPLE 4.19

2 0 − 1

If A = − 1 2 1  . Find A−1 by using elementary row operation.
 3 − 2 − 4
3 1 1
4 − − 
4 4
1 5 1 
Ans: A−1 =  
8 8 8 
1 −
1
− 
1
 2 2 2 
SOLUTION

Page | 84
Topic 4: Matrices and System of Linear Equations

EXAMPLE 4.20

 1 −1 0 
If A =  2 3 −2  . Find A−1 by using elementary row operation.
 −2 0 1 
 3 1 2

−1 
Ans: A =  2 1 2 
6 2 5
 
SOLUTION

Page | 85
Topic 4: Matrices and System of Linear Equations

4.4 System of Linear Equations with Three


Variables
LEARNING OUTCOMES

At the end of the lecture, students should be able to:


• write a system of linear equations in the form of AX = B .
• solve AX = B using
(a) inverse matrix,
(b) Gauss-Jordan Elimination method

4.4.1 Linear Systems of Matrix Equations


A system of equations is said to be linear if each equation is linear. Thus, a linear
system of two equations involving x1 and x 2 is in the form

a11 x1 + a12 x2 = b1
a21 x1 + a22 x2 = b2

a linear system of three equations involving x1 , x 2 and x 3 is in the form

a11 x1 + a12 x2 + a13 x3 = b1


a21 x1 + a22 x2 + a23 x3 = b2
a31 x1 + a32 x2 + a33 x3 = b3
All the linear systems can be written as a single matrix equation. For example, the
linear system
a11 x1 + a12 x2 + a13 x3 = b1
a21 x1 + a22 x2 + a23 x3 = b2
a31 x1 + a32 x2 + a33 x3 = b3
is equivalent to the matrix equation of

 a11 a12 a13  x   b1 


a  1
 21 a 22 a 23   
 x 2  = b2 
 a31 a32 a33  x  b3 
 3

 a11 a12 a13   x1   b1 


where A = a 21 a 22 a 23  X =  x 2  and B = b 
 ,
   2
 a31 a32 a33   x3  b3 

Page | 86
Topic 4: Matrices and System of Linear Equations

then the system equations can be solved by using:


i. inverse matrix
ii. Gauss - Jordan Elimination method

4.4.2 Solving System of Linear Equations

4.4.2.1 Using the Inverse Matrix to solve AX = B


If A is a n  n square matrix that has an inverse A−1 , and if X is a variable matrix and
B a known matrix, both with n rows, then the solution of matrix equations AX = B is
given by

Proof:
X = A−1B
AX = B ( let A is a 3  3 square matrix )
A−1 ( AX ) = A−1B ( multiply by A on both sides )
−1

( A A) X = A
−1 −1
B ( since A A = I )
−1

X = A−1B ( since IX = X )

EXAMPLE 4.21

Solve the following system of equations by using the inverse matrix


3x1 + x2 + 2 x3 = 11
3x1 + 2 x2 + 2 x3 = 10
x1 + x3 =5

SOLUTION

We convert this to a matrix equation of the form


AX = B
3 1 2  x1  11
3 2 2  x  = 10
  2   
1 0 1   x3   5 

Page | 87
Topic 4: Matrices and System of Linear Equations

multiply by A−1 , A−1 AX = A−1B we get


X = A−1B
 x1   2 −1 −2  11
 x  =  −1 1 0  10
 2    
 x3   −2 1 3   5 

 22 − 10 − 10 
=  − 11 + 10 + 0 
− 22 + 10 + 15

2
= − 1
 3 

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

EXAMPLE 4.22

Matrix M and N are given as


 −10 4 9   2 3 4
   
M =  15 −4 −14  , N =  4 3 1 
 −5 1 6   1 2 4
  
Calculate MN and hence find N -1.
Three products X, Y and Z are each made up of three components A, B and C.
Product X is made up of 2A, 4B and 1C, product Y is made up of 3A, 3B and 2C while
product Z is made up of 4A, 1B and 4C. Given that there are 750A, 1000B and 500C
available. If we let x, y and z represent the quantities of X, Y and Z produced
respectively, write a matrix equation that describes the above situation. Then, find the
number each product produced.
SOLUTION

 −10 4 9  2 3 4 
  
MN =  15 −4 −14  4 3 1 
 −5 6  
 1  1 2 4 
5 0 0
 
= 0 5 0  = 5I
0 0 5 

Page | 88
Topic 4: Matrices and System of Linear Equations

M  M 
  N = I similar N   = I
 5   5 
 4 9 
 −2 5 5 
 
−1 M  −4 −14 
Therefore N = = 3
5  5 5 
 
 −1 1 6 

 5 5 

The equations representing the production of X, Y, Z are


System Linear: 2x + 3y + 4z = 750
4x + 3y + z = 1000
x + 2y + 4z = 500
Matrix Form:
 2 3 4  x   750 
    
 4 3 1  y  = 1000 
 1 2 4  z   500 
    

 x   750 
   
N  y  = 1000 
 z   500 
   

 x  750 
   
Multiply by N −1 : N −1 N  y  = N −1 1000 
 z  500 
   
 x  750 
  −1  
I  y  = N 1000 
z  500 
   

 4 9 
 −2 5 5   750 
 x  
   −4 −14   
 y =  3 5 5  
1000 
z   500 
  6 
 −1 1
 
 5 5 
 200 
 
=  50 
 50 
 
Therefore, x = 200, y = 50, z = 50

Page | 89
Topic 4: Matrices and System of Linear Equations

Try this:

Solve the following system of equations using the inverse matrix


x1 + x2 − x3 = 6
x1 + 2 x2 = 1
i) ii) 3x1 − 4 x2 + 2 x3 = −2
3 x1 + 7 x2 = 8
2 x1 + 5 x2 + x3 = 0

Ans:
i) x1 = -9 and x2 = 5 (ii) x1 = 2 , x2 = 0 and x3 = -4

4.4.2.2 Using Gauss- Jordan Elimination Method

This method involves reducing an augmented matrix to the identity matrix I, using
elementary row operation.
Example
augmented matrix A B    I n X 

EXAMPLE 4.23

Solve the following system of equations using the Gauss- Jordan Elimination method
x1 − 3 x2 + x3 = −12
x1 + x2 + x3 = 0
2 x1 − x2 + x3 = −8
SOLUTION
 
We first form the augmented matrix A B , and then begin applying the elementary

row operation to produce I n  X


1 − 3 1 − 12 1 − 3 1 − 12
   
1 1 1 0  − R1 + R2 → R2* 0 4 0 12 
2 − 1 1 − 8  − 2 R1 + R3 → R3* 0 5 − 1 16 

1 − 3 1 − 12
1  
R2 R2* 0 1 0 3 
4 0 5 − 1 16 

Page | 90
Topic 4: Matrices and System of Linear Equations

1 0 1 − 3
3R2 + R1 → R1*  
−5R2 + R3 → R3* 0 1 0 3 
0 0 −1 1 

1 0 1 − 3
 
0 1 0 3 
(−1)R3 R3* 0 0 1 − 1 

(−)R3 + R1 → R1* 1 0 0 − 2
 
0 1 0 3 
0 0 1 − 1 

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

Try this:

Solve the following system of equations using the Gauss-Jordan Elimination method
x1 + 2 x2 + 4 x3 = −10
(a) 2 x1 + 3x2 + 6 x3 = −15
x1 − x2 + x3 = −7

4 x1 + x3 = 5
(b) − 2 x1 + x2 = 4
− 2 x1 + x3 = 2

2 x1 − 4 x2 − 10 x3 = −12
(c) 2 x1 − 2 x2 − 2 x3 =2
− 3x1 + 4 x2 + 11x3 = 8

Answer:
(a). x1 = 0 , x2 = 3 and x3 = −4

1
(b) x1 = , x2 = 5 and x3 = 3
2
(c) x1 = 5 , x2 = 3 and x3 = 1

Page | 91

You might also like