You are on page 1of 94

AM015

TOPIC 3
Matrices and Systems of
Linear Equations

CREDITS: This presentation template was created by Slidesgo, including icons by Flaticon, and infographics & images by Freepik
SUBTOPICS

3.1 3.2 3.3 3.4

Matrices Determinant of Inverse of a System of Linear


Matrices Matrix Equations with
Three Variables
3.1
Matrices
COURSE LEARNING OUTCOMES

At the end of this lesson, students should be able to


(a) Identify the different types of matrices
(b) Perform operations on matrices
(c) Determine the transpose of a matrix
(d) Apply the properties of transpose
Your previous knowledge

Matrix → A rectangular array of numbers, enclosed in brackets and


represented in rows and columns

Element → A number in the matrix


a11 = 6 , a12 = 4 , a13 = 24
a21 = 1 , a22 = -9 , a23 = 8

 6 4 24 
A= 
1 −9 8 
The order of a matrix A is 2 x 3 (read as “a 2 by 3 matrix”)
EXAMPLE 1
State the order of the following matrices :
MATRIX Order of a matrix
(a) 1 0 
3 2 
 
(b) 1 
2
 

3 

(c) 3 2 1
(d) 1 24
 −1 5 6 
 
(e)  2 4
3 0 

5 − 1
LEADING DIAGONAL
For a matrix with order m x m , the elements aij are called the
leading diagonal of the matrix.

EXAMPLE 2
1 6 8
 3 4 2
 
 7 5 9 

The elements _______ are the __________


of the matrix.
EQUAL MATRICES
Matrices which have :
✓ the same number of rows and columns
✓ same orders
✓ the corresponding elements are equal too

EXAMPLE 3

Which matrices below are same?


 8 −8 2 1 7  2 3  8 −8
A=  B=  C=  D= 
 −8 8  3 2 5 1 1  −8 8 

ANSWER :
EXAMPLE 4
3 − a 6 4  9 6 − c 4
Let A =   and B =  
 8 4b 2  2 − 3 d − 8 2 

If A = B , find value of a, b, c and d.


SOLUTION
If A = B , 3 − a 6 4  9 6 − c 4
 8  =
 4 b 2   2 − 3 d − 8 2 
EXERCISE
8 3 −1  2 x 3 −1
Given A = 6 2 0  and B =  6 − y 0 
 3 1 5   3 1 5 
Find
(a) The elements a12 , a21 , a32 and a33
(b) The leading diagonal of matrix A
(c) The order of matrix A
(d) The values of x and y if A = B ANSWERS
(a) a12 = 3 , a21 = 6, a32 = 1, a33 = 5
(b) The leading diagonal is 8, 2 and 5
(c) Order = 3 x 3
(d) x = 4 , y = -2
(a) Identify the different types of matrices

TYPES OF MATRICES
1. The square matrix
2. The column matrix
3. The row matrix
4. The zero/null matrix
5. The diagonal matrix
6. The identity matrix
7. Lower triangular matrix
8. Upper triangular matrix
1. The square matrix
A matrix that has an equal number of rows (m) and columns (n) , (m = n)

EXAMPLE : 1 3 2 
1 3
A=  B = 3 1 2
1 8  2 3 1 
Order = 2 x 2 Order = 3 x 3

2. The column matrix


A matrix that has only one column.
1
1 
EXAMPLE : A =  −3 B=  
 5  2
Order = 3 x 1 Order = 2 x 1
3. The row matrix
A matrix that has only one row.

EXAMPLE : A = 1  2 3 B = 1 - 1

Order = 1 x 3 Order = 1 x 2

4. The zero/null matrix


A matrix where each element of the matrix is 0.
The zero/null matrix can be of any order.

EXAMPLE : 0 0 0  0 0 
A = 0 0 0 B = 0 0
0 0 0 0 0
5. The diagonal matrix
A matrix where all the elements above and below the leading diagonal are
zeros. A diagonal matrix must be a square matrix (m = n).

EXAMPLE :
1 0 0 1 0 0 0 0 0 
 2 0
A=   B = 0 2 0 C = 0 0 0 D = 0 0 0
 0 3 0 0 3 0 0 3 0 0 3

6. The identity matrix


Each element on the leading diagonal is 1, the rest of the elements are 0.
An identity matrix must be a square matrix (m = n)

EXAMPLE : 1 0 0
1 0
A=  B = 0 1 0
0 1  0 0 1
7. Lower triangular matrix
The elements above the leading diagonal are zero.

EXAMPLE : 1 0 0 1 0 0
3 2 0 0 0 0 
   
3 2 3 3 0 2

8. Upper triangular matrix


The elements below the leading diagonal are zero.
EXAMPLE :
1 2 3  1 0 0
0 2 4  0 1 1 
   
0 0 3 0 0 3
EXAMPLE TYPES NOTES
 3 −7 8 
1. 9 1 −2  The square matrix Number of rows = number of column
 
 4 5 10 

2.  2 The column matrix One column


5 
 
7 

3. 3 4 − 1 2 The row matrix One row


4. 0 0 0
0 0 0
The zero/null matrix All entries = 0
 
 0 0 0 

5. 3 0 0 The diagonal matrix All the elements above and below the
0 4 0 
  leading diagonal are zeros
0 0 8 

1 0 0 
6. 0 1 0  The identity matrix Diagonal entries = 1
 
 0 0 1  All other = 0
3 0 0
7. 7 4 0 
Lower triangular matrix Square matrix and

 2 5 8  a ij = 0 for i  j
 3 −7 8 
8. 0 1 −2  Upper triangular matrix Square matrix and
 
0 0 10  a ij = 0 for i  j
EXERCISE
3 2 0  4 0 0
Given A = 0 0 8  , B = 0 0 1
5 0 , = 1 0 
  C ,
0 0 −4   0 7 
0 
 3 0 0 1 0 0  3 
D =  −1 2 0  , E = 0 1 0  , and F =  4  .
 
 0 4 5   0 0 1  6 
Determine which of the above matrix are :
(a) Square matrix = ____________________
(b) Identity matrix = ____________________
(c) Diagonal matrix = ____________________
(d) Row matrix = ____________________
(e) Upper triangular matrix = ____________________
(f) Lower triangular matrix = ____________________
(g) Column matrix = ____________________
(b) Perform operations on matrices

OPERATION ON MATRICES
1. ADDITION of matrices
2. SUBTRACTION of matrices
3. SCALAR MULTIPLICATION
4. MULTIPLICATION OF TWO matrices
1. ADDITION of matrices
2. SUBTRACTION of matrices
Note : Only matrices of same order can be added or subtracted.

ADDITION SUBTRACTION

EXAMPLE 5
Given matrices A = 1 2 4 , B =  4 3 −5
1 
and C =   . Find
 2
(a) A + B (b) A – B (c) A + C
SOLUTION
(a) A + B =
=

(b) A – B =
=

(c) A + C =
3. SCALAR MULTIPLICATION
If k is a scalar and A is a matrix , then the matrix kA obtained by
multiplying every element of A by k.

 a11 a12 
Given A =   ,
 a21 a22 

 a11 a12   ka11 ka12 


Therefore kA = k  =
 a21

a22   ka21 ka22 
EXAMPLE 6
 3 8 1 1
Given A =   . Find the (a) 3A (b) A
 7 1 3 2

SOLUTION
1
(a) 3A = (b) A=
2

= =
4. MULTIPLICATION OF TWO matrices

Matrices can only be multiplied together if the number of columns in the first
matrix equals the number of rows in the second matrix.

In General :
To multiply m x n matrix by n x p matrix, the n must be the same,
and the result is m x p matrix.

Order of 1st matrix Order of 2nd matrix

mxn nxp mxp


n must be The RESULT is
the SAME m x p matrix
1ST STEP
Check the
order of the
2x3 3x2 2x2
two matrices
How to multiply
two matrices ??
2nd STEP 1(7) + 2(9) + 3(11) = 58
Multiply the
two matrices

1(8) + 2(10) + 3(12) = 64

Find another two elements, then we’ll get : 4(7) + 5(9) + 6(11) = 139
4(8) + 5(10) + 6(12) = 154
REMEMBER !
Matrix multiplication is not commutative, AB ≠ BA

e.g : AB =

BA =

AB ≠ BA
The answer is (usually) different !
Identity matrix is a special matrix, because when you multiply by it, the original
is unchanged :

A×I=A or I×A=A

= =
EXAMPLE 7
 2 1
 1 2 3  −3 4  . Find AB.
Given A =   and B =
−  
 2 0 5   2 1 
SOLUTION

AB =

=
EXAMPLE 8



2 3 8 


3 
   
Given D = 1

 7 9 and E = 8  . Find DE and ED.


   
  
1


5 4 1 



 

SOLUTION

DE = =

=
ED =
EXAMPLE 9
−2

1  
0 −1
Given A = and B =
 

 

 
.
3 −1



 3

 2 

Show that AB ≠ BA
SOLUTION

AB = BA =

= =

= =
(c) Determine the transpose of a matrix

THE TRANSPOSITION OF MATRICES

The transposition of a matrix can be obtained by


interchanging the rows and columns.

The transposed matrix is denoted by AT


e.g : 1 
A = 1 2 AT =  
 2
(d) Apply the properties of transpose
THE PROPERTIES OF TRANSPOSE OF MATRICES

 T
1.


T
A  = A


 
 

T
2. 


A B  = AT  BT
 

T
3. 


AB 


= BT AT
 

T
4. 
 kA =kAT for k a scalar
 
EXAMPLE 10
Find the transpose of the following matrices

MATRIX Transpose of a matrix


(a) 10 6 −2  10 6 
 6 3 8  6 3
   
 −2 8 

(b) 3
 −1
 

(c) 2 4
7 1 
 
EXAMPLE 11

4

−1


 
Given A = 3 − 2 . Show that (a) (AT)T = A



 (b) (2A)T = 2AT
 
 


2 5 


SOLUTION

(a)
(b) (2A)T = 2AT

LHS : 2A=

( 2 A)T =

RHS : 2 AT =

=
EXAMPLE 12
Show that
(a) ( A  B ) = A  B
T T T

(b) ( AB )T = BT AT
SOLUTION
(a) ( A  B )T = AT  BT
a b c u v w 
Let A =   and B =  
d e f  x y z 

LHS : A  B =

=
( A  B)T =

RHS : AT  BT =

=
(b) ( AB )
T
= BT AT
a b  u v w 
Let A =   and B= 
c d   x y z 

LHS : AB =

( AB )
T
=
RHS : BT AT =

=
EXERCISE

1. Given A = 2

3 and B =
 

5 1
 
   

3 1
Show that [AB]T=BTAT

1 2  −3 5 
2. If A =  and B = 
3 4   2 6 

(a) Find A – 2B
(b) Show that [AB]T=BTAT
 7 −8 
Answer : 2(a)  −1 −8 
 
 x y  0 0
3. Given D = 


, find the values of x and y if D 2 = 

 


2 2 
  0 0 


 1 3
4. Given that A = 
 
, find the values of p and q such

 −1 4 


1 0 
that A + pI − qA = 0 where I = 
2

 0 1 

Answers : 3. x = −2 , y = −2
4. p = 7 , q = 5
3.2
Determinant of Matrices
COURSE LEARNING OUTCOMES
At the end of this lesson, students should be able to
(a) Determine the minors and cofactors of a matrix

(b) Determine the determinant of a matrix by using


expansion of the cofactors

(c) Determine the determinant of a matrix by using


the properties
(a) Determine the minors and cofactors of a matrix

01 MINOR
The minor of aij denoted by Mij
Mij is the determinant of the matrix after eliminating the i th row
and the j th column

EXAMPLE 1
 2 1 6
Find the minors M13 , M21 and M32 of the matrix A =  −1 3 4  .
 
 2 5 7 
SOLUTION

 2 1 6
A =  −1 3 4 
 2 5 7 

M 13 = M 21 = M 32 =

= = =
= = =
02 COFACTOR
The cofactor of aij denoted by Cij = ( −1)
i+ j
M ij
TIPS : Always +ve in this corner

 + M 11 -M 12 + M 13 
Cij  =  -M 21 + M 22 -M 23 

 + M 31 -M 32 + M 33 

EXAMPLE 2
1 4 0 
Find the cofactors C12 , C22 and C33 of the matrix A =  2 5 1  .
 
 3 0 −2 
SOLUTION Cij = ( −1)
i+ j
M ij

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

C12 = C 22 = C33 =

= = =
= = =
EXAMPLE 3
 a −6 b 
If A =  −1 2 0  and the minors of -2 and 2 are -2 and 5 respectively.
 −2 0 3

Find the value of a and b.


SOLUTION
EXAMPLE 4 Cij = ( −1)
i+ j
M ij
 −2 4 1 
Find the cofactor of matrix B =  3 1 −1
 0 5 8 
SOLUTION
 
Cofactor of matrix B =
 
 

 

 
 
=  

 

(b) Determine the determinant of a matrix by using the expansion of the cofactors

01 DETERMINANT of 2x2 matrix


a b  a b
The determinant of 2 x 2 matrix   is A = = ad - bc
c d  c d
EXAMPLE 5
 2 5 3 2 
Given A =  3 8 and B = 5 2  . Find A , B , AB and BA .
   
SOLUTION
A= B=
AB = BA =

= =

= =

AB = BA =

= =
02 DETERMINANT of 3x3 matrix

• Method : COFACTOR EXPANSION


• The sign of cofactor of each element in determinant 3 x 3 ;
+ − +
− + −
+ − +
• Usually to evaluate the determinant of matrix 3 x 3, we always
choose the row or column that has the most zero
entries.
• We will get the same value of determinant when
we expand any columns or rows.
EXAMPLE 6
1 2 −1
Find the determinant of A = 0 3 0  by cofactor expansion of :
6 4 0 

(a) first row (b) second row (c) third column

SOLUTION

(a) first row : A =

=
+ − +
1 2 −1
A = 0 3 0 
− + −
+ − +
6 4 0 

(b) second row : A =

(c) third column : A =

=
EXERCISE

 4 10 −2 
1. Given A =  8 −3 −5 , find the determinant of A by using
 −6 −3 3 
cofactor expansion :
(a) expanding by 1st row
(b) expanding by 2nd column
 2 −2 0 
2. Find the determinant of P =  −3 1 3 
Answers
 −2 −4 −1 1. (a) & (b) : A = 48

2. P = 40
EXAMPLE 7
 2 x −1
Given A =  x 2 1  . Find x if A = 0 where x  W
 −3 −1 1 

SOLUTION
(c) Determine the determinant of a matrix by using the properties

PROPERTIES OF DETERMINANT
01
For any square matrix A of order n x n and scalar k : kA = k n A

 a11 a12 a13 


If A =  a21 a22 a23  and A = 4 . What is the value of 2 A ?

 a31 a32 a33 

kA = k n A 2A =
=
=
02
If A and B are two
square matrices of the 1 0   2 −1
Given A =   and B = 4 1  .
same order, then  2 −3   
AB = A  B Show that AB = A  B .

A=
AB =
B=
=
AB =

=

AB =
03

AT = A
For every square matrix A,
Det A = Det AT

04

The value of the


determinant changes sign
when two rows or columns
are interchanged
3.3
Inverse of a Matrix
COURSE LEARNING OUTCOMES
At the end of this lesson, students should be able to
Compute the inverse of a non-singular matrix up to
3x3 using :

a) adjoint matrix; and

b) the property of AB = kI
Compute the inverse of a non singular matrix using :
(a) adjoint matrix

ADJOINT MATRIX METHOD

−11
Inverse of a matrix , A = adj A
A

−1 1
A 
T
adj A = cij 
A
If A =0 , then A−1 does not exist, and A is called a singular matrix.

PROPERTIES OF INVERSE MATRICES


(A ) = A
−1
−1
1.

(A ) =(A )
−1 T
−1
2. T

( AB )
−1
3. = B −1 A−1
1 −1
( kA)
−1
4. = A , where k is a real number, k  0
k
1
5. A−1 =
A
EXAMPLE 1 For 2 x 2 matrix :
3 1 
Find the inverse matrix of A =   1
 5 4  A−1 = adj A
A
SOLUTION
1  d −b 
=
A−1 = ad − bc  −c a 

=
EXAMPLE 2
 1 3 2 −11
A = adj A
Find the inverse matrix of A =  0 2 2  A
 
 −2 −1 0 

SOLUTION STEP :

STEP 1 : Find A Refer to your NOTE 3.2 (b)

A =

=
STEP 2 : Find adj A = Cij 
T

 
Cij  =  
 
Refer to your NOTE 3.2 (a) 
 

 
=
 
 

 
 transpose
 
adj A = Cij  =  
T

 

 

STEP 3 : Substitute A and adj A into
1
A-1 = adj A
A

A-1 =

=
EXERCISE
By using adjoint method, find A−1 (if it exist)
 −2 1 4   11 1 13 
 − 25 25 
1. A =  3 −2 5  
25

1. A =  −
9 6 22 
A
−1
 0 1 3  −
 25 25 25 
N
 
 2 −1 4   3 2 1 

S
 25 25 
2. A =  3 2 −1
25
2. A−1 does not exist
 5 −2 9  W  1 
E
2
 3 − 0
3
 
 1 2 0
R 3. A − 1 = 
1 1
0
3. A =  −1 1 0   3 3 
 
 2 5 1  − 7 −
1
1
 3 3 
AA−1 = I
−1
A A=I
AI = A or A−1 I = A−1
IA = A or IA−1 = A−1
Compute the inverse of a non singular matrix using :
(b) the property of AB = kI

AB = kI

If AB = BA = I ,
 B = A−1 and A = B −1

Hence, if AB = kI then
1 1
A = B and also B = A
−1 −1

k k
EXAMPLE 3
 1 −1 0  1 1 −2 
If A =  −2 1 2  and B = 0 1 −2  , show that A & B are inverses of
 −1 0 1  1 1 −1
each other.
SOLUTION

AB = BA =

= =

= =
EXAMPLE 4
 −2 1 1  0 3 3
Given that A =  3 −2 1  and B =  2 3 5
 
 −1 2 −1  4 3 1 
(a) Find AB (b) Deduce A-1 and B-1
SOLUTION

(a) AB = =

=
(b) Deduce A-1 and B-1

Deduce A-1
Deduce B-1
EXAMPLE 5

3 1 1 
Given that A = 1 3 1 , find the values m and n such that
1 1 3

A2 + mA + nI = 0 where I is the 3x3 identity matrix and 0 is the

zero matrix. Use this relation to obtain A-1 and show that A3 = 39 A − 70I .
SOLUTION
A2 + mA + nI = 0 
SOLUTION 
SOLUTION 
3.4
Systems of Linear Equations
with Three Variables
COURSE LEARNING OUTCOMES
At the end of this lesson, students should be able to
(a) Express a system of linear equations in the form of AX = B

(b) Solve the unique solution to AX = B using inverse matrix


(a) Express a system of linear equations in the form of AX = B

The system of linear equations : a11 x + a12 y + a13 z = b1


a21 x + a22 y + a23 z = b2
a31 x + a32 y + a33 z = b3

can be written as the equality of two matrices

 a11x + a12 y + a13 z   b1 


 a x + a y + a z  = b 
 21 22 23   2 
 a31x + a32 y + a33 z   b3 
which can be written in the form of AX = B

 a11 a12 a13   x   b1 


a a22 a23   y  = b2 
 21    
 a31 a32 a33   z   b3 

where
 a11 a12 a13  x  b1 
A =  a21 a22 a23  , X =  y  , B = b2 
     
 a31 a32 a33   z   b3 
EXAMPLE 1
Write a system of linear equations below in the form of AX = B
x − 2 y + 3z = 7
2x + y + z = 4
−3x + 2 y − 2 z = −10
ANSWER
EXAMPLE 2
Salleh is a vegetable seller. On certain day, his regular customer
Mak Mah, paid a sum of RM120 for 1kg red chilies, 5kg cucumbers
and 10kg cabbages. Another customer, Aida paid RM38 for 1kg
cucumbers and 4kg cabbages. The total price of 1kg red chilies,
6kg cucumbers and 15kg cabbages is RM166. By using x, y and z
respectively to denote the price of 1kg red chilies, 1kg cucumbers
and 1kg cabbages, write a system of linear equation and express
the systems in matrix form.
ANSWER
(b) Solve the unique solution to AX = B using inverse matrix

INVERSE MATRIX METHOD


AX = B
A−1 AX = A−1 B
IX = A−1 B
X = A−1 B
Inverse Matrix Method

EXAMPLE 3
Solve the system of linear equations below by using the inverse matrix
(a) 3x + y + 2 z = 11 (b) x + 2 y + z = 8
3x + 2 y + 2 z = 10 y=2
x+z = 5 3y − z = 5
SOLUTION
(a)
STEP 1 : Write
in the form of
AX = B
STEP 2 : Write
this steps…

STEP 3 : Find A-1 −1 1


(adjoint method) A = adj A Refer to your NOTE 3.3 (a)(i)
A
STEP 4 : Substitute
A-1 into X = A-1B
(b) x + 2 y + z = 8 Answer : x = 3, y = 2, z = 1
y=2
3y − z = 5
SOLUTION
EXAMPLE 4

2 1 1  2 2 1
If A = 1 −2 −3 and B = 13 −5 −7  . Find AB and deduce
 3 2 4   −8 1 5 

the matrix A-1. Express the following system in the matrix form
2x + y + z = 1
x − 2 y − 3z = 1
3x + 2 y + 4 z = 5

hence, solve the linear system.


SOLUTION



EXERCISE

1. Solve the following system of equations using the inverse matrix


(a) x1 + 2 x2 = 1
3x1 + 7 x2 = 8

(b) x+ y−z =6
3 x − 4 y + 2 z = −2
2x + 5 y + z = 0 Answer
(a) x1 = −9 , x2 = 5
(b ) x = 2 , y = 0 , z = −4
1 1 1 
2. By using adjoint method, find the inverse matrix for  0 1 2  .
 
 2 1 1 

In a town there are three shops R, S and T which sell three brands of
shampoo. Shop R sold 1 box of shampoo A, 1 box of shampoo B and 1
box of shampoo C. Shop S sold 1 box of shampoo B and 2 boxes of
shampoo C. Shop T sold 2 boxes of shampoo A, 1 box of shampoo B and
1 box of shampoo C. The gain from the sales is RM15 for shop R, RM12
for shop S and RM20 for shop T. If x, y and z respectively are the gain
for each box of shampoo A, B and C sold, form a system of linear from
the information. Then, solve the equation by using the inverse matrix.

Answer : x = RM 5 , y = RM 8 , z = RM 2
3. The table below shows the masses (in kg), of banana, jackfruit and mango
that are supplied by a dealer to three fruit stalls X, Y and Z in a particular
day.
Stalls
X Y Z
Fruits
Banana 30 40 20
Jackfruit 30 30 20
Mango 40 20 30
On that day, the total payment received by the dealer from the stalls X, Y and
Z are RM 190, RM 152 and RM 135 respectively. If x, y and z represent the
prices, in RM, for 1kg of banana, 1kg of jackfruit and 1 kg of mango
respectively, obtain a system of linear equations in x, y and z from the above
information. By using the Cramer’s rule, determine the values of x, y and z.
Answer : x = RM 1.20 , y = RM 1.80 , z = RM 2.50

You might also like