aimnova.
DashboardMy LearningPaper MasteryStudy Plan

Stay in the loop

Study tips, product updates, and early access to new features.

aimnova.

AI-powered IB study platform with personalised plans, instant feedback, and examiner-style marking.

IB Subjects
  • All IB Subjects
  • IB Diploma
  • IB ESS
  • IB Economics
  • IB Business Management
  • IB Math AI
  • IB Math AA
Question Banks
  • ESS Question Bank
  • Economics Question Bank
  • Business Management Question Bank
  • Math AI Question Bank
  • Math AA Question Bank
Predicted Topics 2026
  • ESS Predictions 2026
  • Economics Predictions 2026
  • Business Management Predictions 2026
  • Math AI Predictions 2026
  • Math AA Predictions 2026

Study Resources

  • Free Study Notes
  • Mock Exams
  • Revision Guide
  • Flashcards
  • Exam Skills
  • Command Terms
  • Past Paper Feedback
  • Grade Calculator
  • Exam Timetable 2026

Company

  • Features
  • Pricing
  • About Us
  • Blog
  • Contact
  • Terms
  • Privacy
  • Cookies

© 2026 Aimnova. All rights reserved.

Made with 💜 for IB students worldwide

v0.1.895
NotesMath AI HLTopic 3.15Adjacency matrices
Back to Math AI HL Topics
3.15.12 min read

Adjacency matrices

IB Mathematics: Applications and Interpretation • Unit 3

IB exam ready

Study like the top scorers do

Access a smart study planner, AI tutor, and exam vault — everything you need to hit your target grade.

Start Free Trial

Contents

  • Building the adjacency matrix
  • Counting walks: the powers of A
A graph stored as a grid of numbers: Picture four towns A, B, C, D joined by roads. Instead of drawing them, store the connections in a square grid — the adjacency matrix A.

The rows and columns are labelled with the same vertices in the same order. Entry in row i, column j is the number of edges going from vertex i to vertex j (usually 0 or 1).

Why bother? Once the network is a matrix, a GDC can do all the route-counting for you — no more tracing paths by hand.
Undirected vs directed — symmetry is the tell: Undirected graph (roads you can drive both ways): an edge between A and B puts a 1 in both position (A,B) and (B,A), so the matrix is symmetric (a mirror image across the diagonal).

Directed graph (one-way streets, web links): an arrow A→B puts a 1 in (A,B) only. The matrix is usually not symmetric.

Loops (an edge from a vertex to itself) sit on the diagonal; in an undirected graph a loop is often counted as 2.

IB-style question — write down an adjacency matrix

A small delivery network of four depots A, B, C, D has two-way roads: A–B, A–C, B–C and C–D.

Write down the adjacency matrix, taking the vertices in the order A, B, C, D.

Step by step

  1. Two-way roads → undirected → symmetric matrix. Put a 1 in each direction of every road, 0 everywhere else (no loops here, so the diagonal is 0).
  2. Fill row by row. Row A connects to B and C; row B to A and C; row C to A, B and D; row D to C.
  3. Sanity check: it is symmetric (mirror across the diagonal), as every undirected adjacency matrix must be. The row sums (2, 2, 3, 1) are the degrees of A, B, C, D.

Final answer

M = ((0,1,1,0),(1,0,1,0),(1,1,0,1),(0,0,1,0)). It is symmetric because the roads are two-way.

Aⁿ counts the walks of length n: Here is the result the exam tests again and again:

the entry in row i, column j of Aⁿ is the number of walks of length n (n edges, repeats allowed) from vertex i to vertex j.

A walk is any sequence of edges followed end to end — you may reuse vertices and edges. "Length" means the number of edges used, not the distance.

So A² counts 2-step routes, A³ counts 3-step routes, and so on. A GDC raises a matrix to a power instantly, so these questions are pure calculator work once you have A.
Length = number of edges. Walks may repeat vertices and edges.
Why does this work? (the row × column picture): To get from i to j in 2 steps you go i → (some middle vertex k) → j. The (i,j) entry of A² is the row-i × column-j dot product: it adds, over every k, (edges i→k) × (edges k→j). That product is 1 exactly when both legs exist, so the sum literally counts the 2-step routes.

A³ = A²·A then glues a third edge on, and the pattern continues — each extra power adds one more edge to the walk.

IB-style question — count walks of a given length

For the depot network M = ((0,1,1,0),(1,0,1,0),(1,1,0,1),(0,0,1,0)) (vertices A, B, C, D), use a GDC to find the number of walks of length 3 that start at A and end at D.

Step by step

  1. Walks of length 3 → use M³. Enter M into the GDC and compute the cube.
  2. Read the entry for 'start A, end D' — that is row A (row 1), column D (column 4).
  3. Interpret it: there is exactly one 3-edge walk from A to D. (It is A → C → C? no loops, so it is A → B → C → D, the only such route.)

Final answer

1 walk of length 3 from A to D (read directly from the (A,D) entry of M³).

Try an IB Exam Question — Free AI Feedback

Test yourself on Adjacency matrices. Write your answer and get instant AI feedback — just like a real IB examiner.

A bus network of three stops X, Y, Z has two-way routes X–Y and Y–Z only. Write down the adjacency matrix, taking the order X, Y, Z, and whether it is symmetric. [2 marks]

Related Math AI HL Topics

Continue learning with these related topics from the same unit:

3.1.1Distance & midpoint in 2D
3.1.2Distance & midpoint in 3D
3.1.3Volume and Surface Area of 3D Solids
3.10.1Vector definitions
View all Math AI HL topics

Improve your exam technique

Command terms, paper structure, and mark-scheme tips for Math AI HL

Previous
3.14.1Introduction to graph theory
Next
Spanning trees & shortest path3.16.1

11 questions to test your understanding

Reading is just the start. Students who tested themselves scored 82% on average — try IB-style questions with AI feedback.

Start Free TrialView All Math AI HL Topics