Skip to the page
Home Campus
Start free

Problems with Matrices

Using matrices for costs, scores and stock: setting up the two matrices, choosing which way round to multiply, working out the product, and saying what each element of the answer represents.

Before you start

In lesson 4.4 you multiplied a row by a column: a family's 3 plates of mee rebus, 2 of nasi lemak and 1 of mee soto, at $4, $3 and $5 a plate, cost $23. A problem is built of such products.

321
4
3
5
=
12 + 6 + 5
=
23

Setting Up the Product

Most problems have two matrices: one of quantities (plates sold, games won, items in stock) and one of values (prices, points, profits). Their product multiplies each quantity by its value and adds them up.

Setting up and labelling a product

The things across the first matrix (its column labels) must be the things down the second (its row labels), in the same sequence.

The product's rows are the first matrix's rows, and its columns are the second matrix's columns.

Example 1: The Food Stall's Takings

The food stall of lesson 4.1 sold the plates in S on Monday and Tuesday. Mee rebus costs $4, nasi lemak $3 and mee soto $5. (a) Write the prices as a matrix P so that SP can be found, and evaluate SP. (b) State what the elements of SP represent. (c) Evaluate (1 1)SP and explain what it represents.

S=
plates sold
mee rebusnasi lemakmee soto
Monday453025
Tuesday384220

Solution

(a) The columns of S are the three dishes, so P must have the dishes as its rows, in the same sequence: a 3×13 \times 1 column matrix. SP is (2×3)(3×1)(2 \times 3)(3 \times 1), which gives 2×12 \times 1.

P=
$
mee rebus4
nasi lemak3
mee soto5
SP=
45 × 4 + 30 × 3 + 25 × 5
38 × 4 + 42 × 3 + 20 × 5
=
180 + 90 + 125
152 + 126 + 100
=
395
378
SP=
$
Monday395
Tuesday378

(b) Each row of S times the prices gives one day's takings: the rows of SP are the days, and its column is money in dollars.

(c) A row of ones in front adds the two elements:

11
SP
=
11
395
378
=
1 × 395 + 1 × 378
=
773

(a) P and SP are below. (b) The elements of SP represent the amount of money, in dollars, collected by the stall on Monday ($395) and on Tuesday ($378). (c) (773): the total amount of money collected over the two days, $773.

(a)

P=
4
3
5
SP=
395
378

Saying What the Elements Represent

"State what the elements represent"

Answer in one sentence that names what is counted, its units, and both labels: what the rows are and what the column is (or the columns are).

For money taken, say "collected": "the amount of money, in dollars, collected by the stall on Monday and on Tuesday".

The elements are totals, not prices.

Example 2: Points in a Competition

In an inter-class football competition, three of the classes had these results: 4A won 5 games, drew 2 and lost 1; 4B won 3, drew 4 and lost 1; 4C won 2, drew 1 and lost 5. A win scores 3 points, a draw 1 point and a loss 0. Write the results as a 3×33 \times 3 matrix R and the points as a column matrix W. Evaluate RW and state what its elements represent.

Solution

The columns of R (won, drawn, lost) must be the rows of W, in the same sequence:

R=
wondrawnlost
4A521
4B341
4C215
W=
points
won3
drawn1
lost0

(3×3)(3×1)(3 \times 3)(3 \times 1) gives 3×13 \times 1:

RW=
5 × 3 + 2 × 1 + 1 × 0
3 × 3 + 4 × 1 + 1 × 0
2 × 3 + 1 × 1 + 5 × 0
=
15 + 2 + 0
9 + 4 + 0
6 + 1 + 0
=
17
13
7
RW=
points
4A17
4B13
4C7

The elements of RW represent the number of points scored by 4A (17), 4B (13) and 4C (7) in the competition.

Which Way Round?

Sometimes the quantities are written the other way round, with the items as the rows. Then the prices must go in front, as a row matrix, so that the things across the prices (the items) are the things down the quantities.

The other way round, the quantities times the prices, never gives the money collected. If the quantities have two or more columns, it cannot be found. If they have only one column, it can be found (a column times a row, as in lesson 4.4), but it is a square matrix, not the money collected: each element is one quantity times one price, nothing is added, and most elements pair an item with another item's price. Example 3 shows both.

A product can also be found and still mean nothing: if the prices are listed in a different sequence from the items, each quantity is multiplied by the wrong price. Always check that the labels match.

Example 3: Prices in Front

A bakery sold wholemeal, white and raisin loaves on Saturday and Sunday, as in T. The loaves cost $3.20, $2.80 and $4.50, as in the row matrix C. (a) Which of CT and TC can be found? (b) Evaluate it, and state what its elements represent. (c) On Saturday alone, the loaves sold are the column matrix U. Can CU and UC be found, and which gives the money collected?

T=
loaves sold
SaturdaySunday
whole­meal4035
white6072
raisin2530
C=
price in dollars
whole­mealwhiteraisin
3.202.804.50
U=
loaves sold
Saturday
whole­meal40
white60
raisin25

Solution

(a) CT is (1×3)(3×2)(1 \times 3)(3 \times 2): the inner numbers agree, so it can be found, and it is 1×21 \times 2. The things across C (the loaves) are the things down T, in the same sequence.

TCcannot be found: (3 × 2)(1 × 3), the first has 2 columns but the second has 1 row.

(b) Money keeps 2 decimal places throughout:

CT=
3.20 × 40 + 2.80 × 60 + 4.50 × 253.20 × 35 + 2.80 × 72 + 4.50 × 30
=
128.00 + 168.00 + 112.50112.00 + 201.60 + 135.00
=
408.50448.60
CT=
SaturdaySunday
408.50448.60

(c) CU is (1×3)(3×1)(1 \times 3)(3 \times 1), which gives 1×11 \times 1: Saturday's money, as in (b). UC is (3×1)(1×3)(3 \times 1)(1 \times 3): it can be found too, and is 3×33 \times 3.

CU=
128.00 + 168.00 + 112.50
=
408.50
UC=
128.00112.00180.00
192.00168.00270.00
80.0070.00112.50

Each element of UC is one number of loaves times one price, with nothing added. Row 1, column 2 is 40×2.80=112.0040 \times 2.80 = 112.00, wholemeal loaves times the price of a white loaf. The three from top left to bottom right (128.00, 168.00, 112.50) are the money from each kind of loaf, but they are not added: UC does not give the money collected.

(a) Only CT. (b) The elements of CT represent the amount of money, in dollars, collected from selling loaves on Saturday ($408.50) and on Sunday ($448.60). (c) Both can be found, but only CU = (408.50) gives the money collected, $408.50; UC is a 3×33 \times 3 matrix that does not give the money collected.

An Examination Question

Examination questions run in steps: write down the matrix, write down a second matrix so that the product can be found, evaluate it, and say what it represents. The last step often puts a row of ones in front to add the answers.

Example 4: A Sports Shop

A sports shop has branches at Tampines and Jurong. In June, Tampines sold 12 footballs, 8 basketballs and 5 volleyballs; Jurong sold 15, 6 and 9. (a) Write down a 2×32 \times 3 matrix J to represent this information. (b) A football costs $25, a basketball $32 and a volleyball $18. Write down a column matrix P such that JP can be found, and evaluate JP. (c) State what the elements of JP represent. (d) Evaluate (1 1)JP and explain what your answer represents.

Solution

(a) Rows the branches, columns the balls:

J=
balls sold in June
foot­ballbasket­ballvolley­ball
Tampines1285
Jurong1569

(b) The rows of P are the balls, in the same sequence as the columns of J:

P=
$
foot­ball25
basket­ball32
volley­ball18
JP=
12 × 25 + 8 × 32 + 5 × 18
15 × 25 + 6 × 32 + 9 × 18
=
300 + 256 + 90
375 + 192 + 162
=
646
729

(c) Each element is one branch's sales times the prices: money, in dollars, for that branch.

(d)

11
JP
=
11
646
729
=
1 × 646 + 1 × 729
=
1375

(a) J, and (b) P and JP, are below. (c) The elements of JP represent the amount of money, in dollars, collected from selling balls in June at Tampines ($646) and at Jurong ($729). (d) (1375): the total amount of money, $1375, collected by the two branches in June.

(a)

J=
1285
1569

(b)

P=
25
32
18
JP=
646
729

Combined Steps: Stock

Some problems need a step before the product: subtract the sales from the stock to find what is left, add two months' sales, or multiply a price matrix by a number (4.3). Do that step first, then multiply.

Example 5: The Value of the Stock Left

At the start of June the sports shop of Example 4 had 30 footballs, 20 basketballs and 15 volleyballs at Tampines, and 35, 18 and 20 at Jurong. (a) Write the stock at the start as a matrix K and find the matrix of balls left at the end of June. (b) Find the value, at the selling prices P, of the balls left at each branch.

Solution

(a) K has the same labels as J. What is left is the stock minus the sales, K − J:

K=
foot­ballbasket­ballvolley­ball
Tampines302015
Jurong351820
K−J=
302015
351820
−
1285
1569
=
181210
201211

(b) Multiply the balls left by the prices. The columns of K − J are still the balls, in the same sequence as the rows of P:

(K−J)P=
181210
201211
25
32
18
=
450 + 384 + 180
500 + 384 + 198
=
1014
1082

(a) K and K − J are below. (b) The elements of (K − J)P represent the value, in dollars, at the selling prices, of the balls left at the end of June at Tampines ($1014) and at Jurong ($1082).

(a)

K=
302015
351820
K−J=
181210
201211

Common Mistakes

  • Writing the prices as a row where a column is needed, or the other way round. Check the labels: the things across the first matrix must be the things down the second. Inner numbers that agree are not enough: a column of quantities times a row of prices, or a column of prices times a row of quantities, can be found and does not give the money. Only the labels tell you.
  • Listing the prices in a different sequence from the items. The product can still be found, but each quantity is multiplied by the wrong price.
  • Saying what the elements represent without the units, or without both labels: "money" is not enough; "the amount of money, in dollars, collected on Monday and on Tuesday" is.
  • Saying "the elements represent the prices". They are totals: prices times quantities, added.
  • Adding the elements of the answer when the question asks for each one. Add them only when asked for a total, for example with (1 1) in front.

Practice

Try each question before you open its solution. Give money in dollars, and say what each answer represents.

Question 1

A cinema sold 120 adult and 85 child tickets on Saturday, and 150 adult and 60 child tickets on Sunday. An adult ticket costs $12 and a child ticket $8. Write a 2×22 \times 2 matrix N of tickets sold, with a row for each day, and a column matrix F of prices. Evaluate NF and state what its elements represent.

ShowHide solution

Rows of N: Saturday, Sunday. The rows of F are adult, child, so the columns of N must be adult, child, in the same sequence.

N=
adultchild
Saturday12085
Sunday15060
F=
$
adult12
child8
NF=
120 × 12 + 85 × 8
150 × 12 + 60 × 8
=
1440 + 680
1800 + 480
=
2120
2280

The elements of NF represent the amount of money, in dollars, collected from ticket sales on Saturday ($2120) and on Sunday ($2280).

Question 2

In a quiz of 25 questions, a right answer scores 4 marks, a wrong answer −1 mark and a question left blank 0. Hana had 18 right, 5 wrong and 2 blank; Irfan 15 right, 8 wrong and 2 blank; Jia Hui 20 right, 2 wrong and 3 blank. Use a product of two matrices to find each student's mark.

ShowHide solution

Results Q (rows the students; columns right, wrong, blank) and marks M (rows right, wrong, blank):

Q=
rightwrongblank
Hana1852
Irfan1582
Jia Hui2023
M=
marks
right4
wrong−1
blank0
QM=
18 × 4 + 5 × (−1) + 2 × 0
15 × 4 + 8 × (−1) + 2 × 0
20 × 4 + 2 × (−1) + 3 × 0
=
72 − 5 + 0
60 − 8 + 0
80 − 2 + 0
=
67
52
78

Each row of Q adds to 25, as it should. The wrong answers take marks away: Hana's 72−5=6772 - 5 = 67.

Hana 67 marks, Irfan 52, Jia Hui 78

Question 3

A school canteen sold the fruit in G on Monday and Tuesday. A banana costs $0.60, an apple $0.80 and a pear $1.20. (a) Write the prices as a matrix H so that a product of H and G can be found, and say why the product the other way round cannot be found. (b) Evaluate the product, and state what its elements represent.

G=
fruit sold
MondayTuesday
bananas3020
apples2540
pears1015
ShowHide solution

(a) The fruit are the rows of G, so the prices go in front, as a row in the same sequence, and the product is HG: (1×3)(3×2)(1 \times 3)(3 \times 2) gives 1×21 \times 2.

H=
price in dollars
bananasapplespears
0.600.801.20

The other way round, GH is (3×2)(1×3)(3 \times 2)(1 \times 3):

GHcannot be found: (3 × 2)(1 × 3), the first has 2 columns but the second has 1 row.

(b)

HG=
0.60 × 30 + 0.80 × 25 + 1.20 × 100.60 × 20 + 0.80 × 40 + 1.20 × 15
=
18.00 + 20.00 + 12.0012.00 + 32.00 + 18.00
=
50.0062.00

(a) H is below; GH cannot be found, as G has 2 columns but H has 1 row. (b) HG is below. Its elements represent the amount of money, in dollars, collected from selling fruit on Monday ($50.00) and on Tuesday ($62.00).

(a)

H=
0.600.801.20

(b)

HG=
50.0062.00

Question 4

The sports shop of Example 4 makes a profit of $6 on a football, $8 on a basketball and $5 on a volleyball. (a) Using J from Example 4, find the profit made at each branch in June, and state what the elements represent. (b) Find the total profit.

ShowHide solution

(a) The profits as a column matrix Y, its rows the balls in the same sequence as the columns of J:

Y=
$
foot­ball6
basket­ball8
volley­ball5
JY=
12 × 6 + 8 × 8 + 5 × 5
15 × 6 + 6 × 8 + 9 × 5
=
72 + 64 + 25
90 + 48 + 45
=
161
183

(b) Add the two elements with a row of ones:

11
JY
=
11
161
183
=
1 × 161 + 1 × 183
=
344

(a) The elements represent the profit, in dollars, made from selling balls in June at Tampines ($161) and at Jurong ($183). (b) $344

Question 5

A florist has shops at Bishan and Bedok. At the start of a week Bishan had 50 roses and 40 lilies, and Bedok 60 roses and 30 lilies. During the week Bishan sold 35 roses and 22 lilies, and Bedok 41 roses and 25 lilies. A rose sells for $3 and a lily for $5. Using matrices, find the value, at the selling prices, of the flowers left at each shop at the end of the week.

ShowHide solution

Stock K and sales D (rows the shops; columns roses, lilies); prices V (rows roses, lilies).

K−D=
5040
6030
−
3522
4125
=
1518
195
(K−D)V=
1518
195
3
5
=
45 + 90
57 + 25
=
135
82

The flowers left are worth $135 at Bishan and $82 at Bedok.

Question 6

In July the sports shop of Example 4 sold the balls in L. (a) Find the balls of each kind sold at each branch in June and July together. (b) Hence find the money collected at each branch over the two months, with J and P from Example 4.

L=
balls sold in July
foot­ballbasket­ballvolley­ball
Tampines1096
Jurong1487
ShowHide solution

(a) Add first:

J+L=
12 + 108 + 95 + 6
15 + 146 + 89 + 7
=
221711
291416

(b) Then multiply by the prices:

(J+L)P=
221711
291416
25
32
18
=
550 + 544 + 198
725 + 448 + 288
=
1292
1461

(a) J + L is below. (b) $1292 was collected at Tampines and $1461 at Jurong in June and July.

(a)

J+L=
221711
291416

Question 7

The sports shop raises every price in P by 10%. (a) Find the new price matrix, in dollars and cents. (b) Find the money the June sales J would have collected at the new prices.

ShowHide solution

(a) A 10% rise is 1.1 times every price (4.3). With the prices written in dollars and cents:

1.1P=
1.1 × 25.00
1.1 × 32.00
1.1 × 18.00
=
27.50
35.20
19.80

(b) Call the new prices N, and multiply:

N=
27.50
35.20
19.80
JN=
330.00 + 281.60 + 99.00
412.50 + 211.20 + 178.20
=
710.60
801.90

Check: in Example 4 the June takings were $646 and $729, and 1.1×646=710.601.1 \times 646 = 710.60, 1.1×729=801.901.1 \times 729 = 801.90. The takings are 10% higher, as every price is.

(a) 1.1P is below. (b) $710.60 at Tampines and $801.90 at Jurong.

(a)

1.1P=
27.50
35.20
19.80

Question 8

For Example 4, Nadia lists the prices basketball first, then football, then volleyball, as the column matrix below, and works out J times it. (a) Can her product be found? If so, work it out. (b) Does it mean anything? Explain.

32
25
18
ShowHide solution

(a) It is (2×3)(3×1)(2 \times 3)(3 \times 1), so it can be found:

J
32
25
18
=
384 + 200 + 90
480 + 150 + 162
=
674
792

(b) The first column of J is footballs, but the first price is a basketball's: 12 footballs are multiplied by $32. The answer is a matrix but means nothing. The right product is JP:

JP=
646
729
JP≠J
32
25
18

(a) It can be found: it is below. (b) It means nothing: the prices are not in the same sequence as the columns of J.

(a)

J
32
25
18
=
674
792

Question 9

A bakery delivers to two cafés, at Novena and at Bugis. In one week the Novena café takes 40 croissants, 25 muffins and 30 scones, and the Bugis café 35 croissants, 40 muffins and 20 scones. A croissant costs $1.50, a muffin $2.20 and a scone $1.80. (a) Write down a 2×32 \times 3 matrix D to represent the deliveries. (b) Write down a column matrix E such that DE can be found, and evaluate DE. (c) State what the elements of DE represent. (d) Evaluate (1 1)DE and explain what your answer represents.

ShowHide solution

(a) and (b): rows of D the cafés, columns the three items; the rows of E the items, in the same sequence.

D=
crois­santsmuffinsscones
Novena402530
Bugis354020
E=
$
crois­sants1.50
muffins2.20
scones1.80
DE=
40 × 1.50 + 25 × 2.20 + 30 × 1.80
35 × 1.50 + 40 × 2.20 + 20 × 1.80
=
60.00 + 55.00 + 54.00
52.50 + 88.00 + 36.00
=
169.00
176.50

(d)

11
DE
=
11
169.00
176.50
=
345.50

(a) D, and (b) E and DE, are below. (c) The elements of DE represent the amount of money, in dollars, the bakery collects for the week's deliveries to the Novena café ($169.00) and to the Bugis café ($176.50). (d) (345.50): the total amount of money, $345.50, collected for the week's deliveries to the two cafés.

(a)

D=
402530
354020

(b)

E=
1.50
2.20
1.80
DE=
169.00
176.50

Question 10

In Example 4, the elements of JP are 646 and 729. Siti says, "The elements of JP represent the number of balls sold at each branch." Ravi says, "646 is the money collected from footballs at Tampines." Explain what is wrong with each answer.

ShowHide solution

Siti: each element is numbers of balls times prices in dollars, added, so it is money, in dollars, not a number of balls. The elements represent the amount of money collected from selling balls in June at Tampines and at Jurong.

Ravi: 646 is row 1 of J times P, all three kinds of ball at Tampines: 12×25+8×32+5×18=300+256+90=646.12 \times 25 + 8 \times 32 + 5 \times 18 = 300 + 256 + 90 = 646\text{.} The footballs alone bring in 12×25=30012 \times 25 = 300 dollars.

Siti: the elements are money, in dollars, not numbers of balls. Ravi: 646 is the money from all three kinds of ball at Tampines; the footballs alone bring in $300.

Key Points

  • Set up a quantity matrix and a value matrix so that the things across the first are the things down the second, in the same sequence.
  • The product's rows are the first matrix's rows and its columns the second's columns: label it so.
  • If the items are the rows of the quantities, put the prices in front as a row. The other way round never gives the money: it cannot be found, or, when the quantities have only one column, it is a square matrix that is not the money collected.
  • State what the elements represent in one sentence: what is counted, its units, and both labels ("the amount of money, in dollars, collected … on Monday and on Tuesday").
  • A row of ones in front adds the elements of each column, giving a total.
  • For stock, subtract the sales from the stock first; for two months, add first; for a price rise, multiply the prices by the number first. Then multiply.

Previous lesson4.4 Multiplying Two Matrices Next lesson5.1 Vectors and Their Notation

All Secondary 4 (Grade 10) lessons

Home Campus has lessons for Primary 3 to Secondary 4, and practice questions with worked solutions and worksheets for Primary 3 to Secondary 2. Register free to practise and keep track of progress.

This lesson follows the Singapore Secondary 4 syllabus and was checked question by question before it was published. Spotted a mistake? Tell us.