← Back to subjects
0
IB Diploma Mathematics: Applications & Interpretation HL · Matrices & Graph Theory
Mini-Lesson

Matrices & Graph Theory (HL)

This HL-only mini-lesson covers matrices (multiplication, determinant, inverse, solving systems, transition matrices) and graph theory (adjacency matrices, walks, degrees, and minimum spanning trees) — powerful tools for networks, transformations and Markov processes.

AI HL flavour: matrices model transformations and Markov chains; graph theory models transport, communication and delivery networks.

Work through each screen, answer the questions as you go (some are wordy, some are calculations) and collect ⭐ stars. Every number on the calculation screens has been re-derived and checked. Press Start when you are ready.

Matrix arithmetic

Multiplying matrices

To multiply matrices, take rows of the first with columns of the second (row × column). The inner dimensions must match.

Worked example

A = [[2, 1], [3, 4]], B = [[1, 0], [2, 5]].

AB = [[2×1 + 1×2, 2×0 + 1×5], [3×1 + 4×2, 3×0 + 4×5]] = [[4, 5], [11, 20]]

Matrix multiplication is not commutative: AB ≠ BA in general.

Calculate

Your turn — matrix product entry

1For A = [[2, 1], [3, 4]] and B = [[1, 0], [2, 5]], the product AB = [[4, 5], [11, 20]]. Enter the bottom-right entry of AB.
Hint: row 2 of A times column 2 of B: 3×0 + 4×5.
Determinant & inverse

Determinant and inverse of a 2×2 matrix

det [[a, b], [c, d]] = ad − bcinverse = 1⁄(ad − bc) · [[d, −b], [−c, a]]
Worked example

A = [[2, 1], [3, 4]]: det A = 2×4 − 1×3 = 5.

A⁻¹ = 1⁄5 [[4, −1], [−3, 2]] = [[0.8, −0.2], [−0.6, 0.4]]

The inverse exists only when det ≠ 0.

Calculate

Your turn — determinant

2Find the determinant of A = [[2, 1], [3, 4]] (det = ad − bc).
Hint: 2×4 − 1×3.
Systems

Solving systems with matrices

Write Ax = b and solve x = A⁻¹b (GDC).

Worked example

2x + y = 5, 3x + 4y = 10 (A as above, det 5 ≠ 0).

Solution: x = 2, y = 1

Calculate

Your turn — solve the system

3Solve 2x + y = 5, 3x + 4y = 10 using matrices. Enter the value of x.
Hint: x = A⁻¹b gives whole-number answers here.
Transition matrices

Markov chains & transition matrices

A transition matrix T holds the probabilities of moving between states. The state after k steps is Tk applied to the start vector.

Worked example

T = [[0.8, 0.3], [0.2, 0.7]], start (1, 0).

After 1 step: (0.8, 0.2). After 2 steps: T×(0.8, 0.2) = (0.7, 0.3)

Long-run steady state: solve Ts = s ⇒ s = (0.6, 0.4)

Calculate

Your turn — transition step

4With T = [[0.8, 0.3], [0.2, 0.7]] and start vector (1, 0), the state after 2 steps is (a, b). Enter a (the first component), to 1 decimal place.
Hint: step 1 gives (0.8, 0.2); apply T again: 0.8×0.8 + 0.3×0.2.
Quick check

Steady state

?The long-run steady-state vector s of a transition matrix T satisfies:
Graph theory

Graphs, adjacency matrices & walks

A graph is vertices joined by edges. Its adjacency matrix A has Aij = number of edges between i and j. The powers of A count walks: Akij = number of walks of length k from i to j.

Worked example

A 4-vertex graph has degrees 2, 3, 3, 2.

Number of edges = ½ × (sum of degrees) = ½ × 10 = 5

Walks of length 2 between vertex 1 and vertex 3 = (A²)₁₃ = 1

Calculate

Your turn — count the edges

5A graph's vertices have degrees 2, 3, 3, 2. Using the handshake lemma, edges = ½ × (sum of degrees). Find the number of edges.
Hint: (2 + 3 + 3 + 2) ÷ 2.
Sort it

Matrices & graphs sort

Tap an object, then the area it belongs to.

🔲 Matrix operation

🔀 Markov chain

🕸️ Graph theory

Quick check

Minimum spanning tree

?For edges A–C=3, B–C=2, A–B=4, B–D=5, C–D=7, a minimum spanning tree connects all four vertices with least total weight. Its weight is:
Quick check

Adjacency powers

?In an adjacency matrix A, the entry (A²)ᵢⱼ counts the number of:
Match it

Match the tool to its result

Tap an item on the left, then its match on the right.

Item
Match
Weighted graphs

Weighted graphs & shortest paths

Edges can carry weights (distances, costs, times). A weighted adjacency matrix stores them; algorithms find shortest paths or least-cost tours.

A minimum spanning tree connects every vertex at least total weight but is not the same as a shortest path between two vertices.

Quick check

Handshake lemma

?In any graph, the sum of all vertex degrees equals:
Recap

The big ideas to take away

Multiplication: row × column; AB ≠ BA in general

Determinant / inverse: det = ad − bc; inverse exists iff det ≠ 0

Systems: Ax = b ⇒ x = A⁻¹b

Transition matrices: state after k steps = Tᵏ·start; steady state Ts = s

Graphs: adjacency matrix; Aᵏ counts walks; edges = ½ Σ degrees

MST: Kruskal/Prim connect all vertices at least total weight

You have worked through the whole topic. Press Finish to see your score.

🏆

Mini-lesson complete!

⭐⭐⭐

You have covered HL Matrices & Graph Theory for AI. 🎉

Your stars: 0 / 0

Next: test yourself in the Evaluate stage, then lock it in with Verify.

📣 Smashed it? Share your score

Challenge a mate to beat your stars, or show a parent how you got on.

→ Back to all subjects