📐 Matrices — Revision Notes

A matrix is information laid out in a rectangle of brackets: the rows mean one thing, the columns another. Adding and scaling go element by element; multiplying goes row by column. The sentence that says what the answer's entries mean carries marks of its own. Syllabus outcomes N9 9.1, 9.2, 9.3 and 9.4.

What this chapter is ✕ Not in G2

Formula sheet: no matrices Exact answers; money to 2 d.p. Show the unsimplified matrix

A matrix (plural matrices) is a rectangular array of numbers written inside a pair of brackets. The numbers are its elements. A matrix with m rows and n columns is said to have order m × nrows first, always.
The questionWhere it is answeredThe tool
What is its order, and what does that entry mean? 6.1 What a Matrix Is m rows × n columns, and the row and column headings
How do I add, subtract or scale them? 6.2 Adding, Subtracting & Scaling element by element — but only if the orders are identical
How do I multiply two matrices, and when can I? 6.3 Multiplying Two Matrices row × column, after the inner dimensions have been checked
The question is about money, totals or points. Which product? 6.4 Matrices as Data Models quantities × prices — then say what each entry represents
Where this chapter stops. N9 asks four things: display information as a matrix, interpret it, multiply by a scalar, and add, subtract or multiply matrices. Inverses, determinants and the transpose belong to Additional Mathematics; the boundary is drawn in 6.3.
More detail

K310 says "Relevant mathematical formulae will be provided", and the printed MATHEMATICAL FORMULAE page does hold compound interest, mensuration, ½ab sin C, arc length and sector area in radians, the sine and cosine rules, the mean and the standard deviation — and not one word about matrices. The order convention, the conformability test and the row-times-column rule are carried in your head; there are only three of them.

Two rules from the front of the paper, quoted: "Omission of essential working will result in loss of marks." and "Give non-exact numerical answers correct to 3 significant figures, or 1 decimal place in the case of angles in degrees, unless a different level of accuracy is specified in the question." Matrix arithmetic is exact — every entry here is a whole number, a decimal or a fraction that ends — so almost nothing in this chapter is rounded at all. The one exception is money, which is written to 2 decimal places. What "essential working" means here is the unsimplified matrix: the one whose entries are still written as 6 × 4 + 3 × 5 rather than 39.

There is also no algebra of the identity matrix in this syllabus. If you meet M1 or det M in a book, that is Additional Mathematics material rather than anything N9 asks for.

Everything in this tab is examined in G3 Mathematics only. ✕ Not in G2

Order, rows, columns and elements

A matrix is named with a capital letter in bold in print — A, M, P — which you write with an ordinary capital by hand. To point at one particular element, use a small letter with two subscripts: row number first, column number second.

In a matrix A, the element aij is the element in row i and column j. So a23 is the element in row 2, column 3 — and it is in general not the same element as a32.
3 columns Kopi Teh Milo 2 rows 24 17 32 41 9 28 Stall 1 Stall 2
Fig. 6.1
The rows run across and the columns run down — always, in every matrix, whatever the word "row" means when a teacher lines a class up. This matrix has 2 rows and 3 columns, so its order is 2 × 3. It has 2 × 3 = 6 elements.
Rows first. Order is written m × n: m rows, n columns. A 2 × 3 matrix and a 3 × 2 matrix are different objects, and 6.3 turns on reading the pair in that order.

For the canteen matrix above — call it Mm13 = 32: row 1 is Stall 1, column 3 is Milo, so 32 cups of Milo were sold at Stall 1.

Walkthrough 1 — stating the order Basic

Write down the order of each of the following matrices. (a) ( 5−20 714 ) (b) ( 8 −3 6 1 ) (c) ( −69 ) (d) ( 30 −52 )
  1. (a) 2 rows, 3 columns → order 2 × 3
    Count the horizontal lines of numbers first: there are two. Then count how many numbers are in one of those lines: three. Rows first, so 2 × 3. The minus sign on the −2 is part of that element, not an extra one.
  2. (b) 4 rows, 1 column → order 4 × 1
    Four numbers stacked vertically make four rows of one element each, not one row of four. A matrix with a single column like this is called a column matrix.
  3. (c) 1 row, 2 columns → order 1 × 2
    The mirror image of (b): one horizontal line, two elements in it — a row matrix. Elements are separated by a space, not a comma, which in some countries' notation would read as a decimal point.
  4. (d) 2 rows, 2 columns → order 2 × 2
    So the orders are 2 × 3, 4 × 1, 1 × 2 and 2 × 2.
    A matrix with as many rows as columns is a square matrix, and (d) is the only square one here. Write the answers as orders, with the multiplication sign — "2 by 2", not "4 elements".
Where this comes from

The figure starts from two drink stalls in a canteen counting what they sold one morning. Written as a table it is six numbers with six labels; written as a matrix it is six numbers and one shape, and the shape is what every later rule in this chapter is about.

Reading the elements of M in order means reading the whole of row 1 from the left, then the whole of row 2: 24, 17, 32, 41, 9, 28.

The four names worth knowing

None of these is a new idea — each is just a shape of matrix that comes up often enough to have earned a name, and questions use the names without explaining them.

NameShapeExample
Row matrixone row, any number of columns (1 × n) ( 4−17 )
Column matrixone column, any number of rows (m × 1) ( 4−17 )
Square matrixas many rows as columns (n × n) ( 4−1 70 )
Zero matrix (or null matrix), written 0 every element is 0 — of any order ( 000 000 )
A 1 × 1 matrix is not a number. The matrix (7) and the number 7 are different objects, and so are the zero matrix 0 and the number 0. A 1 × 1 answer keeps its brackets.
More detail

It matters in exactly one place, and there is a mark in it: a product such as (25) (31) comes out as the 1 × 1 matrix (11), written with its brackets. When the same question then asks "what is the total cost?", that answer is the plain number 11 with a dollar sign.

Reading a matrix — what the entries mean

Outcome 9.2 is "interpreting the data in a given matrix": you say, in a sentence, what a number stands for. A matrix on its own is ambiguous, so label it — write the row and column headings outside the brackets, the way the figure above does.

Three questions answer almost every "what does this represent?" part:
1. Which row is it in, and what does that row stand for?
2. Which column is it in, and what does that column stand for?
3. What are the units — cups, dollars, points, people?

Walkthrough 2 — from a table to a matrix, and back to a sentence Basic

A school library records how many items were borrowed on two days. On Monday: 46 fiction books, 23 non-fiction books and 19 magazines. On Tuesday: 38 fiction books, 31 non-fiction books and 12 magazines. (i) Represent the data by a matrix L, and state its order. (ii) Write down the value of l21 and say what it represents. (iii) Find the sum of the elements in the first row, and say what this sum represents.
  1. L= ( 462319 383112 ) rows: Monday, Tuesday  |  columns: fiction, non-fiction, magazines
    Two days and three kinds of item, so one day per row and one kind per column. The headings are written beside the matrix even though the question does not ask for them: they are what makes each entry readable.
  2. The order of L is 2 × 3.
    Two rows (the two days), three columns (the three kinds of item) — rows first. Transposing the table, items down the side and days across the top, would have given a 3 × 2 matrix — just as correct, provided the headings said so.
  3. l21 = 38: the number of fiction books borrowed on Tuesday.
    Row 2 is Tuesday, column 1 is fiction. Both halves of the sentence are needed — "38 fiction books" without the day, or "38 borrowed on Tuesday" without the kind, only answers half the question.
  4. 46 + 23 + 19 = 88: the total number of items borrowed on Monday.
    Row 1 is Monday, and running along a row crosses all three columns, so the sum covers every kind of item on that one day. Name the day and say "items", not "books" — magazines are in the total too.
More detail

24 is only "24 cups of Kopi at Stall 1" once somebody has said which way round the rows and the columns run; with the headings written down, the interpretation writes itself.

The same three questions handle sums of entries. The sum of a row is a total over everything the columns stand for (all the drinks at one stall); the sum of a column is a total over everything the rows stand for (Kopi at every stall). Which of those two a question wants is decided by the labels, not by the arithmetic — and 6.4 shows how to make matrix multiplication produce both of them for you.

When are two matrices equal?

Two matrices A and B are equal if and only if (a) they have the same order, and (b) their corresponding elements are equal — that is, the element in each position of A equals the element in the same position of B.
Equality is what turns a matrix into equations. An equation between two matrices of order m × n is really mn ordinary equations stacked up — one per position. The same idea answers the "find the unknowns" questions in 6.2 and 6.3.

Walkthrough 3 — equal matrices give you equations Intermediate

Given that A= ( 3ab c12 ) and B= ( 27a+5 d7d ) and that A = B, find the values of a, b, c and d.
  1. Both matrices are 2 × 2, so equating corresponding elements:
    3a = 27    b = a + 5    c = d − 7    12 = d
    Same order, so the equality is legal; four positions, so four equations. Writing all four out first is the "essential working" here — pick them off position by position, going along row 1 and then row 2, so that none is missed.
  2. From 3a = 27: a = 9
    Only one of the four equations has a single unknown in it, so it is the one to start with. Everything else follows from a or from d.
  3. b = a + 5 = 9 + 5 = 14
    Substitute the value of a just found. The unknown a appears on both sides of this equation — in A as 3a, in B as a + 5 — so the equations are solved in order.
  4. From 12 = d: d = 12
    The bottom-right position gives d immediately. A number on the left and a letter on the right is still an equation; there is nothing to do but read it.
  5. c = d − 7 = 12 − 7 = 5
    a = 9, b = 14, c = 5, d = 12
    List all four values, in the order the question named them. A quick check costs five seconds: both matrices become ( 2714 512 ), so they really are equal.
More detail

Both halves of the definition matter. (30) and (30) contain the same two numbers, but one is 1 × 2 and the other is 2 × 1, so they are not equal. Neither are (1526) and (1256): same four numbers, same order, different positions.

Check yourself

  • Write down the order of ( −47 03 5−1 ).
    Answer

    Three horizontal lines of numbers, two numbers in each, so the order is 3 × 2 — rows first.

  • A matrix has 12 elements and 3 rows. How many columns does it have, and what is its order?
    Answer

    12 ÷ 3 = 4 columns, so the order is 3 × 4. The number of elements is always (rows) × (columns), which is where the × in the order comes from.

  • Given G=( 6−29 05−7 ), write down g23 and g12.
    Answer

    g23 is row 2, column 3 = −7. g12 is row 1, column 2 = −2. Row number first, both times.

  • Are (30) and (30) equal? Give a reason.
    Answer

    No. The first is a 1 × 2 row matrix and the second is a 2 × 1 column matrix. Equality requires the same order before the elements are even looked at.

  • Find x and y given that ( 2x7 5y+1 ) = ( 147 5−3 ).
    Answer

    2x = 14 gives x = 7; y + 1 = −3 gives y = −4. The other two positions (7 = 7 and 5 = 5) carry no information — they are still worth a glance, because if one of them had been false the matrices could not have been equal at all.

  • Is the 1 × 1 matrix (9) the same thing as the number 9?
    Answer

    No. One is a matrix — an array with an order — and the other is a number. They behave differently: a matrix can only be added to another matrix of the same order, whereas 9 can be added to anything. In practice this only bites when a product turns out to be 1 × 1: write the brackets in the matrix line, and drop them only when you state the answer in context.