How do we describe a graph precisely and record it as a matrix?
Use vertex, edge, degree, loop and multiple-edge terminology, apply the handshake rule, and represent a graph with an adjacency matrix.
How to use the core graph vocabulary of vertices, edges, degree, loops and multiple edges, apply the handshake rule, and translate between a graph and its adjacency matrix.
Reviewed by: AI editorial process; not yet individually human-reviewed
Have a quick question? Jump to the Q&A page
Jump to a section
What this dot point is asking
You must use the core vocabulary correctly, apply the handshake rule, and translate both ways between a graph and its adjacency matrix.
The vocabulary
Other terms appear throughout networks: a graph is connected if you can reach every vertex from every other; a subgraph uses some of the vertices and edges; a complete graph joins every pair of vertices exactly once.
The handshake rule
Each edge contributes one edge-end to each of its two vertices, so it adds to the total degree count. This gives a checking rule used constantly.
Use it to check your degree count or to find a missing degree. If five of six vertices have degrees and the graph has edges, the degrees must sum to , so the sixth vertex has degree .
The adjacency matrix
An adjacency matrix is a square array with one row and one column per vertex. The entry in row , column is the number of edges joining vertex to vertex .
- For an undirected graph the matrix is symmetric: entry equals entry .
- A loop contributes to the diagonal entry for that vertex (it joins the vertex to itself with two edge-ends).
- Multiple edges show as entries greater than .
- The degree of a vertex is the sum of its row (counting a diagonal loop entry as is, since it already counts ).
Reading a matrix back into a graph
Given a matrix, reverse the process: each off-diagonal entry tells you how many edges join those two vertices, and a diagonal entry of marks a loop. The matrix is the compact, calculator-friendly way to store a network, which is why SCSA uses it for the matrix-power method of counting walks between vertices.
In a transport network this is useful: if the matrix records direct flights between cities, the squared matrix gives the number of one-stopover (two-flight) routes between each pair, and the sum of a matrix and its square counts routes of up to two legs. Interpreting such an entry in context (for example, "there are three two-flight routes from city to city ") is a standard application of matrix powers to graphs.
Exam-style practice questions
Practice questions written in the style of SCSA exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.
WACE 20225 marksA graph has vertices , , , with edges , , , , and a loop at . (a) State the degree of each vertex. (b) Verify the handshake rule. (c) Write the adjacency matrix.Show worked answer →
Count edge-ends at each vertex; a loop adds to its vertex's degree.
(a) (edges , and the loop), (, , ), (, , ), (, ). (2 marks)
(b) Sum of degrees edges (the loop counts as one edge), so the handshake rule holds. (1 mark)
(c) Order . With the loop at entered as on the leading diagonal: row , row , row , row . (2 marks)
Markers reward the loop contributing to both degree and the diagonal entry, and a symmetric matrix for an undirected graph.
WACE 20244 marksExplain the difference between a simple graph and a graph that is not simple, then state what feature of an adjacency matrix shows that a graph is undirected.Show worked answer →
A simple graph has no loops and no multiple edges between the same pair of vertices.
A graph that is not simple contains at least one loop (an edge joining a vertex to itself) or multiple edges (two or more edges between the same pair of vertices). (2 marks)
An undirected graph has a symmetric adjacency matrix: the entry in row , column equals the entry in row , column , because each edge is counted in both directions. (2 marks)
Markers reward the loop-and-multiple-edge definition and the symmetry of the matrix for undirected graphs.
