Further Maths/Lessons/Matrices/Introduction to Matrices & Multiplication
Core Pure · Matrices · Year 1

Introduction to Matrices & Multiplication

A rectangular grid of numbers with its own arithmetic — addition and scalar multiplication behave exactly as expected, but matrix multiplication has a rule, and a surprise, all of its own.

13 min read 3 worked examples

What is a matrix?

Definition 1.1 — matrix and order

A matrix is a rectangular array of numbers, arranged in rows and columns. A matrix with $m$ rows and $n$ columns has order $m\times n$. The entry in row $i$, column $j$ is written $a_{ij}$.

Two matrices can be added or subtracted only if they have the same order — corresponding entries are simply added or subtracted. Multiplying a matrix by a scalar $k$ multiplies every entry by $k$.

$$\begin{pmatrix}1&2\\3&4\end{pmatrix}+\begin{pmatrix}0&1\\-1&2\end{pmatrix}=\begin{pmatrix}1&3\\2&6\end{pmatrix},$$ $$2\begin{pmatrix}1&2\\3&4\end{pmatrix}=\begin{pmatrix}2&4\\6&8\end{pmatrix}$$

Matrix multiplication

Definition 1.2 — the multiplication rule

For $AB$ to be defined, the number of columns of $A$ must equal the number of rows of $B$. Each entry of $AB$ is the sum of the products of a row of $A$ with a column of $B$: entry $(i,j)$ of $AB$ is (row $i$ of $A$) $\cdot$ (column $j$ of $B$).

Diagram showing a row highlighted in one matrix and a column highlighted in another matrix, with arrows showing each pair of entries being multiplied and summed to give a single entry in the result matrix
Fig. 1 — the entry in row i, column j of AB is found by multiplying row i of A with column j of B, term by term, and adding the results.
Example 1 · Multiplying two matrices
Given $A=\begin{pmatrix}1&2\\3&4\end{pmatrix}$ and $B=\begin{pmatrix}0&1\\-1&2\end{pmatrix}$, find $AB$.

Row 1 of $A$ with column 1 of $B$: $1(0)+2(-1)=-2$. Row 1 with column 2: $1(1)+2(2)=5$.

Row 2 with column 1: $3(0)+4(-1)=-4$. Row 2 with column 2: $3(1)+4(2)=11$.

$$AB=\begin{pmatrix}-2&5\\-4&11\end{pmatrix}$$
The key surprise — matrix multiplication is not commutative

In general, $AB\neq BA$ — even when both products are defined. Order matters, and it must always be stated explicitly which side a matrix is multiplying from.

Example 2 · Confirming AB ≠ BA
Using the same matrices $A=\begin{pmatrix}1&2\\3&4\end{pmatrix}$ and $B=\begin{pmatrix}0&1\\-1&2\end{pmatrix}$, find $BA$ and compare with $AB$.

Row 1 of $B$ with column 1 of $A$: $0(1)+1(3)=3$. Row 1 with column 2: $0(2)+1(4)=4$.

Row 2 with column 1: $-1(1)+2(3)=5$. Row 2 with column 2: $-1(2)+2(4)=6$.

$$BA=\begin{pmatrix}3&4\\5&6\end{pmatrix} \neq AB=\begin{pmatrix}-2&5\\-4&11\end{pmatrix}$$

The identity matrix $I$ (ones on the leading diagonal, zeros elsewhere) behaves like the number $1$: $AI=IA=A$ for any compatible $A$.

Common mistake

Matrix multiplication is not found by multiplying corresponding entries together (that is a different operation entirely) — always use the row-times-column rule, and always check the orders are compatible before starting.

Exam-style questions

Question 1 6 marks

Given $A=\begin{pmatrix}2&-1\\0&3\end{pmatrix}$ and $B=\begin{pmatrix}1&4\\2&-2\end{pmatrix}$, find $AB$ and $BA$, and state whether $AB=BA$.

$AB = \begin{pmatrix}2(1)-1(2)&2(4)-1(-2)\\0(1)+3(2)&0(4)+3(-2)\end{pmatrix}=\begin{pmatrix}0&10\\6&-6\end{pmatrix}$ (M1, A1)

$BA = \begin{pmatrix}1(2)+4(0)&1(-1)+4(3)\\2(2)-2(0)&2(-1)-2(3)\end{pmatrix}=\begin{pmatrix}2&11\\4&-8\end{pmatrix}$ (M1, A1)

$AB\neq BA$ (B1, B1)

Question 2 5 marks

Given that $\begin{pmatrix}x&2\\1&y\end{pmatrix}\begin{pmatrix}3&0\\-1&4\end{pmatrix} = \begin{pmatrix}1&8\\2&4\end{pmatrix}$, find $x$ and $y$.

Row 1, column 1: $3x-2=1 \Rightarrow x=1$ (M1, A1)

Row 2, column 1: $3-y=2 \Rightarrow y=1$ (M1, A1)

Check row 2, column 2: $4y=4(1)=4$ ✓ consistent (B1)