Matrices and the Information They Hold
What a matrix is: numbers in rows and columns, written in brackets. Its order, its elements and their positions, what an element means, row, column and square matrices, and equal matrices.
Before you start
In Secondary 1 you read two-way tables. A two-way table records two things about each person or thing at once: one is listed down the side (the rows), the other along the top (the columns).
Each cell inside the table is the number of people (or things) that have both: the cell in the row "Sports" and the column "Girls" is the number of girls whose CCA is a sport.
A matrix holds numbers in rows and columns in the same way.
From a Table to a Matrix
A Malay food stall sells mee rebus, nasi lemak and mee soto. This table shows the plates of each dish it sold on Monday and on Tuesday.
| Mee rebus | Nasi lemak | Mee soto | |
|---|---|---|---|
| Monday | 45 | 30 | 25 |
| Tuesday | 38 | 42 | 20 |
Keep every number in its place, leave out the lines and the headings, and put round brackets round the numbers. The result is a matrix. Call it S:
| 45 | 30 | 25 | ||
| 38 | 42 | 20 |
The matrix keeps the numbers only. To show what they mean, the labels are written outside the brackets: the days beside the rows, the dishes above the columns, and what is counted underneath.
| mee rebus | nasi lemak | mee soto | |||
|---|---|---|---|---|---|
| Monday | 45 | 30 | 25 | ||
| Tuesday | 38 | 42 | 20 |
A matrix
A matrix (plural matrices) is a rectangular array of numbers arranged in rows and columns and written inside round brackets. A row goes across; a column goes down.
Each number in a matrix is an element of the matrix.
A matrix is named by a capital letter printed in bold, such as S. In your own writing, a plain capital is enough.
Order, Elements and Their Positions
The order of a matrix
A matrix with 2 rows and 3 columns has order , read "2 by 3". The number of rows always comes first.
A matrix of order has elements.
An element's position is given the same way, row first: "the element in row 2, column 3".
To find an element, go down to its row, then across to its column. To say what it means, read the labels of its row and its column, as you read a cell of a two-way table.
Example 1: Reading the Food Stall's Matrix
Use the matrix S of the food stall's sales. (a) State the order of S and the number of its elements. (b) State the element in row 2, column 2, and what it means. (c) What does row 1 hold? What does column 3 hold? (d) Give the position of the element 25.
| mee rebus | nasi lemak | mee soto | |||
|---|---|---|---|---|---|
| Monday | 45 | 30 | 25 | ||
| Tuesday | 38 | 42 | 20 |
Solution
(a) S has 2 rows and 3 columns, so its order is . It has elements.
(b) Go down to row 2 (Tuesday), then across to column 2 (nasi lemak). The element there is 42: the stall sold 42 plates of nasi lemak on Tuesday.
(c) Row 1 holds Monday's sales of the three dishes: 45, 30 and 25 plates. Column 3 holds the sales of mee soto on the two days: 25 and 20 plates.
(d) 25 is in the first row and the third column: row 1, column 3. It is the 25 plates of mee soto sold on Monday.
(a) , with 6 elements (b) 42: the plates of nasi lemak sold on Tuesday (c) Monday's sales; the sales of mee soto (d) row 1, column 3
The Same Information Either Way Round
The rows of S are the days and its columns the dishes. The same information can be written with the dishes as the rows and the days as the columns. Then the order of S changes, from to , and most elements move: 25, the mee soto sold on Monday, moves from row 1, column 3 to row 3, column 1. A question says which way it wants; if it does not, say which way you have chosen.
Example 2: The Other Way Round
Write the food stall's sales as a matrix D with a row for each dish and a column for each day. State its order, and the position of the plates of mee soto sold on Monday.
Solution
Row 1 is mee rebus: 45 on Monday and 38 on Tuesday. Row 2 is nasi lemak: 30 and 42. Row 3 is mee soto: 25 and 20.
| Monday | Tuesday | |||
|---|---|---|---|---|
| mee rebus | 45 | 38 | ||
| nasi lemak | 30 | 42 | ||
| mee soto | 25 | 20 |
D has 3 rows and 2 columns: its order is .
Mee soto on Monday is in row 3 (mee soto), column 1 (Monday): the element 25. In S it was in row 1, column 3.
S and D hold the same information, written different ways round.
D is ; mee soto on Monday is in row 3, column 1.
Row, Column and Square Matrices
Some kinds of matrix
A row matrix has one row, such as a matrix of order .
A column matrix has one column, such as a matrix of order .
A square matrix has as many rows as columns, such as or .
A matrix can have any number of rows and any number of columns: , and are all orders of matrices.
Example 3: Kinds and Orders
(a) The food stall charges $4 for mee rebus, $3 for nasi lemak and $5 for mee soto. Write the prices as a row matrix R and as a column matrix C, and give their orders. (b) Name the kind of matrix Q and give its order. (c) A matrix has 6 elements. What can its order be?
| 2 | 0 | ||
| −1 | 7 |
Solution
(a) In a row, in dollars:
| mee rebus | nasi lemak | mee soto | ||
|---|---|---|---|---|
| 4 | 3 | 5 |
R has 1 row and 3 columns: a row matrix of order . Written down a column:
| mee rebus | 4 | ||
|---|---|---|---|
| nasi lemak | 3 | ||
| mee soto | 5 |
C has 3 rows and 1 column: a column matrix of order .
(b) Q has 2 rows and 2 columns: a square matrix of order .
(c) The number of rows times the number of columns must be 6: , , , .
(a) R is , C is (b) square, (c) , , or
Equal Matrices
Equal matrices
Two matrices are equal when they have the same order and their corresponding elements (the elements in the same position) are equal.
So an unknown element is found by equating corresponding elements, which gives an equation to solve.
Matrices of different orders are never equal.
Example 4: Finding Unknown Elements
Find the values of and in (a) and (b). (c) Can the two matrices in (c) be equal?
(a)
| 2x | 7 | ||
| 5 | y − 3 |
| 10 | 7 | ||
| 5 | 1 |
(b)
| x + y | 3 | ||
| x − y | 0 |
| 11 | 3 | ||
| 5 | 0 |
(c)
| 1 | 2 | ||
| 3 | 4 |
| 1 | 2 | 3 | ||
| 4 | 0 | 0 |
Solution
(a) Both matrices are . Equate corresponding elements. Row 1, column 1: , so . Row 2, column 2: , so .
The other elements, 7 and 7, 5 and 5, already agree.
(b) Row 1, column 1: . Row 2, column 1: . Solve the two equations together, as in Secondary 2: add them, , so . Then , so .
Check: .
(c) The first is and the second . Their orders are different, so they cannot be equal, whatever their elements.
(a) , (b) , (c) No: their orders are different.
Common Mistakes
- Giving the order columns first. A matrix with 2 rows and 3 columns is , not .
- Mixing up rows and columns: a row goes across, a column goes down.
- Giving an element when its position is asked, or its position when the element is asked. In S, the element in row 2, column 2 is 42; the position of 42 is row 2, column 2.
- Calling two matrices equal when their orders differ, such as and a column holding 1 and 2.
- Writing the labels inside the brackets. Only the numbers go inside; the labels go beside and above.
Practice
Try each question before you open its solution. Questions 4, 5 and 6 are word problems.
Question 1
State the order of each matrix.
| 5 | −1 | ||
| 2 | 0 | ||
| 3 | 7 |
| 2 | 4 | 6 | 8 |
| 9 |
| 1 | ||
| 0 | ||
| −2 | ||
| 6 |
| 3 | 1 | 0 | ||
| 2 | −5 | 4 | ||
| 8 | 6 | 1 |
| −4 | 10 | ||
| 7 | 2 |
ShowHide solution
Count the rows, then the columns.
A: 3 rows, 2 columns. B: 1 row, 4 columns (a row matrix). C: 1 row, 1 column. D: 4 rows, 1 column (a column matrix). E: 3 rows, 3 columns (square). F: 2 rows, 2 columns (square).
A , B , C , D , E , F
Question 2
(a) How many elements has a matrix of order ? (b) A matrix has 8 elements. Write down every order it could have.
ShowHide solution
(a) elements.
(b) Rows times columns must be 8: , , , .
(a) 12 (b) , , ,
Question 3
For the matrix M, (a) state the element in row 2, column 3 and the element in row 1, column 2; (b) give the position of the element 9 and of the element 0.
| 6 | −2 | 9 | ||
| 0 | 4 | −7 |
ShowHide solution
(a) Row 2 is 0, 4, −7; its third element is −7. Row 1 is 6, −2, 9; its second element is −2.
(b) 9 is in the first row, third column: row 1, column 3. 0 is in the second row, first column: row 2, column 1.
(a) −7 and −2 (b) 9: row 1, column 3; 0: row 2, column 1
Question 4
At a school's sports meet, Red House won 4 gold, 6 silver and 3 bronze medals; Blue House won 5 gold, 2 silver and 7 bronze; Green House won 2 gold, 5 silver and 5 bronze. (a) Write a matrix H with a row for each house (Red, Blue, Green) and a column for each medal (gold, silver, bronze). State its order. (b) What does the element in row 2, column 3 mean? (c) Which element shows the house with the most gold medals?
ShowHide solution
(a) Row 1 is Red House, row 2 Blue House, row 3 Green House:
| gold | silver | bronze | |||
|---|---|---|---|---|---|
| Red | 4 | 6 | 3 | ||
| Blue | 5 | 2 | 7 | ||
| Green | 2 | 5 | 5 |
3 rows and 3 columns: order , a square matrix.
(b) Row 2 is Blue House and column 3 is bronze: the element 7 means Blue House won 7 bronze medals.
(c) Column 1 holds the gold medals: 4, 5 and 2. The greatest is 5, in row 2, column 1: Blue House won the most gold medals.
(a) (b) Blue House won 7 bronze medals (c) 5, in row 2, column 1 (Blue House)
Question 5
Write the medals of Question 4 the other way round, as a matrix K with a row for each medal (gold, silver, bronze) and a column for each house (Red, Blue, Green). State its order, and the position of Blue House's bronze medals in K.
ShowHide solution
Each column of H becomes a row of K: the gold medals 4, 5, 2; the silver 6, 2, 5; the bronze 3, 7, 5.
| Red | Blue | Green | |||
|---|---|---|---|---|---|
| gold | 4 | 5 | 2 | ||
| silver | 6 | 2 | 5 | ||
| bronze | 3 | 7 | 5 |
Order . Blue House's bronze medals, 7, are now in row 3 (bronze), column 2 (Blue). In H they were in row 2, column 3.
; row 3, column 2
Question 6
A bookshop has two branches, at Bishan and at Clementi. The Bishan branch has 15 atlases, 8 novels and 20 comics; the Clementi branch has 10 atlases, 12 novels and 25 comics. (a) Write this information as a matrix B. (b) What does the element in row 2, column 1 mean? (c) In which position is the number of novels at Bishan?
ShowHide solution
(a) A matrix has 2 rows, so the rows are the branches and the columns the three kinds of book:
| atlases | novels | comics | |||
|---|---|---|---|---|---|
| Bishan | 15 | 8 | 20 | ||
| Clementi | 10 | 12 | 25 |
(b) Row 2 is Clementi and column 1 is atlases: the Clementi branch has 10 atlases.
(c) Bishan is row 1 and novels column 2: row 1, column 2 (the element 8).
(a) B is below. (b) The Clementi branch has 10 atlases. (c) Row 1, column 2
(a)
| 15 | 8 | 20 | ||
| 10 | 12 | 25 |
Question 7
Find the values of and .
| 3x | x + y | ||
| 4 | 2 |
| 12 | 9 | ||
| 4 | 2 |
ShowHide solution
Both are . Row 1, column 1: , so .
Row 1, column 2: , so and .
,
Question 8
Find the values of and .
| x + y | 0 | ||
| 2 | 2x − y |
| 7 | 0 | ||
| 2 | 8 |
ShowHide solution
Row 1, column 1: . Row 2, column 2: .
Add the two equations: , so . Then , so .
Check: .
,
Question 9
True or false? Give a reason. (a) The two matrices in (a) are equal. (b) If the two matrices in (b) are equal, then .
(a)
| 1 | 2 |
| 1 | ||
| 2 |
(b)
| x | 2 |
| 5 | 2 |
ShowHide solution
(a) The first is (a row) and the second (a column). Their orders are different, so they are not equal, although they hold the same numbers.
(b) Both are , and the elements in row 1, column 2 agree. Equal matrices need .
(a) False: their orders differ. (b) True
Question 10
Wei Ming writes about the matrix N: "N has order , and the element 9 is in row 3, column 1." Find his two mistakes and correct them.
| 7 | 1 | 9 | ||
| 2 | 0 | 4 |
ShowHide solution
N has 2 rows and 3 columns. Its order is : rows come first.
9 is in the first row, third column: row 1, column 3. Wei Ming gave the column first.
N is , and 9 is in row 1, column 3.
Key Points
- A matrix is a rectangular array of numbers in rows (across) and columns (down), written in round brackets and named by a bold capital such as S.
- Each number is an element. The labels that say what the numbers mean go outside the brackets.
- The order is rows × columns, rows first: 2 rows and 3 columns is , with 6 elements.
- A position is given row first: "the element in row 2, column 3". Read its meaning from the labels of its row and its column.
- The same information can be written either way round: the rows become the columns, so a matrix becomes (a square matrix keeps its order), and the element in row 1, column 3 moves to row 3, column 1.
- A row matrix has one row, a column matrix one column, a square matrix as many rows as columns.
- Equal matrices have the same order and equal corresponding elements: equate them to find unknowns.