DirectedGraphQ
Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Test whether a graph is directed:

https://wolfram.com/xid/0b0k512h90z-cx5ig0


https://wolfram.com/xid/0b0k512h90z-fbowek

DirectedGraphQ gives False for inputs that are not directed graphs:

https://wolfram.com/xid/0b0k512h90z-blilb2


https://wolfram.com/xid/0b0k512h90z-i269gu

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

https://wolfram.com/xid/0b0k512h90z-fffujv


https://wolfram.com/xid/0b0k512h90z-gx301e


https://wolfram.com/xid/0b0k512h90z-uvnf7h


https://wolfram.com/xid/0b0k512h90z-5geyu

DirectedGraphQ gives False for anything that is not a directed graph:

https://wolfram.com/xid/0b0k512h90z-3l2bwe


https://wolfram.com/xid/0b0k512h90z-i52fbz

DirectedGraphQ works with large graphs:

https://wolfram.com/xid/0b0k512h90z-puo1px

https://wolfram.com/xid/0b0k512h90z-l0u0o

Properties & Relations (3)Properties of the function, and connections to other functions
A directed graph can have self-loops:

https://wolfram.com/xid/0b0k512h90z-c23ea


https://wolfram.com/xid/0b0k512h90z-fwmduq

A nonsymmetric adjacency matrix corresponds to a directed graph:

https://wolfram.com/xid/0b0k512h90z-bhrtvw


https://wolfram.com/xid/0b0k512h90z-ebo5iw


https://wolfram.com/xid/0b0k512h90z-b937kg

The incidence matrix of a directed graph has at least one entry that is -1:

https://wolfram.com/xid/0b0k512h90z-d0mxjw


https://wolfram.com/xid/0b0k512h90z-e45b43


https://wolfram.com/xid/0b0k512h90z-c9l902

Possible Issues (1)Common pitfalls and unexpected behavior
DirectedGraphQ gives False for non-explicit graphs:

https://wolfram.com/xid/0b0k512h90z-iu6w07

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