32 Matrix Exponentials and Krylov Subspace Actions
The scalar equation \(u'=au\) has solution \(u(t)=e^{ta}u(0)\). For the system \(\bu'=\bA\bu\), we seek a matrix that advances every initial vector in the same way. Replacing scalar powers by matrix powers in the exponential series produces that matrix.
For a large sparse matrix, the full exponential can be dense even though applying \(\bA\) to a vector is cheap. If only one initial state \(\bv\) is given, our computational objective is the vector \(e^{t\bA}\bv\). We construct an approximation in a Krylov subspace and use the defect in the differential equation to assess its error. The later sensitivity and logarithm constructions extend this calculation to estimating model parameters.
$$ \[\begin{align} \bu'(t)=\bA\bu(t),\qquad\bu(0)=\bv,\\ \bu(t)=e^{t\bA}\bv. \end{align}\] $$
32.1 The Exponential and Its Algebraic Properties
For any square matrix \(\bA \in \fC^{n \times n}\), the matrix exponential is defined by the convergent power series \[ \begin{align} e^{\bA} = \sum_{k=0}^\infty \frac{\bA^k}{k!} = \bI + \bA + \frac{1}{2}\bA^2 + \frac{1}{6}\bA^3 + ... \end{align} \] For any scalar \(t \in \fR\), the matrix function \(e^{t\bA}\) satisfies \(\frac{d}{dt} e^{t\bA} = \bA e^{t\bA} = e^{t\bA}\bA\).
Use \(\|\bA^k\|\leq\|\bA\|^k\) to compare the defining series with a scalar exponential and prove absolute convergence. On a bounded interval of \(t\), justify termwise differentiation to verify the differential equation and initial value. Compute the exponential of \(\begin{pmatrix}0&1\\0&0\end{pmatrix}\) directly from the series. Why does this example not require diagonalization?
Let \(\bA, \bB \in \fC^{n \times n}\).
If \(\bA\) and \(\bB\) commute (\(\bA\bB = \bB\bA\)), then \(e^{\bA+\bB} = e^\bA e^\bB\). If they do not commute, this equality fails in general.
The matrix exponential is always nonsingular, with inverse \((e^\bA)^{-1} = e^{-\bA}\).
For any nonsingular similarity transform \(\bS\), \(e^{\bS\bA\bS^{-1}} = \bS e^\bA \bS^{-1}\). In particular, if \(\bA = \bQ\boldsymbol{\Lambda}\bQ^{-1}\) is diagonalizable, then \(e^\bA = \bQ \operatorname{diag}(e^{\lambda_1}, ..., e^{\lambda_n}) \bQ^{-1}\).
The determinant satisfies Jacobi’s formula: \(\det(e^\bA) = e^{\operatorname{trace}(\bA)}\).
The exponential series is absolutely convergent in a matrix norm, since \(\|\bA^k/k!\|\leq\|\bA\|^k/k!\) and the scalar exponential series converges. This permits the regrouping of products used below.
When \(\bA\) and \(\bB\) commute, the product of the two series can be grouped by total degree: \[ \begin{align} e^{\bA}e^{\bB} &=\sum_{k=0}^\infty\sum_{j=0}^k\frac{\bA^j\bB^{k-j}}{j!(k-j)!}\\ &=\sum_{k=0}^\infty\frac1{k!} \sum_{j=0}^k\binom{k}{j}\bA^j\bB^{k-j}\\ &=\sum_{k=0}^\infty\frac{(\bA+\bB)^k}{k!}=e^{\bA+\bB}. \end{align} \] Commutativity is needed for the matrix binomial theorem in the last step. Without it, terms such as \(\bA\bB\) and \(\bB\bA\) cannot be collected as though they were equal.
Set \(\bB=-\bA\). These matrices commute, and \(e^{\bzero}=\bI\), so both \(e^{\bA}e^{-\bA}\) and \(e^{-\bA}e^{\bA}\) equal the identity. This proves nonsingularity and the inverse formula.
For similarity, induction gives \((\bS\bA\bS^{-1})^k=\bS\bA^k\bS^{-1}\): the adjacent factors \(\bS^{-1}\bS\) cancel when one more factor is multiplied. The case \(k=0\) also holds because \(\bS\bI\bS^{-1}=\bI\). Substituting into the convergent series gives \[ \begin{align} e^{\bS\bA\bS^{-1}} =\sum_{k=0}^\infty\frac{\bS\bA^k\bS^{-1}}{k!} =\bS e^{\bA}\bS^{-1}. \end{align} \] For diagonal \(\bA\), each power and then each exponential entry is computed diagonally. This proves the diagonalizable-matrix formula.
For the determinant, use Schur form \(\bA=\bQ\bT\bQ^*\). Similarity invariance gives \(e^{\bA}=\bQ e^{\bT}\bQ^*\). Every power of an upper triangular matrix is upper triangular, and its \(i\)th diagonal entry is \(t_{ii}^k\). Therefore \(e^{\bT}\) is upper triangular with diagonal entries \(e^{t_{ii}}\). Its determinant is their product: \[ \begin{align} \det(e^{\bA})=\det(e^{\bT}) =\prod_i e^{t_{ii}}=e^{\sum_i t_{ii}} =e^{\operatorname{tr}(\bA)}. \end{align} \] Trace and determinant are unchanged by similarity. This establishes the final property without assuming diagonalizability. These are standard matrix-exponential identities (Higham 2008).
Use \(\bB=-\bA\) to prove the inverse formula. Prove \((\bS\bA\bS^{-1})^k=\bS\bA^k\bS^{-1}\) by induction and substitute it into the series to prove similarity invariance. Finally, use Schur form and the diagonal entries of powers of a triangular matrix to show \(\det(e^{\bA})=e^{\operatorname{tr}(\bA)}\).
(Storage and the exponential action) Classical methods for computing the full \(n \times n\) matrix \(e^{\bA}\) rely on scaling and squaring with rational Padé approximants. Evaluating an \([m/m]\) Padé approximant requires computing matrix powers and solving matrix linear systems, incurring \(O(n^3)\) operations. More critically, even when \(\bA\) is sparse, the exponential \(e^{t\bA}\) is typically dense. Storing \(e^{t\bA}\) for \(n = 10^6\) requires eight terabytes of memory in double precision. Many evolution calculations require only the action \(e^{t\bA}\bv\), which can be approximated without forming the full exponential.
32.2 Krylov Subspace Approximation of the Exponential Action
To compute the action \(e^{t\bA}\bv\) for large sparse \(\bA\), we project the evolution onto an expanding Krylov subspace \(\mathcal{K}_m(\bA, \bv) = \operatorname{span}\{\bv, \bA\bv, ..., \bA^{m-1}\bv\}\).
Let \(\bA \in \fC^{n \times n}\) and let \(\bv \in \fC^n\) be a nonzero vector with \(\beta = \|\bv\|_2\). After \(m\) steps of the Arnoldi iteration starting from \(\bv_1 = \bv / \beta\), we obtain the Arnoldi relation \[ \begin{align} \bA \bV_m = \bV_m \bH_m + h_{m+1,m}\bv_{m+1}\be_m^T, \end{align} \] where \(\bV_m \in \fC^{n \times m}\) has orthonormal columns and \(\bH_m = \bV_m^* \bA \bV_m \in \fC^{m \times m}\) is upper Hessenberg. The Arnoldi approximation to the exponential action is \[ \begin{align} e^{t\bA}\bv \approx \beta \bV_m e^{t\bH_m}\be_1. \end{align} \]
We approximate the solution of \(\bu'(t) = \bA\bu(t)\) with \(\bu(0) = \bv\) within the subspace \(\mathcal{K}_m(\bA, \bv)\) by setting \(\bu_m(t) = \bV_m \bz_m(t)\), where \(\bz_m(t) \in \fC^m\). The residual defect of the ODE is \(\br_m(t) = \bu_m'(t) - \bA\bu_m(t) = \bV_m \bz_m'(t) - \bA\bV_m\bz_m(t)\). The vector \(\bz_m(t)\) contains time-dependent coordinates in the fixed basis \(\bV_m\). We cannot generally make every component of the full differential defect zero with only these \(m\) coordinates. Instead we require zero components along all basis vectors. This is the meaning of the following Galerkin condition.
Imposing the Galerkin orthogonality condition \(\bV_m^* \br_m(t) = \bzero\) yields \[ \begin{align} \bV_m^* \bV_m \bz_m'(t) - \bV_m^* \bA \bV_m \bz_m(t) = \bzero \implies \bz_m'(t) = \bH_m \bz_m(t). \end{align} \] The initial condition \(\bu_m(0) = \bv = \beta \bv_1 = \beta \bV_m \be_1\) requires \(\bz_m(0) = \beta \be_1\). Solving the reduced \(m \times m\) linear system gives \(\bz_m(t) = \beta e^{t\bH_m}\be_1\). Multiplying by \(\bV_m\) recovers \(\bu_m(t) = \beta \bV_m e^{t\bH_m}\be_1\).
The small exponential is \(m\times m\), and \(\be_1\) has length \(m\). The final multiplication by \(\bV_m\) returns the vector to the original \(n\)-dimensional space. No \(n\times n\) exponential was formed. At an invariant-subspace termination the same reduced equation is exact for this initial vector.
An approximate trajectory can have the right initial value but fail to satisfy the differential equation. Its defect is the difference \(\bu_m'-\bA\bu_m\). This is computable from the projected solution. Subtracting the approximate equation from the exact one produces a forced linear equation for the error. Variation of constants then shows how past defects propagate to the final time.
The defect in the differential equation satisfies \[ \begin{align} \bu_m'(t) - \bA\bu_m(t) = -\beta h_{m+1,m} [\be_m^T e^{t\bH_m}\be_1] \bv_{m+1}. \end{align} \] Integrating the defect via variation of constants yields the exact error identity \[ \begin{align} e^{t\bA}\bv - \beta \bV_m e^{t\bH_m}\be_1 = \beta h_{m+1,m} \int_0^t e^{(t-\tau)\bA} \bv_{m+1} [\be_m^T e^{\tau\bH_m}\be_1]\,d\tau. \end{align} \] In the Euclidean norm, if the operator \(\bA\) generates a contractive semigroup satisfying \(\|e^{\tau\bA}\|_2 \leq 1\) for all \(\tau \geq 0\), the error is bounded by \[ \begin{align} \|e^{t\bA}\bv - \beta \bV_m e^{t\bH_m}\be_1\|_2 \leq \beta |h_{m+1,m}| \int_0^t |\be_m^T e^{\tau\bH_m}\be_1|\,d\tau. \end{align} \]
Using the Arnoldi relation \(\bA\bV_m = \bV_m\bH_m + h_{m+1,m}\bv_{m+1}\be_m^T\), the ODE defect is \[ \begin{align} \bu_m'(t) - \bA\bu_m(t) &= \bV_m \bz_m'(t) - \bA\bV_m \bz_m(t) \\ &= \bV_m \bH_m \bz_m(t) - \left( \bV_m\bH_m + h_{m+1,m}\bv_{m+1}\be_m^T \right) \bz_m(t) \\ &= -h_{m+1,m} \bv_{m+1} \be_m^T \bz_m(t) \\ &= -\beta h_{m+1,m} [\be_m^T e^{t\bH_m}\be_1] \bv_{m+1}. \end{align} \] The approximation error \(\be(t) = \bu(t) - \bu_m(t)\) satisfies \(\be'(t) = \bA\be(t) - (\bu_m'(t) - \bA\bu_m(t))\) with \(\be(0) = \bzero\). The error equation can be integrated directly. Differentiate \(e^{-t\bA}\be(t)\), using the product rule and the fact that \(\bA\) commutes with its own exponential. The \(\bA\be\) terms cancel, leaving \(e^{-t\bA}[\bA\bu_m(t)-\bu_m'(t)]\). Integrate from zero to \(t\) and multiply by \(e^{t\bA}\). The initial error is zero because both trajectories start at \(\bv\).
Integrating via variation of constants: \[ \begin{align} \be(t) = \int_0^t e^{(t-\tau)\bA} \left[ \bA\bu_m(\tau) - \bu_m'(\tau) \right] d\tau = \beta h_{m+1,m} \int_0^t e^{(t-\tau)\bA} \bv_{m+1} [\be_m^T e^{\tau\bH_m}\be_1]\,d\tau. \end{align} \] Taking norms with \(\|e^{(t-\tau)\bA}\| \leq 1\) and \(\|\bv_{m+1}\|_2 = 1\) yields \[ \begin{align} \|\be(t)\| \leq \beta |h_{m+1,m}| \int_0^t \|e^{(t-\tau)\bA}\|_2 \|\bv_{m+1}\|_2 |\be_m^T e^{\tau\bH_m}\be_1|\,d\tau \leq \beta |h_{m+1,m}| \int_0^t |\be_m^T e^{\tau\bH_m}\be_1|\,d\tau. \end{align} \]
The last inequality requires \(t\geq0\) and the stated bound on the propagator at every intervening time \(t-\tau\). Without that contractivity assumption, the exact error identity remains valid, but its norm bound must retain \(\|e^{(t-\tau)\bA}\|_2\) under the integral. This distinguishes an exact representation from an estimate requiring an extra hypothesis.
Repeat the norm estimate in the \(1\)-norm. Explain why the right-hand side acquires the factor \(\|\bv_{m+1}\|_1\) when the Arnoldi basis is Euclidean-orthonormal. For a column-conservative Markov generator, use uniformization to show that \(\|e^{t\bA}\|_1=1\), and explain why this does not imply Euclidean contractivity.
(Superlinear convergence of Krylov actions) Hochbruck and Lubich bound the error of the Krylov approximation in terms of the spectrum and the time step (Hochbruck and Lubich 1997). For a symmetric negative semidefinite matrix with eigenvalues in \([-4\rho,0]\), the error in approximating \(e^{\tau\bA}\bv\) from \(\mathcal{K}_m(\bA,\bv)\) is bounded by a constant multiple of \(e^{-m^2/(5\rho\tau)}\) when \(\sqrt{4\rho\tau}\leq m\leq2\rho\tau\). For \(m\geq2\rho\tau\) the bound decays superlinearly in \(m\). The relevant scale is therefore \(\rho\tau\), not \(\|\bA\|_2\) alone, and in the first regime the required dimension grows only like the square root of \(\rho\tau\). The same paper gives analogous bounds for non-Hermitian matrices whose numerical range lies in a known region of the left half-plane. The projected approximation also adapts to the spectrum seen from the starting vector rather than to the full matrix norm alone. Grid-independent convergence requires additional spectral or semigroup assumptions and should be checked for the discretization at hand.
32.3 The Continuous-Adjoint Sensitivity Formula
In parameter inference, we estimate unknown coefficients in an evolution model from discrete observations. Consider an affine generator family $$ \[\begin{align} \bA(\btheta) = \bA_0 + \sum_{j=1}^{M_{\mathrm{lib}}} \theta_j \bA_j, \end{align}\] $$ where \(\bA_0\) is a baseline operator, the matrices \(\bA_j\) represent candidate physical mechanisms, and \(\btheta = (\theta_1, ..., \theta_{M_{\mathrm{lib}}})^T\) is a vector of unknown rate parameters.
Suppose the prediction \(\by\) is compared with observed data through a real scalar function \(\ell\). To adjust a parameter, we need the derivative of that comparison with respect to the parameter. Differentiating the ODE gives one possible calculation for each parameter. An adjoint rearranges the chain rule so that all parameters share the same backward propagation. Parameters are real, and the initial vector is fixed. For complex states we use the real differential convention \(d\ell=\operatorname{Re}[(\nabla_{\by}\ell)^*d\by]\).
Let \(\by = e^{h\bA(\btheta)}\bv\) denote the state propagated across an interval of length \(h\). Let \(\ell(\by)\) be a differentiable scalar loss with endpoint gradient \(\nabla_{\by}\ell\). Then the derivative of the loss with respect to coefficient \(\theta_j\) is \[ \begin{align} \frac{\partial \ell}{\partial \theta_j} = h \operatorname{Re} \int_0^1 \blambda(s)^* \bA_j \bm{f}(s)\,ds, \end{align} \] where the forward path \(\bm{f}(s)\) and adjoint path \(\blambda(s)\) are defined by \[ \begin{align} \bm{f}(s) = e^{sh\bA}\bv, \qquad \blambda(s) = e^{(1-s)h\bA^*} \nabla_{\by}\ell, \qquad 0 \leq s \leq 1. \end{align} \]
Let \(\bm{f}(s)\) satisfy the ODE \(\bm{f}'(s) = h\bA(\btheta)\bm{f}(s)\) with \(\bm{f}(0) = \bv\) and \(\by = \bm{f}(1)\). Let \(\bg_j(s)=\partial\bm f(s)/\partial\theta_j\). The product rule applied to \(\bA(\btheta)\bm f(s)\) gives two terms: one differentiates the matrix and the other the state. Since the family is affine, \(\partial\bA/\partial\theta_j=\bA_j\). The initial state is fixed, so \(\bg_j(0)=\bzero\).
Differentiating this initial-value problem with respect to \(\theta_j\) yields the tangent equation \[ \begin{align} \frac{d}{ds} \left( \frac{\partial \bm{f}}{\partial \theta_j} \right) = h\bA \left( \frac{\partial \bm{f}}{\partial \theta_j} \right) + h\bA_j \bm{f}(s), \qquad \frac{\partial \bm{f}(0)}{\partial \theta_j} = \bzero. \end{align} \] Applying variation of constants at the endpoint \(s = 1\) gives \[ \begin{align} \frac{\partial \by}{\partial \theta_j} = h \int_0^1 e^{(1-s)h\bA} \bA_j \bm{f}(s)\,ds. \end{align} \] Applying the chain rule to the scalar loss \(\ell(\by)\) and taking the real part produces \[ \begin{align} \frac{\partial \ell}{\partial \theta_j} &= \operatorname{Re}\left( (\nabla_{\by}\ell)^* \frac{\partial \by}{\partial \theta_j} \right) = h \operatorname{Re} \int_0^1 (\nabla_{\by}\ell)^* e^{(1-s)h\bA} \bA_j \bm{f}(s)\,ds \\ &= h \operatorname{Re} \int_0^1 \left( e^{(1-s)h\bA^*} \nabla_{\by}\ell \right)^* \bA_j \bm{f}(s)\,ds = h \operatorname{Re} \int_0^1 \blambda(s)^* \bA_j \bm{f}(s)\,ds. \end{align} \]
The identity \((e^{(1-s)h\bA^*})^*=e^{(1-s)h\bA}\) follows by conjugate-transposing the power series term by term. This is the step that moves propagation from the state derivative to the loss gradient. In a real problem the conjugations and real-part operation reduce to ordinary transposes and the usual chain rule.
Check the formula when \(A(\theta)=\theta\) is scalar, \(v=1\), and \(\ell(y)=\tfrac12(y-y_{\rm obs})^2\). Differentiate \(y=e^{h\theta}\) directly, then evaluate the adjoint integral. Why does its integrand become independent of \(s\) in this example?
(The adjoint sharing principle) Evaluating a separate directional Fréchet derivative \(L_{\exp}(h\bA, h\bA_j)\) for each candidate matrix \(\bA_j\) repeats the forward exponential propagation \(M_{\mathrm{lib}}\) times. The adjoint identity separates propagation from the candidate directions. We compute the forward path \(\bm{f}\) and adjoint path \(\blambda\) once per observation interval, and evaluate their contractions against \(\bA_j\) via numerical quadrature.
32.4 Shared Krylov Spaces and Quadrature
To evaluate the bilinear integral numerically, we approximate both paths using independent forward and adjoint Krylov spaces, and integrate the contraction using Gauss–Legendre quadrature.
Let \(\mathcal{K}_{m_f}(\bA, \bv)\) have basis \(\bV_f\) and projected Hessenberg matrix \(\bH_f\), with \(\beta_f = \|\bv\|_2\). Let \(\mathcal{K}_{m_a}(\bA^*, \nabla_{\by}\ell)\) have basis \(\bV_a\) and projected matrix \(\bH_a\), with \(\beta_a = \|\nabla_{\by}\ell\|_2\). At any Gauss–Legendre node \(s_q \in [0, 1]\) with quadrature weight \(w_q\), the path approximations are \[ \begin{align} \bm{f}^{(q)} = \beta_f \bV_f e^{s_q h \bH_f}\be_1, \qquad \blambda^{(q)} = \beta_a \bV_a e^{(1-s_q) h \bH_a}\be_1. \end{align} \] The coefficient gradient evaluates to \[ \begin{align} \frac{\partial \ell}{\partial \theta_j} \approx h \sum_{q=1}^{n_q} w_q \operatorname{Re}\left[ (\blambda^{(q)})^* \bA_j \bm{f}^{(q)} \right]. \end{align} \]
One-Sided Termination: Construct a \(3 \times 3\) example where \(\bv\) is an exact eigenvector of \(\bA\), yielding forward residual \(\rho_f = 0\) at step 1, while the adjoint starting vector is not an eigenvector. Explain why product heuristics fail in this setting.
(One-sided termination in refinement heuristics) A common stopping diagnostic tests the product of forward and adjoint residuals \(\rho_f \rho_a\). If the forward path reaches an invariant subspace, \(\rho_f = 0\), causing the product to vanish even when the adjoint path is at depth \(m_a = 2\) and completely unresolved. Reliable stopping criteria require monitoring forward and adjoint convergence separately.
32.5 Matrix Logarithms and Generator Recovery
A discrete observation map records evolution over a fixed interval. In the scalar case, recovering a decay rate from a positive multiplier uses \(a=h^{-1}\log k\). For oscillations, the exponential loses integer multiples of \(2\pi\) in phase. The principal matrix logarithm chooses one branch, but recovering the actual generator also requires that its frequencies fall within that branch.
Let \(\bK \in \fC^{n \times n}\) have no eigenvalues on the closed negative real axis \((-\infty, 0]\). The principal matrix logarithm \(\log(\bK)\) is the unique matrix \(\bA\) such that \(e^\bA = \bK\) and all eigenvalues of \(\bA\) satisfy \(|\operatorname{Im}(\lambda)| < \pi\).
Logarithm Branch Cuts: Let an evolution operator have oscillatory eigenvalue \(\lambda = -\gamma + i\omega\) with \(\omega = 50\pi\). Determine the maximum observation interval \(h\) that avoids branch-cut crossing in the principal matrix logarithm.
(Projection and finite-time closure bias) If \(P\) denotes the orthogonal projection onto a subspace of observables \(\calF\), the projected generator obtained from finite-time observations satisfies \[ \begin{align} \widehat{\bA}_h = h^{-1}\log\left( P e^{h\calA} |_{\calF} \right) \neq P\calA|_{\calF}. \end{align} \] Unless \(\calF\) is invariant under \(\calA\), projection and exponentiation do not commute. The resulting finite-time closure bias can be expanded in powers of \(h\), but its leading order depends on which terms leave the observable space. Any rate such as \(O(h^r)\) therefore requires a separately defined closure depth and corresponding assumptions.
32.6 Further Exercises
Dense vs. Action Complexity: A sparse matrix \(\bA \in \fR^{10^6 \times 10^6}\) has 10 nonzero entries per row. Compute the memory required to store \(e^{h\bA}\) as a dense array. Compare this with storing \(m=30\) Arnoldi basis vectors.
Adjoint Sharing: Let an overcomplete library contain \(M_{\mathrm{lib}} = 200\) candidate directions. Let each forward and adjoint Krylov construction use \(m\) products, and count products with \(\bA\) or \(\bA^*\) separately from contractions with candidate matrices. Compare rebuilding a forward and adjoint path separately for each of the 200 coefficients with sharing the two paths across all coefficients at five quadrature nodes. State the cost model for a candidate contraction, and explain why the number of candidates and nodes alone does not determine the cost of directional Fréchet derivatives.
Taylor vs. Krylov Convergence: For the 1D discrete Laplacian \(\bA\) with \(\|\bA\|_2 = 4 \times 10^4\) and \(t = 10^{-2}\), compare the polynomial degrees suggested by a direct Taylor remainder bound and by Krylov projection. State every estimate you use, since neither degree is determined by \(\|\bA\|_2\) alone.
Higham gives the general theory of matrix functions (Higham 2008). Moler and Van Loan explain why apparently reasonable methods for the matrix exponential can fail, and Al-Mohy and Higham develop a modern action method that avoids forming the exponential (Moler and Van Loan 2003; Al-Mohy and Higham 2011).