UndirectedEdge
✖
UndirectedEdge
Details

- UndirectedEdge is also known as link or connection.
- UndirectedEdge[u,v] can be input as uv. The character is entered as
ue
or \[UndirectedEdge].
- UndirectedEdge[u,v,t] can be input as u
v. An empty template
can entered as
tue
, and
moves the cursor to the overscript position.
Examples
open allclose allBasic Examples (5)Summary of the most common use cases
Build a graph with undirected edges:

https://wolfram.com/xid/0ywpsrfdca1w-gb1uwg


https://wolfram.com/xid/0ywpsrfdca1w-d1avng


https://wolfram.com/xid/0ywpsrfdca1w-dkpjt3


https://wolfram.com/xid/0ywpsrfdca1w-lr0czz

Enter using a two-way rule <->:

https://wolfram.com/xid/0ywpsrfdca1w-eyscbp

The two-way rules are converted to undirected edges:

https://wolfram.com/xid/0ywpsrfdca1w-balwtm

Style and label individual edges:

https://wolfram.com/xid/0ywpsrfdca1w-ergo02

StandardForm formatting:

https://wolfram.com/xid/0ywpsrfdca1w-hf39q7


https://wolfram.com/xid/0ywpsrfdca1w-l0q7xl

Scope (6)Survey of the scope of standard use cases
Use wrappers to specify edge properties, including style:

https://wolfram.com/xid/0ywpsrfdca1w-bbpjpo


https://wolfram.com/xid/0ywpsrfdca1w-g4vyjh


https://wolfram.com/xid/0ywpsrfdca1w-f448y

Wrappers can be used to specify any supported edge annotation:

https://wolfram.com/xid/0ywpsrfdca1w-cyxk2u


https://wolfram.com/xid/0ywpsrfdca1w-byy2yq


https://wolfram.com/xid/0ywpsrfdca1w-eabhy

Use UndirectedEdge to specify individual edges for options, including style:

https://wolfram.com/xid/0ywpsrfdca1w-e5mot


https://wolfram.com/xid/0ywpsrfdca1w-hnirp6

Use a list of edges to indicate which edges to highlight:

https://wolfram.com/xid/0ywpsrfdca1w-c3sz0j


https://wolfram.com/xid/0ywpsrfdca1w-bfnacd

Use edge patterns to select and count edges:

https://wolfram.com/xid/0ywpsrfdca1w-calvzy


https://wolfram.com/xid/0ywpsrfdca1w-cn2j4u


https://wolfram.com/xid/0ywpsrfdca1w-d96osv

Properties & Relations (3)Properties of the function, and connections to other functions
Use UndirectedEdge to construct undirected graphs:

https://wolfram.com/xid/0ywpsrfdca1w-cvm4t2


https://wolfram.com/xid/0ywpsrfdca1w-cnn4wi


https://wolfram.com/xid/0ywpsrfdca1w-b1r2oi

Inside graph constructors, TwoWayRule[a,b] is converted to UndirectedEdge[a,b]:

https://wolfram.com/xid/0ywpsrfdca1w-etyvlt


https://wolfram.com/xid/0ywpsrfdca1w-cql5gt

The adjacency matrix of an undirected graph is symmetric:

https://wolfram.com/xid/0ywpsrfdca1w-bd6rdz


https://wolfram.com/xid/0ywpsrfdca1w-b882g

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