MathematicsDiscrete MathematicsMedium

Edge (graph theory)

Also known as:ArcLinkLineBond

In graph theory, an edge is a connection between two vertices (nodes) representing a relationship or link between them. Edges may be directed (pointing from one vertex to another, called arcs) or undirected (bidirectional), and weighted (carrying a numerical value such as distance or cost) or unweighted. The set of all edges in a graph, together with the set of vertices, fully defines the graph's structure.

Key Formula

Maximum number of edges in a simple undirected graph with n vertices = n(n-1)/2

LaTeX: |E| \leq \frac{n(n-1)}{2}

SymbolMeaningUnit
|E|Number of edges in the graphnone
nNumber of vertices in the graphnone

Worked Example

Problem

A complete graph K₅ has 5 vertices. How many edges does it contain? Then verify using the Handshaking Lemma.

Solution

Step 1: Use the formula for a complete graph: |E| = n(n-1)/2 = 5 × 4 / 2 = 10 edges. Step 2: In K₅, every vertex has degree n-1 = 4 (connected to all other 4 vertices). Step 3: Sum of all degrees = 5 vertices × 4 = 20. Step 4: Handshaking Lemma: sum of degrees = 2|E|, so 2|E| = 20, giving |E| = 10. ✓

Answer

K₅ contains 10 edges. Verified by Handshaking Lemma: sum of degrees (20) = 2 × 10.

Types of Edges in Graph Theory

Edge TypeSymbolDirectionWeightExample
Undirected edge{u, v}Both waysNoMutual friendship on Facebook
Directed edge (arc)(u, v)u → v onlyNoTwitter follow (one-way)
Weighted undirected{u, v, w}Both waysYes (w)Road distance between cities
Weighted directed(u, v, w)u → v onlyYes (w)One-way flight with fare
Self-loop(v, v)SelfOptionalWeb page linking to itself

Interactive Tools

GeoGebra — Graph Builder

Open Tool

Brilliant — Edges and Graphs

Open Tool

Wolfram MathWorld — Graph Edge

Open Tool
Simple undirected graph showing edges connecting vertices

Wikimedia Commons, CC BY-SA

Related Terms

The term "edge" in mathematics comes from the Old English ecg, meaning "corner" or "boundary," related to Old High German ecka. In graph theory, the term was popularised by Sylvester (1878) and König (1936) to describe the line segments connecting vertices in a diagram of a graph.

graph-theoryconnectionsweighted-graphsdirected-graphsdiscrete-math