yields True if the graph g is a directed graph and False otherwise.


  • A graph is directed if every edge in the graph is directed.


open allclose all

Basic Examples  (2)

Test whether a graph is directed:

DirectedGraphQ gives False for inputs that are not directed graphs:

Scope  (6)

DirectedGraphQ works with undirected graphs:

Directed graphs:


Mixed graphs:

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

DirectedGraphQ works with large graphs:

Properties & Relations  (3)

A directed graph can have self-loops:

A nonsymmetric adjacency matrix corresponds to a directed graph:

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

Possible Issues  (1)

DirectedGraphQ gives False for non-explicit graphs:

Introduced in 2010