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.
To multiply matrices, take rows of the first with columns of the second (row × column). The inner dimensions must match.
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.
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.
Write Ax = b and solve x = A⁻¹b (GDC).
2x + y = 5, 3x + 4y = 10 (A as above, det 5 ≠ 0).
Solution: x = 2, y = 1
A transition matrix T holds the probabilities of moving between states. The state after k steps is Tk applied to the start vector.
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)
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.
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
Tap an object, then the area it belongs to.
Tap an item on the left, then its match on the right.
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.
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.
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.