EmptyGraphQ[g]
EmptyGraphQ
EmptyGraphQ[g]
Examples
open all close allBasic Examples (2)
Scope (6)
EmptyGraphQ works with undirected graphs:
EmptyGraphQ[[image]]EmptyGraphQ[[image]]EmptyGraphQ[[image]]EmptyGraphQ[[image]]EmptyGraphQ gives False for expressions that are not edgeless graphs:
EmptyGraphQ[x]EmptyGraphQ[Graph[garbage]]EmptyGraphQ works with large graphs:
GridGraph[{10, 10, 10, 10}];EmptyGraphQ[%]//TimingProperties & Relations (8)
The number of edges of an empty graph is zero:
{EmptyGraphQ[[image]], EdgeCount[[image]]}The vertex degree for an empty graph is all zeros:
{EmptyGraphQ[[image]], VertexDegree[[image]]}The null graph is empty, has zero edges and vertices and has no vertex degrees:
Through[{EmptyGraphQ, VertexCount, EdgeCount, VertexDegree}[Graph[{}]]]The empty graphs are undirected graphs:
{UndirectedGraphQ[[image]], DirectedGraphQ[[image]]}The complement of a complete graph is an empty graph:
EmptyGraphQ[GraphComplement[[image]]]The intersection of two graphs with different names is an empty graph:
EmptyGraphQ[GraphIntersection[[image], [image]]]The intersection of any graph and its complement is an empty graph:
g = [image];EmptyGraphQ[GraphIntersection[g, GraphComplement[g]]]The adjacency matrix for an empty graph has all zero entries:
AdjacencyMatrix[[image]]//MatrixFormSee Also
Related Guides
History
Text
Wolfram Research (2010), EmptyGraphQ, Wolfram Language function, https://reference.wolfram.com/language/ref/EmptyGraphQ.html.
CMS
Wolfram Language. 2010. "EmptyGraphQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/EmptyGraphQ.html.
APA
Wolfram Language. (2010). EmptyGraphQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/EmptyGraphQ.html
BibTeX
@misc{reference.wolfram_2026_emptygraphq, author="Wolfram Research", title="{EmptyGraphQ}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/EmptyGraphQ.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_emptygraphq, organization={Wolfram Research}, title={EmptyGraphQ}, year={2010}, url={https://reference.wolfram.com/language/ref/EmptyGraphQ.html}, note=[Accessed: 13-June-2026]}