Graph theory, without the intimidation.
You do not need advanced calculus to start graph theory. Begin with dots, lines, and questions about how things are connected.
1. Why do computer scientists care?
Think of a social network. Each person is a vertex; a friendship is an edge. Or think of the internet: pages are vertices and links are edges. Roads between cities, computers on a network, and dependencies between software packages can all be described with graphs.
Graph theory gives us a compact language for asking questions such as: Can I get from A to B? Which person has the most direct connections? Are there separate groups? What happens if a connection breaks?
2. Six words worth knowing
One item in your network. We often label vertices 1, 2, 3, and so on.
A connection between two vertices. In a simple undirected graph, an edge from A to B is the same as an edge from B to A.
The number of edges touching a vertex. If vertex 2 connects to vertices 1, 3, and 4, its degree is 3.
A sequence of edges that lets you travel from one vertex to another.
A graph is connected if every vertex can reach every other vertex along some path.
A path that returns to where it started without repeating the intermediate vertices.
3. A small counting trick
In an undirected graph, every edge touches two endpoints. So when we add up all vertex degrees, each edge gets counted twice.
For example, if a graph has 5 edges, the sum of all degrees must be 10. This is called the handshake lemma: every edge represents a handshake between two endpoints.
4. What does “density” mean?
With n vertices, a simple undirected graph can have at most n(n−1)/2 edges—one for every possible pair of distinct vertices. Density tells us what fraction of those possible edges actually exist.
A density near 0 means a sparse network. A density near 1 means almost every pair is connected. This helps compare networks of different sizes.
5. Try the interactive 3D playground
Open Graph Universe and test these small challenges. The graph rotates in 3D, but the mathematics is still the same: vertices and edges.
- Choose One popular hub. Which vertex has the largest degree?
- Choose A ring. Can you find two different paths between a pair of vertices?
- Add a dot. How do the vertex count and average degree change?
- Connect two dots. How many edges are there now?
- Drag a dot and rotate the scene. Notice that moving a vertex on screen does not change which vertices are connected.
Important distinction: moving a dot changes the drawing; adding or removing an edge changes the graph itself. A graph is about the connections, not the exact positions of the dots.
6. What to learn next
Once vertices, edges, degree, and paths feel familiar, explore breadth-first search (BFS), shortest paths, trees, bipartite graphs, and adjacency lists. These topics connect graph theory directly to algorithms and data structures in computer science.
Written as an introductory learning note. The playground is an educational model, not a full mathematical graph editor.