IB Maths AI HL Matrices Paper 1 & 2 Linear systems ~8 min read

Solving Systems of Linear Equations with Matrices

A system of linear equations packs into a single matrix equation Ax = b. If A is invertible, the solution is one matrix multiplication away: x = A−1b. The same machinery handles 2×2 systems by hand and 3×3 systems with a GDC.

📘 What you need to know

Writing a system as a matrix equation

Each linear equation contributes a row. The coefficients of the unknowns go into A, the unknowns themselves stack into the column vector x, and the constants from the right-hand side make up b. Once you can see the pattern, the translation is mechanical.

Each equation becomes a row of A and b x + 2yz = 2 2xy + z = 3 x + y + 3z = 10 becomes A 12−1 2−11 −113 x x y z = b 2 3 10 SOLVING THE EQUATION multiply both sides by A−1 on the left  ⇒  x = A−1 b use the GDC to find A−1 for a 3×3 system, then multiply by b x = 1,   y = 2,   z = 3
Each colour-coded equation maps to a row of A and b. The unknowns stack into x. Inverting A and multiplying by b reads off the solution in one step.
Matrix form of a linear system Ax = b,   with det A ≠ 0   ⇒   x = A−1 b rows of A hold the coefficients; b holds the constants; x stacks the unknowns

Solving with the inverse

Once the system sits in matrix form, the same trick from the previous note finishes it: pre-multiply by A−1 to isolate x. For 2×2 systems use the inverse formula by hand; for 3×3 let your GDC do the heavy lifting — you only need to enter A and b, then compute A−1b.

When does a unique solution exist?

The determinant is the gate. If det A ≠ 0, the system has exactly one solution and inversion finds it. If det A = 0, the coefficient matrix is singular — the system either has no solution (the equations contradict each other) or infinitely many (the equations are essentially the same). Either way, the inverse method fails.

Quick check: before reaching for the GDC, compute (or estimate) det A. A non-zero determinant tells you a unique solution exists; a zero one tells you to look for special structure rather than a unique answer.

🧭 Recipe — solving a linear system with matrices

  1. Read off the coefficients of the unknowns into matrix A, row by row.
  2. Read off the constants from the right-hand sides into the column vector b.
  3. Compute det A; if zero, there is no unique solution — stop.
  4. Find A−1 by hand for 2×2, or with the GDC for 3×3.
  5. Multiply: x = A−1 b. The entries of x are the values of the unknowns.

Worked examples

WE 1

Set-up: write a system in matrix form

Write the system 2x − 3y = 7, x + 4y = −2 as a matrix equation Ax = b.

A holds the coefficients of x and y row by row A = ((2, −3), (1, 4)) x stacks the unknowns; b stacks the constants x = (x, y)T;   b = (7, −2)T ((2, −3), (1, 4)) · (x, y)T = (7, −2)T match the order: row 1 of A goes with the top entry of b.
WE 2

Solve a 2×2 system by hand

Solve 3x + y = 11,   2x + 5y = 16 using matrices.

A = ((3, 1), (2, 5));   b = (11, 16)T det A = (3)(5) − (1)(2) det A = 15 − 2 = 13 A⁻¹ = (1/13)((5, −1), (−2, 3)) x = A⁻¹ b x = (1/13)((5)(11) + (−1)(16)) = (1/13)(39) = 3 y = (1/13)((−2)(11) + (3)(16)) = (1/13)(26) = 2 x = 3, y = 2 check: 3(3)+2 = 11 ✓, 2(3)+5(2) = 16 ✓.
WE 3

Detect a system with no unique solution

Show that the system 2x + 3y = 7,   4x + 6y = 14 has no unique solution.

coefficient matrix and its determinant A = ((2, 3), (4, 6)) det A = (2)(6) − (3)(4) = 12 − 12 = 0 det A = 0 ⇒ A is singular no unique solution notice the second equation is twice the first — infinitely many solutions, but no single one.
WE 4

3×3 system using the GDC

Solve x + 2yz = 2,   2xy + z = 3,   −x + y + 3z = 10.

set up the matrix equation A = ((1, 2, −1), (2, −1, 1), (−1, 1, 3)); b = (2, 3, 10)T det A on GDC: −19 ≠ 0 ⇒ unique solution enter A and b, compute A⁻¹ b x = A⁻¹ b = (1, 2, 3)T x = 1,   y = 2,   z = 3 verify by plugging back: 1 + 4 − 3 = 2 ✓, 2 − 2 + 3 = 3 ✓, −1 + 2 + 9 = 10 ✓.
WE 5

Applied: pricing three items

A shop sells apples, bananas and cherries by the unit. Three customers each buy a mix: customer 1 buys 2 apples, 3 bananas and 1 cherry for $11; customer 2 buys 1 apple, 2 bananas and 4 cherries for $17; customer 3 buys 3 apples, 1 banana and 2 cherries for $11. Find the unit price of each fruit.

let a, b, c be the unit prices of apple, banana, cherry 2a + 3b + c = 11;   a + 2b + 4c = 17;   3a + b + 2c = 11 matrix form A = ((2, 3, 1), (1, 2, 4), (3, 1, 2));   b = (11, 17, 11)T A⁻¹ b on the GDC (a, b, c) = (1, 2, 3) apple $1, banana $2, cherry $3 real-world systems often hide behind word problems — set the unknowns up first, then translate.
WE 6

Parameter: existence and explicit solve

Consider the system kx + 2y = 8,   3x + 4y = 14. (a) Find the value of k for which the system has no unique solution. (b) Solve the system when k = 2.

(a) no unique solution ⇔ det A = 0 det A = 4k − 6 = 0 ⇒ k = 3/2 (b) at k = 2: A = ((2, 2), (3, 4));   b = (8, 14)T det A = 8 − 6 = 2 A⁻¹ = (1/2)((4, −2), (−3, 2)) x = (1/2)(4·8 + (−2)·14) = (1/2)(4) = 2 y = (1/2)((−3)·8 + 2·14) = (1/2)(4) = 2 (a) k = 3/2 · (b) x = 2, y = 2 the boundary value of k turns A singular — any k away from 3/2 gives a unique solution.

💡 Top tips

âš  Common mistakes

That completes Matrices. From the basic definition through addition, multiplication, determinants and inverses, and now linear systems, you have a full toolkit for handling matrices in IB Maths AI HL Paper 1 & 2.

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 →