DirectedEdge[u,v] or uv
represents a directed edge from u to v.
DirectedEdge[u,v,t] or u
v
represents a directed edge from u to v with tag t.
DirectedEdge 
DirectedEdge[u,v] or uv
represents a directed edge from u to v.
DirectedEdge[u,v,t] or u
v
represents a directed edge from u to v with tag t.
Details
- DirectedEdge is also known as arc or directed link.
- DirectedEdge[u,v] can be input as uv. The character is entered as
de
or \[DirectedEdge]. - DirectedEdge[u,v,t] can be input as u
v. An empty template
can entered as
tde
, and
moves the cursor to the overscript position.
Examples
open all close allBasic Examples (4)
Build a graph with directed edges:
Graph[{DirectedEdge[a, b], DirectedEdge[b, c], DirectedEdge[c, a]}]EdgeList[%]Graph[{ab, bc, ca}]EdgeList[%]Style and label individual edges:
Graph[{Style[ab, Red], Style[bc, Dashed], Labeled[ca, "hello"]}]StandardForm formatting:
DirectedEdge[a, b]DirectedEdge[a, b, t]Scope (5)
Use wrappers to specify edge properties, including style:
Graph[{Style[12, Red], 23, 31}]Graph[{Labeled[12, "Hello"], 23, 31}]Graph[{Button[Style[12, Red], Speak["Hello"]], 23, 31}]Graph[{Annotation[12, "foo" -> 17], 23, 31}]AnnotationValue[{%, 12}, "foo"]Use DirectedEdge to specify individual edges for options, including style:
Graph[{12, 23, 31}, EdgeStyle -> {12 -> Red}]Graph[{12, 23, 31}, EdgeLabels -> {12 -> "Hello"}]Use a list of edges to indicate which edges to highlight:
HighlightGraph[Graph[{12, 23, 31, 34}], {12, 23}]Subgraph[Graph[{12, 23, 31, 34}], 3_]Use edge patterns to select and count edges:
g = Graph[{12, 23, 31, 34}]EdgeList[g, 3_]EdgeCount[g, 3_]Properties & Relations (3)
Use DirectedEdge to construct directed graphs:
Graph[{ab, bc, ca}]TreeGraph[{12, 13, 14}]PathGraph[{12, 23, 34}]Inside graph constructors, Rule[a,b] is converted to DirectedEdge[a,b]:
Graph[{a -> b, a -> c, a -> d}]EdgeList[%]The adjacency matrix of a directed graph can be unsymmetric:
Graph[{12, 23, 31}]AdjacencyMatrix[%]//MatrixFormSee Also
UndirectedEdge Graph EdgeList EdgeCount Rule EdgeTaggedGraph IndexEdgeTaggedGraph EdgeTags
Characters: \[DirectedEdge]
Related Guides
Text
Wolfram Research (2010), DirectedEdge, Wolfram Language function, https://reference.wolfram.com/language/ref/DirectedEdge.html (updated 2020).
CMS
Wolfram Language. 2010. "DirectedEdge." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/DirectedEdge.html.
APA
Wolfram Language. (2010). DirectedEdge. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DirectedEdge.html
BibTeX
@misc{reference.wolfram_2026_directededge, author="Wolfram Research", title="{DirectedEdge}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/DirectedEdge.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_directededge, organization={Wolfram Research}, title={DirectedEdge}, year={2020}, url={https://reference.wolfram.com/language/ref/DirectedEdge.html}, note=[Accessed: 13-June-2026]}