IB Maths AI HL Matrices Paper 1 & 2 Addition & multiplication ~8 min read

Operations with Matrices

Adding and subtracting matrices is straightforward — same order, element-by-element. Multiplication is where matrices get interesting: the inner dimensions must match, the order of the factors matters, and the new entry in row i, column j comes from a row-times-column dot product.

📘 What you need to know

Addition, subtraction and scalar multiplication

Two matrices of the same order can be added or subtracted by working entry-by-entry: (A ± B)i,j = ai,j ± bi,j. The result has the same order as the originals. Scalar multiplication kA simply multiplies every entry by k.

Addition is commutative (A + B = B + A) and associative. The zero matrix is the additive identity: A + O = A. Subtraction is just adding the negative: AB = A + (−B).

Matrix multiplication

Multiplication is the operation that makes matrices powerful — and also the one with the trickiest rules. First, AB only exists when the number of columns in A equals the number of rows in B. When it does, the result has the outer dimensions: an m × n times an n × p gives an m × p product.

Each entry (AB)i,j comes from multiplying the ith row of A by the jth column of B entry-by-entry and summing — a dot product.

Each entry of AB is a row of A times a column of B A (2×3) 1 2 −1 3 0 2 × B (3×2) 4 1 −2 3 5 −1 = AB (2×2) −5 8 22 1 COMPUTING (AB)1, 1 (AB)1, 1 = row 1 of A · col 1 of B = (1)(4) + (2)(−2) + (−1)(5) = 4 − 4 − 5 = −5
Inner dimensions must match (the 3 in 2×3 times 3×2). The outer dimensions (2 and 2) give the order of the product. Every entry of AB is a row-times-column dot product.
Matrix multiplication: when and what shape A(m × n) · B(n × p) = (AB)(m × p) inner dimensions must match; outer dimensions give the result

Properties and powers

Matrix multiplication satisfies most of the algebra you expect — but not commutativity. Switching the order of two matrices generally changes the answer (and sometimes even the very existence of the product). Useful identities you can rely on:

Properties of multiplication: associative A(BC) = (AB)C; distributive A(B+C) = AB + AC; identity AI = IA = A; zero AO = OA = O. But ABBA in general — never assume otherwise.

For a square matrix, powers are repeated multiplication by itself: A2 = AA, A3 = AAA, and so on. Non-square matrices have no well-defined powers, since AA wouldn’t be compatible.

🧭 Recipe — multiplying two matrices

  1. Check compatibility: the number of columns in A must equal the number of rows in B.
  2. Find the order of the result: m × p (the outer dimensions).
  3. For each entry (i, j): take row i of A and column j of B.
  4. Multiply pairwise and add: pair the first row-entry with the first column-entry, the second with the second, …, and sum.
  5. Repeat for every position of the result; check with your GDC if available.

Worked examples

WE 1

Addition and subtraction

Let A = ((3, −1), (2, 5)) and B = ((−2, 4), (1, −3)). Find A + B and AB.

add element by element A + B = ((3−2, −1+4), (2+1, 5−3)) = ((1, 3), (3, 2)) subtract element by element A − B = ((3+2, −1−4), (2−1, 5+3)) = ((5, −5), (1, 8)) A + B = ((1, 3), (3, 2)) · A − B = ((5, −5), (1, 8)) order matches the originals (2×2 in, 2×2 out).
WE 2

Scalar multiplication

Let A = ((4, −2, 1), (0, 5, −3)). Find 3A and −2A.

multiply every entry by the scalar 3A = ((12, −6, 3), (0, 15, −9)) −2A = ((−8, 4, −2), (0, −10, 6)) 3A and −2A as shown a negative scalar flips the sign of every entry; the order stays 2×3.
WE 3

Compatibility check

Let A be 2 × 4, B be 4 × 3 and C be 3 × 2. State whether each product is defined and, if so, give its order: AB, BA, BC, CB.

check inner dimensions for each AB: 2×4 · 4×3 ⇒ inner 4 = 4 ✓ → 2×3 BA: 4×3 · 2×4 ⇒ inner 3 ≠ 2 ✗ not defined BC: 4×3 · 3×2 ⇒ inner 3 = 3 ✓ → 4×2 CB: 3×2 · 4×3 ⇒ inner 2 ≠ 4 ✗ not defined AB: 2×3 · BC: 4×2 · BA, CB: not defined switching the order can kill the product altogether — not just change the answer.
WE 4

AB versus BA — non-commutativity

Let A = ((2, 1), (3, 4)) and B = ((1, −1), (2, 3)). Find AB and BA, and verify they differ.

AB: row i of A times col j of B AB₁₁ = 2(1)+1(2) = 4; AB₁₂ = 2(−1)+1(3) = 1 AB₂₁ = 3(1)+4(2) = 11; AB₂₂ = 3(−1)+4(3) = 9 AB = ((4, 1), (11, 9)) BA: row i of B times col j of A BA = ((−1, −3), (13, 14)) AB = ((4,1),(11,9)) · BA = ((−1,−3),(13,14)) ⇒ AB ≠ BA order matters — matrix multiplication is not commutative.
WE 5

2×3 times 3×2

Let A = ((1, 2, −1), (3, 0, 2)) and B = ((4, 1), (−2, 3), (5, −1)). Find AB.

check: 2×3 · 3×2 ⇒ AB is 2×2 row 1 · col 1 = (1)(4)+(2)(−2)+(−1)(5) = 4 − 4 − 5 = −5 row 1 · col 2 = (1)(1)+(2)(3)+(−1)(−1) = 1 + 6 + 1 = 8 row 2 · col 1 = (3)(4)+(0)(−2)+(2)(5) = 12 + 0 + 10 = 22 row 2 · col 2 = (3)(1)+(0)(3)+(2)(−1) = 3 + 0 − 2 = 1 AB = ((−5, 8), (22, 1)) four entries, four dot products — tabulating helps avoid sign slips.
WE 6

Full question: powers and the identity

Let A = ((1, 2), (3, 4)). (a) Find A2. (b) Find 2A − 3I, where I is the 2 × 2 identity. (c) Verify that AI = A.

(a) A² = AA A²₁₁ = 1(1)+2(3) = 7; A²₁₂ = 1(2)+2(4) = 10 A²₂₁ = 3(1)+4(3) = 15; A²₂₂ = 3(2)+4(4) = 22 A² = ((7, 10), (15, 22)) (b) 2A = ((2, 4), (6, 8)); 3I = ((3, 0), (0, 3)) 2A − 3I = ((−1, 4), (6, 5)) (c) AI computed entry-by-entry AI = ((1, 2), (3, 4)) = A ✓ (a) ((7,10),(15,22)) · (b) ((−1,4),(6,5)) · (c) AI = A the identity is to matrices what 1 is to numbers — multiplying by it changes nothing.

💡 Top tips

âš  Common mistakes

Next up: Determinants & Inverses — the determinant tells you whether a square matrix is invertible, and the inverse undoes matrix multiplication, just like 1/x undoes multiplication by x.

Need help with AI HL Matrices?

Get 1-on-1 help from an IB examiner who knows exactly what Paper 1 & 2 are looking for.

Book Free Session →