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 .
Proof of Corollary 1
Transposing swaps the roles of rows and columns, so is indexed by edges in its rows and vertices in its columns. By Definition 1, this entry is nonzero exactly when is an endpoint of , the same incidence relation recorded by .
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.
Proof of Lemma 1
Every edge of a simple graph has exactly two distinct endpoints, since has no self-loops. By Definition 2, exactly for the two rows corresponding to those endpoints, and for every other row.
Corollary 2 (Row sums give the degree)
Proof of Corollary 2
By Definition 2, exactly when is an endpoint of , and otherwise. Summing over therefore counts exactly the edges incident to , which is 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 .
Proof of Lemma 2
Every edge has exactly one tail and one head, which are distinct vertices. By Definition 3, for the row corresponding to the tail, for the row corresponding to the head, and for every other row. Hence column sums to .
Corollary 3 (Rank bound)
The rank of the incidence matrix of a directed graph with satisfies .
Proof of Corollary 3
Let be the all-ones vector. By Lemma 2, every column of sums to , so . Since , this is a nontrivial linear dependence among the rows of , so the rows are linearly dependent and span a subspace of dimension at most . Hence .
Theorem 1 (Total unimodularity of the directed incidence matrix)
The incidence matrix of a directed graph is always totally unimodular.
Proof of Theorem 1
We show by induction on that every square submatrix of satisfies .
Base case (): every entry of lies in by Definition 3, so .
Inductive step: assume the claim holds for all square submatrices, and let be a square submatrix of . Each column of has at most one (the tail’s row) and at most one (the head’s row), so each column of has , , or nonzero entries.
If some column of is entirely zero, then .
If some column of has exactly one nonzero entry, expanding the determinant along that column gives , where is the submatrix of obtained by deleting that row and column. By the inductive hypothesis, , so .
Otherwise, every column of has exactly two nonzero entries, a and a , which cancel. Then the rows of sum to the zero vector, so they are linearly dependent and .
In every case .
Theorem 2 (Forest criterion)
A directed graph is a directed forest if and only if the columns of its incidence matrix are linearly independent.
Proof of Theorem 2
() We prove the contrapositive: suppose is not a directed forest, so its underlying graph contains a cycle (indices mod ), traversed by distinct edges , where joins and . For each , let , the entry of at row and column . We claim
Row of this sum receives contributions only from and , the two cycle edges incident to . The term from equals , while the term from equals , the product of the two nonzero entries of column , one equal to (the tail) and the other to (the head), hence . The two contributions cancel, so row sums to for every . Since the are all nonzero, this is a nontrivial linear dependence, so the columns of are linearly dependent.
() Suppose is a directed forest; we show the columns of are linearly independent by induction on . If the claim is vacuous. Otherwise, since the underlying graph is a forest with at least one edge, it has a vertex of degree ; let be its unique incident edge. By Definition 3, row of has a single nonzero entry, in column . If for scalars , row of this equation gives , so . The remaining equation involves only the columns of , the directed forest obtained by deleting , which has edges; by the inductive hypothesis its incidence matrix has linearly independent columns, so for all . Hence all , and the columns of 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.
Proof of Corollary 4
By Definition 3, when is the head of and when is the tail of . Summing over , each edge with head contributes and each edge with tail contributes , so counts the edges directed into minus the edges directed out of , that is .
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 .
Proof of Lemma 3
Every edge of a simple graph has exactly two distinct endpoints. By Definition 4, for the two rows corresponding to those endpoints, and for every other row.
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 .
Proof of Corollary 5
By Definition 4, exactly when is an endpoint of , and otherwise. Summing over therefore adds for exactly 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.
Proof of Lemma 4
Row of has nonzero entries only in columns and (indices mod ), since is an endpoint only of and . In the Leibniz expansion of , a permutation contributes only if for every row . Any such that is neither the identity nor the full cyclic shift must mix the two choices, which forces two rows to map to the same column, so would not be a bijection. Hence the only two permutations contributing to the determinant are the identity, with sign , and the -cycle , with sign . Therefore
If is even, , so . If is odd, , so .
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 .
Proof of Lemma 5
By definition of a bipartite graph, every edge has one endpoint in and one endpoint in . By Definition 5, exactly for the two rows corresponding to those endpoints, one among (the -rows) and one among (the -rows), and for every other row.
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.
Proof of Theorem 3
() Suppose is bipartite, with incidence matrix as in Definition 5. Let be the matrix obtained from by multiplying every row corresponding to by . By Lemma 5, each column of has exactly one among the -rows and one among the -rows, so each column of has exactly one and one , the same pattern as the incidence matrix of a directed graph (Definition 3). By Theorem 1, is totally unimodular. Multiplying rows by changes the sign but not the absolute value of the determinant of any square submatrix, so is totally unimodular as well.
() We prove the contrapositive. Suppose is not bipartite, so it contains an odd cycle on some subset of its vertices and edges. The submatrix of restricted to these rows and columns is exactly the incidence matrix of , so by Lemma 4 its determinant is . Hence is not totally unimodular.
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.
Proof of Lemma 6
Let be an edge of . If is a loop at some vertex , then by Definition 6, and for every , so column sums to . If is not a loop, it has two distinct endpoints, so for the two rows corresponding to those endpoints and for every other row, so column again sums to .
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 .
Proof of Corollary 6
By Definition 6, a non-loop edge at contributes to the row sum, and a loop at contributes . This matches the standard convention for , so .
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]
“Incidence matrix”, Wikipedia, Available: https://en.wikipedia.org/wiki/Incidence_matrix, Accessed: 2026-07-15 ↩
- [2]
“Incidence Matrix”, Wolfram MathWorld, Available: https://mathworld.wolfram.com/IncidenceMatrix.html, Accessed: 2026-07-15 ↩