Lesson 3: Adjacency matrices

Constructing an adjacency matrix

SkillAdjacency matrices

Worked example

  • Simple familiar

Construct the adjacency matrix for the graph shown.

1 of 5 steps
  1. Step 1: Label the rows and the columns

    Use the same order for both: A,B,C,DA, B, C, D. The entry in row ii, column jj is the number of edges joining vertex ii to vertex jj.

Try a similar one

A fresh question of the same kind, checked as you answer, with hints and a full solution.

Method

  1. Label the rows and columns with the vertices, in the same order.

  2. Each entry is the number of edges joining the row vertex to the column vertex; a loop is entered as 1.

  3. Check the matrix is symmetric and that the edge count matches the drawing.

Watch out for

  • Entering the loop as 2. The degree of AA counts the loop twice, but the matrix counts edges, so the entry is 1.

  • Entering 1 for the pair of edges between B and C instead of 2.

Save your progress with a free account