Graph Theory: The Math of What's Connected to What
If you have ever used a package manager, followed a social network, or traced a network request through a series of services, you have used graph theory. The difference is that the computer knew it was using graph theory, and you did not.
This guide fixes that. We are not going to prove theorems about planar embeddings. We are going to start from something you already understand - a group chat where everyone is connected to everyone else - and build up to the algorithms that find the shortest route, detect cycles, and rank the most important nodes. By the end, a graph will look like a map you already know how to read.
This is the eighth guide in the Mathematics track. It assumes the set idea from Sets, Relations, and Functions and the counting basics from Counting & Combinatorics. If you can follow a family tree or a subway map, you are ready.
How to read this
- Here for the "what problem does this solve" answer? Start with Phase 1 - graphs as real relationships.
- Want the full toolkit? Read in order - paths and trees build on the basic graph, and the applications build on both.
The phases
- Nodes, Edges, and the Graphs You Already Use - what a graph is, directed vs undirected, weighted edges, and the code that represents a dependency tree.
- Finding the Shortest Path and Detecting Cycles - BFS and DFS, shortest path with Dijkstra, minimum spanning tree, and why circular dependencies are a graph problem.
- Graphs That Run the World - PageRank again (now with the graph lens), network routing, recommendation engines, and the builder's guide to seeing graphs everywhere.
This builds on Sets, Relations, and Functions (relations are graphs) and Counting & Combinatorics (dimensions as choices). It is the discrete structure behind most modern systems.