In graph theory, the incidence matrix [1][2], or vertex-edge incidence matrix, of a graph is a matrix that records the incidence of vertices and edges, with rows indexed by the vertex set and columns indexed by the edge set. Its transpose, with rows indexed by edges and columns by vertices, is the edge-vertex incidence matrix. Together with the adjacency matrix, it is one of the standard matrix graph representations.

Definition


Definition 1 (Vertex-edge incidence matrix)

Let be a graph with vertex set and edge set . A vertex-edge incidence matrix of is an matrix , with rows indexed by and columns by , such that

and if is an endpoint of . The concrete nonzero value depends on the class of graph under consideration.

Corollary 1 (Edge-vertex incidence matrix)

The transpose of a vertex-edge incidence matrix of is an matrix, with rows indexed by and columns by , called the edge-vertex incidence matrix of .

Variants


Each of the following variants specializes Definition 1 to a class of graphs by fixing what the nonzero entries record.

Undirected graph


Definition 2 (Incidence matrix of an undirected graph)

Let be a simple undirected graph, i.e. one without self loops or parallel edges, with vertex set and edge set . The incidence matrix of is the binary matrix given by

Properties


Lemma 1 (Column sums)

The incidence matrix of a simple undirected graph has exactly two ‘s in each column, one for each endpoint of the corresponding edge.

Corollary 2 (Row sums give the degree)

For each vertex , the row sum equals the degree of :

Examples


Example 1 (Cycle graph )

For with and , the incidence matrix is

Directed graph


Definition 3 (Incidence matrix of a directed graph)

Let be a directed graph with vertex set and edge set . The incidence matrix of is the signed matrix , distinguishing the tail from the head of each directed edge, given by

Properties


Lemma 2 (Column sums vanish)

Every column of the incidence matrix of a directed graph sums to , since it has exactly one entry equal to and one entry equal to .

Corollary 3 (Rank bound)

The rank of the incidence matrix of a directed graph with satisfies .

Theorem 1 (Total unimodularity of the directed incidence matrix)

The incidence matrix of a directed graph is always totally unimodular.

Theorem 2 (Forest criterion)

A directed graph is a directed forest if and only if the columns of its incidence matrix are linearly independent.

Corollary 4 (Row sums give the net degree)

For each vertex , the row sum equals , the in-degree of minus its out-degree.

Examples


Example 2 (Directed cycle graph)

For with and , labeled , , , the incidence matrix is

Edge-weighted graph


An edge-weighted graph attaches a real-valued weight to each edge, and is what is usually meant by a weighted graph unless the weights are placed on the vertices instead.

Definition 4 (Incidence matrix of an edge-weighted graph)

Let be an edge-weighted graph with weight function . The incidence matrix of is the matrix given by

with replaced by in the signed, directed case.

Properties


Lemma 3 (Column sums)

In the incidence matrix of an edge-weighted graph, column has exactly two nonzero entries, each equal to .

Corollary 5 (Row sums give the weighted degree)

For each vertex , the row sum equals , the sum of the weights of the edges incident to .

Examples


Example 3 (Edge-weighted triangle graph)

For with , and weights , , , the incidence matrix is

Cycle graph


A cycle graph is a simple undirected graph, so its incidence matrix is the one given by Definition 2. Its distinguishing feature is that the determinant of this matrix is governed by the parity of .

Properties


Lemma 4 (Cycle determinant)

Let be the cycle graph on vertices with edges (indices mod ), and let be its incidence matrix. Then if is even, and if is odd.

Examples


Example 4 (Triangle graph )

For with and , the incidence matrix is

Since is odd, , in agreement with Lemma 4.

Bipartite graph


Definition 5 (Incidence matrix of a bipartite graph)

Let be a bipartite graph with partitions and , and edge set . Let be the vertices of listed with first and second, so for and for . The incidence matrix of is the matrix given by

Properties


The incidence matrix of a bipartite graph is a principal source of totally unimodular matrices, a property rooted in the block structure that the bipartite row ordering imposes.

Lemma 5 (Bipartite block structure)

The incidence matrix of a bipartite graph , with rows ordered as followed by , has in each column exactly one nonzero entry among the rows corresponding to and one among the rows corresponding to , since every edge joins a vertex in to one in .

The block structure underlies the following characterization of total unimodularity for undirected incidence matrices.

Theorem 3 (Total unimodularity of the undirected incidence matrix)

The incidence matrix of an undirected graph is totally unimodular if and only if is bipartite.

Examples


Example 5

For with , and , ordering rows as , the incidence matrix is

Multigraph


A multigraph is an undirected graph in which loops and parallel edges are allowed, relaxing the simple-graph assumption of Definition 2.

Definition 6 (Incidence matrix of a multigraph)

Let be a multigraph with vertex set and edge set . The incidence matrix of is the matrix given by

Properties


Lemma 6 (Column sums)

Every column of the incidence matrix of a multigraph sums to : a single if the corresponding edge is a loop, or two ‘s otherwise.

Corollary 6 (Row sums give the degree)

For each vertex , the row sum equals the degree of , with the usual convention that a loop at contributes to .

Examples


Example 6

For with , a loop at , an edge , and parallel edges , , the incidence matrix is

Every column sums to , in agreement with Lemma 6.

References

  1. [1]

    “Incidence matrix”, Wikipedia, Available: https://en.wikipedia.org/wiki/Incidence_matrix, Accessed: 2026-07-15 ↩

  2. [2]

    “Incidence Matrix”, Wolfram MathWorld, Available: https://mathworld.wolfram.com/IncidenceMatrix.html, Accessed: 2026-07-15 ↩