Graphs in Discrete Math: Definition & Examples

Zachary Aug 05, 2026

In the expansive realm of discrete mathematics, the concept of a graph often serves as a versatile tool for modeling relationships and structures. It's a fundamental concept that finds wide-ranging applications, from computer science to social networks. But what exactly is a graph in the context of discrete mathematics?

Displacement-Time Graph | Physics Motion Graph Study Notes
Displacement-Time Graph | Physics Motion Graph Study Notes

A graph, in this context, is a collection of vertices (or nodes) connected by edges (or lines). It's an abstract representation that can depict relationships, flows, trees, hierarchies, and more. Let's delve into this concept with some key aspects and examples to illustrate.

Discrete/continuous graphs Classroom Data Visualization Ideas, Discrete And Continuous Data Chart, Educational Data Types Chart, Math Classroom Poster, Teaching Math Concepts, Domain And Range Of Continuous Graphs, Discrete And Continuous Math, Discrete Vs Continuous Data Anchor Chart, Bivariate Data Anchor Charts
Discrete/continuous graphs Classroom Data Visualization Ideas, Discrete And Continuous Data Chart, Educational Data Types Chart, Math Classroom Poster, Teaching Math Concepts, Domain And Range Of Continuous Graphs, Discrete And Continuous Math, Discrete Vs Continuous Data Anchor Chart, Bivariate Data Anchor Charts

Understanding Graphs

In simple terms, a graph consists of vertices and edges. Vertices, or nodes, are the individual points that make up a graph. Edges, on the other hand, are the lines connecting these vertices.

the types of graphs that you can use to help students understand what they are doing
the types of graphs that you can use to help students understand what they are doing

Graphs can be directed or undirected. In an undirected graph, edges don't have a direction, implying a mutual relationship between connected vertices. In a directed graph (or digraph), edges have a specific start and end point, representing a one-way connection.

Undirected Graphs

Distance-Time Graph | Physics Motion Graph Study Notes
Distance-Time Graph | Physics Motion Graph Study Notes

Undirected graphs are symmetric, meaning if vertex A is connected to vertex B, then B is also connected to A. An example is a social network where two people are considered connected if they know each other.

For instance, consider a group of people: Alice, Bob, Charlie, and Dave. If we represent this network as a graph, with each person as a vertex and lines connecting those who know each other:

  • Alice - Bob
  • Alice - Charlie
  • Bob - Dave
the different types of graphs are shown in this diagram, and there is also an info sheet
the different types of graphs are shown in this diagram, and there is also an info sheet

The resulting undirected graph would have four vertices and three edges, accurately representing the mutual connections.

Directed Graphs

Directed graphs, or digraphs, capture asymmetric relationships, like following-on social media platforms. Here, if User A follows User B, it doesn't necessarily mean B follows A back.

a poster with some diagrams on it that include graphs, graphs and other things to describe
a poster with some diagrams on it that include graphs, graphs and other things to describe

In a directed graph, the edge Alice -> Bob indicates that Alice follows Bob. Using the same group of friends:

  • Alice -> Bob
  • Alice -> Charlie
  • Bob -> Dave
  • Dave -> Charlie
When and Why for Graph Types
When and Why for Graph Types
an image of different graphs and functions on a computer screen, with the corresponding symbols in blue
an image of different graphs and functions on a computer screen, with the corresponding symbols in blue
Complete Computer Science & Cybersecurity Infographics Bundle
Complete Computer Science & Cybersecurity Infographics Bundle
Master Graphs Fast – Pie, Bar, and Line Graph with Clear Examples
Master Graphs Fast – Pie, Bar, and Line Graph with Clear Examples
an image of graphs and functions in the form of lines with different slope intercepts
an image of graphs and functions in the form of lines with different slope intercepts
Sine & Cosine Graphs Made Easy 🌊 | Trigonometric Waves Explained
Sine & Cosine Graphs Made Easy 🌊 | Trigonometric Waves Explained
an image of graphs and functions for graphing the lines in slope intercept form, which are
an image of graphs and functions for graphing the lines in slope intercept form, which are
Features of Function Graphs
Features of Function Graphs
Common Graphs of Functions: 11 Essential Parent Functions
Common Graphs of Functions: 11 Essential Parent Functions
Graph of Linear Equation Made Easy 📈 | y = mx + c Explained
Graph of Linear Equation Made Easy 📈 | y = mx + c Explained

The resulting digraph illustrates the one-way following relationships.

Graph Representation

Graphs can be represented in multiple ways, depending on whether you're working with a computer, a whiteboard, or pen and paper. Here, we'll look at two common representations: adjacency matrices and adjacency lists.

Adjacency matrices are square matrices where rows and columns represent vertices, and the entry in the i-th row and j-th column indicates whether there's an edge from vertex i to vertex j.

A graph with vertices [A, B, C, D] and edges [AB, BC, CD] could be represented by the following adjacency matrix:

ABCD
A0100
B1010
C0101
D0010

Adjacency Lists

Adjacency lists, on the other hand, are more space-efficient for sparse graphs (graphs with few edges). They represent vertices as a list, where each vertex is connected to a list of its adjacent vertices.

The same graph could be represented with adjacency lists as:

  • A: [B]
  • B: [A, C]
  • C: [B, D]
  • D: [C]

In conclusion, understanding graphs is vital in discrete mathematics as it provides a universal language for modeling various problems and relationships. Whether you're a computer scientist, engineer, economist, or mathematician, mastering graphs is a core competency that opens doors to countless applications.