Cambridge International AS & A Level · Topic 1.4
A-Level Further Maths 9231 / Topic 1.4 / AS & A Level

Rows meet columns: the arithmetic of matrices.

A matrix is a rectangular array of numbers. You add matrices entry by entry, but you multiply them row by column, and that one rule explains everything else: when a product exists, what size it is, and why \(AB\) and \(BA\) are usually different.

The key idea

A matrix with \(m\) rows and \(n\) columns has order \(m \times n\). Matrices of the same order add and subtract entry by entry, and a scalar multiplies every entry. The product \(AB\) exists only when the number of columns of \(A\) equals the number of rows of \(B\): an \(m \times n\) matrix times an \(n \times p\) matrix is \(m \times p\), and its \((i, j)\) entry is row \(i\) of \(A\) times column \(j\) of \(B\). In general \(AB \neq BA\), but \((AB)C = A(BC)\), \(AI = IA = A\) and \(A + O = A\).

1 2 0 −1 3 4 A (2 × 3) 2 1 0 −1 3 2 B (3 × 2) = 2 −1 10 4 AB (2 × 2) row 2 of A with column 1 of B: (−1)(2) + (3)(0) + (4)(3) = 10
Fig. 1: entry (2, 1) of AB comes from row 2 of A and column 1 of B. Multiply the pairs of entries in order and add: (-1)(2) + (3)(0) + (4)(3) = 10. A has 3 columns and B has 3 rows, so the pairs match up and the product exists
Section 01

Order, sums and scalar multiples.

The order of a matrix is its size, written rows \(\times\) columns: \begin{pmatrix} 2 & -1 & 3 \\ 0 & 4 & 1 \end{pmatrix} has 2 rows and 3 columns, so it is a \(2 \times 3\) matrix. In this course a matrix has at most 3 rows and 3 columns, and it need not be square. Two matrices can be added or subtracted only if they have the same order; you then add or subtract the entries in matching positions. Multiplying by a scalar \(k\) multiplies every entry by \(k\).

Worked example A combination of two matrices
Given \(A = \begin{pmatrix} 2 & -1 & 3 \\ 0 & 4 & 1 \end{pmatrix}\) and \(B = \begin{pmatrix} 1 & 5 & -2 \\ 3 & -1 & 0 \end{pmatrix}\), find \(2A - 3B\).
  1. Both are \(2 \times 3\), so the combination is defined and is also \(2 \times 3\).
  2. \(2A = \begin{pmatrix} 4 & -2 & 6 \\ 0 & 8 & 2 \end{pmatrix}\) and \(3B = \begin{pmatrix} 3 & 15 & -6 \\ 9 & -3 & 0 \end{pmatrix}\).
  3. Subtract entry by entry: \(4 - 3 = 1\), \(-2 - 15 = -17\), \(6 - (-6) = 12\), \(0 - 9 = -9\), \(8 - (-3) = 11\), \(2 - 0 = 2\).
Answer: \(2A - 3B = \begin{pmatrix} 1 & -17 & 12 \\ -9 & 11 & 2 \end{pmatrix}\)
Worked example Unknown entries from an equation
Find \(a\), \(b\), \(c\) and \(d\) given that \(\begin{pmatrix} a & 3 \\ 1 & b \end{pmatrix} + 2\begin{pmatrix} 1 & c \\ d & -2 \end{pmatrix} = \begin{pmatrix} 5 & 7 \\ -3 & 0 \end{pmatrix}\).
  1. The left side is \(\begin{pmatrix} a + 2 & 3 + 2c \\ 1 + 2d & b - 4 \end{pmatrix}\).
  2. Equate matching entries: \(a + 2 = 5\), \(3 + 2c = 7\), \(1 + 2d = -3\), \(b - 4 = 0\).
  3. Solve each one separately.
Answer: \(a = 3\), \(b = 4\), \(c = 2\), \(d = -2\)
Your turn
Find the matrix \(X\) such that \(3X + \begin{pmatrix} 1 & 2 \\ 0 & -1 \end{pmatrix} = \begin{pmatrix} 7 & -4 \\ 6 & 5 \end{pmatrix}\).
Examiner trap

A \(2 \times 3\) matrix and a \(3 \times 2\) matrix have the same number of entries but different orders, so their sum is not defined. And a scalar multiplies every entry: \(3\begin{pmatrix} 1 & 2 \\ 0 & -1 \end{pmatrix} = \begin{pmatrix} 3 & 6 \\ 0 & -3 \end{pmatrix}\), not just the first row or the first entry.

Section 02

Row by column.

To multiply \(A\) by \(B\), take row \(i\) of \(A\) and column \(j\) of \(B\), multiply the pairs of entries in order and add: that number is the \((i, j)\) entry of \(AB\) (Fig. 1). The pairs only match up when the number of columns of \(A\) equals the number of rows of \(B\). The inside numbers of the orders must agree, and the outside numbers give the order of the product.

\[(m \times n)(n \times p) = m \times p\]

Worked example Both products, different orders
Given \(A = \begin{pmatrix} 1 & 2 & 0 \\ -1 & 3 & 4 \end{pmatrix}\) and \(B = \begin{pmatrix} 2 & 1 \\ 0 & -1 \\ 3 & 2 \end{pmatrix}\), find \(AB\) and \(BA\).
  1. \(A\) is \(2 \times 3\) and \(B\) is \(3 \times 2\): \(AB\) is \(2 \times 2\), and \(BA\) is \(3 \times 3\).
  2. Row 1 of \(A\) with the columns of \(B\): \(1(2) + 2(0) + 0(3) = 2\) and \(1(1) + 2(-1) + 0(2) = -1\).
  3. Row 2 of \(A\): \(-1(2) + 3(0) + 4(3) = 10\) and \(-1(1) + 3(-1) + 4(2) = 4\). So \(AB = \begin{pmatrix} 2 & -1 \\ 10 & 4 \end{pmatrix}\).
  4. For \(BA\), row 1 of \(B\) is \((2, 1)\): \(2(1) + 1(-1) = 1\), \(2(2) + 1(3) = 7\), \(2(0) + 1(4) = 4\). Rows 2 and 3 likewise.
  5. \[BA = \begin{pmatrix} 1 & 7 & 4 \\ 1 & -3 & -4 \\ 1 & 12 & 8 \end{pmatrix}\]
Answer: \(AB = \begin{pmatrix} 2 & -1 \\ 10 & 4 \end{pmatrix}\) (\(2 \times 2\)) and \(BA = \begin{pmatrix} 1 & 7 & 4 \\ 1 & -3 & -4 \\ 1 & 12 & 8 \end{pmatrix}\) (\(3 \times 3\))
Worked example A product of three
Given \(A = \begin{pmatrix} 1 & 2 & -1 \end{pmatrix}\), \(B = \begin{pmatrix} 1 & 0 \\ 2 & 1 \\ 0 & 3 \end{pmatrix}\) and \(C = \begin{pmatrix} 2 \\ -1 \end{pmatrix}\), find \(ABC\), and check that \((AB)C = A(BC)\).
  1. Orders: \((1 \times 3)(3 \times 2)(2 \times 1)\), so \(ABC\) is \(1 \times 1\).
  2. \(AB = \begin{pmatrix} 1 + 4 + 0 & 0 + 2 - 3 \end{pmatrix} = \begin{pmatrix} 5 & -1 \end{pmatrix}\), so \((AB)C = \begin{pmatrix} 10 + 1 \end{pmatrix} = \begin{pmatrix} 11 \end{pmatrix}\), since \(5 \times 2 = 10\) and \((-1) \times (-1) = 1\).
  3. \(BC = \begin{pmatrix} 2 \\ 4 - 1 \\ 0 - 3 \end{pmatrix} = \begin{pmatrix} 2 \\ 3 \\ -3 \end{pmatrix}\), so \(A(BC) = \begin{pmatrix} 2 + 6 + 3 \end{pmatrix} = \begin{pmatrix} 11 \end{pmatrix}\).
  4. Both routes agree, as associativity promises; \(CBA\), in contrast, is not even defined, since \(C\) is \(2 \times 1\) and \(B\) is \(3 \times 2\).
Answer: \(ABC = \begin{pmatrix} 11 \end{pmatrix}\)
Your turn
With \(A = \begin{pmatrix} 1 & 2 \\ 0 & 1 \end{pmatrix}\) and \(B = \begin{pmatrix} 1 & 0 \\ 3 & 1 \end{pmatrix}\), work out \(AB\) and \(BA\), and so show that \(AB \neq BA\).
Examiner trap

Never multiply entry by entry: \(\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}\) is \(\begin{pmatrix} 2 & 1 \\ 4 & 3 \end{pmatrix}\), not \(\begin{pmatrix} 0 & 2 \\ 3 & 0 \end{pmatrix}\). Check the orders before you start, because \(AB\) can exist while \(BA\) does not. And the \((i, j)\) entry always uses a row of the left matrix and a column of the right one.

Stage 1 · Learn

Check your understanding

Four quick checks. Each correct answer earns XP and records this skill on your profile.

Quick check+10 XP

\(A\) is a \(2 \times 3\) matrix and \(B\) is a \(3 \times 4\) matrix. What is the order of \(AB\)?

Quick check+10 XP

Find \(\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}\).

Quick check+10 XP

\(A\) is a \(3 \times 3\) matrix. Which matrix \(M\) satisfies \(AM = MA = A\) for every such \(A\)?

Quick check+10 XP

\(A\) is \(2 \times 3\), \(B\) is \(3 \times 3\) and \(C\) is \(3 \times 1\). What is the order of \(ABC\)?

Section 03

Powers and unknown entries.

For a square matrix, \(A^2 = AA\), \(A^3 = A^2A = AA^2\), and so on; powers exist only for square matrices, because \(AA\) needs columns of \(A\) to equal rows of \(A\). A matrix equation such as \(AB = BA\) or \(A^2 = kA + I\) is really several ordinary equations, one for each entry: multiply out both sides and equate matching entries.

Worked example A square written with A and I
Given \(A = \begin{pmatrix} 2 & 1 \\ 3 & 1 \end{pmatrix}\), show that \(A^2 = 3A + I\). Hence express \(A^3\) in the form \(pA + qI\), and write \(A^3\) out in full.
  1. \[A^2 = \begin{pmatrix} 2 & 1 \\ 3 & 1 \end{pmatrix}\begin{pmatrix} 2 & 1 \\ 3 & 1 \end{pmatrix}\] \[= \begin{pmatrix} 4 + 3 & 2 + 1 \\ 6 + 3 & 3 + 1 \end{pmatrix} = \begin{pmatrix} 7 & 3 \\ 9 & 4 \end{pmatrix}\]
  2. \(3A + I = \begin{pmatrix} 6 & 3 \\ 9 & 3 \end{pmatrix} + \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} = \begin{pmatrix} 7 & 3 \\ 9 & 4 \end{pmatrix}\), the same matrix, so \(A^2 = 3A + I\).
  3. \(A^3 = A \cdot A^2 = A(3A + I) = 3A^2 + A = 3(3A + I) + A = 10A + 3I\).
  4. \[A^3 = \begin{pmatrix} 20 & 10 \\ 30 & 10 \end{pmatrix} + \begin{pmatrix} 3 & 0 \\ 0 & 3 \end{pmatrix} = \begin{pmatrix} 23 & 10 \\ 30 & 13 \end{pmatrix}\]
Answer: \(A^3 = 10A + 3I = \begin{pmatrix} 23 & 10 \\ 30 & 13 \end{pmatrix}\) (multiplying \(A\) by \(\begin{pmatrix} 7 & 3 \\ 9 & 4 \end{pmatrix}\) directly gives the same)
Worked example Matrices that commute
Given \(A = \begin{pmatrix} 1 & 2 \\ 0 & 3 \end{pmatrix}\) and \(B = \begin{pmatrix} a & 1 \\ b & 2 \end{pmatrix}\), find \(a\) and \(b\) such that \(AB = BA\).
  1. \(AB = \begin{pmatrix} a + 2b & 1 + 4 \\ 3b & 6 \end{pmatrix} = \begin{pmatrix} a + 2b & 5 \\ 3b & 6 \end{pmatrix}\).
  2. \(BA = \begin{pmatrix} a & 2a + 3 \\ b & 2b + 6 \end{pmatrix}\).
  3. Equate entries: \(a + 2b = a\) gives \(b = 0\); \(5 = 2a + 3\) gives \(a = 1\); \(3b = b\) and \(6 = 2b + 6\) both agree with \(b = 0\).
  4. Check: with \(B = \begin{pmatrix} 1 & 1 \\ 0 & 2 \end{pmatrix}\), both products are \(\begin{pmatrix} 1 & 5 \\ 0 & 6 \end{pmatrix}\).
Answer: \(a = 1\), \(b = 0\)
Your turn
Let \(A = \begin{pmatrix} 2 & k \\ 0 & -2 \end{pmatrix}\), where \(k\) is a constant. Show that \(A^2 = 4I\) for every value of \(k\), and hence find \(A^4\).
Examiner trap

When you replace \(A^2\) by \(3A + I\), multiply every term: \(A(3A + I) = 3A^2 + A\), not \(3A^2 + I\), because \(AI = A\). Write the constant term as a matrix, \(3I\), never as the number \(3\): you cannot add a number to a matrix.

Stage 2 · Exam

Exam-style questions

Unlocks once the four checks above are done. Worth more XP, written to AS & A Level Further Mathematics Paper 1 to 4 standard.

Finish the four checks above to unlock the exam questions
Exam style+20 XP

\(A = \begin{pmatrix} 1 & k \\ 0 & 2 \end{pmatrix}\) and \(B = \begin{pmatrix} 3 & 1 \\ 0 & 1 \end{pmatrix}\), where \(k\) is a constant. Find the value of \(k\) for which \(AB = BA\).

Exam style+20 XP

\(A = \begin{pmatrix} 2 & 1 \\ 3 & 1 \end{pmatrix}\). Given that \(A^2 = pA + qI\), find \(p\) and \(q\).

Exam style+20 XP

\(A\) is \(3 \times 2\), \(B\) is \(2 \times 3\) and \(C\) is \(3 \times 3\). Which of these products is not defined?

Exam style+20 XP

Find \(ABC\), where \(A = \begin{pmatrix} 1 & -2 \end{pmatrix}\), \(B = \begin{pmatrix} 3 & 1 \\ 0 & 2 \end{pmatrix}\) and \(C = \begin{pmatrix} 2 \\ 1 \end{pmatrix}\).

Skill unlocked

Orders checked, rows met columns, unknowns found.

This skill is now recorded on your profile. Keep the chain going.

-Rank -Level -Score -Topics
Go deeper · practice
Six original Cambridge-style questions
Combinations of non-square matrices, both products of a pair, unknown entries from a square, powers through \(A^2 = pA + qI\), why \((A + B)^2 \neq A^2 + 2AB + B^2\), and a \(3 \times 3\) cube.