An edge in graph theory and computer science in general, is a pair of vertices. It logically and visually connects vertices to form a graph or tree.

Definition

Formally, an edge is defined as:

a pair of two vertices .

Properties

The vertices that form an edge are not necessarily commutative, meaning that:

This is particularly important for directed graphs.