GraphComplement
✖
GraphComplement
Details and Options

- GraphComplement is also known as edge-complementary graph.
- The graph complement has the same vertices and edges defined by two vertices being adjacent only if they are not adjacent in g.
- GraphComplement works with undirected graphs, directed graphs, multigraphs, and mixed graphs.

Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Graph complement of cycle graphs:

https://wolfram.com/xid/0b8dvz1cr2-b1kkxi


https://wolfram.com/xid/0b8dvz1cr2-b3rg0e

Graph complement of directed graphs:

https://wolfram.com/xid/0b8dvz1cr2-e4hi6a


https://wolfram.com/xid/0b8dvz1cr2-clnng3

Scope (6)Survey of the scope of standard use cases
GraphComplement works with undirected graphs:

https://wolfram.com/xid/0b8dvz1cr2-n26fy


https://wolfram.com/xid/0b8dvz1cr2-i3p7rw


https://wolfram.com/xid/0b8dvz1cr2-djehuq


https://wolfram.com/xid/0b8dvz1cr2-czvddh

Use rules to specify the graph:

https://wolfram.com/xid/0b8dvz1cr2-bndh30

GraphComplement works with large graphs:

https://wolfram.com/xid/0b8dvz1cr2-ejnwgv

https://wolfram.com/xid/0b8dvz1cr2-wogg5a

Properties & Relations (7)Properties of the function, and connections to other functions
The complement of a CompleteGraph is an edgeless graph:

https://wolfram.com/xid/0b8dvz1cr2-s8par

The complement of the complement is the original graph (for simple graphs):

https://wolfram.com/xid/0b8dvz1cr2-dfpcpm

The complement of the graph can be obtained from its adjacency matrix:

https://wolfram.com/xid/0b8dvz1cr2-ck85j2

https://wolfram.com/xid/0b8dvz1cr2-ctd3le

https://wolfram.com/xid/0b8dvz1cr2-g3wjcf


https://wolfram.com/xid/0b8dvz1cr2-bnzbl2

An independent vertex set of the graph is a clique of its complement graph:

https://wolfram.com/xid/0b8dvz1cr2-k0rgt4


https://wolfram.com/xid/0b8dvz1cr2-ggrswc


https://wolfram.com/xid/0b8dvz1cr2-zo19z

The complement of the line graph of is a Petersen graph:

https://wolfram.com/xid/0b8dvz1cr2-g8s4u4


https://wolfram.com/xid/0b8dvz1cr2-k80ax

The graph union of any simple graph and its complement is a complete graph:

https://wolfram.com/xid/0b8dvz1cr2-hch6zr

https://wolfram.com/xid/0b8dvz1cr2-emajil

The graph intersection of any graph and its complement is an empty graph:

https://wolfram.com/xid/0b8dvz1cr2-b1mhiw

https://wolfram.com/xid/0b8dvz1cr2-b5yq85

Wolfram Research (2010), GraphComplement, Wolfram Language function, https://reference.wolfram.com/language/ref/GraphComplement.html (updated 2015).
Text
Wolfram Research (2010), GraphComplement, Wolfram Language function, https://reference.wolfram.com/language/ref/GraphComplement.html (updated 2015).
Wolfram Research (2010), GraphComplement, Wolfram Language function, https://reference.wolfram.com/language/ref/GraphComplement.html (updated 2015).
CMS
Wolfram Language. 2010. "GraphComplement." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/GraphComplement.html.
Wolfram Language. 2010. "GraphComplement." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/GraphComplement.html.
APA
Wolfram Language. (2010). GraphComplement. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GraphComplement.html
Wolfram Language. (2010). GraphComplement. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GraphComplement.html
BibTeX
@misc{reference.wolfram_2025_graphcomplement, author="Wolfram Research", title="{GraphComplement}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/GraphComplement.html}", note=[Accessed: 17-May-2025
]}
BibLaTeX
@online{reference.wolfram_2025_graphcomplement, organization={Wolfram Research}, title={GraphComplement}, year={2015}, url={https://reference.wolfram.com/language/ref/GraphComplement.html}, note=[Accessed: 17-May-2025
]}