---
title: Forest-Representable Matrices
url: https://www.emergentmind.com/topics/forest-representable-matrices
type: topic
---

# Forest-Representable Matrices

Forest-representable matrices are matrices whose structure is governed by a forest. In the rank-structured formulation introduced for tree quasi-separable matrices, a matrix \(A \in \mathbb{R}^{n\times n}\) is forest-representable if there exists a block partition of its rows and columns indexed by the vertices of a forest \(F=\bigsqcup_c T_c\) such that either \(A\) has block-sparsity consistent with \(F\), or \(A^{-1}\) has block-sparsity consistent with \(F\); when the forest has multiple components, a permutation puts \(A\) into block-diagonal form, one block per tree component [2402.13381]. In other settings, closely related terminology is used for matrices whose entries enumerate forests, matrices derived from spanning rooted forests, adjacency-based encodings that classify forests, and lower-triangular matrices that encode ranked tree shapes [1305.6441] [2009.03299] [2510.27030]. This suggests that the term does not denote a single universal matrix class, but rather a family of matrix constructions in which forest topology is the organizing constraint.

## 1. Forest topology as a matrix constraint

Let \(F=(V,E)\) be an undirected acyclic graph, possibly disconnected, with connected components \(T_c=(V_c,E_c)\), and let each vertex \(v\in V\) carry an index set \(I(v)\subset \{1,\dots,n\}\). In the numerical linear-algebraic sense, forest-representability means that \(A\) is viewed as a graph-partitioned block matrix \(A_{I(u),I(v)}\), and either \(A_{I(u),I(v)}=0\) unless \((u,v)\in E\) or \(u=v\), or the same sparsity statement holds for \(A^{-1}\) instead of \(A\) [2402.13381].

The disconnected case is not merely formal. If \(F\) has several components, the permutation bringing \(A\) to forest form yields a block-diagonal matrix with blocks indexed by the connected components \(T_c\). Each block can then be represented and operated on independently, so a forest-representable matrix is a direct sum of tree quasi-separable blocks, one per tree component [2402.13381].

A closely related situation arises for sparse matrices whose adjacency graph is itself a tree. Such a sparse matrix \(S\) is sparse, whereas \(S^{-1}\) is typically dense; nevertheless, \(S^{-1}\) satisfies the graph-induced rank structure and admits an exact tree quasi-separable form with generator sizes equal to the ranks of unit Hankel blocks [2402.13381]. In this sense, forest-representability includes both explicit forest sparsity and forest-shaped inverse sparsity.

## 2. Tree quasi-separable realization

For a rooted tree \(T=(V,E)\) with root \(r\) and a partition \(\{I(v)\}_{v\in V}\) of \(\{1,\dots,n\}\), a tree quasi-separable (TQS) matrix is defined by local generators attached to vertices and edges. These include the explicit diagonal blocks \(D^v \in \mathbb{R}^{|I(v)|\times |I(v)|}\), input-to-edge maps \(B^v_{P(v)}\) and \(P^v_w\), edge-to-edge transfers \(U^v_{P(v),w}\), \(V^v_{w,w'}\), \(W^v_{w,P(v)}\), and edge-to-output maps \(C^v_w\) and \(Q^v_{P(v)}\) [2402.13381].

For \(i\neq j\), the off-diagonal block is obtained by multiplying operators along the unique path \(j=p_0-p_1-\cdots-p_\nu=i\):
\[
A_{I(i),I(j)}=
Out^{p_\nu}_{p_{\nu-1}}
\,Trans^{p_{\nu-1}}_{p_{\nu-2},p_\nu}
\cdots
Trans^{p_1}_{p_2,p_0}
\,Inp^{p_0}_{p_1}.
\]
This path factorization implies that off-diagonal blocks between disjoint subtrees are low-rank and can be written in the canonical form
\[
A_{I(u),I(v)} \approx U_u S_{uv} V_v^T,
\]
where \(U_u\) and \(V_v\) are bases assembled from local generators and \(S_{uv}\) collects the couplings transmitted along the path and sibling transfers [2402.13381].

An important structural feature is nestedness. Internal-node bases are formed from child bases through small transfer matrices:
\[
U_{parent}=[U_{child_1}\cdots U_{child_k}]W_{parent},\qquad
V_{parent}=[V_{child_1}\cdots V_{child_k}]Z_{parent}.
\]
Diagonal and near-diagonal blocks remain explicit through the \(D^v\), while compressed representation is reserved for off-diagonal interactions connecting disjoint subtrees across the tree topology [2402.13381].

## 3. Hankel-rank characterization and specialization to SSS and HSS

The decisive structural invariant in the TQS theory is the rank of tree-induced Hankel blocks. For an edge \(e=(i,j)\), one defines a unit Hankel subset by
\[
H_{(i,j)}=D(i)\quad \text{if } j=P(i),\qquad
H_{(i,j)}=V\setminus D(j)\quad \text{if } i=P(j),
\]
where \(D(i)\) denotes the descendants of \(i\), including \(i\) itself, and the associated Hankel block is \(H_e:=A_{H_e,V\setminus H_e}\) [2402.13381].

The key theorem states that if \((A,T)\) is a graph-partitioned matrix on a tree, then \(A\) admits a TQS representation whose rank profile satisfies
\[
\rho_e=\operatorname{rank}(H_e),\qquad e\in E,
\]
and this realization is minimal: any other TQS realization on the same tree has edge ranks \(\rho'_e\ge \rho_e\) for all \(e\) [2402.13381]. The intuition is that each unit Hankel block measures the minimal state dimension needed to transmit interactions across the corresponding cut; any smaller edge state would force a lower-rank factorization of \(H_e\), which is impossible.

This theorem simultaneously recovers the two classical semi-separable formats. When the tree is a path graph, rooted at the last node, the TQS operators reduce to the classical sequentially semi-separable representation; the relevant Hankel blocks coincide with the classical SSS off-diagonal Hankel blocks, and their ranks determine the generator sizes [2402.13381]. When the tree is a post-ordered binary partition tree with internal nodes taken to be empty, the TQS form becomes hierarchically semi-separable, with sibling interactions compressed level by level and nested bases propagated across levels [2402.13381].

A common misconception is that forest-representability in this setting is merely a notational reformulation of SSS or HSS. The TQS construction is instead a simultaneous generalization: the path graph yields SSS, the hierarchical binary tree yields HSS, and general trees interpolate between these two extremes [2402.13381].

## 4. Algebraic operations, conversion algorithms, and efficiency regime

The TQS class is closed under addition, multiplication, and inversion, provided the input and output partitions coincide in the inversion case. If \(r:=\max_e \rho_e\) is the maximum generator rank and \(\deg_{\max}:=\max_v \deg(v)\) is the maximum node degree, the associated algorithms are fast when \(r\) is small, \(\deg_{\max}\) is bounded, and the block sizes \(|I(v)|\) are uniformly bounded [2402.13381].

| Operation | Structural statement | Stated cost |
|---|---|---|
| Matrix–vector product | state-space upsweep and downsweep | \(O\!\left(\sum_{v\in V} (|I(v)|+\deg(v)r)(|I(v)|+\deg(v)r)\right)\) flops |
| Addition | \(\rho_e(A+B)\le \rho_e(A)+\rho_e(B)\) | edge-wise concatenation and recompression \(O(nr^2)\) |
| Multiplication | \(\rho_e(A\cdot B)\le \rho_e(A)+\rho_e(B)\) | \(O(nr)\) per mat-vec and \(O(nr^2)\) for recompression |
| Inversion / direct solve | \(\rho_e(A^{-1})=\rho_e(A)\) for nonsingular \(A\) | typical direct solve \(O\!\left(\sum_{v\in V} (|I(v)|+\deg(v)r)^3\right)\) |

Conversion from a dense matrix to TQS proceeds in two passes. In the upsweep, for each edge \((i,j)\) with \(j=P(i)\), one forms the unit Hankel block \(H_{(i,j)}\), computes a low-rank factorization \(H_{(i,j)}\approx X_{(i,j)}Y_{(i,j)}\), assigns \(B^i_j\) and \(C^j_i\), and compresses interior augmented matrices to obtain transfer operators. In the downsweep, for each edge \((j,i)\) with \(j=P(i)\), one analogously factors \(H_{(j,i)}\), assigns \(Q^i_j\) and \(P^j_i\), and extracts the sibling and parent transfers \(V\) and \(W\) [2402.13381].

The factorization at each edge may use deterministic truncated SVD, strong RRQR, or randomized SVD. Accuracy is controlled by a truncation tolerance \(\tau\); if each unit Hankel block \(H_e\) is approximated with error \(\epsilon_e\), then the reconstruction error obeys
\[
\|A-A_{TQS}\| \le C \sum_{e\in E}\epsilon_e,
\]
with \(C\) depending mildly on \(\deg_{\max}\) and path lengths [2402.13381].

The format is not universally economical. For arbitrary dense matrices, the unit Hankel blocks can have large rank, yielding large generators. The arrowhead matrix on a star tree is the standard counterexample: the TQS representation then uses roughly as many parameters as the dense matrix, while an SSS or HSS representation on a different topology may be more efficient [2402.13381].

## 5. Graph-theoretic, Laplacian, and matroidal formulations

Several other matrix constructions encode forests directly rather than through low-rank path factorization. A real symmetric matrix is called acyclic if it is the adjacency matrix of a weighted forest with real nonzero edge weights and possibly vertex weights; if the matrix is irreducible, the forest is a tree [1609.02399]. For such matrices, the characteristic polynomial equals the matching polynomial of the weighted forest, and explicit eigenvector formulas are available in terms of path weights and characteristic polynomials of vertex- or path-deleted submatrices [1609.02399].

A different line of work studies Laplacian-based matrices of spanning rooted forests. For a weighted digraph with column Laplacian \(L\), the matrix-forest theorem gives
\[
Q(\tau)=\operatorname{adj}(I+\tau L),\qquad
\sigma(\tau)=\det(I+\tau L),\qquad
J(\tau)=(I+\tau L)^{-1},
\]
where the entries of \(Q(\tau)\) and \(J(\tau)\) admit combinatorial interpretations in terms of weighted spanning out-forests [1305.6441]. The limiting matrix \(\bar J=\lim_{\tau\to\infty}J(\tau)\) is the eigenprojection of \(L\) onto its nullspace, satisfies \(\bar J^2=\bar J\), and exposes the source-knot structure of the digraph [1305.6441].

Forests can also be recovered from adjacency-derived binary matroids. Over \(\mathrm{GF}(2)\), the matrices
\[
IA(F)=(I\;\;A(F)),\qquad
IAS(F)=(I\;\;A(F)\;\;I+A(F))
\]
define the restricted isotropic and isotropic matroids of a forest \(F\). For forests \(F\) and \(F'\), the equivalence
\[
F\cong F' \iff M[IA(F)]\cong M[IA(F')] \iff M[IAS(F)]\cong M[IAS(F')]
\]
shows that these matrix representations classify forests up to isomorphism [2009.03299].

Hierarchical trees admit yet another sparse matrix representation, the Generation Matrix. Under descending order of height, the Generation Matrix is lower triangular, has exactly \(2n-1\) nonzeros for a tree with \(n\) nodes, and becomes block-diagonal for forests, one block per component [2201.11297]. This representation is designed so that triangular solves simulate upward and downward recursive traversals [2201.11297].

## 6. Enumerative, positivity, and ranked-tree encodings

In combinatorics, lower-triangular matrices whose entries enumerate trees and forests are also described through forest structure. The matrix
\[
t_{n,k}=\binom{n}{k}n^{\,n-k}
\]
counts rooted labeled trees on \([n+1]\) with a prescribed root statistic, and also partial functional digraphs on \([n]\) with exactly \(k\) vertices of out-degree \(0\); its row-generating polynomials are \(T_n(x)=(x+n)^n\), the matrix is totally positive, and the sequence \(\{T_n(x)\}\) is coefficientwise Hankel-totally positive [2302.03999]. The related forest matrix
\[
f_{n,k}=\binom{n-1}{k-1}n^{\,n-k}=\binom{n}{k}k\,n^{\,n-k-1}
\]
enumerates \(k\)-component forests of rooted trees on \([n]\), with weighted generalizations by improper edges and proper-child multiplicities; its matrix and row-generating polynomials are coefficientwise totally positive and coefficientwise Hankel-totally positive under Toeplitz-total positivity assumptions on the weight sequence \(\boldsymbol{\phi}\) [2105.05583]. A \(q\)-analogue replaces binomial coefficients and powers by Gaussian binomials and \(q\)-integers, yielding coefficientwise totally positive matrices proved via planar networks and the Lindström–Gessel–Viennot lemma [2106.00656].

Restricted Stirling and Lah number matrices provide another forest-based representation. For restriction sets \(R\subseteq \mathbb{N}\) with \(1\in R\), each entry of the inverse matrices \(\big[{n\brace k}_R\big]^{-1}\), \(\big[{n\brack k}_R\big]^{-1}\), and \(\big[L(n,k)_R\big]^{-1}\) is a signed difference of cardinalities of explicitly defined families of increasingly ordered, min-first ordered, or linearly ordered phylogenetic forests; when \(R\) has no exposed odds, each inverse entry is, up to an explicit sign, the cardinality of a single family of \(R\)-good forests [1610.05803].

A more recent phylogenetic use of forest-representable matrices is the \(F\)-matrix for ranked tree shapes. For an \(n\)-leaf fully heterochronous ranked tree shape, the \(F\)-matrix is lower triangular of size \((2n-2)\times(2n-2)\), and \(F_{i,j}\) counts the number of edges whose parent rank is at most \(j\) and whose child rank is greater than \(i\) [2510.27030]. Valid \(F\)-matrices are characterized by monotonicity constraints, diagonal and subdiagonal rules, and a four-entry local bound
\[
L_F(i,j)\le F_{i,j}\le U_F(i,j),
\]
with \(L_F(i,j)\) and \(U_F(i,j)\) determined by the left, above, above-left, and previous diagonal values [2510.27030]. This local rule yields an explicit bijection with ranked tree shapes and supports enumeration and probabilistic modeling [2510.27030].

Across these settings, forest-representable matrices serve different purposes: low-rank compression for sparse-inverse problems, Laplacian resolvents for spanning forests, algebraic classification of forest graphs, total positivity in forest enumerators, and lower-triangular encodings of ranked tree shapes. The shared principle is precise rather than metaphorical: a forest supplies the combinatorial skeleton that determines which matrix entries are allowed, how they factor, or what they count.

Source: https://www.emergentmind.com/topics/forest-representable-matrices