Did you know that a map of train stations, a friendship network and the internet can all be described using the same mathematical language? In each case, we care less about the appearance of individual objects and more about which objects connect, which routes are possible and how those connections shape the whole system. That is the beauty of graph theory: it turns messy-looking networks into something we can understand.
The core aim of graph theory mastery is to learn how to model a network using vertices and edges, recognise directed and undirected connections, understand weighted routes, identify paths and cycles, use degree counting, and solve simple shortest-path and spanning-tree problems. Students should be able to explain why a route works, not merely draw lines between dots. Graph theory is especially useful for understanding transport, computer networks, scheduling, relationships and modern algorithms.
This Mathematics Mastery guide connects to eduKateSG’s Mathematical Reasoning, Matrices and Permutations and Combinations. For its real-world network application, see Why Mathematics? | Graph Theory, Networks and Internet Routing. Here, the emphasis is on building reliable mathematical skill, step by step.
What Is a Graph in Mathematics?
A graph is a collection of vertices (also called nodes) and edges connecting them. We often write a graph as G=(V,E), where V is the set of vertices and E is the set of edges.
Imagine three MRT stations A, B and C. If a direct connection exists between A and B, draw an edge from A to B. If B connects to C, draw another. That tiny diagram already allows useful questions: can we reach C from A? How many stops must we travel? Is a direct route possible?
Graph theory is not the same as plotting y=f(x) on axes. A network graph represents relationships; a function graph represents numerical coordinate pairs. Keeping these meanings separate prevents confusion.
Vertices and Edges Must Be Defined Clearly
The usefulness of any network model depends on what its elements represent. In a transport graph, vertices might be stations and edges might be direct services. In a classroom collaboration graph, vertices might be students and edges might represent confirmed project partnerships. In an internet graph, vertices and edges could represent routers and communication links.
Before calculating, students should ask: What counts as a node? What counts as a connection? Are connections allowed in both directions? Can there be repeated edges? Are there special restrictions? Getting the model right comes before doing the mathematics.
Undirected Graphs Versus Directed Graphs
An undirected graph has edges without orientation. An edge AB represents a two-way relationship. A directed graph, or digraph, has arcs with a specified direction. A→B does not automatically mean B→A.
A two-way pedestrian passage can be represented by an undirected edge; a one-way road requires direction. This small choice can completely change reachability.
Weighted Graphs Give Connections a Cost
An edge can carry a weight, such as length, time, fare or difficulty. A shortest path means the least total weight under the chosen measure. The route with the fewest edges is not always the cheapest or fastest.
For example, one direct connection might take 18 minutes, while a two-edge route takes 6+7=13 minutes. The latter has more edges but lower total travel time.
For an applied discussion, read How MRT Routes and Transfers Are Optimised Using Mathematics.
Degree Counts How Many Edges Meet a Vertex
In an undirected graph, the degree of a vertex counts the number of incident edge ends. A self-loop contributes two to the degree. If a station has direct connections to four other stations in a simple network, its degree is 4.
Directed graphs require a distinction: in-degree counts arriving arcs and out-degree counts departing arcs. A node may have high in-degree but low out-degree, or the reverse.
The Handshaking Lemma Gives a Fast Network Check
In an undirected graph, every edge contributes two ends to the total degree count. Therefore:
Sum of all vertex degrees = 2 × number of edges.
This means the sum of degrees must be even. It also implies that the number of vertices of odd degree is even.
Worked Example: Count Edges From Degrees
Suppose a network has four vertices with degrees 2, 3, 2 and 1.
Total degree = 2+3+2+1 = 8. By the handshaking lemma, number of edges = 8÷2 = 4.
The two odd-degree vertices also satisfy the even-odd rule. This is a useful way to audit a student’s drawing.
Walks, Trails, Paths and Cycles Are Different
A walk follows a sequence of adjacent edges and may repeat vertices or edges. A trail does not repeat an edge. A simple path does not repeat vertices. A cycle is a closed route with no repeated vertices apart from its starting and ending vertex, under the usual simple-graph convention.
These distinctions matter because a question about whether two nodes are connected is different from a question about visiting every edge exactly once.
Connected Graphs and Reachability
An undirected graph is connected if a path exists between every pair of vertices. If there are isolated groups, the graph has multiple connected components.
For directed networks, we distinguish stronger and weaker notions of connectivity because travelling from A to B may not imply travelling from B to A.
A Tree Is Connected and Has No Cycles
A tree is an undirected connected graph without cycles. It has several elegant properties: between any two vertices there is exactly one simple path, and a tree with n vertices has n−1 edges.
Removing any edge disconnects a tree. Adding an edge between two already connected vertices creates a cycle. These are useful reasoning checks.
Spanning Trees Connect All Vertices Without Unnecessary Cycles
A spanning tree includes every vertex of a connected graph but only enough edges to keep everything connected. If the original graph has weighted edges, we can ask for a minimum spanning tree whose total weight is as small as possible.
Worked Example: Cheapest Three-Station Connection
Three locations A, B and C have possible connection costs:
- A–B: 2 units;
- B–C: 3 units;
- A–C: 8 units.
Choosing A–B and B–C connects all locations for 2+3=5 units. Choosing A–B and A–C costs 10; choosing B–C and A–C costs 11. The minimum spanning tree therefore costs 5.
Notice that a minimum spanning tree solves a network construction problem, not necessarily the same problem as finding the shortest route between two particular stations.
Shortest Paths Ask a Different Question
A shortest-path problem asks for the path of minimum total weight between specified vertices. The answer depends on the particular start, destination and edge weights.
In an unweighted graph, breadth-first search can find shortest paths by edge count. With non-negative weights, Dijkstra’s algorithm is a standard approach. Negative edge weights require additional care and may require a different method.
Worked Example: Choose a Shortest Route
Suppose A–B costs 4, B–D costs 3, A–C costs 2, C–D costs 6 and A–D costs 10.
Possible routes include:
- A→D: 10;
- A→B→D: 4+3=7;
- A→C→D: 2+6=8.
The shortest is A→B→D, with total cost 7. The correct explanation compares valid route weights, not merely the number of stops.
Euler Trails and Hamilton Paths Are Not the Same
An Euler trail visits every edge exactly once. A Hamilton path visits every vertex exactly once. Their goals are different: one is about edges, the other about vertices.
For a connected undirected graph, an Euler circuit exists when every vertex has even degree. An Euler trail without a closed circuit exists when exactly two vertices have odd degree. Hamilton-path questions generally require different reasoning and do not have an equally simple degree rule.
Adjacency Matrices Turn Networks Into Algebra
An adjacency matrix records which vertex pairs have edges between them. For a simple undirected graph, the matrix is symmetric, with a 1 when two different vertices are adjacent and 0 otherwise.
For example, if A connects to B and B to C but A does not connect directly to C, the adjacency matrix in order A, B, C is:
[[0,1,0],[1,0,1],[0,1,0]].
Powers of an adjacency matrix count walks of corresponding lengths between vertices under the standard unweighted interpretation. This connects graph theory directly to Matrices.
Networks Appear Everywhere
Graph theory helps organise roads, railway systems, electrical circuits, internet routing, collaboration networks, delivery logistics and dependency chains. But mathematical modelling begins with deciding which features of reality can safely be represented as nodes, edges and weights.
For an applied discussion, read Graph Theory, Networks and Internet Routing and How MRT Routes and Transfers Are Optimised Using Mathematics.
Common Graph Theory Mistakes
- Confusing mathematical networks with x–y function graphs.
- Ignoring direction on one-way edges.
- Confusing shortest path with minimum spanning tree.
- Using the number of edges when the problem asks for minimum travel time.
- Calling a graph a tree despite the presence of a cycle.
- Mixing up Euler trails and Hamilton paths.
- Using shortest-path algorithms without checking assumptions about weights.
Three Learning Pathways
Repair: Basic Network Language
Start with four to six vertices. Identify edges, directions and degrees. Draw the same small graph in two different layouts to learn that position on the page does not change connectivity.
Stabilise: Paths, Weights and Trees
Calculate degree sums, explain a path or cycle, and compare shortest paths with minimum spanning trees. Ask the student to justify the choice before calculating the total.
Extend: Algorithms and Matrix Models
Introduce breadth-first search, Dijkstra’s algorithm, Euler trails, adjacency matrices, and the relationship between matrix powers and walks in a network.
A Weekly Graph Theory Routine
- Define vertices and edges in one real-world example.
- Draw a small directed and undirected graph.
- Use the handshaking lemma to audit degrees.
- Identify a path, cycle and spanning tree.
- Find one shortest weighted route.
- Explain a network-modelling assumption that could fail.
Parent and Student Progress Checklist
- I can explain vertices and edges.
- I can distinguish directed and undirected graphs.
- I know what an edge weight means.
- I can calculate and check degrees.
- I distinguish walks, paths and cycles.
- I know when a graph is connected.
- I understand trees and spanning trees.
- I can find a shortest route in a small weighted graph.
- I distinguish Euler from Hamilton questions.
- I can interpret a simple adjacency matrix.
Frequently Asked Questions
What is graph theory in simple terms?
Graph theory is the mathematics of objects and their connections. Objects are vertices, and connections are edges.
What is the difference between a tree and a graph?
A tree is a special kind of graph: it is connected and contains no cycles.
Is the shortest path always the route with the fewest stops?
Only when each edge has the same cost. In a weighted network, the shortest path minimises total weight, such as time or distance.
Why does graph theory matter for computing?
Many computational systems are networks, including communication links, dependencies, search results and routes. Graph algorithms help analyse their structure and find workable solutions.
Helpful Reading in the eduKateSG Ecosystem
- Graph Theory, Networks and Internet Routing
- How MRT Routes and Transfers Are Optimised
- The Core Aim of Mathematics Mastery | Matrices
- Permutations and Combinations
- Mathematics Learning Hub
The Core Aim
The core aim of graph theory mastery is not to make students draw more dots and lines. It is to make connection structure understandable.
A strong learner can construct a graph that matches a real question, choose the correct network concept, reason about possible routes and verify a result. That is what graph theory adds to mathematics mastery: a reliable language for understanding networks and relationships.
