Matrix Algebra

A matrix is a grid of numbers you can add, scale, and multiply by rules of its own. Master the 2x2 case, including its determinant and inverse, and you have the toolkit for solving equations with matrices.

MYP 5Extended MathsVectors & MatricesCriteria A · C · D~12 min read

Adding, subtracting, and scaling

A matrix is a rectangular grid of numbers. A 2x2 matrix has two rows and two columns. To add or subtract two matrices of the same size, work on each position separately, just like with column vectors.

\[ \begin{pmatrix} a & b \\ c & d \end{pmatrix} + \begin{pmatrix} e & f \\ g & h \end{pmatrix} = \begin{pmatrix} a+e & b+f \\ c+g & d+h \end{pmatrix} \]

To multiply a matrix by a scalar, multiply every entry by that number.

Worked example

With \(A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}\) and \(B = \begin{pmatrix} 5 & 0 \\ -1 & 2 \end{pmatrix}\), find \(A + B\) and \(3A\).

1
Add matching entries: \(A + B = \begin{pmatrix} 1+5 & 2+0 \\ 3+(-1) & 4+2 \end{pmatrix} = \begin{pmatrix} 6 & 2 \\ 2 & 6 \end{pmatrix}\).
2
Multiply every entry of \(A\) by 3: \(3A = \begin{pmatrix} 3 & 6 \\ 9 & 12 \end{pmatrix}\).
\(A + B = \begin{pmatrix} 6 & 2 \\ 2 & 6 \end{pmatrix}, \quad 3A = \begin{pmatrix} 3 & 6 \\ 9 & 12 \end{pmatrix}\)

Multiplying two matrices

Matrix multiplication is the one that surprises people. You take each row of the left matrix and pair it with each column of the right matrix, multiplying term by term and adding, exactly like a dot product.

\[ \begin{pmatrix} a & b \\ c & d \end{pmatrix}\begin{pmatrix} e & f \\ g & h \end{pmatrix} = \begin{pmatrix} ae+bg & af+bh \\ ce+dg & cf+dh \end{pmatrix} \]
Worked example

Find \(AB\) where \(A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}\) and \(B = \begin{pmatrix} 5 & 6 \\ 7 & 8 \end{pmatrix}\).

1
Top-left: row 1 of \(A\) with column 1 of \(B\): \((1)(5) + (2)(7) = 5 + 14 = 19\).
2
Top-right: row 1 with column 2: \((1)(6) + (2)(8) = 6 + 16 = 22\).
3
Bottom-left: row 2 with column 1: \((3)(5) + (4)(7) = 15 + 28 = 43\).
4
Bottom-right: row 2 with column 2: \((3)(6) + (4)(8) = 18 + 32 = 50\).
\(AB = \begin{pmatrix} 19 & 22 \\ 43 & 50 \end{pmatrix}\)

Order matters

Matrix multiplication is not commutative: in general \(AB \neq BA\). Always keep the matrices in the order the question gives them, and go row of the left, column of the right.

The determinant

The determinant of a 2x2 matrix is a single number that tells you, among other things, whether the matrix can be inverted. For \(A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}\) it is defined as follows.

\[ \det(A) = ad - bc \]
Worked example

Find the determinant of \(A = \begin{pmatrix} 4 & 3 \\ 2 & 1 \end{pmatrix}\).

1
Multiply the leading diagonal: \(ad = 4 \times 1 = 4\).
2
Multiply the other diagonal: \(bc = 3 \times 2 = 6\).
3
Subtract: \(\det(A) = 4 - 6 = -2\).
\(\det(A) = -2\)

If the determinant is zero, the matrix is singular and has no inverse. Keep an eye on that value before trying to invert.

The inverse of a 2x2 matrix

The inverse \(A^{-1}\) undoes \(A\): multiplying them gives the identity matrix \(I = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}\). To find it, swap the leading diagonal, negate the other diagonal, and divide everything by the determinant.

\[ A^{-1} = \frac{1}{ad-bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix} \]
Worked example

Find the inverse of \(A = \begin{pmatrix} 2 & 1 \\ 3 & 4 \end{pmatrix}\).

1
Determinant: \(\det(A) = (2)(4) - (1)(3) = 8 - 3 = 5\).
2
Swap the leading diagonal and negate the other: \(\begin{pmatrix} 4 & -1 \\ -3 & 2 \end{pmatrix}\).
3
Divide by the determinant: \(A^{-1} = \dfrac{1}{5}\begin{pmatrix} 4 & -1 \\ -3 & 2 \end{pmatrix}\).
\(A^{-1} = \begin{pmatrix} \frac{4}{5} & -\frac{1}{5} \\ -\frac{3}{5} & \frac{2}{5} \end{pmatrix}\)

Where this is assessed

Determinant and inverse are core Criterion A skills. You can always check your inverse under Criterion C by multiplying \(A A^{-1}\) and confirming you get the identity matrix \(\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}\). Here \(\begin{pmatrix} 2 & 1 \\ 3 & 4 \end{pmatrix}\begin{pmatrix} \frac{4}{5} & -\frac{1}{5} \\ -\frac{3}{5} & \frac{2}{5} \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}\).

Check yourself

1. Find the determinant of \(\begin{pmatrix} 3 & 5 \\ 1 & 2 \end{pmatrix}\). +

Use \(ad - bc\): \((3)(2) - (5)(1) = 6 - 5 = \mathbf{1}\).

2. Find the inverse of \(\begin{pmatrix} 1 & 2 \\ 3 & 7 \end{pmatrix}\). +

Determinant: \((1)(7) - (2)(3) = 7 - 6 = 1\). Swap the leading diagonal and negate the other: \(\begin{pmatrix} 7 & -2 \\ -3 & 1 \end{pmatrix}\). Dividing by \(1\) leaves it unchanged, so the inverse is \(\mathbf{\begin{pmatrix} 7 & -2 \\ -3 & 1 \end{pmatrix}}\).

3. Work out \(\begin{pmatrix} 1 & 0 \\ 2 & 3 \end{pmatrix}\begin{pmatrix} 4 & 5 \\ 6 & 7 \end{pmatrix}\). +

Top-left: \((1)(4)+(0)(6)=4\). Top-right: \((1)(5)+(0)(7)=5\). Bottom-left: \((2)(4)+(3)(6)=8+18=26\). Bottom-right: \((2)(5)+(3)(7)=10+21=31\). Result: \(\mathbf{\begin{pmatrix} 4 & 5 \\ 26 & 31 \end{pmatrix}}\).


Part of the Extended Maths library. Spotted an error or want a topic added? That feedback makes the notes better.