UndirectedGraph
✖
UndirectedGraph
Details and Options

- The undirected edge uv is an edge in the resulting undirected graph if either of the directed edges uv or vu is an edge of g.
- UndirectedGraph works with directed graphs, multigraphs, and mixed graphs.

Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Scope (7)Survey of the scope of standard use cases
The input is unchanged for undirected graphs:

https://wolfram.com/xid/0btoq6uup5x2-ll3qid

UndirectedGraph works with directed graphs:

https://wolfram.com/xid/0btoq6uup5x2-edm5o


https://wolfram.com/xid/0btoq6uup5x2-2v2f3n


https://wolfram.com/xid/0btoq6uup5x2-rlhrjj

Use rules to specify the graph:

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

Directed edges with different directions convert to one undirected edge:

https://wolfram.com/xid/0btoq6uup5x2-vi85h

UndirectedGraph works with large graphs:

https://wolfram.com/xid/0btoq6uup5x2-n9fcxi

https://wolfram.com/xid/0btoq6uup5x2-nf5nx4


https://wolfram.com/xid/0btoq6uup5x2-gn2bvu


https://wolfram.com/xid/0btoq6uup5x2-h2w1yd

Properties & Relations (4)Properties of the function, and connections to other functions
An undirected graph can be constructed by a list of UndirectedEdge objects:

https://wolfram.com/xid/0btoq6uup5x2-li4snf


https://wolfram.com/xid/0btoq6uup5x2-dvvh45

A graph is either undirected or directed:

https://wolfram.com/xid/0btoq6uup5x2-ouppi

https://wolfram.com/xid/0btoq6uup5x2-o98wrl


https://wolfram.com/xid/0btoq6uup5x2-ezaznq

A symmetric adjacency matrix is interpreted to be an undirected graph:

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


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


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

Use DirectedEdges->True to interpret it as a directed graph:

https://wolfram.com/xid/0btoq6uup5x2-dbmka8

The incidence matrix of an undirected graph has no negative entries:

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


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


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

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