IncidenceMatrix—Wolfram Language Documentation (original) (raw)

BUILT-IN SYMBOL

IncidenceMatrix

Details

Examples

open allclose all

Basic Examples (2)

The incidence matrix of an undirected graph:

The incidence matrix of a directed graph:

Scope (5)

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

The sum of the entries in any column is 2:

The incidence matrix of a directed graph has some negative entries:

If there are no self-loops, the sum of the entries in any column is 0:

The incidence matrix of a graph with self-loops has some entries equal to 2:

Use rules to specify the graph:

IncidenceMatrix works with large graphs:

Use MatrixPlot to visualize the matrix:

Properties & Relations (9)

Rows and columns correspond to VertexList and EdgeList order:

The ^(th) row gives all edge indices incident to the ^(th) vertex:

The first vertex is incident to edges 2, 3, and 4:

The ^(th) column gives all vertex indices incident to the ^(th) edge:

The second edge is incident to vertices 1 and 3:

Use VertexIndex and EdgeIndex to find the indices for vertices and edges:

The incidence matrix can tell whether a vertex and edge are incident:

The incidence matrix for a directed graph indicates the source vertex by and the target vertex by :

Compute the oriented incidence matrix for an undirected graph using DirectedGraph:

The oriented incidence matrix using a random orientation:

The dimensions of the incidence matrix are given by VertexCount and EdgeCount:

Use IncidenceGraph to construct a graph from an incidence matrix:

The adjacency matrix of a line graph can be computed by its IncidenceMatrix:

Wolfram Research (2010), IncidenceMatrix, Wolfram Language function, https://reference.wolfram.com/language/ref/IncidenceMatrix.html (updated 2015).

Text

Wolfram Research (2010), IncidenceMatrix, Wolfram Language function, https://reference.wolfram.com/language/ref/IncidenceMatrix.html (updated 2015).

CMS

Wolfram Language. 2010. "IncidenceMatrix." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/IncidenceMatrix.html.

APA

Wolfram Language. (2010). IncidenceMatrix. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/IncidenceMatrix.html

BibTeX

@misc{reference.wolfram_2025_incidencematrix, author="Wolfram Research", title="{IncidenceMatrix}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/IncidenceMatrix.html}", note=[Accessed: 05-May-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_incidencematrix, organization={Wolfram Research}, title={IncidenceMatrix}, year={2015}, url={https://reference.wolfram.com/language/ref/IncidenceMatrix.html}, note=[Accessed: 05-May-2025 ]}