Chapter 1 Module Matrices
Chapter 1 Module Matrices
Chapter 1 Module Matrices
MATRICES
By the end of this chapter, you will be able to :
Solve arithmetic operations involving matrices.
Calculate the determinant of a square matrix.
Find the inverse of a matrix by using the adjoint and Gauss-
Jordan elimination method.
Solve system of linear equations.
Apply what you have learned in this topic to solve application
problems.
Chapter 1 Matrices
1.0 INTRODUCTION
There are many information in real life displayed in table form. For example
production, manufacturing, dietary table, flight schedule etc. Let see the following
example of a dietary table of three kind of foods
Units per ounce
Calcium 30 10 20
Iron 10 10 20
Vitamin A 10 30 20
If we remove the labels from the table, the result would be a matrix
30 10 20
10 10 20
10 30 20
a1 j
a
, and the j -th column of A is , 1 j n
2j
amj
If a matrix A has m rows and n columns, then A is a matrix of order m by n .
(written as m n )
If m n , then A is called a square matrix of order n , and that the elements
a11, a22 ,, ann are on the main diagonal of A .
2
Chapter 1 Matrices
Equality of Matrices
Let A and B be matrices of order m n , then A and B are equal if and only if aij bij
Example 1
1 2 3 1 2 w
4 are equal A B , if and only
The matrices A 2 1 4 and B 2 x
5 4 0 5 4 z
if w 3 , x 1 , and z 0 .
There are three types of arithmetic operations that can be carried with matrices,
which are addition, subtraction, and multiplication. However, for multiplication, there
are two types of matrix multiplication which are scalar multiplication and matrix
multiplication.
If A and B be matrices of order m n , then A B aij bij and A B aij bij for
3
Chapter 1 Matrices
Example 2
1 3 0 1
a) Let A and B .
5 7 1 0
1 4 1 2
Then, A B and A B 4 7 .
6 7
1 2 3 3 2 1
b) Let A and B 1 0 1 .
8 1 4
2 0 4 4 4 2
Then, A B and A B 7 1 5 .
9 1 3
1 7 4 2 0 3
c)
Let A 5 9 6 and B 0 9 0 .
2 0 3 1 8 4
3 7 1 1 7 7
Then, A B 5 18 6 and A B 5 0 6 .
3 8 7 1 8 3
4
Chapter 1 Matrices
Scalar Multiplication
Let A aij be a matrix of order m n and c is a real number, then the scalar multiple
of A by c , cA caij for all i 1,2,, m and j 1,2,n .
Example 3
1 2 3 2 3 0
Let A and B 4 5 0 ,
2 1 0
Find
a) 2 A B .
b) 3 A 4B.
Solution:
a) 1 1 3
A B
6 6 0
2 2 6
2 A B
12 12 0
b) 3 6 9 8 12 0
3A and 4 B 16 20 0
6 3 0
11 18 9
Then, 3 A 4 B
10 17 0
5
Chapter 1 Matrices
Matrix Multiplication
define by,
n
cij aik bkj ai1b1 j ai 2 b2 j ain bnj , for all i 1,2,, m and j 1,2,, p .
k 1
Note:
AB is defined only when the number of columns of A is the same as the
number of rows of B , i.e., Amn Bn p Cm p .
In general AB BA .
Let A , B and C are the matrices with the appropriate sizes and c is a scalar, then,
a) ABC AB C
b) A BC AC BC
c) C A B CA CB
d) c AB cAB
e) There a square matrix I where all the elements are equal 0 except the
diagonal equal to 1 such that
IA AI A
The matrix I is called the identity matrix. Below is the different size of
identity matrices.
1 0 0 0
1 0 0 0
1 0 0 1 0 1 0 0
0 1 0 0 1 0
...
22 0 0 1 33
0 0 0 1 44
6
Chapter 1 Matrices
Example 4
p
q ap bq cr
1. a b c 13 11
r 31
2
a b c 2a 3b 4c
2.
f 23 2d 3e 4 f
3
d e 4 31 21
2 3 3 1 2
3. A , and B , then
1 2 22 1 0 5 23
2 3 0 1 2 1 0 0 2 2 0 5 6 2 4
AB
1 3 2 1 1 1 2 0 1 2 2 5 1 1 8 23
However, BA is not defined.
Transpose of a Matrix
Properties of Transpose:
a) A
T T
A
b) A BT AT BT
c) AB T BT AT
d) cAT cAT
Example 5
1 3
If A 0
, then AT 1 0 1 .
2 3 2 7
1 7 32 23
7
Chapter 1 Matrices
Exercise 1.1
Use the following matrices to compute the given expression
3 2
1 2 3 4 2 3
A B C 5 2
4 1 0 2 1 0 2 3
a) A B
b) 3 A 2B
c) C( A B)
d) CA CB
e) ABT
Solution:
8
Chapter 1 Matrices
input output
A A
square matrix real number ( = determinant of A )
Example 1
A 5 , then A 5 5
Note: Determinant of order 1 matrix is the element number of its matrix.
Example 2
2 1
1. ( 2)( 4) (1)(3) 8 3 11
3 4
1 0
2. (1)(1) (0)(0) 1
0 1
x 0
3. ( x)(1) (0)( y ) x
y 1
9
Chapter 1 Matrices
With a given entry of matrix A , we associate the square matrix of order 3 obtained by
deleting the entries in the row and column in which the given entry lies.
With entry a21 , we delete the entries in row 2 and column 1, leaving the matrix of order
a12 a13
2 as follows:
a32 a33
Similarly,
a11 a13
Minor of a22 a11a33 a31a13
a31 a33
and
a11 a12
Minor of a23 a11a32 a31a12
a31 a32
The cofactor of the entry aij is given by cij (1)i j minor of aij where
i j is the sum of the row number i and column number j in which the entry lies.
10
Chapter 1 Matrices
Example 3
a12 a13
1. Cofactor of the entry a21 , c21 (1)21 ( 1)( a12a33 a13a32 )
a32 a33
a12 a13
2. Cofactor of the entry a31 , c31 ( 1)31 (1)( a12a23 a13a22 )
a22 a23
Note: The only difference between a cofactor and a minor is the factor ( 1)i j .
Thus, to find the determinant of a square matrix A of order 3, select any row (or
column) of A and multiply each entry in the row (column) by its cofactor element. The
sum of these products is defined to be the determinant of A .
Example 4
12 1 3
Find A if A 3 1 1 .
10 2 3
Solution:
By choosing the first row,
1 1
c11 ( 1)11 (1)( 3) ( 1)( 2) 1
2 3
3 1
c12 ( 1)12 [( 3)( 3) ( 1)( 10)] 1
10 3
3 1
c13 ( 1)13 ( 3)( 2) (1)( 10) 4
10 2
11
Chapter 1 Matrices
Thus,
3 1
c13 ( 1)13 ( 3)( 2) (1)( 10) 4
10 2
12 1
c23 ( 1)23 [(12)( 2) ( 1)( 10)] 14
10 2
12 1
c33 ( 1)33 (12)(1) ( 1)( 3) 9
3 1
Thus,
12
Chapter 1 Matrices
Example 5
12 1 3
Find A if A 3 1 1 .
10 2 3
Solution:
Step 1: Copy the first two columns and paste them as column 4 and 5.
12 1 3 12 1
3 1 1 3 1
10 2 3 10 2
Step 2: Find the sum of the three products from upper left to lower right
diagonal.
12 1 3 12 1
3 1 1 3 1
10 2 3 10 2
12 1 3 12 1
3 1 1 3 1
10 2 3 10 2
13
Chapter 1 Matrices
3. The determinant of the product of two matrices of order n is the product of their
determinants, that is AB A B .
4. The determinant of a square matrix and the determinant of its transpose are
equal, that is A AT
14
Chapter 1 Matrices
Exercise 1.2
2 1
a) 9 6
1 3 4
b)
2 1 0
3 2 5
3 1 8
c)
6 3 0
6 8 0
Solution:
15
Chapter 1 Matrices
An nn matrix with 1s down the diagonal from upper left to lower right and 0s
elsewhere is called the multiplicative identity matrix of order n.
Example 1
1 0 0
1 0
I2 ; I 3 0 1 0
0 1 0 0 1
Theorem
16
Chapter 1 Matrices
Example 2
3
2 3 1
A , B 2
2 2
1 1
1 0
Since AB BA I 2 , B is an inverse of A , B A1 .
0 1
Finding the inverse of a 2×2 matrix using the adjoint matrix or cofactor method
a b
If A
c d
1 d b
A1
ad bc c a
where
ad bc 0 A , and
d b
c a adjoint matrix A or adj A = Cofactors of A
T
1
Thus, A1 adj A
A
17
Chapter 1 Matrices
Example 3
1 2
Let A
1
. Find A .
3 7
Solution:
A (1)(7) (2)(3) 7 6 1
1 7 2 7 2
A1
1 3 1 3 1
Thus,
1
Given a matrix A , the steps to obtain A using Gauss-Jordan elimination are as
follows:
18
Chapter 1 Matrices
Example 4
2 3 4
Find the inverse of 2 1 1 , if it is invertible.
1 1 2
Solution:
By ERO to produce reduced row-echelon form:
4 1 01 02
2 3 4 1 0 0 R 2 R R
2 1 1 0 1 0 1 3 1 5 1 1
00 1
R 1 R R 2 2 2
1 1 2 0 0 1 2 2 3 2
1 1 2 0 0 1
1 0 0 1 2 1 1 0 0 1 2 1
R1 2 R2 R1 R2 52 R1 R2
5 1 1 1 5
0 0 1 0 0 4 3
R3 R2 R3 2 2 2 2 2
2
5
6 2 4 6 2 4
0 20 0 2 0
5 5 5 5 5 5
1 0 0 1 1
2
R2 2 R2 1 0 0 1 1
2
R1 R1
4 3 0 1 0 5 8 6
1 5
0 0
R3 R2 R3
12 2 2 R3 12 R3
0 0 2 0 0 0 3 5 4
6 10 8
5
1 2 1
1
Thus, A 5 8 6 .
3 5 4
19
Chapter 1 Matrices
Example 5
Find the inverse of the following matrix.
1 2 1
0 1 1
1 0 2
Solution:
By ERO to produce reduced row-echelon form:
1 2 1 1 0 0
R3 R1 R3
1 2 1 1 0 0
0 1 1 0 1 0 0 1 1 0 1 0
1 0 2 0 0 1 0 2 3 1 0 1
1 1 0 1 1 0 1 1 0 1 01
R1 R2 R1 R2 R3 R2
0 1 1 0 1 0 0 1 0 1 3 1
R3 2 R2 R3
0 0 1 1 2 1 0 0 1 1 2 1
1 0 0 2 4 1
R1 R2 R1
0 1 0 1 3 1
R3 R3
0 0 1 1 2 1
2 4 1
1
Thus, A 1 3 1 .
1 2 1
20
Chapter 1 Matrices
Finding the inverse of a 3×3 matrix using the adjoint matrix or cofactor method
Example 6
3 2 1
1
Find A if it is invertible, given that A 5 6 2 .
1 0 3
Solution:
6 2
c11 (1)11 18
0 3
5 2
c12 (1)1 2 17
1 3
5 6
c13 (1)13 6
1 0
c21 6; c22 10; c23 2
c31 10; c32 1; c33 28
18 6 10
Hence, adj A 17 10 1
6 2 28
Thus,
1
A1 adj A
A
18 6 10
1
17 10 1
94
6 2 28
21
Chapter 1 Matrices
Exercise 1.3
Find the inverse of each matrix
1 1 1
a)
0 2 1
2 3 0
1 1 1
b)
3 2 1
3 1 2
Solution:
22
Chapter 1 Matrices
Recall:
x1 x2 x3 6
2x y 5
3x1 2 x2 4 x3 9
4 x 6 y 2
x1 x2 x3 0
am1 x1 am 2 x2 amn xn bm
23
Chapter 1 Matrices
24
Chapter 1 Matrices
Example 1
Use Gaussian elimination with back substitution to solve the following system of linear
equation.
2x y 8
x 3y 6
Solution:
Write the system of linear equation as an augmented matrix.
2 1 8
1 3 6
1 1
1 2 4 x y 4
2
0 1 4 y 4
Use back substitution to find the solution of the system.
1
x y 4
2
y 4
Then
1
x 4 4
2
x 4 2
x 6
25
Chapter 1 Matrices
Example 2
Use Gaussian elimination method to solve the following linear equation.
2x y 8z 1
x y z 2
3x 2 y 2z 2
Solution:
Write the system of linear equation as augmented matrix.
2 1 8 1
1 1 1 2
3 2 2 2
Use row operations to rewrite the matrix in row-echelon form
2 1 8 1
2 1 8 1 R2 1 R1 R2
1 1 1 2 0
2 3
3
3
R 3 R R 2 2
3 2 2 2 3 2 1 3
7 7
0 14
2 2
2 1 8 1 1 2 1 8 1
3 7 3
7
R3 R2 R3 R3 R3
3 3 3
0 3 0 3
2 2 2 2
0 0 7 7 0 0 1 1
Write the system of linear equations corresponding to the row echelon form of the
matrix resulting in step above.
2 1 8 1 2 x y 8 z 1
3 3 3 3
0 3 y 3z
2 2 2 2
0 0 1 1 z 1
26
Chapter 1 Matrices
27
Chapter 1 Matrices
28
Chapter 1 Matrices
Example 3
Use Gauss-Jordan elimination method to solve the following linear equation.
x y 2z 9
2 x 4 y 3z 1
3x 6 y 5z 0
Solution:
Write the system of linear equation as augmented matrix.
1 1 2 9
2 4 3 1
3 6 5 0
Use row operations to produce the matrix in reduced row-echelon form
1 1 2 9
R2 2 R1 R2
1 1 2 9
2 4 3 1 0 2 7 17
R3 3 R1 R3
3 6 5 0 0 3 11 27
11 35
1 1 2 9 1 0 2 2
17
1
R2 R2
R1 R2 R1
0 1
2 7 7 17
0 1
2 2 R3 3 R2 R3 2 2
0 3 11 27 1 3
0 0
2 2
11 35
1 0 2 2
R3 2 R3
R1
11
R3 R1 1 0 0 1
0 1
7
17
2
0 1 0 2
2 2 7
R2 R3 R2
0 0 1 0 0 1 3
3
2
29
Chapter 1 Matrices
Exercise 1.4
Solve each system of linear equations using both methods.
6x 5 y 7
a)
2x 2 y 2
x yz0
b) 2 y z 1
2 x 3 y 5
x yz2
7
c) 3x 2 y z
3
10
3x y 2 z
3
Solution:
30
Chapter 1 Matrices
31
Chapter 1 Matrices
EXERCISE CHAPTER 1
2 5 3 2 8 6
A
4 5 4 1 7
, B , C
3
1 2 3 1 1 5 3 2 6
D 5 1 6 , E 4 2 6 , F 4 1 8
7 2 8 5 2 5 5 0 7
Perform the following operation if possible.
a) A B
b) D+E
c) A–C
d) D–F
e) Matrix X such that A + 2X = C
f) Matrix X such that D – 2X = F
g) BA
h) ED
1 2 5 6
2. Given that A and B , find BA.
3 4 7 8
1 2 0 1
4. Given that A and A , find -5A +2B.
3 4 2 3
1 2 5 6
5. Given that A and B , find BA.
3 4 7 8
32
Chapter 1 Matrices
0 1
1 0 2
6. For A and B 1 2 , find AB.
3 1 4 0 2
1
7. Given that A 2 and B 4 5 , find AB.
3
1 1 4
8. Find the transpose of matrix A where A 3 2 1 .
4 5 2
2 1
2 1 3 2
9. Given that, P 1 3, Q and R .
0 3 1 4
2 2
Show that PQ Q T P T
T
a)
b) Show that Q T T
Q
Find Q R
T
c)
Find 3P
T
d)
2 3 k 2
10. Let A 1 4 2 , B 0 and C 6 4 9 . Find the value of a
2 10 5 1
constant k , such that AB CT .
1 2 4
11. If A 6 2 0 , find A .
5 2 1
1 0 0
12. If A 2 2 0 , find A .
1 3 4
1 2 4
13. If A 6 2 0 , find A .
5 2 1
33
Chapter 1 Matrices
34
Chapter 1 Matrices
15. Find the determinant, all minors and cofactors, and the inverse of each of the
following matrices:
1 1 1
(a) 2 2 3
4 0 0
2 1 1
(b) 2 0 3
4 0 4
5 2 1
(c) 2 1 4
2 0 2
10 5 1
(d) 2 1 4
4 0 4
16. By using elementary row operation method, find the inverse of the following
matrices:
3 1
a) A
5 2
2 3
b) A
4 4
6 4
c) A
2 1
1 2 0
d) A 5 4 2
2 1 2
4 4 2
e) A 0 5 1
4 3 2
1 0 1
f) A 1 2 3
3 1 5
35
Chapter 1 Matrices
1 1 2
17. Given A 4 0 3 . Find A 1 .
5 1 2
1 2 3
18. Given A 1 3 5 . Find A 1
1 5 12
1 2 3
19. Given A 5 1 6 . Find A 1 .
7 2 8
4 0 1 1 2 1
20.
If A 2 1 3 and C 3 1 4
1 2 5 0 5 2
Determine a matrix 𝐵, such that 𝐴 x 𝐵 = 𝐶
21. Solve the following systems using Gaussian elimination with back substitution
method.
x 2y 3
a)
x y 1
x 2y 7
b)
3x 2 y 5
x 2y 3
c)
2x 3y 1
x y z 2
d) 3x 2y z 8
2x 3y 4z 0
x 7 y 4z 9
e) x 2 y 2z 2
x 3y z 4
2x 4 y z 2
f) 3x 6 y 2 z 3
2x y 2z 1
36
Chapter 1 Matrices
22. Use Gauss-Jordan elimination method to solve the following systems of linear
equations.
4x 3y 9
a)
3x 2y 7
x 2y 2
b)
5x 4 y 3
3x 2 y z 3
c) 5 x 4 y 3z 3
6x y z 5
x 2 y 2z 0
d) 2x 5 y 4z 2
x y 6z 4
2(i3 i2 ) 5(i3 i1 ) 4
e) (i2 i3 ) 2i2 (i2 i1 ) 0
5(i1 i3 ) 2(i1 i2 ) i2 1
2x 5 y z 12
f) x 2 y 3z 6
2x 6 y 6
23. A company produces three products x, y and z. each item of product x requires
20 units of steel, 2 units of plastic and 1 unit of glass. Each item of product y
requires 25 units of steel, 5 units of plastic and no unit of glass. Each item of
product z requires 150 units of steel, 10 units of plastic and 0.5 unit of glass.
The available amount of steel, plastic and glass are 2400, 310 and 28
respectively. How many items of each type can be the company produce and
utilize all the available raw materials?
24. Hassan pays RM200 for 2 pair of shirts and 2 pair of trousers while Ali pays
RM500 for one shirt and 6 trousers for Hari Raya. If x and y represents the price
of shirt and trouser respectively, write a system of linear equation in matrix form
based on the information given. Determine the price of a shirt and a trouser.
37
Chapter 1 Matrices
25. Hashim feeds his cats with different mixture of three types of food, namely, X,
Y and Z, as given below:
Assume that cats require 190mg of protein, 95mg carbohydrates and 160mg of
vitamins. Find how many grams of each food Hashim should feed his cats daily
to satisfy their nutrient requirements.
By applying the Current law to the point A and also point B, we obtain
I1 I 2 I 3 . At the left hand loop, by using Ohm’s law, the voltage drop across
the 8 resistor is 8I 1 , the voltage drop across the 6 resistor is 6I 2 , while
the voltage drop across the 5 resistor is 5I 1 . On the other hand, the voltage
drop across the 20V electrical source is negative, since the positive direction of
the loop is from – to +. By applying the Voltage law for this loop now gives
8I1 6I 2 5I1 20 0 and we have the linear equation 13I1 6I 2 20 . At the
right hand loop, by using Ohm’s law, the voltage drop across the 6 resistor is
6I 2 and the voltage drop across the 8 resistor is 8I 3 . On the other hand, the
voltage drop across the 30V electrical source is negative, since the positive
direction of the loop is from – to +. By applying the Voltage law for this loop now
gives 6I 2 8I 3 30 0 and we have the linear equation 3I 2 4I 3 15 .
Determine the currents I 1 , I 2 and I 3 by using Gaussian elimination method.
38
Chapter 1 Matrices
27. A dietitian in a hospital is to arrange a special diet using three basic foods.
The diet is to include exactly 340 units of calcium, 180 units of iron, and 220
units of vitamin A. The number of units per ounce of each special ingredient
for each of the foods is indicated in the table below. How many ounces of each
food must be used to meet the diet requirements? Find the solution using
elementary row operation method.
Calcium 30 10 20
Iron 10 10 20
Vitamin A 10 30 20
28. A small manufacturing plant makes three types of inflatable boats: one-
person, two-person, and four-person models. Each boat requires the services
of three departments, as listed in the table below. The cutting, assembly and
packaging departments have available a maximum of 380, 330 and 120 labor-
hours per week, respectively. How many boats of each type must be produced
each week for the plant to operate at full capacity? Find the solution using
Gaussian elimination method.
Cutting
0.5 h 1.0 h 1.5 h
department
Assembly
0.6 h 0.9 h 1.2 h
department
Packaging
0.2 h 0.3 h 0.5 h
department
29. Mr. Tan want to support his wife on her dietary plan. He decided to investigate
the carbohydrate content of the vegetable they plant. Together , 1 cup of raw
cabbage, 5 raw cauliflowers, and 1 cup of raw tomatoes contain 12 gram of
carbohydrates. One cup of raw cabbage and 6 raw cauliflowers have one-half
the carbohydrates of 1 cup of raw tomatoes. One cup each of raw cabbage
and raw tomatoes has 3 times the carbohydrate content of 6 raw
cauliflowers.Find the number of grams of carbohydrates in the given portion
size of each vegetable.
39
Chapter 1 Matrices
30. The following table gives nutritional information for Subway’s 6-inch
sandwiches advertised with 6 grams of fat or less.
Oven-roasted chicken
430 19 46 20
breast
Suppose you are going to eat only Subway 6-inch sandwiches for a week
(seven days) for both lunch and dinner (total of 14 meals). If your goal is to eat
388 grams of protein and 4900 calories in those 14 sandwiches, how many of
each sandwich should you eat that week? Find the solution using Gaussian
elimination method.
31. A feeding station in a field study provides for three types of deer: young deer,
adult females and adult males. There are 12 deer in all. In total, the deer consume
18.5 units of food and 14.5 units water each day. Suppose each young deer consumes
1 unit of food and 0.5 unit of water each day. The corresponding values for an adult
female are 1.5 and 1, and for an adult male are 2 and 2. The ecologist needs to figure
out how many young deer, adult females and adult males are in the herd.
32. Real Estate Cantwell Associates, a real estate developer, is planning to build a
new apartment complex consisting of one bedroom units and two- and three-bedroom
townhouse. A total of 192 units is planned, and the number of family units (two- and
three-bedroom townhouse) will equal the number of one-bedroom units. If the number
of one-bedroom units will be 3 times the number of three-bedroom units. Find how
many units of each type will be in the complex.
40
Chapter 1 Matrices
33. The following table shows the average departure delay per flight at the four
busiest airports in the Malaysia.
On a certain day, 100 flights depart from Klia, 80 from Kota Kinabalu, 70 from Penang,
and 60 from Kuching. Use matrix algebra to compute the total delay on all departing
flights from these airports.
41