Graph
A graph is a pair consisting of a set of vertices and a set of edges, where each edge connects two vertices. In an undirected graph, an edge is an unordered pair ; in a directed graph, an edge is an ordered pair .
Graphs formalize relations between discrete objects. A symmetric binary relation on a set corresponds exactly to an undirected graph; a general binary relation corresponds to a directed graph.
In category theory, a directed graph (or quiver) is a diagram in the category of sets โ a pair of functions assigning source and target to each edge. A category can be seen as a graph with composition and identities.