Thinking Time: Equal Matrices
Thinking Time: Equal Matrices
Time
1. Write down a 3 3 square matrix.
2. Write down a 1 2 zero matrix and a 2 3 zero matrix.
3. Is (0) equal to 0? Explain.
Equal Matrices
Two matrices A and B are equal if and only if AT
TE
NTI
ON
(a) both matrices have the same order, and
(b) their corresponding elements are equal. The corresponding elements of
two matrices refer to the elements
1 2 1 2 in the same position of both
For example, if A = and B = , then A = B. matrices.
3 4 3 4
Thinking
Time
2 2 0
1. Are and equal? Explain.
3 3 0
0 0 0
0 0
2. Are and 0 0 0 equal? Explain.
0 0 0 0 0
1 2 1 3
3. Are and equal? Explain.
3 4 2 4
Solution:
20 b 4a a + 3
A = B, so = .
c 16 d−4 d
From (1),
20
∴ a =
4
=5
From (2),
b = 5 + 3
=8
1. Write down the order of each of the following 3. The table below shows the number of students in a
matrices. class and the type of fruits that they like best among
−1 3 the fruits given (i.e. they can only choose one type
of fruit among the fruits given).
0 2
(a)
5 6
Apple Orange Banana Durian
1 Boys 4 0 5 6
7 6
(b) −8
2 8 7 5 3
Girls
−8 −1 7
(i) Represent the data in the table by using
3 0 4.3
(c) a matrix F.
5 −9 12
(ii) Which is the type of fruit that is liked best by an
5 equal number of boys and girls?
(d)
(iii) Find the sum of the elements in the first row
0
of F. What does this sum represent?
( −13 )
(e) (iv) How do you use the elements of F to find the
number of students who like durian best?
0 0
(f) What is the answer?
0 0
4. Which of the following pairs of matrices are equal?
2. Which of the following pairs of matrices are equal? If they are not equal, state the reason.
If they are not equal, state the reason.
6
−4 −4 P=
(a) , Q = (0)
A= −3
(a) ,B=
5 5
0 0
7 8 7 −8 (b) X = ,Y=
C= 0 0
(b) ,D=
−8 2 8 2
−2
P=
(c)
7
,Q= ( −2 7 )
0 6 6
X=
(d) , Y=
0 −3 −3
5
Q=
7
3 5 b a 5 13
(b) =
7 −3 c d − a 6
2 x 18 14 2 k
(c) 3 y 36 = 15 6 h
(d) ( 2x − 3 y + 4 )=( 7 6 )
1
x x+4 3 h
(e) 2 =
k − 9 27
5 3 y
2x − 5 y − 4
0 0
(f) =
z+3 5k 0 0
4.2 Subtraction of
Matrices
Class
Discussion
Addition of Matrices
Let us return to the context of the matrix for Table 4.1 in the class discussion on
16 7 69
page 129: M =
58 64 76
Suppose the boss of the stationery shops receives a new stock of 100 pens of each
brand. How should he distribute them? Should he give equal number of pens of each
brand to each of the two shops, or more pens to the shops with less stock?
86 ____ ____
=
____ ____ ____
Hence when we add two matrices, we get a new matrix whose elements are the
sum of the corresponding elements of the two matrices.
2. Can you add two matrices of different orders, e.g.
16 7 69 70 80
+ ?
58 64 76 30 20
Explain.
3. How about adding the following two matrices?
16 7 69 70 80 0
+
58 64 76 30 20 0
Explain.
p q w x p+w q+x
if A = and B = , then A + B = .
r s y z r + y s + z
Class
Discussion
Subtraction of Matrices
The final stock for the two stationery shops for the previous class discussion is now
86 87 119
represented by the matrix X = .
88 84 126
After one month, the boss finds that the stock of pens left is given by
30 24 98
Y= .
61 67 117
1. How do you subtract matrix Y from matrix X to give the quantity of the pens of
each brand that were sold?
119 30 98
X − Y = 86 87
−
24
88 84 126 61 67 117
86 − 30 87 − 24 119 − ___
=
88 − ___ ______ _______
56 ____ ____
=
____ ____ ____
Hence when we subtract one matrix from another, we get a new matrix whose
elements are the difference of the corresponding elements of the two matrices.
2. Do you think you can find the difference of two matrices if their orders are
different?
In general, if two matrices A and B have the same order, then A – B is obtained by
subtracting the corresponding elements of B from A, e.g.
p q w x p−w q−x
if A = r s and B = y z , then A – B = r − y s− z .
t u a b t − a u − b
−1 3
and D = 6 −2 , evaluate each of the following if
0 8
possible. If it is not possible, explain why.
(a) A + B (b) A – B + C (c) C – D
Solution:
6 3 4 −2
(a) A + B = +
5 8 0 7
10 1
= P
5 15 So roblem
lvin
g T
ip
6 3 4 −2 −9 0
(b) A – B + C = − + For (b), we can also evaluate
5 8 0 7 10 −1 A – B + C straightaway, e.g. the
first element is equal to
2 5 −9 0 6 – 4 + (–9) = –7.
= +
5 1 10 −1
−7 5
=
15 0
2. The marks of a Mathematics test and a Science test for three students are shown
in matrix P. The total possible score for each test is 50 marks.
Raj Ethan Farhan
49 28 39 Mathematics
P=
47 45 21 Science
In the second test for Mathematics and for Science, Raj scores 46 marks for
Mathematics and 42 marks for Science, Ethan scores 40 marks for
Mathematics and 38 marks for Science, and Farhan scores 31 marks for
Mathematics and 35 marks for Science.
(i) Express the marks for the second test by using the matrix Q with the same
order as P.
(ii) Find the matrix P + Q.
(iii) Explain what the numbers in the matrix in (ii) represent.
Exercise
4B
1. Evaluate each of the following if possible. If it is 2. Evaluate each of the following if possible. If it is
not possible, explain why. not possible, explain why.
(a) 3 4 + 4 6 3 −1 6
8 −5 3 0 (a) + −
4 5 7
(b) 7 + 5 4 −1 3 2 −6 4
−8 −9 (b) + −
3 2 −5 4 2 1
(c) ( 2 8 −3 )+( −4 7 0 )
(c) ( 1 3 )−( 3 4 )+( −2 6 )
5
(d) + ( 5 −2 ) 3 1 5 2 −1 0 7 5 8
−2 (d)
− +
−7 8 −2 5 −2 6 −2 4 −9
2 −3 8 5 6 7
(e) − 2 5
10 5 4 −3 0 12 2
12 8 3
(e) + 6 − −8
−5 0
(f) −8.3 − 1.7
4 0 4 −3 −3 2 4 5
8 9 4
(f) 2 5 − 7 −1 + 0 −6
−8 9 6 −3 2 8
(g) +
−7 6 8
2 5 −5 0 −8 6 0
8 9 4 0 (g) + −
(h) + −3 6 8 9 2 8 0
−7 6 8 0
( 5 ) − ( −6 ) + ( 3 )
(h)
3 1 4 −1
5. If A = ,B= and
4 −2 3 −4
0 1
C= , evaluate
−1 0
(i) A – B, (ii)
B – A,
B – C, (iv)
(iii) A – (B – C),
(A – B) – C.
(v)
Class
Discussion
Multiplying a Matrix by a Scalar
In the previous class discussion on page 136, the number of pens sold after one
56 63 21
month is represented by the matrix P = X – Y = .
27 17 9
Suppose the boss decides to order two times the number of pens sold in the previous
month.
1. How do you multiply matrix P by a constant number to give the quantity of the
pens of each brand ordered by the boss for each shop?
56 63 21
2P = 2
27 17 9
2 × 56 2 × 63 2 × ___
=
2 × ___ ______ ______
p q kp kq
if A = , then kA = .
r s kr ks
evaluate 2A + 3B.
(b) Find the value of a and of b in the following:
−2 ( a b )+( −5 8 )=( 7 3 ).
Solution:
5 −3 −2 7
(a) 2A + 3B = 2 + 3
1 6 −4 0
10 −6 −6 21
= +
2 12 −12 0
4 15
=
−10 12
(b) −2 ( ) + ( −5 8 ) = (
a b 7 3 )
( −2 a −2b ) + ( −5 8 ) = ( 7 3 )
( −2 a − 5 −2b + 8 ) = ( 7 3 )
Equating the corresponding elements, we have
–2a – 5 = 7 and –2b + 8 = 3
–2a = 7 + 5 –2b = 3 – 8
= 12 = –5
12 −5
a = b =
−2 −2
1
= –6 = 2
2
1
∴ a = –6, b = 2
2
(i) 3A + 2B,
(ii) 4B – 3A.
Passenger Cargo
Ships Ships
8 3 Dock 1
A=
7 5 Dock 2
Passenger Cargo
Ships Ships
11 2 Dock 1
B=
12 1 Dock 2
Solution:
(i) Total number of ships of each type arriving at each of the docks from Monday to
Friday is given in the matrix 5A.
5A = 5 8 3
7 5
40 15
=
35 25
40 15 11 2
(ii) 5A + 2B = + 2
35 25 12 1
40 15 22 4
= +
35 25 24 2
62 19
=
59 27
(iii) The elements of 5A + 2B represent the number of each type of ships arriving at
each of the docks from Monday to Sunday.
A chartered bus carries passengers daily from Monday to Friday. The number of Exercise 4C Question 5
adults and children it carries each morning and afternoon is given in the matrix D.
Adults Children
15 25 Morning
D=
21 8 Afternoon
(i) Find the total number of adults and children carried by the bus from Monday to
Friday in the mornings and afternoons, expressing your results in matrix form.
(ii) The bus carries a total of 14 adults and 10 children every Saturday morning, and
18 adults and 7 children every Saturday afternoon. Represent this information
using the matrix E.
(iii) Evaluate the matrix 5D + E and explain what this matrix represents.
Class
Discussion
Multiplying a Matrix with another Matrix
In the class discussion on page 136, the number of pens sold is represented by the
matrix:
A B C
56 63 21 Shop 1
P=
27 17 9 Shop 2
Suppose the selling price of each pen of brands A, B and C is $1.50, $2 and $1.80
1.5 A
respectively, and this is represented by the matrix Q = 2 B .
1.8 C
A B C A
1.5 ( 56 × 1.5) + ( 63 × 2 ) + ( 21 × __ ) Shop 1
Shop 1 56 63 21
2
B =
Shop 2 27 17 9 ( 27 × __ ) + ( __ × __ ) + ( __ × __ ) Shop 2
1.8 C
____ Shop 1
P Q
=
____ Shop 2
R
Order of matrix: 2 3 31 21
2. Look at the orders of P, Q and the product R. Can you explain the relationship
between the orders?
3. By looking at their orders, state the conditions for multiplication of two matrices
to be possible.
In general, for any two matrices A and B, the product A B (or simply AB) is only
possible if
number of columns of A = number of rows of B.
In other words,
A B = C
mn np mp
must be
equal
Thinking
Time
Justify if the following two matrices can be multiplied together by checking their
orders. If it is possible, write down the order of the product.
4 −9 4 −9
2 −3 5 2 −3 5
(a) −5 10 (b) −5 10 −7 0 8
−7 0 8 21 6 21 6
(c) ( 2 3 ) 7 8 7 8
(d)
−9 4 ( 2 −3 )
−9 4
7 7
(e) 8
( −7 2 3 ) (f) ( −7 2 3 )
8
−5 −5
Old New
A B C Price Price
1.5 1.9
Shop 1 56 63 21
2
2.4 = a b
Shop 2 27 17 9 c d
1.8 2.2
P Q R
Order: 23 32 22
equal
Fig. 4.1
Since the orders of the two matrices P and Q are 2 by 3 and 3 by 2 respectively, the
order of the product R must be 2 by 2, as shown in Fig. 4.1.
To obtain a (element in first row, first column of R) we multiply the corresponding
elements in the first row of P and the first column of Q as shown in Fig. 4.2, before
adding the three products to obtain 247.8.
1.5 1.9
56 63 21 56(1.5) + 63( 2 ) + 21(1.8 ) b
2 2.4 =
27 17 9 1.8 2.2 c d
247.8 b
=
c d
Fig. 4.2
1.5 1.9
247.8 56(1.9 ) + 63( 2.4 ) + 21( 2.2 )
56 63 21 2 2.4
27 17 9
=
1.8 2.2 c d
247.8 303.8
=
c d
Fig. 4.3
Since Q has no third column, then we move on to the second row of P.
1.5 1.9
247.8 303.8
56 63 21 2 2.4 =
27 17 9 ( 27 )(1.5) + (17 )( 2 ) + ( 9 )(1.8 ) d
1.8 2.2
247.8 303.8
= 90.7 d
Fig. 4.4
1.5 1.9
247.8 303.8
56 63 21
2 2.4 =
27 17 9 1.8 2.2 90.7 ( 27 )(1.9 ) + (17 )( 2.4 ) + ( 9 )( 2.2 )
247.8 303.8
=
90.7 111.9
Fig. 4.5
247.8 303.8
Therefore, we obtain the product R, i.e. PQ = R = .
90.7 111.9
−2 3 −1
(c)
1 1 −4
Solution:
AT
TE
−2 5 9 2 (− 2 )( 9 ) + (5)(1) (− 2 )( 2 ) + (5)( − 2 )
NTI
ON
(a) =
1 −6 1 −2 (1)( 9 ) + ( − 6 )(1) (1)( 2 ) + ( − 6 )( − 2 ) (a) Product exists as number of
columns of first matrix
−13 −14 = number of rows of second
= matrix
3 14 = 2
= ( −23 )
−2
(c) The order of is 2 1.
1
−2
Number of columns of = 1
1
3 −1
Number of rows of = 2
1 −4
Since number of columns of 2 ≠ number of rows of 3 −1 , then matrix
1 1 −4
multiplication is not possible.
Evaluate all the matrix multiplication in Thinking Time Questions 1(a) – (f) on Exercise 4C Questions 6(a)-(h),
page 144, if it is possible. 7-9, 11
Exercise
4C
2. Simplify each of the following.
1. Simplify each of the following. (a) 2 −1 + 3 4
5 −3
(
2 1 −2 3
(a) )
−2
(b) 2 (3 1 5 ) − 4( −1 3 2 )
4
(b)
1 1 3 −3 −1
5
(c) − 2
6 −4 6 4 2
1
(c) 4 0 4 1 −1 3 0
2
−8 3
(d) − 4
5 0 −1 −2 1 −1
1
(d) 6 15
3 21 −24 4 4 1 2 1 4
3. If A = ,B= and C = ,
−1 0.5 3 2 7 −1 3 3 −5
−2
(e)
−0.8 2 1.2 find the following.
1 5 (i) A + B (ii) A + 2B
(iii) A – B – C (iv) 2A – 2C + 3B
(f) 5 −4 3
−1 2
1
6 1
2 4. Find the values of the unknowns in each of the
1 following.
3 0 2
(g)
3
2 2 0
5 −4 − 2 a
(a) + b =
2 −2 8
2x x 18
3
(b) + 3 =
y 3 y 36
1 2 3 5 a b
2
(c) − =
3 4 c 6 7 d
9 12 6
(d) 2 5 3 2 + a b c =
1 6 3 −2 −4 5 d e f
Worked
6
(Application of Matrices in Calculating Costs)
A bakery produces 3 different types of bread:
Example white bread (W), wholemeal bread (M) and multi-grain
bread (G). Delivery is made to 2 distribution outlets in
the following way:
Solution:
2.1
60 50 30 348
(a) (i) PQ = 2.7 =
40 70 20 2.9 331
PQ gives the costs of the bread delivered to Outlets A and B respectively.
(ii) AT
TE
NTI
ON
348
(b) ( 27 25 ) = ( 17 671 ) For (b), an alternative method is
331
( 348 331 ) 27
∴ The total cost of bread delivered to the 2 outlets is $17 671. 25
= ( 17 671 ).
1. Huixian and Lixin take a multiple choice test. The matrices X and Y show the Exercise 4D Questions 1-8
2. An otah factory produces four types of seafood otahs, namely fish (F), prawn (P),
squid (S) and mixed seafood otah (M), for distribution to its five outlets across
Singapore.
Part A:
A simple method of encoding a message is to use the encoding key shown in Fig. 4.6.
AèD
BèE
CèF
⋮
WèZ
XèA
YèB
ZèC
Fig. 4.6
Usually, we write the encoded message in blocks of 4 letters.
The first 3 blocks are: VHFU HWUR RPLQ
If your enemies intercept this encoded message, they can break it easily by using
frequency analysis. In English, the 3 most frequent letters used are E, followed by T
and then A.
2. Which letter occurs the most often in the above encoded message? Does it
correspond to E, T or A in the original message?
Your enemies will try H → E (i.e. I → F, J → G, etc.) and decode the entire message.
If it does not make sense, they will try H → T (i.e. I → U, J → V, etc.), and so forth,
until the decoded message makes sense. Therefore there is a need for a more secure
coding system.
Aè1
Bè2
Cè3
⋮
Z è 26
Fig. 4.7
You can encode all the letters at one go. The following shows the encoding of the
first 6 letters. You must fill the second matrix column by column, not row by row.
3 1 19 3 5 62 27 35 10 1 9
= è
5 2 5 18 20 105 51 65 1 25 13
J A I
è
A Y M
INF
OR
MA
TIO N
So, SECRET is encoded as JAAYIM.
Although it is harder to decode
4. Can you use frequency analysis to break the code? For example, what letter(s) matrix encoding, we can still
in the original message does the letter A in the encoded message represent? analyse the frequency of blocks
of 2 letters using a computer
5. Encode the rest of the message using the above matrix encoding key. software in order to try to break
the code.
Then write down the entire encoded message in blocks of 4 letters.
Hint: If you get a negative number, e.g. –11, you add 26 continuously until you reach
a number between 1 and 26 inclusive, e.g. –11 + 26 = 15 → O.
Journal
Writing
We can use matrices to rotate a point on the Cartesian plane.
For example, Fig. 4.8 shows a point P(2, 3). We want to rotate P 90° anti-clockwise
about the origin to give the image Pʹ.
y
P(2, 3)
3
P'(−3, 2)
2
90°
x
−3 0 2
Fig. 4.8
A 90° anti-clockwise rotation about the origin O can be represented by the matrix
0 −1
.
1 0
0 −1 2 −3
By matrix multiplication, = .
1 0 3 2
Exercise
4D
1. In a soccer tournament, 4 teams play against one 2. The price of tickets to a musical at Marina Bay
another twice. The matrices P and Q show the Sands Theatre is as follows:
results of the matches and the points awarded
VIP Reserve: $130 A Reserve: $115
respectively.
B Reserve: $90 C Reserve: $75
Win Draw Lose The number of tickets sold for three nightly
5 1 6 Team A performances are as follows:
8 4 0 Team B
P=
2 3 7 Team C VIP A B C
3 4 5 Team D
Reserve Reserve Reserve Reserve
Friday 220 430 555 355
Points
3 Win Saturday 245 485 520 310
Q = 1 Draw Sunday 280 430 515 375
0 Lose
Write down two matrices only such that the
(i) How many matches does each team play
elements of their product will give the total amount
during the tournament?
of ticket sales for the three nightly performances.
(ii) Evaluate PQ.
Hence, calculate the total amount collected for
(iii) Explain what your answer to (ii) represents. the three nightly performances.
(i) Write down two matrices only such that the Extra
Size Large Medium Small
product will give the total takings of each -large
outlet and hence, calculate the takings for the Men 220 240 180 85
day, for each of the outlets. 50 60 210 135
Women
(ii) Hence, calculate the total takings for the pie 10 40 200 250
Children
company.
The cost of an extra-large, large, medium and
4. The table below shows the number of cups of small T-shirt is $15, $13.50, $12 and $10
tea, tea with milk, coffee, and coffee with milk, respectively. Evaluate the product.
sold during breakfast hours by 3 drinks stalls in a (i) Write down two matrices only such that the
neighbourbood. elements of their product under matrix
multiplication give the total cost of the T-shirts
Tea Coffee ordered for the men, women and children
Tea with Coffee with
respectively. Evaluate the product.
milk milk
(ii)
Evaluate the matrix product
Albert 22 32 42 28
Drink Stall 220 240 180 85 1
1
Best 50 60 210 135
18 26 36 32
Drink Stall 10 40 200 250 1
1
Chandra 27 24 52 25 and explain what the elements in the product
Drink Stall represent.
(i) If the price is $0.90 for a cup of tea, $1.00 for (iii)
Evaluate the matrix product
a cup of tea with milk, $1.10 for a cup of 220 240 180 85
coffee and $1.20 for a cup of coffee with milk,
form two matrices only such that the product
( )
1 1 1 50 60 210 135
10 40 200 250
will give the total amount of money collected
by the three different stalls from the sales of and explain what the elements in the product
these drinks during the breakfast hours. represent.
(iv) Write down two matrices such that the
elements of their product under matrix
multiplication will give the total cost of the
T-shirts ordered. Hence, find the total cost.