EdgeIndex
Details

- EdgeIndex is also known as edge ordering.
- EdgeIndex gives the ordering used in functions such as EdgeList and IncidenceMatrix.
- EdgeIndex[g,e] gives the position for an edge e in EdgeList[g].
- EdgeIndex[g,e] gives the column position for an edge e in IncidenceMatrix[g].

Examples
open all close allBasic Examples (1)
Scope (4)
Properties & Relations (5)
The EdgeIndex of an edge corresponds to its position in EdgeList:
Sort the vertices in undirected edges for comparison:
EdgeIndex is typically faster than Position:
EdgeQ can be used to tell whether EdgeIndex will succeed:

Use VertexIndex to find the integer index of a vertex:
VertexIndex and EdgeIndex give the row and column ordering used in IncidenceMatrix:
See Also
Related Guides
Text
Wolfram Research (2010), EdgeIndex, Wolfram Language function, https://reference.wolfram.com/language/ref/EdgeIndex.html (updated 2015).
CMS
Wolfram Language. 2010. "EdgeIndex." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/EdgeIndex.html.
APA
Wolfram Language. (2010). EdgeIndex. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/EdgeIndex.html
BibTeX
@misc{reference.wolfram_2025_edgeindex, author="Wolfram Research", title="{EdgeIndex}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/EdgeIndex.html}", note=[Accessed: 11-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_edgeindex, organization={Wolfram Research}, title={EdgeIndex}, year={2015}, url={https://reference.wolfram.com/language/ref/EdgeIndex.html}, note=[Accessed: 11-August-2025]}