An incidence matrix is a matrix representation of a graph that records the relation between vertices and edges. In contrast with the adjacency matrix, which records whether two vertices are adjacent, the incidence matrix records whether a vertex belongs to an edge.
Let
be a finite graph with vertex set
and edge set
The incidence matrix of has one row for each vertex and one column for each edge. Thus it is an matrix.
For an undirected graph, the unoriented incidence matrix is the matrix
where
Each column describes one edge. Since an ordinary edge has two endpoints, each column contains two entries equal to , except when loops are allowed and treated by a separate convention.
77.1 Incidence
The word incidence describes membership between objects of different types.
In graph theory, a vertex and an edge are incident when the vertex is an endpoint of the edge. If
then is incident with , and is incident with .
The incidence matrix records this relation directly. Rows correspond to vertices. Columns correspond to edges. The entry in row , column answers the question:
If yes, the entry is . If no, the entry is .
77.2 Example
Consider the graph with vertices
and edges
The incidence matrix is
The first column corresponds to . It has ones in rows and , because joins and .
The fourth column corresponds to . It has ones in rows and , because joins and .
Thus each column gives the endpoints of an edge.
77.3 Comparison with the Adjacency Matrix
The adjacency matrix is a vertex-by-vertex matrix. The incidence matrix is a vertex-by-edge matrix.
| Matrix | Rows | Columns | Entry records |
|---|---|---|---|
| Adjacency matrix | Vertices | Vertices | Whether two vertices are adjacent |
| Incidence matrix | Vertices | Edges | Whether a vertex is incident with an edge |
For a graph with vertices and edges, the adjacency matrix has size
while the incidence matrix has size
The adjacency matrix is often convenient for studying walks and spectral properties. The incidence matrix is often convenient for studying degrees, cuts, flows, cycles, and graph Laplacians.
77.4 Column Sums
For a simple undirected graph, each edge has exactly two endpoints. Therefore every column of the incidence matrix has sum :
for every edge .
This property distinguishes ordinary graph incidence matrices from more general incidence structures. In a hypergraph, an edge may contain more than two vertices, so a column may have more than two nonzero entries.
77.5 Row Sums and Degrees
The row sum of the incidence matrix gives the degree of a vertex.
For a simple undirected graph,
Each entry corresponds to one edge incident with . Therefore the row sum counts the number of edges touching .
In the example above,
the row sums are
Thus
77.6 The Handshaking Identity
Since every column of the incidence matrix of a simple graph has sum ,
But the sum of row is . Therefore
This is the handshaking identity.
The incidence matrix gives a direct proof: counting all ones by columns gives twice the number of edges, while counting all ones by rows gives the sum of all degrees.
77.7 Oriented Incidence Matrices
An oriented incidence matrix assigns a direction to each edge. This may be done even when the original graph is undirected. The orientation is arbitrary but fixed.
If an edge is oriented from to , then the oriented incidence matrix has
and all other entries in column are zero.
Equivalently,
Some authors use the opposite sign convention. The mathematical content is unchanged as long as the convention is used consistently.
77.8 Example of an Oriented Incidence Matrix
Use the same graph as before:
Choose the orientations
Then the oriented incidence matrix is
Each column has one entry , one entry , and all other entries zero. The sum of every column is zero:
This expresses the fact that every oriented edge leaves one vertex and enters one vertex.
77.9 Directed Graphs
For a directed graph, the orientation is part of the graph itself. The oriented incidence matrix uses the direction of each arc.
If is an arc from to , then
Thus a directed graph naturally has an oriented incidence matrix.
The row of a vertex records all arcs entering and leaving that vertex. Positive entries mark incoming arcs. Negative entries mark outgoing arcs. With the opposite sign convention, these signs are reversed.
77.10 Net Flow Interpretation
The oriented incidence matrix has a natural flow interpretation.
Let
be a vector of edge flows, where is the amount of flow along edge in its chosen orientation.
Then
is a vector indexed by vertices. Its -th entry is
With the convention for leaving and for entering, this entry equals
Thus the equation
means that every vertex has zero net imbalance. In network language, this is flow conservation.
77.11 Cuts and Potential Differences
The transpose of the oriented incidence matrix also has an important meaning.
Let
be a vector assigning a scalar potential to each vertex. Then
is a vector indexed by edges.
If is oriented from to , then the -th entry of is
Thus gives the potential difference across each oriented edge.
This interpretation appears in electrical networks, graph Laplacians, optimization, and numerical methods on graphs.
77.12 The Graph Laplacian
The oriented incidence matrix gives a concise formula for the graph Laplacian.
For an undirected graph with an arbitrary orientation, let be its oriented incidence matrix. Then
is the graph Laplacian.
The result does not depend on the chosen orientation. Reversing an edge changes the sign of one column of . Since that column is multiplied by its transpose in , the contribution to remains the same.
The Laplacian satisfies
and, for ,
Equivalently,
where is the diagonal degree matrix and is the adjacency matrix. The identity is a standard reason incidence matrices are central in spectral graph theory and network analysis.
77.13 The Matrix
The matrix
is indexed by edges rather than vertices. Its diagonal entries are , because each column of has one and one .
For two distinct edges and , the entry
depends on whether the two edges share a vertex and on how their orientations meet at that vertex.
Thus records edge-edge interaction. It is closely related to the line graph, whose vertices correspond to edges of the original graph. For the unoriented incidence matrix , one has the relation
where is the line graph and is the identity matrix.
77.14 Cycle Space
The null space of the oriented incidence matrix describes cycles.
A vector
lies in the null space of when
This means that the net flow at every vertex is zero. Such a flow can circulate around cycles without accumulating at any vertex.
In this sense, the cycle space of a graph is represented by the null space of the oriented incidence matrix. Over the real numbers, this gives a vector space of circulations. Over the field with two elements, it gives the binary cycle space.
For a connected graph with vertices and edges, the dimension of the cycle space is
This number counts the independent cycles of the graph.
77.15 Rank
The rank of the oriented incidence matrix is determined by the number of connected components.
If has vertices and connected components, then
In particular, if is connected, then
The reason is that each column of has entries summing to zero, so the rows are linearly dependent:
For a connected graph, this is the only row dependency up to scalar multiplication. For a graph with components, there is one such dependency for each component.
77.16 Reduced Incidence Matrix
For a connected graph, the oriented incidence matrix has rank . Therefore one row is redundant.
A reduced incidence matrix is obtained by deleting one row from . If is connected, the reduced incidence matrix has full row rank:
Reduced incidence matrices appear in the matrix-tree theorem, electrical network theory, and flow problems. Deleting one row corresponds to choosing a reference vertex, sometimes called a ground node in network theory.
77.17 Trees
Incidence matrices are especially simple for trees.
If is a tree with vertices, then it has
edges. If is an oriented incidence matrix of , then
Thus the columns of are linearly independent.
This reflects the absence of cycles. A nonzero circulation would require a cycle. Since a tree has no cycle, the only solution of
is
77.18 Multigraphs and Loops
For multigraphs, the incidence matrix has one column for each edge, including parallel edges.
If two edges have the same endpoints, their columns in the unoriented incidence matrix are identical. In the oriented incidence matrix, their columns may be identical or negatives of each other, depending on their chosen orientations.
Loops require a convention. In the unoriented incidence matrix, a loop may be recorded as in the row of its endpoint, because the loop touches the vertex twice. In some conventions, it is recorded as . In an oriented incidence matrix for an ordinary directed loop, the edge both leaves and enters the same vertex, so the contributions cancel and the column is zero.
Because of these convention choices, loops should be specified explicitly when incidence matrices are used.
77.19 Hypergraphs
The incidence matrix extends naturally to hypergraphs.
A hypergraph has vertices and hyperedges, where a hyperedge may contain any number of vertices. Its incidence matrix is still a vertex-by-edge matrix:
Unlike ordinary graphs, a column may contain three or more ones. Thus the incidence matrix is often the most natural matrix representation of a hypergraph.
77.20 Incidence Structures
Incidence matrices also appear outside graph theory. More generally, an incidence matrix records a relation between two finite sets.
For example, in finite geometry, one set may consist of points and the other of lines. The entry is if a point lies on a line and otherwise.
In block design theory, one set may consist of points and the other of blocks. The entry is if the point belongs to the block.
Graph incidence matrices are one special case of this broader idea.
77.21 Summary
An incidence matrix records the relation between vertices and edges.
For an undirected graph, the unoriented incidence matrix has entries
when vertex is an endpoint of edge , and
otherwise.
For an oriented graph, the incidence matrix records direction:
The incidence matrix supports several basic interpretations.
| Object | Matrix expression |
|---|---|
| Degree of in a simple graph | Row sum of the unoriented incidence matrix |
| Handshaking identity | Sum of all entries equals (2 |
| Flow conservation | |
| Edge potential differences | |
| Graph Laplacian | |
| Cycle space | |
| Rank |
The incidence matrix gives a vertex-edge view of a graph. It is especially important in the study of flows, cuts, cycles, trees, Laplacians, electrical networks, and spectral graph theory.