In mathematics and computer science, graph theory is the study of graph (mathematics)|graphs, which are mathematical structures used to model pairwise relations between objects from a certain collection. A graph in this context is a collection of vertex (graph theory)|vertices or nodes and a collection of edges that connect pairs of vertices. A graph may be undirected, meaning that there is no distinction between the two vertices associated with each edge, or its edges may be directed from one vertex to another; see graph (mathematics) for more detailed definitions and for other variations in the types of graph that are commonly considered. Graphs are one of the prime objects of study in discrete mathematics.
The graphs studied in graph theory should not be confused with the graph of a function|graphs of functions or other kinds of graphs.
Refer to the glossary of graph theory for basic definitions in graph theory.