The complement of a graph records the missing edges of the graph. It keeps the same vertices, removes the existing edges, and adds exactly those edges that were absent before.
Complementation is defined most naturally for simple graphs. If loops and multiple edges are allowed, extra conventions are needed. In this chapter, all graphs are finite simple undirected graphs unless stated otherwise.
13.1 Definition
Let
be a simple graph. The complement of , written
is the graph with the same vertex set as , where two distinct vertices are adjacent in exactly when they are not adjacent in . This is the standard definition of graph complementation.
Thus
For distinct vertices ,
if and only if
Equivalently, the edge set of is
The complement exchanges adjacency and non-adjacency.
13.2 Complement Relative to a Complete Graph
For a simple graph on vertices, the complete graph contains every possible edge.
The complement of is obtained from by removing the edges of :
This formula is often the cleanest way to think about complements.
The graph and its complement together fill the complete graph:
and
Thus and split all possible edges between the same vertex set.
13.3 Number of Edges
A simple graph on vertices can have at most
edges.
If has edges, then its complement has
edges. This follows because every possible edge belongs to exactly one of or .
For example, if has vertices and edges, then
Complementation turns sparse graphs into dense graphs and dense graphs into sparse graphs.
13.4 Degree in the Complement
Let be a simple graph of order . For any vertex ,
There are possible neighbors of . Each one is either adjacent to in or adjacent to in , but not both.
Thus the degree sequence of the complement can be computed directly from the degree sequence of .
If has degree sequence
then has degrees
then sorted if one wants the usual nonincreasing degree sequence.
13.5 Examples
If is the empty graph on vertices, then no pair of distinct vertices is adjacent in . Therefore every pair is adjacent in . Hence
If , then every possible edge is already present. Therefore no edge remains for the complement, so
is the empty graph on vertices. These two examples are standard consequences of the definition.
For a path with vertices
and edges
the possible edges in are
Removing the path edges leaves
Thus is also a path on four vertices, with vertex order
13.6 Complement of a Cycle
Let be the cycle graph on vertices.
Each vertex in has degree . Therefore each vertex in the complement has degree
So
is -regular.
For example, is a cycle on five vertices. Its complement is also a cycle on five vertices:
This is one of the simplest examples of a self-complementary graph.
13.7 Complement and Isomorphism
Complementation respects graph isomorphism.
If
then
Proof
Let
be an isomorphism. Then for distinct vertices ,
if and only if
Taking negations gives
if and only if
Therefore
if and only if
So the same bijection is an isomorphism from to .
13.8 Double Complement
The complement of the complement is the original graph:
This follows directly from the definition. A pair of distinct vertices is adjacent in exactly when it is not adjacent in , which means it is adjacent in .
Thus complementation is an involution: applying it twice returns to the starting graph.
13.9 Complement and Induced Subgraphs
Complementation commutes with taking induced subgraphs.
If
then
On the left, one first takes the subgraph induced by , then complements it. On the right, one first complements , then takes the induced subgraph on .
Both graphs have vertex set . Two distinct vertices in are adjacent in either graph exactly when they are not adjacent in . This relationship is a standard property of graph complements.
This property is useful in clique theory, independent sets, and hereditary graph classes.
13.10 Cliques and Independent Sets
A clique in is a set of vertices that are pairwise adjacent.
An independent set in is a set of vertices that are pairwise non-adjacent.
Complementation exchanges these two notions.
A set is a clique in if and only if is an independent set in .
Similarly, is an independent set in if and only if is a clique in . This clique-independent-set duality is a basic application of graph complementation.
Thus questions about cliques can often be translated into questions about independent sets in the complement.
13.11 Chromatic Number and Clique Cover
The chromatic number of a graph , written
is the minimum number of colors needed to color the vertices so that adjacent vertices receive different colors.
A proper coloring of partitions into independent sets.
Since independent sets in are cliques in , a coloring of corresponds to a partition of into cliques.
Thus the chromatic number of can be interpreted as the minimum number of cliques needed to cover the vertices of .
This is another example of complement duality: coloring problems become clique-cover problems.
13.12 Connectivity and Complements
Connectivity behaves differently under complementation.
A disconnected graph may have a connected complement. In fact, if is disconnected and has at least two components, then is connected.
Proof
Let and be distinct vertices.
If and lie in different components of , then they are not adjacent in , so they are adjacent in .
If and lie in the same component of , choose a vertex in a different component. Then is adjacent to in , and is adjacent to in . Therefore there is a path
in .
Hence any two vertices are connected in .
The converse is false. A connected graph may also have a connected complement. For example, and are both connected.
13.13 Complement and Adjacency Matrices
Let be a simple graph of order , and let be its adjacency matrix.
Let be the all-ones matrix, and let be the identity matrix.
The adjacency matrix of the complement is
The matrix is the adjacency matrix of . It has in every off-diagonal position and on the diagonal. Subtracting removes precisely the edges already present in . This matrix formula is a standard expression of graph complementation.
This formula connects graph complementation with algebraic graph theory.
13.14 Self-Complementary Graphs
A graph is self-complementary if it is isomorphic to its complement:
This does not usually mean that
with the same labels. It means the two graphs have the same structure after relabeling.
Examples include and .
If is self-complementary with vertices and edges, then
Therefore
and
Hence
must be divisible by . This implies
or
So a self-complementary graph can have order only congruent to or modulo .
13.15 Complements of Special Graphs
Several complements are immediate from the definition.
| Graph | Complement |
|---|---|
| Empty graph on vertices | |
| Empty graph on vertices | |
| Isomorphic to | |
| Isomorphic to | |
| -regular graph | |
| Complete bipartite graph | Disjoint union |
For the last row, has all edges between the two parts and no edges inside either part. Its complement has no edges between the parts, but it has all edges inside each part. Therefore
13.16 Complement and Density
The density of a simple graph on vertices is often measured by
If has density , then has density
Thus complementing a graph exchanges dense and sparse structure.
This can be useful in proofs. If a graph has many missing edges, its complement has many edges. Sometimes it is easier to reason about the complement than about the original graph.
13.17 Algorithmic Considerations
Explicitly constructing a complement may be expensive.
If is sparse, then may be dense. A graph with vertices and only edges may have a complement with
edges.
Therefore algorithms sometimes work with complements implicitly rather than materializing every missing edge. This distinction matters for large graphs because the complement can require much more memory than the original graph. Algorithmic work on complement graphs often studies traversal and connectivity without explicitly constructing the dense complement.
13.18 Example
Let
and
The complete graph on this vertex set has
edges.
The possible edges are
Removing the four edges of , we get
Thus is the complete bipartite graph
with parts
and
This example shows how a graph made from a triangle and an edge can have a highly connected complement across the two parts.
13.19 Summary
The complement of a simple graph keeps the same vertex set and replaces edges by non-edges. If has vertices and edges, then
For each vertex,
Complementation is an involution:
It exchanges cliques and independent sets, turns complete graphs into empty graphs, and often changes sparse graphs into dense graphs. Complement graphs are useful because they let one restate adjacency problems as non-adjacency problems and translate several graph properties into dual forms.