Interactive graph theory explainer — from basic concepts to types and terminology

What is a graph? — Click nodes to explore
Vertices (V)
5
nodes / points
Edges (E)
6
connections
Selected node
degree shown below
Degree
edges at this node
Click any node to see its degree (number of edges connected to it).

Types of graphs — click to switch

Key terminology
Vertex / Node
A point in the graph. Represents an entity — a city, a person, a computer.
Edge / Arc
A connection between two vertices. Can be undirected (—) or directed (→).
Degree
Number of edges at a vertex. In digraphs: in-degree (arrows in) + out-degree (arrows out).
Path
A sequence of vertices where each consecutive pair is connected by an edge.
Cycle
A path that starts and ends at the same vertex, visiting each node once.
Adjacent
Two vertices are adjacent if they are directly connected by an edge.
Connected
A graph is connected if there is a path between every pair of vertices.
Weight
A numerical value assigned to an edge — distance, cost, time, capacity.

Real-world applications
Social networks
People = nodes. Friendships = edges. Find communities, shortest connection paths.
Road maps / GPS
Cities = nodes. Roads = weighted edges. Dijkstra finds the shortest path.
Internet routing
Routers = nodes. Links = edges. Data packets travel optimal routes.
Circuit design
Components = nodes. Wires = edges. Planarity and connectivity matter.