Tutorials › Graph Theory (Undergraduate) › Incidence Matrices And Spanning-Tree Minors

Spanning Trees and Counting · Tutorial 121 of 799

Incidence Matrices And Spanning-Tree Minors

Learn how orientation, row deletion and selected edge sets determine whether an incidence-matrix minor is zero or has absolute value one.

Advanced 10 min read

What You'll Learn

  • Construct the vertex-edge incidence matrix from an arbitrary orientation.
  • Identify the edge sets detected by a square incidence-matrix minor.
  • Prove that a forest minor is nonzero exactly when each component has one omitted vertex.
  • Recognize spanning trees through reduced incidence minors.
  • Check determinant signs and zero minors in explicit examples.

From Edges to a Matrix

An incidence matrix records which vertices meet which edges, with signs supplied by an orientation. The orientation is a bookkeeping choice: it makes the columns signed, but it does not change which edge sets are trees. The key fact is that square minors of this matrix detect forests. When exactly one vertex row is omitted from a connected graph, the corresponding minors identify its spanning trees.

All graphs below are finite and simple. An orientation of a graph chooses, for each edge \(uv\), one endpoint as its tail and the other as its head. The resulting directed edge is not a change to the underlying graph; it is only a choice used to define a matrix.

Definition: Given an orientation of \(G=(V,E)\), its vertex-edge incidence matrix \(\mathbf{B}\) has one row for each vertex and one column for each edge. In the column for an edge directed from \(u\) to \(v\), the entry in row \(u\) is \(-1\), the entry in row \(v\) is \(1\), and all other entries are \(0\). A minor \( \mathbf{B}[R,F]\) is the submatrix using a row set \(R\subseteq V\) and an edge-column set \(F\subseteq E\). It is a square minor when \(|R|=|F|\).

Rows and columns in a submatrix are taken in fixed orders. Changing those orders can change a determinant's sign, but not whether it is zero or its absolute value. Reversing the orientation of an edge multiplies its column by \(-1\), which likewise changes at most the sign of a determinant using that column. We use the convention that a \(0\)-by-\(0\) determinant equals \(1\).

The Forest-Minor Characterization

For a chosen row set \(R\), write \(U=V\setminus R\) for the omitted vertices. The condition on \(U\) is component-by-component: every component formed by the selected edges must contain exactly one omitted vertex. Components include isolated vertices, so this condition also accounts for vertices incident to no selected edge.

Theorem: Let \(G=(V,E)\) be a finite simple graph with an arbitrary orientation, and let \(R\subseteq V\) and \(F\subseteq E\) satisfy \(|R|=|F|\). Then \(\det \mathbf{B}[R,F]\ne 0\) if and only if \((V,F)\) is a forest and each of its components contains exactly one vertex of \(U=V\setminus R\). In that case, \(\left|\det \mathbf{B}[R,F]\right|=1\).

Here a forest is a graph with no cycles; isolated vertices count as components. We prove the determinant fact needed for the theorem first.

Lemma: If \(T\) is a tree and the row of any one vertex \(r\) is deleted from its incidence matrix, the resulting square matrix has determinant \(1\) or \(-1\).

Proof. We use induction on the number \(k\) of vertices of \(T\). If \(k=1\), there are no edges and the matrix is \(0\)-by-\(0\), whose determinant is \(1\). Now let \(k\ge2\), and suppose the claim holds for trees with \(k-1\) vertices. A tree with at least two vertices has at least two leaves: for example, the endpoints of a longest path must have degree one, since an additional neighbor would either extend the path or create a cycle. Thus there is a leaf \(x\ne r\). In the matrix with row \(r\) deleted, the row for \(x\) has exactly one nonzero entry, equal to \(1\) or \(-1\), in the column for its sole incident edge \(e\). Expanding the determinant along row \(x\) gives, up to sign, the determinant obtained by deleting row \(x\) and column \(e\). Removing a leaf and its incident edge leaves a tree on \(k-1\) vertices, still with row \(r\) deleted. By the induction hypothesis its determinant is \(1\) or \(-1\). Multiplication by the entry \(1\) or \(-1\), and the cofactor sign, leaves the determinant equal to \(1\) or \(-1\). \(\square\)

Proof of the theorem. First suppose \(\det \mathbf{B}[R,F]\ne0\). If the edges \(F\) contained a cycle, the columns belonging to that cycle would be linearly dependent: traverse the cycle in one direction, assigning coefficient \(1\) to an edge whose orientation agrees with the traversal and \(-1\) to an edge whose orientation disagrees. At every vertex of the cycle the signed contributions cancel, so the resulting nontrivial combination of columns is zero. This dependence remains in the selected rows, contradicting the nonzero determinant. Therefore \((V,F)\) is a forest.

Consider a component \(C\) of \((V,F)\), with \(k\) vertices and \(e_C\) selected edges. Since it is a tree, including when it is an isolated vertex, \(e_C=k-1\). Let \(r_C=|R\cap C|\). The columns for edges in \(C\) have nonzero entries only in rows from \(C\). If \(r_C<e_C\), those \(e_C\) columns are linearly dependent when restricted to the \(r_C\) rows, contradicting invertibility of the square matrix. If \(r_C>e_C\), the \(r_C\) rows from \(C\) have nonzero entries only in the \(e_C\) columns from \(C\), so those rows are linearly dependent, again contradicting invertibility. Hence \(r_C=e_C=k-1\). Exactly \(k-r_C=1\) vertex of \(C\) lies in \(U\).

Conversely, suppose \((V,F)\) is a forest and each component has exactly one vertex in \(U\). A component on \(k\) vertices then has \(k-1\) edges and \(k-1\) selected rows. Permute rows and columns to group them by component. The resulting square matrix is block diagonal, with one square block for each component. For a nontrivial component, its block is the incidence matrix of a tree with the row of its unique omitted vertex deleted, so the lemma gives determinant \(1\) or \(-1\). For an isolated component, its block is \(0\)-by-\(0\), with determinant \(1\). The determinant of the whole matrix is, up to the signs of the row and column permutations, the product of these block determinants. Its absolute value is therefore \(1\), proving both nonvanishing and the claimed magnitude. \(\square\)

The Spanning-Tree Case

Corollary: Suppose \(G\) has \(n\ge1\) vertices, choose any vertex \(r\), and delete its row from \(\mathbf{B}\) to obtain \(\mathbf{B}^{(r)}\). For every \(F\subseteq E\) with \(|F|=n-1\), the matrix \(\mathbf{B}^{(r)}[:,F]\) is square, and its determinant is nonzero if and only if \(F\) is the edge set of a spanning tree of \(G\). When nonzero, its determinant has absolute value \(1\).

Proof. The rows retained are all vertices except \(r\), so there is just one omitted vertex. By the theorem, a nonzero determinant requires \(F\) to be a forest with exactly one omitted vertex in each component. Since the only omitted vertex is \(r\), the forest can have only one component: every component must contain \(r\), which is possible only if there is one component. Thus \((V,F)\) is connected and acyclic, so it is a spanning tree. Conversely, a spanning tree is a forest with one component containing the omitted vertex \(r\), so the theorem gives a determinant of absolute value \(1\). \(\square\)

This statement applies whether or not \(G\) itself is connected. If \(G\) is disconnected, it has no spanning tree, and every such \((n-1)\)-column minor is zero. The case \(n=1\) is included: the empty edge set is the spanning tree on one vertex, and its reduced incidence determinant is the empty determinant \(1\).

Worked Minors

Worked Example: A Spanning Tree Gives a Unit Minor

Let \(V=\{1,2,3,4\}\) and \(E=\{12,13,23,24,34\}\). Orient every edge from its smaller endpoint to its larger endpoint. Delete row \(4\), and select \(F=\{12,23,24\}\), in that column order. The reduced submatrix is

$$ \mathbf{B}^{(4)}[:,F] = \begin{pmatrix} -1&0&0\\ 1&-1&-1\\ 0&1&0 \end{pmatrix}. $$

Expanding along the first row gives

$$ \det \mathbf{B}^{(4)}[:,F] =(-1)\det\begin{pmatrix}-1&-1\\1&0\end{pmatrix} =(-1)\bigl((-1)(0)-(-1)(1)\bigr) =(-1)(1)=-1. $$

The selected edges connect \(1\) to \(2\), \(2\) to \(3\), and \(2\) to \(4\). They contain all four vertices and have no cycle, so they form a spanning tree. The determinant has absolute value \(1\), as the corollary predicts.

Check: There are \(4-1=3\) selected edges, and each vertex is connected to \(2\) by one of the selected edges or by the path \(1,2,3\); vertex \(4\) is joined directly to \(2\). Thus the set is connected and acyclic, independently confirming it is a spanning tree.

Worked Example: A Cycle Produces a Zero Minor

Use the same graph and orientation, but select \(F=\{12,13,23\}\), the triangle on vertices \(1,2,3\). After deleting row \(4\), the submatrix is

$$ \mathbf{B}^{(4)}[:,F] = \begin{pmatrix} -1&-1&0\\ 1&0&-1\\ 0&1&1 \end{pmatrix}. $$

Expanding along the first row, with the cofactor sign included, gives

$$ \det \mathbf{B}^{(4)}[:,F] =(-1)\det\begin{pmatrix}0&-1\\1&1\end{pmatrix} -(-1)\det\begin{pmatrix}1&-1\\0&1\end{pmatrix} =(-1)(1)-(-1)(1) =-1+1=0. $$

The selected edges contain a cycle and leave vertex \(4\) isolated. They are not a spanning tree, so the zero determinant agrees with the corollary.

Check: The three columns also satisfy \(\mathbf{b}_{12}-\mathbf{b}_{13}+\mathbf{b}_{23}=0\): the row entries give \((-1)-(-1)+0=0\), \(1-0-1=0\), and \(0-1+1=0\). This explicit dependence independently verifies that the determinant is zero.

Worked Example: A General Minor Tests Each Component

Let \(V=\{1,2,3,4\}\), \(E=\{12,23,34\}\), with all edges oriented from smaller to larger endpoint. Select \(F=\{12,34\}\) and \(R=\{1,3\}\), in the displayed orders. Then \(U=\{2,4\}\), and

$$ \mathbf{B}[R,F] = \begin{pmatrix} -1&0\\ 0&-1 \end{pmatrix}, \qquad \det\mathbf{B}[R,F]=(-1)(-1)-0(0)=1. $$

The selected-edge graph has components \(\{1,2\}\) and \(\{3,4\}\). The first contains exactly one omitted vertex, \(2\), and the second exactly one, \(4\). Both components are trees, so the theorem predicts a minor of absolute value \(1\).

Now keep \(F=\{12,34\}\) but change the rows to \(R=\{1,2\}\). The omitted vertices are \(3\) and \(4\), and the minor is

$$ \mathbf{B}[R,F] = \begin{pmatrix} -1&0\\ 1&0 \end{pmatrix}, \qquad \det\mathbf{B}[R,F]=(-1)(0)-0(1)=0. $$

The component \(\{1,2\}\) contains no omitted vertex, while \(\{3,4\}\) contains two. The component condition fails, and the two selected rows are dependent because the second selected column is zero in both rows.

Check: In the first minor, both diagonal entries are \(-1\), so their product is \(1\), and the off-diagonal product is \(0\), giving determinant \(1-0=1\). In the second, both products in the \(2\)-by-\(2\) determinant formula are \(0\), giving determinant \(0-0=0\).

Common Pitfalls and Why the Criterion Matters

Do not ignore cofactor signs. In the triangle example, the second term of the first-row expansion has a minus sign because it comes from column \(2\). The correct calculation is \((-1)(1)-(-1)(1)=-1+1=0\). Dropping that cofactor sign would produce a wrong determinant, even though the graph-theoretic conclusion is known.

A forest alone does not guarantee a nonzero arbitrary minor. The rows must also match the components correctly: each component must have exactly one omitted vertex. The general criterion is more precise than the spanning-tree corollary, which is the special case where there is only one omitted vertex in the entire graph.

The unit determinants are useful because they turn a structural question into a matrix test without introducing complicated values: an edge set gives a nonzero spanning-tree minor exactly when it is a spanning tree, and the nonzero determinant is always \(1\) or \(-1\). The next step in the subject uses incidence matrices to connect these minors with spanning-tree counts; that counting identity requires additional determinant machinery beyond the criterion proved here.

Check Your Understanding

Use the component condition and, where appropriate, calculate the determinant directly.

  1. Why does reversing one edge orientation preserve whether a chosen incidence minor is zero?
  2. For a graph on \(5\) vertices, what does a nonzero minor using \(4\) columns and all rows except one imply about those four edges?
  3. Give a reason an edge set containing a cycle must have linearly dependent incidence columns.
  4. For a forest with components of sizes \(3\) and \(2\), how many omitted vertices are required for a square minor to be nonzero?
  5. Why is the \(0\)-by-\(0\) determinant convention consistent with the spanning-tree statement for a graph with one vertex?