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.
What is a matrix?
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$.
Matrix multiplication
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$).
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$.
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.
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$.
The identity matrix $I$ (ones on the leading diagonal, zeros elsewhere) behaves like the number $1$: $AI=IA=A$ for any compatible $A$.
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)