Essential cookies keep your basket and sign-in working. Optional cookies help us understand visits and measure ads. Privacy details.
Non-linear data structure consisting of vertices (nodes) connected by edges.
AI-assisted explanation. It may contain errors; use a textbook or original source to check important details.
A graph is a way to describe “things and the connections between them.” The things are called vertices (or nodes), and the connections are called edges. What makes graphs powerful is that they ignore unnecessary details (like exact physical distance or shape) and focus on the relationship pattern: who is connected to whom. Think of a city map: intersections are vertices, roads are edges. Or a social network: people are vertices, friendships are edges. Once you model a situation as a graph, you can ask beautifully practical questions: Is there a route between A and B? What’s the shortest route? Which node is most “central”? Are there groups (communities) that cluster together? Graphs can be directed (an edge has a direction, like “follows” on social media), undirected (mutual friendship), weighted (edges have costs like distance/time), or unweighted. In short: a graph is a universal language for connectivity.
Graph theory is often dated to a single charming puzzle that revealed a deep new mathematical idea: the Seven Bridges of Königsberg problem in 1736. The city of Königsberg (now Kaliningrad) had a river and two islands connected by seven bridges. Citizens wondered: can you walk through the city crossing each bridge exactly once? Leonhard Euler realized the crucial move was to stop thinking about the exact geography and instead keep only the structure of connections. He collapsed each landmass into a vertex and each bridge into an edge—creating what we now recognize as a graph. With that abstraction, Euler proved it was impossible to traverse each bridge exactly once. This was a breakthrough moment: it showed that some problems are about structure, not measurement, and it effectively launched graph theory and topology-flavored thinking. Over the 19th and 20th centuries, graphs became central to chemistry (molecular structures), electrical networks, operations research, and eventually computer science—where graphs underpin routing, web search, and modern network analysis.
Pioneered by: Leonhard Euler (1736) is widely credited with founding graph theory via the Seven Bridges of Königsberg analysis.