At first glance, it might seem silly that this book would spend any time on algorithms for this task. After all, we can compute the trace of a matrix by simply reading and summing its diagonal entries. The challenge arises when is not available explicitly, but is instead accessibly only as a block-box linear operator which we can access through matrix-vector product queries.
Some settings where is most naturally accessed implicitly include:
is the solution operator to a differential equation, and is computed by a numerical solver.
, and can be computed using a black-box method for matrix functions such as Lanczos.
A special case is , where is computed by solving a linear system using Conjugate Gradient or some other fast solver.
Further Reading¶
Girard (1987), Hutchinson (1989): First papers on stochastic trace estimation
Epperly (2023): Nice derivation of the variance of stochastic trace estimators.
Chen (2024): Book on Lanczos methods for matrix functions, which includes content on spectrum and spectral sum approximation. See references within for connection to physics.
- Girard, D. (1987). Un algorithme simple et rapide pour la validation croisée généralisée sur des problèmes de grande taille. https://membres-ljk.imag.fr/Didier.Girard/TR-665-M-IMAG.pdf
- Hutchinson, M. F. (1989). A Stochastic Estimator of the Trace of the Influence Matrix for Laplacian Smoothing Splines. Communications in Statistics - Simulation and Computation, 18(3), 1059–1076. 10.1080/03610918908812806
- Epperly, E. N. (2023). Stochstic trace estimation. https://www.ethanepperly.com/index.php/2023/01/26/stochastic-trace-estimation/
- Chen, T. (2024). The Lanczos algorithm for matrix functions: a handbook for scientists. https://arxiv.org/abs/2410.11090