Technology Fundamentals

Graph

Definition

A graph is an abstract data type that is meant to implement the undirected graph and directed graph concepts from the field of graph theory. A graph data structure consists of a finite (and possibly mutable) set of vertices (also called nodes or points), together with a set of unordered pairs of these vertices for an undirected graph or a set of ordered pairs for a directed graph.

Why It Matters

Graphs are used to model networks and relationships. They are essential for applications like social networks (modeling "friend" connections), mapping and navigation (modeling roads and intersections), and web page ranking.

Contextual Example

On Facebook, you and your friends form a graph. Each person is a vertex (node), and the "friendship" connection between two people is an edge.

Common Misunderstandings

  • A tree is a special, more restricted type of graph that has no cycles.
  • Finding the shortest path between two nodes in a graph is a classic computer science problem, solved by algorithms like Dijkstra's algorithm.

Related Terms

Last Updated: December 17, 2025