← Blog

Eigenpairs from Matrix–Vector Products: Power Iteration, Deflation, Lanczos, and Arnoldi

This document rigorously studies what can be learned about the A nonzero vector u\mathbf u is an eigenvector of A\mathbf A, with eigenvalue λ\lambda, when Au=λu.\mathbf A\mathbf u=\lambda\mathbf u. Multiplying u\mathbf u by A\mathbf A only rescales it, by the factor λ\lambda, and the pair (λ,u)(\lambda,\mathbf u) is called an eigenpair. For example, A=[2112]\mathbf A=\left[\begin{smallmatrix}2&1\\1&2\end{smallmatrix}\right] maps [1,1]⊤[1,1]^\top to 3[1,1]⊤3[1,1]^\top and [1,−1]⊤[1,-1]^\top to itself, so these two vectors are eigenvectors, with the eigenvalues 33 and 11. Rewriting the definition as (A−λ Id)u=0(\mathbf A-\lambda\,\mathbb I_d)\mathbf u=0 shows that λ\lambda is an eigenvalue exactly when the matrix A−λ Id\mathbf A-\lambda\,\mathbb I_d is singular, that is, when λ\lambda is a root of the polynomial λ↦det⁡(λ Id−A),\lambda\mapsto\det(\lambda\,\mathbb I_d-\mathbf A), of degree dd, called the characteristic polynomial of A\mathbf A. The eigenvectors of λ\lambda are then the nonzero vectors of the null space ker⁡(A−λ Id)\ker(\mathbf A-\lambda\,\mathbb I_d), called the eigenspace of λ\lambda. A real polynomial can have complex roots, so a real matrix can have complex eigenvalues. The rotation [0−110]\left[\begin{smallmatrix}0&-1\\1&0\end{smallmatrix}\right] turns every real vector by a quarter turn, so it has no real eigenvector, and its characteristic polynomial λ2+1\lambda^2+1 has the roots ±i\pm i. A real symmetric matrix, in contrast, has only real eigenvalues and an orthonormal basis of eigenvectors, by the spectral theorem used in Sections 1 to 4. Computing the characteristic polynomial requires every entry of A\mathbf A, which the setting of this post does not provide. The definition itself, however, involves A\textcolor{#2563eb}{\mathbf A} only through the product Au\textcolor{#2563eb}{\mathbf A\mathbf u}. One product is enough to test a candidate pair (λ,u)(\lambda,\mathbf u), because the residual Au−λu=(A−λ Id)u\mathbf A\mathbf u-\lambda\mathbf u=(\mathbf A-\lambda\,\mathbb I_d)\mathbf u vanishes exactly when the pair is an eigenpair. The methods of this post use A\mathbf A in no other way. For a symmetric matrix, Lemma 2 and Remark 11 also turn a small residual into a guarantee: if ∥u∥=1\|\mathbf u\|=1, then λ\lambda is within ∥Au−λu∥\|\mathbf A\mathbf u-\lambda\mathbf u\| of an eigenvalue. of a real matrix A∈Rd×d\mathbf{A}\in\mathbb{R}^{d\times d} that is known only through the map x↦Ax\mathbf{x}\mapsto\mathbf{A}\mathbf{x}. Storing A\mathbf{A} takes d2d^2 numbers, and forming it can cost much more. In many applications, however, the product Ax\mathbf{A}\mathbf{x} is cheap, because it follows directly from how A\mathbf{A} is defined, whether A\mathbf{A} is built from a data matrix, a sparse graph or a discretized differential operator, or is the Hessian of a function whose gradient can be computed (Section 2 gives more examples). Two families of methods need nothing more than such products: power iteration (Section 3), which extracts one eigenpair at a time and reaches further eigenpairs through shifts and deflation, and the Lanczos method (Section 4), which builds an orthonormal basis of a Krylov subspace and solves a small tridiagonal eigenvalue problem inside it. Sections 1 to 4 assume that A\mathbf{A} is symmetric, as Hessians, covariance matrices and the adjacency matrices of undirected graphs are. The Arnoldi method (Section 5) extends the Lanczos method to nonsymmetric matrices, such as the transition matrix of a random walk on a directed graph.

The results assume neither positive definiteness nor distinct eigenvalues. Each statement says precisely which eigenpairs are recovered, and the remarks say which are not. All the delicate cases are treated explicitly: a dominant eigenvalue of either sign, opposite eigenvalues of equal magnitude, repeated eigenvalues, and zero eigenvalues. Sections 3, 4 and 5 each end with an implementable procedure: Algorithm 1 for power iteration, Algorithm 2 for the Lanczos method and Algorithm 3 for the Arnoldi method. All three stop when a residual computed with the original matrix falls below a tolerance. The figures run these procedures on matrices with prescribed spectra and on five matrices from applications: the adjacency matrix of a graph, a covariance matrix and the Hessian of a neural network (Section 2), and the transition matrix of a random walk on a directed graph and a discretized convection–diffusion operator (Section 5.1). The code that produces them, with implementations of the three algorithms, is on GitHub.

For a symmetric A\mathbf{A}, the central object is the decomposition of a vector along the eigenspaces of A\mathbf{A}. Let Λ(A)\Lambda(\mathbf{A}) be the set of distinct eigenvalues of A\mathbf{A}, and let Πλ\Pi_\lambda be the orthogonal projection onto the eigenspace of λ∈Λ(A)\lambda\in\Lambda(\mathbf{A}). Then, for every vector v∈Rd\mathbf{v}\in\mathbb{R}^d and every integer k≥0k\ge0,

v=∑λ∈Λ(A)Πλv,Akv=∑λ∈Λ(A)λk Πλv.\mathbf{v}=\sum_{\lambda\in\Lambda(\mathbf{A})}\Pi_\lambda\mathbf{v}, \qquad \mathbf{A}^k\mathbf{v}=\sum_{\lambda\in\Lambda(\mathbf{A})}\lambda^k\,\Pi_\lambda\mathbf{v}.

Started from v\mathbf{v}, power iteration keeps the last vector of the sequence v,Av,A2v,…\mathbf{v},\mathbf{A}\mathbf{v},\mathbf{A}^2\mathbf{v},\dots and lets the factors λk\lambda^k select the eigenvalue of largest magnitude. The Lanczos method keeps the whole sequence and optimizes over its span. Every proof of Sections 3 and 4 follows the components Πλv\Pi_\lambda\mathbf{v} through these operations, and Section 5 shows what changes when the eigenspaces are no longer orthogonal.

1. Notation and preliminaries

Notation

  • ∥⋅∥\|\cdot\| is the Euclidean norm, Id\mathbb{I}_d the d×dd\times d identity matrix, δa,b\delta_{a,b} the Kronecker delta, equal to 11 if a=ba=b and to 00 otherwise, for aa and bb in any set (we write δij\delta_{ij}, without the comma, when ii and jj are integers), and em=[0,…,0,1]⊤∈Rm\mathbf{e}_m=[0,\ldots,0,1]^\top\in\mathbb{R}^m the last standard basis vector of Rm\mathbb{R}^m.

  • For a subspace S⊆RdS\subseteq\mathbb{R}^d, S⊥={x∈Rd:x⊤s=0 ∀s∈S}S^\perp=\{\mathbf{x}\in\mathbb{R}^d:\mathbf{x}^\top\mathbf{s}=0 \ \forall \mathbf{s}\in S\} is its orthogonal complement.

  • For a matrix M\mathbf{M} with nn columns, ker⁡(M)={x∈Rn:Mx=0}\ker(\mathbf{M})=\{\mathbf{x}\in\mathbb{R}^n:\mathbf{M}\mathbf{x}=0\} is its null space and range⁡(M)={Mx:x∈Rn}\operatorname{range}(\mathbf{M})=\{\mathbf{M}\mathbf{x}:\mathbf{x}\in\mathbb{R}^n\} is its column space.

  • In Sections 1 to 4, A∈Rd×d\mathbf{A}\in\mathbb{R}^{d\times d} is symmetric, and Section 5 drops this assumption. We let Λ(A)\Lambda(\mathbf{A}) be the set of its distinct eigenvalues, so that a repeated eigenvalue appears once in Λ(A)\Lambda(\mathbf{A}), and we write λmin⁡(A)=min⁡Λ(A)\lambda_{\min}(\mathbf{A})=\min\Lambda(\mathbf{A}) and λmax⁡(A)=max⁡Λ(A)\lambda_{\max}(\mathbf{A})=\max\Lambda(\mathbf{A}). For each λ∈Λ(A)\lambda\in\Lambda(\mathbf{A}), Eλ=ker⁡(A−λId)E_\lambda=\ker(\mathbf{A}-\lambda\mathbb{I}_d) is the eigenspace of λ\lambda, and Πλ\Pi_\lambda is the orthogonal projection onto EλE_\lambda. If the columns u1,…,umλ\mathbf{u}_1,\dots,\mathbf{u}_{m_\lambda} of Uλ∈Rd×mλ\mathbf{U}_\lambda\in\mathbb{R}^{d\times m_\lambda} form an orthonormal basis of EλE_\lambda, where mλm_\lambda is the multiplicity of λ\lambda, then Πλ=UλUλ⊤=∑i=1mλuiui⊤\Pi_\lambda=\mathbf{U}_\lambda\mathbf{U}_\lambda^\top=\sum_{i=1}^{m_\lambda}\mathbf{u}_i\mathbf{u}_i^\top, that is, Πλx=∑i=1mλ(ui⊤x) ui\Pi_\lambda\mathbf{x}=\sum_{i=1}^{m_\lambda}(\mathbf{u}_i^\top\mathbf{x})\,\mathbf{u}_i keeps the components of x\mathbf{x} along these basis vectors. An expression in terms of A\mathbf{A} alone is given below.

  • For vectors u1,…,um∈Rd\mathbf{u}_1,\dots,\mathbf{u}_m\in\mathbb{R}^d, [u1,…,um]∈Rd×m[\mathbf{u}_1,\dots,\mathbf{u}_m]\in\mathbb{R}^{d\times m} is the matrix with these columns, and span⁡{u1,…,um}\operatorname{span}\{\mathbf{u}_1,\dots,\mathbf{u}_m\} is the set of their linear combinations

  • diag⁡(c1,…,cm)\operatorname{diag}(c_1,\dots,c_m) is the diagonal matrix with diagonal entries c1,…,cm∈Rc_1,\dots,c_m \in \mathbb{R}.

  • N(0,Id)\mathcal{N}(0,\mathbb{I}_d) is the standard Gaussian distribution on Rd\mathbb{R}^d, and sgn⁡(t)∈{−1,1}\operatorname{sgn}(t)\in\{-1,1\} is the sign of a real number t≠0t\neq0.

Spectral decomposition

When A\mathbf{A} is symmetric, the Every real symmetric matrix has an orthonormal basis of eigenvectors. Collecting the basis vectors that share the eigenvalue λ\lambda as the columns of a matrix Uλ\mathbf U_\lambda gives Πλ=UλUλ⊤\Pi_\lambda=\mathbf U_\lambda\mathbf U_\lambda^\top, and the three identities follow from the orthonormality of the basis. gives

A=∑λ∈Λ(A)λ Πλ,Id=∑λ∈Λ(A)Πλ,ΠλΠμ=δλ,μ Πλ.\mathbf{A}=\sum_{\lambda\in\Lambda(\mathbf{A})}\lambda\,\Pi_\lambda, \qquad \mathbb{I}_d=\sum_{\lambda\in\Lambda(\mathbf{A})}\Pi_\lambda, \qquad \Pi_\lambda\Pi_\mu=\delta_{\lambda,\mu}\,\Pi_\lambda .

The powers of A\mathbf{A} act on each eigenspace separately, and so does every polynomial: for every integer k≥0k\ge0 and every polynomial pp,

Ak=∑λ∈Λ(A)λk Πλ,p(A)=∑λ∈Λ(A)p(λ) Πλ.\mathbf{A}^k=\sum_{\lambda\in\Lambda(\mathbf{A})}\lambda^k\,\Pi_\lambda, \qquad p(\mathbf{A})=\sum_{\lambda\in\Lambda(\mathbf{A})}p(\lambda)\,\Pi_\lambda .

In fact, each column ui\mathbf{u}_i of Uλ\mathbf{U}_\lambda is an eigenvector, Aui=λui\mathbf{A}\mathbf{u}_i=\lambda\mathbf{u}_i, so multiplying Πλ=∑i=1mλuiui⊤\Pi_\lambda=\sum_{i=1}^{m_\lambda} \mathbf{u}_i\mathbf{u}_i^\top by A\mathbf{A} gives A Πλ=∑i=1mλ(Aui) ui⊤=λ Πλ.\mathbf{A}\,\Pi_\lambda=\sum_{i=1}^{m_\lambda}(\mathbf{A}\mathbf{u}_i)\,\mathbf{u}_i^\top=\lambda\,\Pi_\lambda. The spectral theorem gives the same identity, since A Πλ=∑μμ ΠμΠλ=λ Πλ2\mathbf{A}\,\Pi_\lambda=\sum_{\mu}\mu\,\Pi_\mu\Pi_\lambda=\lambda\,\Pi_\lambda^2 and Πλ2=Πλ\Pi_\lambda^2=\Pi_\lambda. Applying it kk times gives AkΠλ=λkΠλ\mathbf{A}^k\Pi_\lambda=\lambda^k\Pi_\lambda, and multiplying Id=∑λΠλ\mathbb{I}_d=\sum_\lambda\Pi_\lambda by Ak\mathbf{A}^k then gives the first identity above. For a polynomial p(t)=∑k=0ncktkp(t)=\sum_{k=0}^n c_k t^k, we have p(A)=∑k=0nckAk=∑λ(∑k=0nckλk)Πλ=∑λp(λ)Πλp(\mathbf{A})=\sum_{k=0}^nc_k\mathbf{A}^k=\sum_\lambda\bigl(\sum_{k=0}^nc_k\lambda^k\bigr)\Pi_\lambda=\sum_\lambda p(\lambda)\Pi_\lambda, which is the second identity.

Taking for pp the Given finitely many distinct numbers, the Lagrange polynomial attached to one of them equals 11 at that number and 00 at all the others. For λ∈Λ(A)\lambda\in\Lambda(\mathbf A) it is ℓλ(t)=∏μ∈Λ(A), μ≠λt−μλ−μ.\displaystyle\ell_\lambda(t)=\prod_{\mu\in\Lambda(\mathbf A),\,\mu\neq\lambda}\frac{t-\mu}{\lambda-\mu}. Each factor vanishes at its own μ\mu and equals 11 at t=λt=\lambda, so ℓλ(λ)=1\ell_\lambda(\lambda)=1 and ℓλ(μ)=0\ell_\lambda(\mu)=0 for every other μ∈Λ(A)\mu\in\Lambda(\mathbf A). Its degree is ∣Λ(A)∣−1|\Lambda(\mathbf A)|-1. Substituting it for pp in p(A)=∑νp(ν) Πνp(\mathbf A)=\sum_{\nu}p(\nu)\,\Pi_\nu keeps only the term ν=λ\nu=\lambda, so ℓλ(A)=Πλ.\ell_\lambda(\mathbf A)=\Pi_\lambda. For example, if Λ(A)={1,3}\Lambda(\mathbf A)=\{1,3\}, then ℓ1(t)=(3−t)/2\ell_1(t)=(3-t)/2 and Π1=(3 Id−A)/2\Pi_1=(3\,\mathbb I_d-\mathbf A)/2. that equals 11 at λ\lambda and 00 at the other distinct eigenvalues expresses each projection through A\mathbf{A} alone:

Πλ=∏μ∈Λ(A)μ≠λA−μ Idλ−μ,\Pi_\lambda=\prod_{\substack{\mu\in\Lambda(\mathbf{A})\\\mu\neq\lambda}}\frac{\mathbf{A}-\mu\,\mathbb{I}_d}{\lambda-\mu},

where the empty product, when A\mathbf{A} has a single distinct eigenvalue, equals Id\mathbb{I}_d.

These projections are used in the analysis. The algorithms below do not require computing them.

2. Matrices known only through their products

The results below use A\mathbf{A} only through the products x↦Ax\mathbf{x}\mapsto\mathbf{A}\mathbf{x}, so they hold whatever routine computes those products. The following cases are typical.

2.1 Hessians

In many problems, A=∇θ2f(θ)\mathbf{A}=\nabla_\theta^2f(\theta) is the Hessian of a function f:Rd→Rf:\mathbb{R}^d\to\mathbb{R} that is twice continuously differentiable in a neighborhood of a point θ\theta. Examples include the following.

  • Training losses. The training loss of a (deep) neural network with parameters θ\theta is f(θ)=1n∑i=1nℓ(zi(θ),yi)f(\theta)=\frac1n\sum_{i=1}^n \ell\bigl(\mathbf{z}_i(\theta),\mathbf{y}_i\bigr), where zi(θ)\mathbf{z}_i(\theta) is the output of the network on the ii-th of nn training inputs, yi\mathbf{y}_i is the target for that input, and ℓ\ell is a cost function such as ℓ(z,y)=12∥z−y∥2\ell(\mathbf{z},\mathbf{y})=\frac12\|\mathbf{z}-\mathbf{y}\|^2. Its curvature is studied to understand optimization (how training progresses) and generalization (how the network performs on new inputs).
  • Likelihoods. The negative log-likelihood of observations y1,…,yn\mathbf{y}_1,\dots,\mathbf{y}_n under a statistical model with density p(⋅ ;θ)p(\cdot\,;\theta) is f(θ)=−∑i=1nlog⁡p(yi;θ)f(\theta)=-\sum_{i=1}^n\log p(\mathbf{y}_i;\theta). Its minimizer θ^\hat\theta is the maximum-likelihood estimate, and the Hessian ∇2f(θ^)\nabla^2f(\hat\theta) is the observed Fisher information. For large samples, its inverse approximates the covariance of θ^\hat\theta, that is, how precisely the data determine the parameters.
  • Newton-type optimization. To minimize f(θ)f(\theta), Near θ\theta, Newton’s method replaces ff by its second-order Taylor expansion, a quadratic function of the step: f(θ+Δθ)≈f(θ)+∇f(θ)⊤Δθ+12 Δθ⊤∇2f(θ) Δθ.f(\theta+\Delta\theta)\approx f(\theta)+\nabla f(\theta)^\top\Delta\theta+\tfrac12\,\Delta\theta^\top\nabla^2f(\theta)\,\Delta\theta. The gradient of this model with respect to Δθ\Delta\theta is ∇f(θ)+∇2f(θ) Δθ\nabla f(\theta)+\nabla^2f(\theta)\,\Delta\theta, and setting it to zero gives the linear system ∇2f(θ) Δθ=−∇f(θ)\nabla^2f(\theta)\,\Delta\theta=-\nabla f(\theta). When ∇2f(θ)\nabla^2f(\theta) is positive definite, the model is a bowl and Δθ\Delta\theta goes to its bottom. Otherwise, the model has no minimum, and practical methods modify the step. In one dimension, the step Δθ=−f′(θ)/f′′(θ)\Delta\theta=-f'(\theta)/f''(\theta) moves to the point where the tangent line of f′f' at θ\theta crosses zero, as Newton’s method does to solve f′=0f'=0. Write the Hessian in an orthonormal eigenbasis, ∇2f(θ)=∑j=1dλjujuj⊤\nabla^2f(\theta)=\sum_{j=1}^d\lambda_j\mathbf{u}_j\mathbf{u}_j^\top, with every λj>0\lambda_j>0. Since ui⊤uj=δij\mathbf{u}_i^\top\mathbf{u}_j=\delta_{ij}, multiplying the sum on the left by ui⊤\mathbf{u}_i^\top gives ui⊤∇2f(θ)=λiui⊤\mathbf{u}_i^\top\nabla^2f(\theta)=\lambda_i\mathbf{u}_i^\top. Multiplying the linear system on the left by ui⊤\mathbf{u}_i^\top therefore gives λi ui⊤Δθ=−ui⊤∇f(θ)\lambda_i\,\mathbf{u}_i^\top\Delta\theta=-\mathbf{u}_i^\top\nabla f(\theta), that is, ui⊤Δθ=−ui⊤∇f(θ)/λi.\mathbf{u}_i^\top\Delta\theta=- \mathbf{u}_i^\top\nabla f(\theta)/\lambda_i. Expanding the step in the same basis, Δθ=∑i=1d(ui⊤Δθ) ui\Delta\theta=\sum_{i=1}^d(\mathbf{u}_i^\top\Delta\theta)\,\mathbf{u}_i, and substituting each coordinate gives Δθ=−∑i=1dui⊤∇f(θ)λi ui.\displaystyle\Delta\theta=-\sum_{i=1}^d\frac{\mathbf{u}_i^\top\nabla f(\theta)}{\lambda_i}\,\mathbf{u}_i. Each component of the gradient is divided by the curvature λi\lambda_i along ui\mathbf{u}_i, so the step is short where ff is steep and long where ff is flat. Gradient descent instead takes the step Δθ=−α∇f(θ)=−∑i=1dα (ui⊤∇f(θ)) ui,\displaystyle\Delta\theta=-\alpha\nabla f(\theta)=-\sum_{i=1}^d\alpha\,\bigl(\mathbf{u}_i^\top\nabla f(\theta)\bigr)\,\mathbf{u}_i, which multiplies every coordinate by the same factor α\alpha. takes the step Δθ\Delta\theta that solves the linear system ∇2f(θ) Δθ=−∇f(θ)\nabla^2f(\theta)\,\Delta\theta=-\nabla f(\theta). Solving it by forming and factorizing the d×dd\times d Hessian would take d2d^2 numbers of storage and about d3d^3 operations. Truncated Newton methods (Dembo and Steihaug, 1983) instead run a few iterations of the conjugate gradient method (Hestenes and Stiefel, 1952), which uses the Hessian only through products ∇2f(θ) x\nabla^2f(\theta)\,\mathbf{x}, computed as explained below, and stop once the step is accurate enough. The conjugate gradient method builds the same Krylov subspaces as the Lanczos method.
  • Molecular vibrations. The potential energy f(θ)f(\theta) of a molecule depends on the positions θ∈R3N\theta\in\mathbb{R}^{3N} of its NN atoms. Near an equilibrium θ⋆\theta^\star, where ∇f(θ⋆)=0\nabla f(\theta^\star)=0, small displacements obey Newton’s second law says that mass times acceleration equals force, and the force on the atoms is minus the gradient of the potential energy, −∇f(θ)-\nabla f(\theta): the atoms are pushed downhill. Near θ⋆\theta^\star, the first-order Taylor expansion of the gradient is ∇f(θ)≈∇f(θ⋆)+∇2f(θ⋆)(θ−θ⋆)=∇2f(θ⋆)(θ−θ⋆),\nabla f(\theta)\approx\nabla f(\theta^\star)+\nabla^2f(\theta^\star)(\theta-\theta^\star)=\nabla^2f(\theta^\star)(\theta-\theta^\star), because ∇f(θ⋆)=0\nabla f(\theta^\star)=0 at an equilibrium. The force is therefore a linear restoring force, as for a system of springs, and Mθ¨=−∇f(θ)\mathbf M\ddot\theta=-\nabla f(\theta) becomes the stated equation, where θ¨\ddot\theta is the acceleration, the second time derivative of the positions. Mθ¨=−∇2f(θ⋆)(θ−θ⋆)\mathbf{M}\ddot\theta=-\nabla^2f(\theta^\star)(\theta-\theta^\star), where M\mathbf{M} is the diagonal matrix of atomic masses, each repeated for the three coordinates of its atom. The eigenvectors of the In the mass-weighted coordinates x=M1/2(θ−θ⋆)\mathbf x=\mathbf M^{1/2}(\theta-\theta^\star), substituting θ−θ⋆=M−1/2x\theta-\theta^\star=\mathbf M^{-1/2}\mathbf x into the equation of motion and multiplying it on the left by M−1/2\mathbf M^{-1/2} gives x¨=−Kx,K=M−1/2∇2f(θ⋆)M−1/2.\ddot{\mathbf x}=-\mathbf K\mathbf x,\qquad\mathbf K=\mathbf M^{-1/2}\nabla^2f(\theta^\star)\mathbf M^{-1/2}. A motion in which every coordinate oscillates at the same frequency ω\omega in a fixed pattern v\mathbf v, x(t)=cos⁡(ωt) v\mathbf x(t)=\cos(\omega t)\,\mathbf v, has x¨=−ω2x\ddot{\mathbf x}=-\omega^2\mathbf x, so it solves the equation exactly when Kv=ω2v\mathbf K\mathbf v=\omega^2\mathbf v. Each eigenvector of K\mathbf K is thus a vibration pattern, a normal mode, and its eigenvalue is the squared frequency of that mode. Because K\mathbf K is symmetric, its orthonormal eigenvectors split every small motion into independent normal modes, each vibrating at its own frequency, and the weighting by M−1/2\mathbf M^{-1/2} on both sides is what keeps the matrix symmetric. At a minimum of ff, the Hessian is positive semidefinite, and so is K\mathbf K, since x⊤Kx=(M−1/2x)⊤∇2f(θ⋆)(M−1/2x)≥0\mathbf x^\top\mathbf K\mathbf x=(\mathbf M^{-1/2}\mathbf x)^\top\nabla^2f(\theta^\star)(\mathbf M^{-1/2}\mathbf x)\ge0. Its eigenvalues are therefore nonnegative, and each one is the square of a real frequency ω\omega. At a saddle point of ff, an eigenvalue −μ<0-\mu<0 would have no real square root, and the displacement along its mode would grow like eμ te^{\sqrt{\mu}\,t} instead of oscillating. For example, take two atoms of masses m1m_1 and m2m_2 at positions θ1\theta_1 and θ2\theta_2 on a line, joined by a spring of stiffness kk and rest length aa. The energy of the spring is f(θ)=k2(θ2−θ1−a)2f(\theta)=\tfrac k2(\theta_2-\theta_1-a)^2, and ∇2f(θ⋆)=k[1−1−11],K=k[1/m1−1/m1m2−1/m1m21/m2].\nabla^2f(\theta^\star)=k\begin{bmatrix}1&-1\\-1&1\end{bmatrix},\qquad\mathbf K=k\begin{bmatrix}1/m_1&-1/\sqrt{m_1m_2}\\-1/\sqrt{m_1m_2}&1/m_2\end{bmatrix}. The eigenvalues of K\mathbf K are 00, whose mode moves both atoms together and stretches nothing, and k(1/m1+1/m2)k(1/m_1+1/m_2), the trace of K\mathbf K. The second mode moves the atoms in opposite directions, the heavier one less, and it is the stretching vibration, with frequency ω=k(1/m1+1/m2)\omega=\sqrt{k(1/m_1+1/m_2)}. M−1/2∇2f(θ⋆)M−1/2\mathbf{M}^{-1/2}\nabla^2f(\theta^\star)\mathbf{M}^{-1/2} are the vibration patterns of the molecule (its normal modes), and its eigenvalues are the squared vibration frequencies ω2\omega^2. A product with this matrix is a Hessian–vector product between two diagonal scalings, M−1/2(∇2f(θ⋆)(M−1/2x))\mathbf{M}^{-1/2}\bigl(\nabla^2f(\theta^\star)(\mathbf{M}^{-1/2}\mathbf{x})\bigr), so the lowest-frequency modes of a large molecule, its slowest collective motions, can be computed without forming the 3N×3N3N\times3N Hessian.

Such a Hessian is symmetric by When the second partial derivatives of ff are continuous near θ\theta, they do not depend on the order of differentiation: ∂2f/∂θi∂θj=∂2f/∂θj∂θi\partial^2f/\partial\theta_i\partial\theta_j=\partial^2f/\partial\theta_j\partial\theta_i. The Hessian is therefore a real symmetric matrix.. In that case, each product can be evaluated as Ax=∇θ(∇θf(θ)⊤x),\mathbf{A}\mathbf{x}=\nabla_\theta\bigl(\nabla_\theta f(\theta)^\top\mathbf{x}\bigr), with x\mathbf{x} held constant during differentiation. The scalar ∇θf(θ)⊤x\nabla_\theta f(\theta)^\top\mathbf{x} is the directional derivative of ff along x\mathbf{x}. Its gradient with respect to θ\theta is ∇θ2f(θ)⊤x\nabla_\theta^2f(\theta)^\top\mathbf{x}, which equals Ax\mathbf{A}\mathbf{x} because the Hessian is symmetric. Automatic differentiation therefore returns the product at a The product is obtained by differentiating the gradient computation once more, in forward or reverse mode. Each pass costs a small constant multiple of the original computation, so the product costs about as much as a few gradient evaluations. of the cost of a gradient (Pearlmutter, 1994), and the d×dd\times d matrix is never formed.

The point θ\theta and everything that defines ff must remain fixed during an eigensolver run. For a training loss, evaluating it on a different random subset of the data (a minibatch) between two products changes the matrix being analyzed, and the statements below then no longer describe the computation.

Every symmetric matrix A\mathbf{A} is in fact a Hessian: the quadratic x↦12x⊤Ax\mathbf{x}\mapsto\frac12\mathbf{x}^\top\mathbf{A}\mathbf{x} has the Hessian A\mathbf{A} at every point. This does not help to compute products, since the gradient of that quadratic is Ax\mathbf{A}\mathbf{x} itself. The Hessian route pays off when ff is given by a program whose gradient is cheap, so that curvature is obtained from first-order code. For the matrices of the following section, the products come instead from the structure that defines A\mathbf{A}.

2.2 Other matrices known through their products

Products are just as cheap in many cases where A\mathbf{A} is not presented as a Hessian.

  • Gram and covariance matrices. For a data matrix X∈Rn×d\mathbf{X}\in\mathbb{R}^{n\times d}, whose nn rows are observations of dd variables, the product X⊤Xx=X⊤(Xx)\mathbf{X}^\top\mathbf{X}\mathbf{x}=\mathbf{X}^\top(\mathbf{X}\mathbf{x}) The parentheses fix the order: two matrix–vector products, and X⊤X\mathbf X^\top\mathbf X is never formed. First, each of the nn entries of y=Xx\mathbf y=\mathbf X\mathbf x is the inner product of a row of X\mathbf X with x\mathbf x, about dd multiplications and additions. Then each of the dd entries of X⊤y\mathbf X^\top\mathbf y is the inner product of a column of X\mathbf X with y\mathbf y, about nn of them. Each pass costs about ndnd operations, and only y\mathbf y is stored in between. Forming X⊤X\mathbf X^\top\mathbf X instead takes d2d^2 inner products of columns of length nn, about nd2nd^2 operations, and d2d^2 numbers of storage. For n=106n=10^6 observations of d=104d=10^4 variables, one product costs about 2⋅10102\cdot10^{10} operations, whereas forming X⊤X\mathbf X^\top\mathbf X costs about 101410^{14} operations and 10810^8 numbers of storage. If X\mathbf X is sparse, a product costs on the order of its number of nonzero entries., whereas forming X⊤X\mathbf{X}^\top\mathbf{X} costs O(nd2)O(nd^2) and storing it costs O(d2)O(d^2). When each column of X\mathbf{X} has zero mean, the sample covariance matrix of the dd variables is the average of the outer products of the observations, X⊤X/n=(1/n)∑i=1nXiXi⊤\mathbf{X}^\top\mathbf{X}/n=(1/n)\sum_{i=1}^n\mathbf{X}_i\mathbf{X}_i^\top, where Xi∈Rd\mathbf{X}_i\in\mathbb{R}^d is the ii-th row of X\mathbf{X}. Its leading eigenvector, the first principal component, is the direction of largest variance in the data: it maximizes the variance 1n∥Xu∥2\frac1n\|\mathbf{X}\mathbf{u}\|^2 of the data projected on u\mathbf{u} over unit vectors u\mathbf{u}.

  • Gauss–Newton matrices. Many objectives are compositions f(θ)=ψ(F(θ))f(\theta)=\psi\bigl(F(\theta)\bigr) of a map F:Rd→RpF:\mathbb{R}^d\to\mathbb{R}^p and a function ψ:Rp→R\psi:\mathbb{R}^p\to\mathbb{R}, both twice differentiable. For the training loss of Section 2.1, F(θ)F(\theta) stacks the outputs z1(θ),…,zn(θ)\mathbf{z}_1(\theta),\dots,\mathbf{z}_n(\theta) into one vector of Rp\mathbb{R}^p, and ψ(z)=1n∑i=1nℓ(zi,yi)\psi(\mathbf{z})=\frac1n\sum_{i=1}^n\ell(\mathbf{z}_i,\mathbf{y}_i) for z=[z1;… ;zn]\mathbf{z}=[\mathbf{z}_1;\dots;\mathbf{z}_n]. Let J∈Rp×d\mathbf{J}\in\mathbb{R}^{p\times d} be the Jacobian of FF at θ\theta, with entries Jkj=∂Fk(θ)/∂θjJ_{kj}=\partial F_k(\theta)/\partial\theta_j, and let H=∇2ψ(F(θ))∈Rp×p\mathbf{H}=\nabla^2\psi\bigl(F(\theta)\bigr)\in\mathbb{R}^{p\times p}. The chain rule gives ∇2f(θ)=J⊤HJ+∑k=1p∂kψ(F(θ)) ∇2Fk(θ)\nabla^2f(\theta)=\mathbf{J}^\top\mathbf{H}\mathbf{J}+\sum_{k=1}^p\partial_k\psi\bigl(F(\theta)\bigr)\,\nabla^2F_k(\theta), where ∂kψ\partial_k\psi is the partial derivative of ψ\psi with respect to its kk-th argument. The generalized Gauss–Newton matrix G=J⊤HJ\mathbf{G}=\mathbf{J}^\top\mathbf{H}\mathbf{J} keeps the first term. It is symmetric, and positive semidefinite when ψ\psi is convex. It is applied as Gx=J⊤(H(Jx))\mathbf{G}\mathbf{x}=\mathbf{J}^\top\bigl(\mathbf{H}(\mathbf{J}\mathbf{x})\bigr), where automatic differentiation computes Jx\mathbf{J}\mathbf{x} in forward mode and J⊤u\mathbf{J}^\top\mathbf{u} in reverse mode without forming J\mathbf{J}. For least squares, ψ(z)=12∥z−y∥2\psi(\mathbf{z})=\frac12\|\mathbf{z}-\mathbf{y}\|^2 for a target y∈Rp\mathbf{y}\in\mathbb{R}^p, so H=Ip\mathbf{H}=\mathbb{I}_p and G=J⊤J\mathbf{G}=\mathbf{J}^\top\mathbf{J}. When FF is linear, F(θ)=JθF(\theta)=\mathbf{J}\theta, every ∇2Fk\nabla^2F_k vanishes and G\mathbf{G} is the exact Hessian. When FF is nonlinear, G=J⊤J\mathbf{G}=\mathbf{J}^\top\mathbf{J} is the classical Gauss–Newton approximation of the Hessian. For the squared loss and the softmax cross-entropy of a neural network, G\mathbf{G} is also the Suppose the model gives each target a probability density p(y ∣ z)p(\mathbf y\,|\,\mathbf z) that depends on the output z=F(θ)\mathbf z=F(\theta), and that ℓ\ell is the corresponding negative log-likelihood. The Fisher information matrix is Ey∼p(⋅ ∣ F(θ))[∇θlog⁡p(y ∣ F(θ)) ∇θlog⁡p(y ∣ F(θ))⊤].\mathbb E_{\mathbf y\sim p(\cdot\,|\,F(\theta))}\bigl[\nabla_\theta\log p(\mathbf y\,|\,F(\theta))\,\nabla_\theta\log p(\mathbf y\,|\,F(\theta))^\top\bigr]. By the chain rule it equals J⊤IzJ\mathbf J^\top\mathbf I_{\mathbf z}\mathbf J at z=F(θ)\mathbf z=F(\theta), where Iz=Ey∼p(⋅ ∣ z)[∇zlog⁡p(y ∣ z) ∇zlog⁡p(y ∣ z)⊤]=Ey∼p(⋅ ∣ z)[−∇z2log⁡p(y ∣ z)].\mathbf I_{\mathbf z}=\mathbb E_{\mathbf y\sim p(\cdot\,|\,\mathbf z)}\bigl[\nabla_{\mathbf z}\log p(\mathbf y\,|\,\mathbf z)\,\nabla_{\mathbf z}\log p(\mathbf y\,|\,\mathbf z)^\top\bigr]=\mathbb E_{\mathbf y\sim p(\cdot\,|\,\mathbf z)}\bigl[-\nabla_{\mathbf z}^2\log p(\mathbf y\,|\,\mathbf z)\bigr]. When −∇z2log⁡p(y ∣ z)-\nabla_{\mathbf z}^2\log p(\mathbf y\,|\,\mathbf z) does not depend on y\mathbf y, the last expectation is H\mathbf H, so the Fisher matrix is G\mathbf G. This holds for a Gaussian with mean z\mathbf z (the squared loss, H=I\mathbf H=\mathbb I) and for a categorical distribution with probabilities sk=ezk/∑jezjs_k=e^{z_k}/\sum_je^{z_j} (the softmax cross-entropy, H=diag⁡(s)−ss⊤\mathbf H=\operatorname{diag}(\mathbf s)-\mathbf s\mathbf s^\top). of the model.

  • Graphs. For an undirected graph on dd nodes, the adjacency matrix W\mathbf{W} has the entries Wij=Wji≥0W_{ij}=W_{ji}\ge0, the weight of the edge between nodes ii and jj, with Wij=0W_{ij}=0 when there is no edge. It is symmetric, and so is the Laplacian L=diag⁡(W1)−W\mathbf{L}=\operatorname{diag}(\mathbf{W}\mathbf{1})-\mathbf{W}, where 1\mathbf{1} is the all-ones vector. A product with either matrix costs one pass over the edges. Since x⊤Lx=∑i<jWij(xi−xj)2\mathbf{x}^\top\mathbf{L}\mathbf{x}=\sum_{i<j}W_{ij}(x_i-x_j)^2, the eigenvectors of L\mathbf{L} with the smallest eigenvalues vary little across heavily weighted edges. They are used to split the graph into well-connected groups, in spectral clustering and graph partitioning (von Luxburg, 2007).

  • Discretized differential operators. Finite-difference and finite-element discretizations of self-adjoint differential operators, such as those of heat conduction, elasticity or quantum mechanics, are applied point by point or element by element, in time proportional to the number of unknowns and without assembling the matrix. For instance, the operator u↦−u′′u\mapsto-u'' maps a twice-differentiable function uu on [0,1][0,1] with u(0)=u(1)=0u(0)=u(1)=0 to the function −u′′-u''. To discretize it, we use the grid ti=iht_i=ih for i∈{0,…,d+1}i\in\{0,\dots,d+1\}, with step h=1/(d+1)h=1/(d+1). A function uu is represented by the vector x∈Rd\mathbf{x}\in\mathbb{R}^d of its values xi=u(ti)x_i=u(t_i) at the dd interior points tit_i for i∈{1,…,d}i\in\{1,\dots,d\}, and the boundary conditions fix x0=xd+1=0x_0=x_{d+1}=0, which are not entries of x\mathbf{x}. At each interior point, the second derivative is replaced by the If uu has four continuous derivatives on [0,1][0,1], Taylor’s theorem at tit_i with the increment ±h\pm h and the remainder in Lagrange form gives for some ξ+∈(ti,ti+1)\xi_+\in(t_i,t_{i+1}) and some ξ−∈(ti−1,ti)\xi_-\in(t_{i-1},t_i), u(ti±1)=u(ti±h)=u(ti)±h u′(ti)+h22u′′(ti)±h36u′′′(ti)+h424u′′′′(ξ±).u(t_{i\pm1})=u(t_{i}\pm h)=u(t_i)\pm h\,u'(t_i)+\frac{h^2}{2}u''(t_i)\pm\frac{h^3}{6}u'''(t_i)+\frac{h^4}{24}u''''(\xi_\pm).Adding the two expansions, rearranging the terms, dividing by h2h^2, and writing xj=u(tj)x_j=u(t_j), with x0=xd+1=0x_0=x_{d+1}=0 because u(0)=u(1)=0u(0)=u(1)=0, gives −u′′(ti)=2xi−xi−1−xi+1h2+h224(u′′′′(ξ+)+u′′′′(ξ−)),-u''(t_i)=\frac{2x_i-x_{i-1}-x_{i+1}}{h^2}+\frac{h^2}{24}\bigl(u''''(\xi_+)+u''''(\xi_-)\bigr), so the error of the centered difference is at most h212max⁡[0,1]∣u′′′′∣\frac{h^2}{12}\max_{[0,1]}\lvert u''''\rvert.

    −u′′(ti)≈2xi−xi−1−xi+1h2,i∈{1,…,d},-u''(t_i)\approx\frac{2x_i-x_{i-1}-x_{i+1}}{h^2},\qquad i\in\{1,\dots,d\},

    with an error O(h2)O(h^2). The right-hand side is a linear function of x\mathbf{x}, so it defines a matrix A∈Rd×d\mathbf{A}\in\mathbb{R}^{d\times d} by (Ax)i=(2xi−xi−1−xi+1)/h2(\mathbf{A}\mathbf{x})_i=(2x_i-x_{i-1}-x_{i+1})/h^2 for every x∈Rd\mathbf{x}\in\mathbb{R}^d and i∈{1,…,d}i\in\{1,\dots,d\}. When x\mathbf{x} holds the values of uu, the vector Ax\mathbf{A}\mathbf{x} therefore holds approximations of the values of −u′′-u'' at the interior points (Figure 1). Row ii of A\mathbf{A} holds the coefficients of xi−1x_{i-1}, xix_i and xi+1x_{i+1} in this formula, except that rows 11 and dd have no entry for x0x_0 and xd+1x_{d+1}, which are zero:

    A=1h2[2−1−12−1⋱⋱⋱−12−1−12].\mathbf{A}=\frac{1}{h^2}\begin{bmatrix}2&-1&&&\\-1&2&-1&&\\&\ddots&\ddots&\ddots&\\&&-1&2&-1\\&&&-1&2\end{bmatrix}.
    Two panels. Left: a curve u on the interval from 0 to 1, vanishing at both ends, sampled at seven interior grid points t_1 to t_7 shown as blue dots, with the two boundary points t_0 and t_8 shown as orange circles where the value is zero; the points t_2, t_3 and t_4 are circled with the weights minus 1, plus 2 and minus 1 written above them, and the formula -u''(t_3) approximately equals (-x_2 + 2x_3 - x_4)/h^2, which is (Ax)_3. Right: the 7 by 7 matrix A, with 2 on the diagonal and -1 on the two neighbouring diagonals, times 1/h^2, multiplied by the vector x; row 3 of A, the entries x_2, x_3 and x_4 of x and the entry (Ax)_3 are highlighted.
    Figure 1. The discretization of u↦−u′′u\mapsto-u'' of Section 2.2, with d=7d=7 interior grid points. Left: a function uu with u(0)=u(1)=0u(0)=u(1)=0 is represented by its values xi=u(ti)x_i=u(t_i) at the interior points (blue). The boundary values x0=x8=0x_0=x_8=0 (orange) are fixed and are not entries of x\mathbf x. The centered difference at t3t_3 combines x2x_2, x3x_3 and x4x_4 with the weights −1-1, 22 and −1-1, divided by h2h^2. Right: the same weights form row 3 of the tridiagonal matrix A\mathbf A, so that the product Ax\mathbf A\mathbf x gives the approximations of −u′′-u'' at all the interior points at once. In rows 11 and dd, the terms in x0x_0 and xd+1x_{d+1} vanish and have no column.

    It is tridiagonal and symmetric, and the formula computes Ax\mathbf{A}\mathbf{x} in O(d)O(d) operations without storing A\mathbf{A}. Its eigenpairs approximate those of u↦−u′′u\mapsto-u''. For every integer k≥1k\ge1, the function u(t)=sin⁡(kπt)u(t)=\sin(k\pi t) satisfies the boundary conditions and −u′′=k2π2u-u''=k^2\pi^2u. For k∈{1,…,d}k\in\{1,\dots,d\}, the vector with entries sin⁡(kπti)\sin(k\pi t_i) is Fix k∈{1,…,d}k\in\{1,\dots,d\} and set vi=sin⁡(kπti)v_i=\sin(k\pi t_i) for i∈{0,…,d+1}i\in\{0,\dots,d+1\}. The end values v0=sin⁡(0)v_0=\sin(0) and vd+1=sin⁡(kπ)v_{d+1}=\sin(k\pi) are zero, so the formula for (Av)i(\mathbf{A}\mathbf{v})_i holds in every row for v=(v1,…,vd)\mathbf{v}=(v_1,\dots,v_d). Since ti±1=ti±ht_{i\pm1}=t_i\pm h, the identity sin⁡(a−b)+sin⁡(a+b)=2sin⁡(a)cos⁡(b)\sin(a-b)+\sin(a+b)=2\sin(a)\cos(b) with a=kπtia=k\pi t_i and b=kπhb=k\pi h gives vi−1+vi+1=2cos⁡(kπh) viv_{i-1}+v_{i+1}=2\cos(k\pi h)\,v_i, hence (Av)i=2vi−vi−1−vi+1h2=2−2cos⁡(kπh)h2 vi,i∈{1,…,d}.(\mathbf{A}\mathbf{v})_i=\frac{2v_i-v_{i-1}-v_{i+1}}{h^2}=\frac{2-2\cos(k\pi h)}{h^2}\,v_i,\qquad i\in\{1,\dots,d\}. The vector v\mathbf{v} is nonzero, since 0<kπh<π0<k\pi h<\pi gives v1=sin⁡(kπh)>0v_1=\sin(k\pi h)>0. As cos⁡\cos is decreasing on [0,π][0,\pi], the dd eigenvalues (2−2cos⁡(kπh))/h2(2-2\cos(k\pi h))/h^2 obtained for k=1,…,dk=1,\dots,d are distinct, so these are all the eigenpairs of A\mathbf{A}. Finally, 2−2cos⁡(z)=z2+O(z4)2-2\cos(z)=z^2+O(z^4), so the eigenvalue equals k2π2+O(k4h2)k^2\pi^2+O(k^4h^2). with eigenvalue (2−2cos⁡(kπh))/h2(2-2\cos(k\pi h))/h^2, which tends to k2π2k^2\pi^2 as h→0h\to0 for fixed kk. Lanczos (1950) designed his method for linear differential and integral operators.

  • Structured matrices. A symmetric Toeplitz matrix is constant along each diagonal, Aij=a∣i−j∣A_{ij}=a_{|i-j|} for numbers a0,…,ad−1a_0,\dots,a_{d-1}. The covariance matrix of dd consecutive values X1,…,XdX_1,\dots,X_d of a stationary time series has this form, with ak=Cov⁡(Xi,Xi+k)a_k=\operatorname{Cov}(X_i,X_{i+k}), because stationarity means that Cov⁡(Xi,Xj)\operatorname{Cov}(X_i,X_j) depends only on ∣i−j∣|i-j|. A product with A\mathbf{A} costs O(dlog⁡(d))O(d\log(d)) operations instead of O(d2)O(d^2): A\mathbf{A} is the upper-left block of a A circulant matrix C∈Rn×n\mathbf{C}\in\mathbb{R}^{n\times n} is determined by a vector c=(c0,…,cn−1)\mathbf{c}=(c_0,\dots,c_{n-1}) through Cij=c(i−j) mod nC_{ij}=c_{(i-j)\bmod n}, so each row is the previous one shifted cyclically by one position. Take n=2dn=2d and c=(a0,a1,…,ad−1,0,ad−1,…,a1).\mathbf{c}=(a_0,a_1,\dots,a_{d-1},0,a_{d-1},\dots,a_1). For i,j∈{1,…,d}i,j\in\{1,\dots,d\}, the index (i−j) mod 2d(i-j)\bmod 2d equals i−ji-j when i≥ji\ge j and 2d−(j−i)2d-(j-i) when i<ji<j, and in both cases the entry of c\mathbf{c} at that index is a∣i−j∣a_{|i-j|}. Hence A\mathbf{A} is the upper-left d×dd\times d block of C\mathbf{C}, and Ax\mathbf{A}\mathbf{x} consists of the first dd entries of C[x;0]\mathbf{C}[\mathbf{x};\mathbf{0}], with 0∈Rd\mathbf{0}\in\mathbb{R}^d. The product (Cy)i=∑jc(i−j) mod n yj(\mathbf{C}\mathbf{y})_i=\sum_jc_{(i-j)\bmod n}\,y_j is the cyclic convolution of c\mathbf{c} and y\mathbf{y}, and the discrete Fourier transform F\mathcal{F} of length nn turns a cyclic convolution into an entrywise product, F(Cy)=(Fc)⊙(Fy)\mathcal{F}(\mathbf{C}\mathbf{y})=(\mathcal{F}\mathbf{c})\odot(\mathcal{F}\mathbf{y}). Therefore Ax=first d entries of F−1((Fc)⊙F[x;0]).\mathbf{A}\mathbf{x}=\text{first }d\text{ entries of }\mathcal{F}^{-1}\bigl((\mathcal{F}\mathbf{c})\odot\mathcal{F}[\mathbf{x};\mathbf{0}]\bigr). The vector Fc\mathcal{F}\mathbf{c} is computed once. Each product then takes one transform and one inverse transform of length 2d2d, each O(dlog⁡(d))O(d\log(d)) operations with the fast Fourier transform, and 2d2d multiplications., whose rows are cyclic shifts of one another, and the fast Fourier transform (Cooley and Tukey, 1965) multiplies such a matrix by a vector in O(dlog⁡(d))O(d\log(d)) operations. Kronecker products arise on grids. For M1∈Rd1×d1\mathbf{M}_1\in\mathbb{R}^{d_1\times d_1} and M2∈Rd2×d2\mathbf{M}_2\in\mathbb{R}^{d_2\times d_2}, the Kronecker product M1⊗M2\mathbf{M}_1\otimes\mathbf{M}_2 is the d1d2×d1d2d_1d_2\times d_1d_2 matrix made of d1×d1d_1\times d_1 blocks of size d2×d2d_2\times d_2, with block (k,l)(k,l) equal to (M1)klM2(\mathbf{M}_1)_{kl}\mathbf{M}_2. It is symmetric when M1\mathbf{M}_1 and M2\mathbf{M}_2 are, since (M1⊗M2)⊤=M1⊤⊗M2⊤(\mathbf{M}_1\otimes\mathbf{M}_2)^\top=\mathbf{M}_1^\top\otimes\mathbf{M}_2^\top. It is applied without being formed, through the Write yl∈Rd2\mathbf{y}_l\in\mathbb{R}^{d_2} for column ll of Y\mathbf{Y}, so that vec⁡(Y)=[y1;… ;yd1]\operatorname{vec}(\mathbf{Y})=[\mathbf{y}_1;\dots;\mathbf{y}_{d_1}]. Block row kk of M1⊗M2\mathbf{M}_1\otimes\mathbf{M}_2 is [(M1)k1M2,…,(M1)kd1M2][(\mathbf{M}_1)_{k1}\mathbf{M}_2,\dots,(\mathbf{M}_1)_{kd_1}\mathbf{M}_2], so block kk of the product is ∑l=1d1(M1)kl M2yl=M2∑l=1d1yl (M1⊤)lk.\sum_{l=1}^{d_1}(\mathbf{M}_1)_{kl}\,\mathbf{M}_2\mathbf{y}_l=\mathbf{M}_2\sum_{l=1}^{d_1}\mathbf{y}_l\,(\mathbf{M}_1^\top)_{lk}. The last sum is column kk of YM1⊤\mathbf{Y}\mathbf{M}_1^\top, so this block is column kk of M2YM1⊤\mathbf{M}_2\mathbf{Y}\mathbf{M}_1^\top. Computing M2Y\mathbf{M}_2\mathbf{Y} costs about d22d1d_2^2d_1 multiplications, and multiplying the result by M1⊤\mathbf{M}_1^\top about d2d12d_2d_1^2, whereas the formed matrix has d12d22d_1^2d_2^2 entries.

    (M1⊗M2)vec⁡(Y)=vec⁡(M2YM1⊤),Y∈Rd2×d1,(\mathbf{M}_1\otimes\mathbf{M}_2)\operatorname{vec}(\mathbf{Y})=\operatorname{vec}(\mathbf{M}_2\mathbf{Y}\mathbf{M}_1^\top),\qquad\mathbf{Y}\in\mathbb{R}^{d_2\times d_1},

    where vec⁡(⋅)\operatorname{vec}(\cdot) stacks the columns of a matrix into one vector. The right-hand side costs O(d1d2(d1+d2))O(d_1d_2(d_1+d_2)) operations, whereas a product with the formed matrix costs O(d12d22)O(d_1^2d_2^2). When Y\mathbf{Y} holds the values of a function on a grid with d2d_2 points along the first axis and d1d_1 along the second, M2Y\mathbf{M}_2\mathbf{Y} applies M2\mathbf{M}_2 to each column, along the first axis, and YM1⊤\mathbf{Y}\mathbf{M}_1^\top applies M1\mathbf{M}_1 to each row, along the second axis. For instance, take the operator u↦−∂2u/∂s2−∂2u/∂t2u\mapsto-\partial^2u/\partial s^2-\partial^2u/\partial t^2 on the unit square, with u=0u=0 on its boundary, and the grid points (si,tj)=(ih,jh)(s_i,t_j)=(ih,jh) for i,j∈{1,…,d}i,j\in\{1,\dots,d\}, with h=1/(d+1)h=1/(d+1). With Yij=u(si,tj)Y_{ij}=u(s_i,t_j), the centered difference of the previous item along each axis gives −∂2u/∂s2(si,tj)≈(AY)ij-\partial^2u/\partial s^2(s_i,t_j)\approx(\mathbf{A}\mathbf{Y})_{ij} and −∂2u/∂t2(si,tj)≈(YA)ij-\partial^2u/\partial t^2(s_i,t_j)\approx(\mathbf{Y}\mathbf{A})_{ij}, where A\mathbf{A} is the matrix of the previous item. The discretized operator is therefore vec⁡(Y)↦vec⁡(AY+YA)\operatorname{vec}(\mathbf{Y})\mapsto\operatorname{vec}(\mathbf{A}\mathbf{Y}+\mathbf{Y}\mathbf{A}), that is, the matrix Id⊗A+A⊗Id\mathbb{I}_d\otimes\mathbf{A}+\mathbf{A}\otimes\mathbb{I}_d of size d2d^2, whose product costs O(d2)O(d^2) operations because A\mathbf{A} is tridiagonal.

  • Shifted inverses. Let σ\sigma be a number that is not an eigenvalue of A\mathbf{A}, so that A−σId\mathbf{A}-\sigma\mathbb{I}_d is invertible. Suppose that linear systems (A−σId)y=x(\mathbf{A}-\sigma\mathbb{I}_d)\mathbf{y}=\mathbf{x} can be solved, for instance with a sparse factorization of A−σId\mathbf{A}-\sigma\mathbb{I}_d into triangular factors, computed once from the entries of A\mathbf{A}, after which each solve consists of two triangular solves. The solution is y=Bx\mathbf{y}=\mathbf{B}\mathbf{x} with B=(A−σId)−1\mathbf{B}=(\mathbf{A}-\sigma\mathbb{I}_d)^{-1}, so each solve is a product with B\mathbf{B}, a symmetric matrix as the inverse of a symmetric one. It has the eigenvectors of A\mathbf{A}. The eigenvalue μ=1/(λ−σ)\mu=1/(\lambda-\sigma) of B\mathbf{B} is largest in absolute value for the eigenvalue λ\lambda of A\mathbf{A} closest to σ\sigma. Power iteration on B\mathbf{B} therefore returns this μ\mu (Remark 4), unless another eigenvalue of A\mathbf{A} lies at the same distance on the other side of σ\sigma (Remark 5), and λ=σ+1/μ\lambda=\sigma+1/\mu. When λmin⁡<σ<λmax⁡\lambda_{\min}<\sigma<\lambda_{\max}, the extreme eigenvalues of B\mathbf{B}, which the extreme Ritz values of the Lanczos method approach from inside (Remark 14), are 1/(λ+−σ)>01/(\lambda^+-\sigma)>0 and 1/(λ−−σ)<01/(\lambda^--\sigma)<0, where λ+\lambda^+ and λ−\lambda^- are the eigenvalues of A\mathbf{A} closest to σ\sigma above and below it. This is the shift-and-invert strategy. It reaches eigenvalues inside the spectrum, which power iteration on a shifted matrix A−τId\mathbf{A}-\tau\mathbb{I}_d never returns, since it returns λmax⁡\lambda_{\max} or λmin⁡\lambda_{\min}, whichever is farther from τ\tau (Corollary 1).

All these matrices are symmetric, and the results of Sections 3 and 4 rely on symmetry through the spectral theorem. For a nonsymmetric matrix accessed through products, such as the transition matrix of a random walk on a directed graph, whose entry (i,j)(i,j) is the probability of stepping from node ii to node jj, the Arnoldi method (Arnoldi, 1951) replaces the Lanczos method. Section 5 presents it, together with nonsymmetric examples and what power iteration retains without symmetry.

3. Power iteration

In this part, we first establish the convergence conditions for ordinary power iteration, then describe how shifting and deflation recover additional eigenpairs. Starting from a unit vector v0\mathbf{v}_0, power iteration alternates a product with A\mathbf{A} and a normalization:

vk+1=Avk∥Avk∥,k≥0.\mathbf{v}_{k+1}=\frac{\mathbf{A}\mathbf{v}_k}{\|\mathbf{A}\mathbf{v}_k\|}, \qquad k\ge0 .

If Av0=0\mathbf{A}\mathbf{v}_0=0, then v0\mathbf{v}_0 is already an eigenvector with eigenvalue zero. In this case, the algorithm should return (0,v0)(0,\mathbf{v}_0) without attempting to normalize Av0\mathbf{A}\mathbf{v}_0.

The numerical analyst Alston S. Householder attributed the first treatment of the method to Müntz (1913) in his book The Theory of Matrices in Numerical Analysis (1964), as recalled in the historical survey of Golub and van der Vorst (2000). Deflation schemes built on it were analyzed early on, for example by Osborne (1958). The eigenvalue estimate of power iteration is the For a unit vector v\mathbf v, the Rayleigh quotient v⊤Av\mathbf v^\top\mathbf A\mathbf v is the curvature of x↦12x⊤Ax\mathbf x\mapsto\frac12\mathbf x^\top\mathbf A\mathbf x along v\mathbf v. It lies between λmin⁡(A)\lambda_{\min}(\mathbf A) and λmax⁡(A)\lambda_{\max}(\mathbf A). It equals λ\lambda for every unit vector v\mathbf v of the eigenspace EλE_\lambda, since Av=λv\mathbf A\mathbf v=\lambda\mathbf v gives v⊤Av=λ∥v∥2=λ\mathbf v^\top\mathbf A\mathbf v=\lambda\|\mathbf v\|^2=\lambda. The converse fails: v⊤Av=λ\mathbf v^\top\mathbf A\mathbf v=\lambda does not make v\mathbf v an eigenvector, except when λ\lambda is λmin⁡(A)\lambda_{\min}(\mathbf A) or λmax⁡(A)\lambda_{\max}(\mathbf A). vk⊤Avk\mathbf{v}_k^\top\mathbf{A}\mathbf{v}_k.

3.1 Proposition 1 [Convergence of power iteration]

Let v0∈Rd\mathbf{v}_0\in\mathbb{R}^d be a unit vector, and define Λ0={λ∈Λ(A):Πλv0≠0}.\Lambda_0=\{\lambda\in\Lambda(\mathbf{A}):\Pi_\lambda\mathbf{v}_0\neq0\}. Thus, Λ0\Lambda_0 contains precisely the eigenvalues whose eigenspaces have a nonzero component in the initialization. Suppose that Λ0\Lambda_0 contains a nonzero eigenvalue λ⋆\lambda_\star satisfying ∣λ⋆∣>∣λ∣|\lambda_\star|>|\lambda| for every λ∈Λ0∖{λ⋆}\lambda\in\Lambda_0\setminus\{\lambda_\star\}. The eigenvalue λ⋆\lambda_\star may have arbitrary multiplicity. Then the iteration

vk+1:=Avk∥Avk∥=Ak+1v0∥Ak+1v0∥,k≥0,\mathbf{v}_{k+1}:=\frac{\mathbf{A}\mathbf{v}_k}{\|\mathbf{A}\mathbf{v}_k\|}=\frac{\mathbf{A}^{k+1}\mathbf{v}_0}{\|\mathbf{A}^{k+1}\mathbf{v}_0\|}, \qquad k\ge0,

is well defined, and

(sgn⁡(λ⋆))kvk⟶q⋆:=Πλ⋆v0∥Πλ⋆v0∥.\bigl(\operatorname{sgn}(\lambda_\star)\bigr)^k\mathbf{v}_k \longrightarrow \mathbf{q}_\star:=\frac{\Pi_{\lambda_\star}\mathbf{v}_0}{\|\Pi_{\lambda_\star}\mathbf{v}_0\|}.

In particular,

Aq⋆=λ⋆q⋆,vk⊤Avk⟶λ⋆.\mathbf{A}\mathbf{q}_\star=\lambda_\star\mathbf{q}_\star, \qquad \mathbf{v}_k^\top\mathbf{A}\mathbf{v}_k\longrightarrow\lambda_\star .

Remark 1 [Why the dominant component wins]

Recall that for every vector v∈Rd\mathbf{v}\in\mathbb{R}^d and every integer k≥0k\ge0, v=∑λ∈Λ(A)Πλv\mathbf{v}=\sum_{\lambda\in\Lambda(\mathbf{A})}\Pi_\lambda\mathbf{v} and Akv=∑λ∈Λ(A)λk Πλv.\mathbf{A}^k\mathbf{v}=\sum_{\lambda\in\Lambda(\mathbf{A})}\lambda^k\,\Pi_\lambda\mathbf{v}. So, for the iteration above, each application of A\mathbf{A} multiplies the component of the current vector in EλE_\lambda by λ\lambda, so after kk steps the component in EλE_\lambda carries the factor λk\lambda^k:

Akv0=∑λ∈Λ0λk Πλv0=λ⋆k Πλ⋆v0+∑λ∈Λ0∖{λ⋆}λk Πλv0=λ⋆k(Πλ⋆v0+∑λ∈Λ0∖{λ⋆}(λλ⋆)k Πλv0).\mathbf{A}^k\mathbf{v}_0 =\sum_{\lambda\in\Lambda_0}\lambda^k\,\Pi_\lambda\mathbf{v}_0 =\textcolor{#2563eb}{\lambda_\star^k\,\Pi_{\lambda_\star}\mathbf{v}_0}+\textcolor{#ea580c}{\sum_{\lambda\in\Lambda_0\setminus\{\lambda_\star\}}\lambda^k\,\Pi_\lambda\mathbf{v}_0} =\lambda_\star^k \left( \textcolor{#2563eb}{\Pi_{\lambda_\star}\mathbf{v}_0}+\textcolor{#ea580c}{\sum_{\lambda\in\Lambda_0\setminus\{\lambda_\star\}} \left(\frac{\lambda}{\lambda_\star}\right)^k\,\Pi_\lambda\mathbf{v}_0} \right).

Among the components present in v0\mathbf{v}_0, the blue one, with the largest ∣λ∣|\lambda| (we have ∣λ⋆∣>∣λ∣|\lambda_\star|>|\lambda| for every λ∈Λ0∖{λ⋆}\lambda\in\Lambda_0\setminus\{\lambda_\star\} by assumption), grows fastest, and the normalization removes the common factor ∣λ⋆∣k|\lambda_\star|^k, so the orange components fade relative to it. Only the sign of λ⋆k\lambda_\star^k survives, which is why the statement multiplies vk\mathbf{v}_k by (sgn⁡(λ⋆))k\bigl(\operatorname{sgn}(\lambda_\star)\bigr)^k. The limit is the normalized projection of v0\mathbf{v}_0 onto the whole eigenspace Eλ⋆E_{\lambda_\star}: inside a repeated eigenspace, the direction is chosen by the initialization, not by the method.

Proof

Set pλ=Πλv0\mathbf{p}_\lambda=\Pi_\lambda\mathbf{v}_0. The spectral decomposition gives

v0=∑λ∈Λ0pλ,Akv0=∑λ∈Λ0λkpλ(k≥1).\mathbf{v}_0=\sum_{\lambda\in\Lambda_0}\mathbf{p}_\lambda, \qquad \mathbf{A}^k\mathbf{v}_0=\sum_{\lambda\in\Lambda_0}\lambda^k\mathbf{p}_\lambda \quad(k\ge1).

Well-definedness. Because pλ⋆≠0\mathbf{p}_{\lambda_\star}\neq0 and λ⋆≠0\lambda_\star\neq0, the component Πλ⋆Akv0=λ⋆kpλ⋆\Pi_{\lambda_\star}\mathbf{A}^k\mathbf{v}_0=\lambda_\star^k\mathbf{p}_{\lambda_\star} is nonzero for every k≥0k\ge0. Consequently, Akv0≠0\mathbf{A}^k\mathbf{v}_0\neq0 for every k≥0k\ge0. Since ∥v0∥=1\|\mathbf{v}_0\|=1, repeated normalization satisfies vk=Akv0∥Akv0∥.\mathbf{v}_k=\frac{\mathbf{A}^k\mathbf{v}_0}{\|\mathbf{A}^k\mathbf{v}_0\|}. Indeed, this identity holds at k=0k=0. If it holds at iteration kk, then

vk+1=A(Akv0/∥Akv0∥)∥A(Akv0/∥Akv0∥)∥=Ak+1v0∥Ak+1v0∥.\begin{aligned} \mathbf{v}_{k+1} &=\frac{\mathbf{A}\bigl(\mathbf{A}^k\mathbf{v}_0/\|\mathbf{A}^k\mathbf{v}_0\|\bigr)}{\bigl\|\mathbf{A}\bigl(\mathbf{A}^k\mathbf{v}_0/\|\mathbf{A}^k\mathbf{v}_0\|\bigr)\bigr\|}\\ &=\frac{\mathbf{A}^{k+1}\mathbf{v}_0}{\|\mathbf{A}^{k+1}\mathbf{v}_0\|}. \end{aligned}

Convergence of the direction. For k≥1k\ge1, define the scaled remainder

rk=∑λ∈Λ0∖{λ⋆}(λλ⋆)kpλ.\mathbf{r}_k=\sum_{\lambda\in\Lambda_0\setminus\{\lambda_\star\}}\left(\frac{\lambda}{\lambda_\star}\right)^k\mathbf{p}_\lambda .

Then

Akv0=λ⋆k(pλ⋆+rk).\mathbf{A}^k\mathbf{v}_0=\lambda_\star^k\bigl(\textcolor{#2563eb}{\mathbf{p}_{\lambda_\star}}+\textcolor{#ea580c}{\mathbf{r}_k}\bigr).

The eigenspaces are orthogonal, so pλ⋆⊤rk=0\mathbf{p}_{\lambda_\star}^\top\mathbf{r}_k=0 and

∥rk∥2=∑λ∈Λ0∖{λ⋆}∣λλ⋆∣2k∥pλ∥2⟶0,\|\mathbf{r}_k\|^2=\sum_{\lambda\in\Lambda_0\setminus\{\lambda_\star\}}\left|\frac{\lambda}{\lambda_\star}\right|^{2k}\|\mathbf{p}_\lambda\|^2\longrightarrow0,

since every ratio ∣λ/λ⋆∣|\lambda/\lambda_\star| in this sum is smaller than one. Therefore,

vk=Akv0∥Akv0∥=λ⋆k∣λ⋆∣kpλ⋆+rk∥pλ⋆∥2+∥rk∥2=(sgn⁡(λ⋆))kpλ⋆+rk∥pλ⋆∥2+∥rk∥2,(sgn⁡(λ⋆))kvk=pλ⋆+rk∥pλ⋆∥2+∥rk∥2⟶pλ⋆∥pλ⋆∥.\begin{aligned} \mathbf{v}_k &= \frac{\mathbf{A}^k\mathbf{v}_0}{\|\mathbf{A}^k\mathbf{v}_0\|} %=\frac{\lambda_\star^k\bigl(\mathbf{p}_{\lambda_\star}+\mathbf{r}_k\bigr)}{|\lambda_\star|^k\sqrt{\|\mathbf{p}_{\lambda_\star}\|^2+\|\mathbf{r}_k\|^2}} =\frac{\lambda_\star^k}{|\lambda_\star|^k} \frac{\textcolor{#2563eb}{\mathbf{p}_{\lambda_\star}}+\textcolor{#ea580c}{\mathbf{r}_k}}{\sqrt{\|\mathbf{p}_{\lambda_\star}\|^2+\|\mathbf{r}_k\|^2}} =\bigl(\operatorname{sgn}(\lambda_\star)\bigr)^k \frac{\textcolor{#2563eb}{\mathbf{p}_{\lambda_\star}}+\textcolor{#ea580c}{\mathbf{r}_k}}{\sqrt{\|\mathbf{p}_{\lambda_\star}\|^2+\|\mathbf{r}_k\|^2}},\\ \bigl(\operatorname{sgn}(\lambda_\star)\bigr)^k\mathbf{v}_k &=\frac{\textcolor{#2563eb}{\mathbf{p}_{\lambda_\star}}+\textcolor{#ea580c}{\mathbf{r}_k}}{\sqrt{\|\mathbf{p}_{\lambda_\star}\|^2+\|\mathbf{r}_k\|^2}} \longrightarrow\frac{\mathbf{p}_{\lambda_\star}}{\|\mathbf{p}_{\lambda_\star}\|}. \end{aligned}

The blue term is the component along the dominant eigenspace, and it keeps its size after rescaling. The orange term collects every other component, and it shrinks geometrically. Since pλ⋆∈Eλ⋆\mathbf{p}_{\lambda_\star}\in E_{\lambda_\star}, the limit q⋆\mathbf{q}_\star satisfies Aq⋆=λ⋆q⋆\mathbf{A}\mathbf{q}_\star=\lambda_\star\mathbf{q}_\star.

Rayleigh quotient. For k≥1k\ge1, the symmetry of A\mathbf{A} and its spectral decomposition A=∑λ∈Λ(A)λ Πλ\mathbf{A}=\sum_{\lambda\in\Lambda(\mathbf{A})}\lambda\,\Pi_\lambda give

vk⊤Avk=(Akv0)⊤A(Akv0)∥Akv0∥2=v0⊤A2k+1v0v0⊤A2kv0=∑λ∈Λ(A)λ2k+1 v0⊤Πλv0∑λ∈Λ(A)λ2k v0⊤Πλv0=∑λ∈Λ0λ2k+1∥pλ∥2∑λ∈Λ0λ2k∥pλ∥2=λ⋆∥pλ⋆∥2+∑λ∈Λ0∖{λ⋆}λ∣λλ⋆∣2k∥pλ∥2∥pλ⋆∥2+∑λ∈Λ0∖{λ⋆}∣λλ⋆∣2k∥pλ∥2⟶λ⋆∥pλ⋆∥2∥pλ⋆∥2=λ⋆.\begin{align*} \mathbf{v}_k^\top\mathbf{A}\mathbf{v}_k &=\frac{(\mathbf{A}^k\mathbf{v}_0)^\top\mathbf{A}(\mathbf{A}^k\mathbf{v}_0)}{\|\mathbf{A}^k\mathbf{v}_0\|^2}\\ &=\frac{\mathbf{v}_0^\top \mathbf{A}^{2k+1}\mathbf{v}_0}{\mathbf{v}_0^\top \mathbf{A}^{2k}\mathbf{v}_0}\\ &=\frac{\displaystyle\sum_{\lambda\in\Lambda(\mathbf{A})}\lambda^{2k+1}\,\mathbf{v}_0^\top\Pi_\lambda\mathbf{v}_0}{\displaystyle\sum_{\lambda\in\Lambda(\mathbf{A})}\lambda^{2k}\,\mathbf{v}_0^\top\Pi_\lambda\mathbf{v}_0}\\ &=\frac{\displaystyle\sum_{\lambda\in\Lambda_0}\lambda^{2k+1}\|\mathbf{p}_\lambda\|^2}{\displaystyle\sum_{\lambda\in\Lambda_0}\lambda^{2k}\|\mathbf{p}_\lambda\|^2}\\ &=\frac{\displaystyle\lambda_\star\|\mathbf{p}_{\lambda_\star}\|^2+\sum_{\lambda\in\Lambda_0\setminus\{\lambda_\star\}}\lambda\left|\frac{\lambda}{\lambda_\star}\right|^{2k}\|\mathbf{p}_\lambda\|^2}{\displaystyle\|\mathbf{p}_{\lambda_\star}\|^2+\sum_{\lambda\in\Lambda_0\setminus\{\lambda_\star\}}\left|\frac{\lambda}{\lambda_\star}\right|^{2k}\|\mathbf{p}_\lambda\|^2}\tag{1}\\ &\longrightarrow\frac{\lambda_\star\|\mathbf{p}_{\lambda_\star}\|^2}{\|\mathbf{p}_{\lambda_\star}\|^2}=\lambda_\star . \end{align*}

The second line uses (Akv0)⊤=v0⊤Ak(\mathbf{A}^k\mathbf{v}_0)^\top=\mathbf{v}_0^\top\mathbf{A}^k, since A\mathbf{A} is symmetric. The third expands A2k+1\mathbf{A}^{2k+1} and A2k\mathbf{A}^{2k} with Aj=∑λλj Πλ\mathbf{A}^j=\sum_\lambda\lambda^j\,\Pi_\lambda. The fourth uses v0⊤Πλv0=v0⊤Πλ⊤Πλv0=∥Πλv0∥2=∥pλ∥2\mathbf{v}_0^\top\Pi_\lambda\mathbf{v}_0=\mathbf{v}_0^\top\Pi_\lambda^\top\Pi_\lambda\mathbf{v}_0=\|\Pi_\lambda\mathbf{v}_0\|^2=\|\mathbf{p}_\lambda\|^2, which holds because Πλ\Pi_\lambda is symmetric and Πλ2=Πλ\Pi_\lambda^2=\Pi_\lambda, and only the eigenvalues of Λ0\Lambda_0 remain, since pλ=0\mathbf{p}_\lambda=0 for the others. The fifth divides the numerator and the denominator by λ⋆2k>0\lambda_\star^{2k}>0.

■□\begin{array}{r} \blacksquare\Box \end{array}

Remark 2 [A negative dominant eigenvalue]

If λ⋆>0\lambda_\star>0, Proposition 1 gives vk→q⋆\mathbf{v}_k\to\mathbf{q}_\star. If λ⋆<0\lambda_\star<0, it gives (−1)kvk→q⋆(-1)^k\mathbf{v}_k\to\mathbf{q}_\star, or, equivalently, v2k⟶q⋆\mathbf{v}_{2k}\longrightarrow\mathbf{q}_\star and v2k+1⟶−q⋆.\mathbf{v}_{2k+1}\longrightarrow-\mathbf{q}_\star. Thus, in the latter case, the even and odd subsequences converge to opposite unit vectors. The raw sequence {vk}k≥0\{\mathbf{v}_k\}_{k\ge0} does not converge, but min⁡{∥vk−q⋆∥,∥vk+q⋆∥}⟶0.\min\bigl\{\|\mathbf{v}_k-\mathbf{q}_\star\|,\|\mathbf{v}_k+\mathbf{q}_\star\|\bigr\}\longrightarrow0. A stopping rule that compares consecutive iterates, such as ∥vk+1−vk∥≤ε\|\mathbf{v}_{k+1}-\mathbf{v}_k\|\le\varepsilon with ε<2\varepsilon<2, is therefore eventually never satisfied when λ⋆<0\lambda_\star<0, because ∥vk+1−vk∥→2∥q⋆∥=2\|\mathbf{v}_{k+1}-\mathbf{v}_k\|\to2\|\mathbf{q}_\star\|=2, even though the eigendirection has converged. The Rayleigh quotient converges in both cases. In panel (a) of Figure 2, where λ⋆=−1\lambda_\star=-1, the raw distance ∥vk−q⋆∥\|\mathbf{v}_k-\mathbf{q}_\star\| (grey) alternates between values close to 00 and values close to 22, while ∥(−1)kvk−q⋆∥\|(-1)^k\mathbf{v}_k-\mathbf{q}_\star\| (blue) tends to zero.

3.2 Theorem 1 [Rate of convergence]

Assume the hypotheses of Proposition 1, and write pλ⋆=Πλ⋆v0\mathbf{p}_{\lambda_\star}=\Pi_{\lambda_\star}\mathbf{v}_0. Let ρ2=max⁡{∣λ∣:λ∈Λ0∖{λ⋆}},\rho_2=\max\{|\lambda|:\lambda\in\Lambda_0\setminus\{\lambda_\star\}\}, with ρ2=0\rho_2=0 when Λ0={λ⋆}\Lambda_0=\{\lambda_\star\}, and let ϕ0∈[0,π/2)\phi_0\in[0,\pi/2) be Write v0=pλ⋆+(v0−pλ⋆)\mathbf v_0=\mathbf p_{\lambda_\star}+(\mathbf v_0-\mathbf p_{\lambda_\star}), where pλ⋆=Πλ⋆v0\mathbf p_{\lambda_\star}=\Pi_{\lambda_\star}\mathbf v_0 lies in Eλ⋆E_{\lambda_\star} and the remainder is orthogonal to it. A right triangle: the unit vector v0 from the origin as hypotenuse, its projection p along the line of the eigenspace, the perpendicular side v0 minus p, a right angle at the foot of the perpendicular, and the angle phi0 at the origin The three vectors form a right triangle: the hypotenuse v0\mathbf v_0 (black), a side pλ⋆\mathbf p_{\lambda_\star} along Eλ⋆E_{\lambda_\star} (blue), and a side v0−pλ⋆\mathbf v_0-\mathbf p_{\lambda_\star} perpendicular to it (orange). The angle between a vector and a subspace is the angle between the vector and its orthogonal projection, the smallest angle it makes with a vector of the subspace, so ϕ0\phi_0 is the angle between v0\mathbf v_0 and pλ⋆\mathbf p_{\lambda_\star}. The tangent is the opposite side over the adjacent side, and since ∥v0∥=1\|\mathbf v_0\|=1, also cos⁡(ϕ0)=∥pλ⋆∥\cos(\phi_0)=\|\mathbf p_{\lambda_\star}\| and sin⁡(ϕ0)=∥v0−pλ⋆∥\sin(\phi_0)=\|\mathbf v_0-\mathbf p_{\lambda_\star}\|. The hypothesis pλ⋆≠0\mathbf p_{\lambda_\star}\neq0 keeps ϕ0\phi_0 below π/2\pi/2., so that tan⁡(ϕ0)=∥v0−pλ⋆∥/∥pλ⋆∥\tan(\phi_0)=\|\mathbf{v}_0-\mathbf{p}_{\lambda_\star}\|/\|\mathbf{p}_{\lambda_\star}\|. Then, for every k≥1k\ge1,

∥(sgn⁡(λ⋆))kvk−q⋆∥≤(ρ2∣λ⋆∣)ktan⁡(ϕ0),∣vk⊤Avk−λ⋆∣≤2∣λ⋆∣(ρ2∣λ⋆∣)2ktan⁡2(ϕ0).\Bigl\|\bigl(\operatorname{sgn}(\lambda_\star)\bigr)^k\mathbf{v}_k-\mathbf{q}_\star\Bigr\| \le\textcolor{#ea580c}{\left(\frac{\rho_2}{|\lambda_\star|}\right)^{k}}\tan(\phi_0), \qquad \bigl|\mathbf{v}_k^\top\mathbf{A}\mathbf{v}_k-\lambda_\star\bigr| \le2|\lambda_\star|\textcolor{#ea580c}{\left(\frac{\rho_2}{|\lambda_\star|}\right)^{2k}}\tan^2(\phi_0).

Remark 3 [The convergence factor]

Relative to the dominant component, each product multiplies the component in EλE_\lambda by λ/λ⋆\lambda/\lambda_\star (Remark 1), so the slowest of them, with ∣λ∣=ρ2|\lambda|=\rho_2, sets the pace. The eigenvector error therefore shrinks by the factor ρ2/∣λ⋆∣\textcolor{#ea580c}{\rho_2/|\lambda_\star|} per product, and the eigenvalue error by its square, because the Rayleigh quotient is stationary at an eigenvector. In panel (a) of Figure 2, the factor is 0.80.8, and the two errors decay like 0.8k0.8^k and 0.82k0.8^{2k}. The factor can be arbitrarily close to one. Remark 5 below is the limiting case ρ2=∣λ⋆∣\rho_2=|\lambda_\star|, in which convergence can fail altogether.

This factor is related to the condition number κ(A)\kappa(\mathbf{A}) of A\mathbf{A} in the following way.

  • For an invertible A\mathbf{A}, the For a matrix M\mathbf M, ∥M∥=max⁡∥z∥=1∥Mz∥\|\mathbf M\|=\max_{\|\mathbf z\|=1}\|\mathbf M\mathbf z\| is the largest factor by which M\mathbf M stretches a vector, and the condition number of an invertible A\mathbf A is κ(A)=∥A∥ ∥A−1∥.\kappa(\mathbf A)=\|\mathbf A\|\,\|\mathbf A^{-1}\|. For a symmetric A\mathbf A, write a unit vector along the eigenspaces, z=∑λΠλz\mathbf z=\sum_\lambda\Pi_\lambda\mathbf z, so that Az=∑λλ Πλz\mathbf A\mathbf z=\sum_\lambda\lambda\,\Pi_\lambda\mathbf z. The eigenspaces are orthogonal, so Pythagoras gives ∥Az∥2=∑λλ2∥Πλz∥2≤(max⁡λλ2)∑λ∥Πλz∥2=max⁡λλ2,\|\mathbf A\mathbf z\|^2=\sum_\lambda\lambda^2\|\Pi_\lambda\mathbf z\|^2\le(\max_\lambda\lambda^2)\sum_\lambda\|\Pi_\lambda\mathbf z\|^2=\max_\lambda\lambda^2, with equality when z\mathbf z is a unit eigenvector of an eigenvalue of largest magnitude. Hence ∥A∥=max⁡λ∈Λ(A)∣λ∣\|\mathbf A\|=\max_{\lambda\in\Lambda(\mathbf A)}|\lambda|. If A\mathbf A is invertible, 00 is not an eigenvalue, since Au=0\mathbf A\mathbf u=0 forces u=0\mathbf u=0, and A−1=∑λλ−1 Πλ\mathbf A^{-1}=\sum_\lambda\lambda^{-1}\,\Pi_\lambda, because multiplying it by A=∑μμ Πμ\mathbf A=\sum_\mu\mu\,\Pi_\mu gives ∑λΠλ=Id\sum_\lambda\Pi_\lambda=\mathbb I_d. So A−1\mathbf A^{-1} is symmetric, with the same eigenspaces and the eigenvalues 1/λ1/\lambda, and the same argument gives ∥A−1∥=max⁡λ1/∣λ∣=1/min⁡λ∈Λ(A)∣λ∣\|\mathbf A^{-1}\|=\max_\lambda1/|\lambda|=1/\min_{\lambda\in\Lambda(\mathbf A)}|\lambda|. Multiplying the two norms, κ(A)=max⁡λ∈Λ(A)∣λ∣min⁡λ∈Λ(A)∣λ∣.\kappa(\mathbf A)=\dfrac{\max_{\lambda\in\Lambda(\mathbf A)}|\lambda|}{\min_{\lambda\in\Lambda(\mathbf A)}|\lambda|}. Without symmetry, ∥A∥\|\mathbf A\| and 1/∥A−1∥1/\|\mathbf A^{-1}\| are the largest and smallest singular values of A\mathbf A, which can differ greatly from the magnitudes of its eigenvalues. κ(A)=max⁡λ∈Λ(A)∣λ∣/min⁡λ∈Λ(A)∣λ∣\kappa(\mathbf{A})=\max_{\lambda\in\Lambda(\mathbf{A})}|\lambda|/\min_{\lambda\in\Lambda(\mathbf{A})}|\lambda| compares the largest magnitude with the smallest, while the factor compares the largest with the next one. The two are linked only by a lower bound. When Λ0\Lambda_0 contains an eigenvalue other than λ⋆\lambda_\star, ∣λ⋆∣≤∥A∥:=max⁡∥z∥=1∥Az∥|\lambda_\star|\le\|\mathbf{A}\|:=\max_{\|\mathbf{z}\|=1}\|\mathbf{A}\mathbf{z}\| and ρ2≥min⁡λ∈Λ(A)∣λ∣=1/∥A−1∥\rho_2\ge\min_{\lambda\in\Lambda(\mathbf{A})}|\lambda|=1/\|\mathbf{A}^{-1}\|, so ρ2/∣λ⋆∣≥1/κ(A),\textcolor{#ea580c}{\rho_2/|\lambda_\star|}\ge1/\kappa(\mathbf{A}), with equality when Λ0=Λ(A)\Lambda_0=\Lambda(\mathbf{A}) has exactly two elements. A well-conditioned matrix is therefore a slow one for power iteration. When κ(A)\kappa(\mathbf{A}) is close to one, all the eigenvalues have nearly the same magnitude, and the factor is close to one as well. For A=diag⁡(1.01,1)\mathbf{A}=\operatorname{diag}(1.01,1), κ(A)=1.01\kappa(\mathbf{A})=1.01, and each decimal digit of the eigenvector costs about One decimal digit of accuracy means dividing the error by 1010. By Theorem 1, after kk products the eigenvector error is at most (ρ2/∣λ⋆∣)ktan⁡(ϕ0)(\rho_2/|\lambda_\star|)^k\tan(\phi_0), here (1/1.01)ktan⁡(ϕ0)(1/1.01)^k\tan(\phi_0). Each product multiplies this bound by 1/1.011/1.01, so kk products multiply it by (1/1.01)k(1/1.01)^k. The bound has thus gained one digit when (11.01)k=110  ⟺  k=ln⁡10ln⁡1.01≈2.30260.00995≈231.\left(\dfrac{1}{1.01}\right)^k=\dfrac{1}{10}\iff k=\dfrac{\ln10}{\ln1.01}\approx\dfrac{2.3026}{0.00995}\approx231. The logarithm solves for the unknown exponent, and the ratio does not depend on its base, since ln⁡10/ln⁡1.01=1/log⁡101.01\ln10/\ln1.01=1/\log_{10}1.01. For a factor 1−δ1-\delta, where δ=1−ρ2/∣λ⋆∣\delta=1-\rho_2/|\lambda_\star| is the relative gap, the same computation gives k=ln⁡10−ln⁡(1−δ)≈2.3δk=\dfrac{\ln10}{-\ln(1-\delta)}\approx\dfrac{2.3}{\delta} products per digit when δ\delta is small, because −ln⁡(1−δ)≈δ-\ln(1-\delta)\approx\delta. The cost grows like 1/δ1/\delta. Here δ≈0.0099\delta\approx0.0099, and the approximation gives about 232232.. This is the reverse of the conjugate gradient method for Ax=b\mathbf{A}\mathbf{x}=\mathbf{b} (Hestenes and Stiefel, 1952), which converges fast when κ(A)\kappa(\mathbf{A}) is small. A large condition number, on the other hand, implies nothing. diag⁡(1,10−6)\operatorname{diag}(1,10^{-6}) has κ=106\kappa=10^6 and the factor 10−610^{-6}, so each product gains six digits, whereas diag⁡(1.01,1,10−6)\operatorname{diag}(1.01,1,10^{-6}) also has κ≈106\kappa\approx10^6 but is as slow as diag⁡(1.01,1)\operatorname{diag}(1.01,1). The pace is set by the relative gap 1−ρ2/∣λ⋆∣1-\rho_2/|\lambda_\star| at the top of the spectrum, which depends only on the two largest magnitudes present.

  • For a singular A\mathbf{A}, κ(A)=∞\kappa(\mathbf{A})=\infty by convention, and the bound above says nothing. It still holds with the zero eigenvalue left out. The pseudo-inverse A+=∑λ∈Λ(A)∖{0}λ−1 Πλ\mathbf{A}^+=\sum_{\lambda\in\Lambda(\mathbf{A})\setminus\{0\}}\lambda^{-1}\,\Pi_\lambda inverts A\mathbf{A} on range⁡(A)\operatorname{range}(\mathbf{A}) and vanishes on E0=ker⁡(A)E_0=\ker(\mathbf{A}), and κ+(A)=∥A∥ ∥A+∥=max⁡λ∈Λ(A)∣λ∣/min⁡λ∈Λ(A)∖{0}∣λ∣\kappa^+(\mathbf{A})=\|\mathbf{A}\|\,\|\mathbf{A}^+\|=\max_{\lambda\in\Lambda(\mathbf{A})}|\lambda|/\min_{\lambda\in\Lambda(\mathbf{A})\setminus\{0\}}|\lambda| compares the largest magnitude with the smallest nonzero one. When Λ0\Lambda_0 contains a nonzero eigenvalue other than λ⋆\lambda_\star, ρ2≥min⁡λ∈Λ(A)∖{0}∣λ∣=1/∥A+∥\rho_2\ge\min_{\lambda\in\Lambda(\mathbf{A})\setminus\{0\}}|\lambda|=1/\|\mathbf{A}^+\|, so ρ2/∣λ⋆∣≥1/κ+(A)\rho_2/|\lambda_\star|\ge1/\kappa^+(\mathbf{A}), and everything said above about κ(A)\kappa(\mathbf{A}) applies to κ+(A)\kappa^+(\mathbf{A}). For instance, diag⁡(1.01,1,0)\operatorname{diag}(1.01,1,0) has κ+=1.01\kappa^+=1.01 and is as slow as diag⁡(1.01,1)\operatorname{diag}(1.01,1). Otherwise, the only other eigenvalue that can be present is 00, so ρ2=0\rho_2=0, and a single product gives the eigenvector exactly. In both cases, a zero eigenvalue never slows power iteration. Its magnitude is below every other, and the first product removes the component along E0E_0.

Proof

Recall from the proof of Proposition 1 the scaled remainder and the normalized iterate:

rk=∑λ∈Λ0∖{λ⋆}(λλ⋆)kpλ,(sgn⁡(λ⋆))kvk=pλ⋆+rk∥pλ⋆∥2+∥rk∥2⟶q⋆=Πλ⋆v0∥Πλ⋆v0∥=pλ⋆∥pλ⋆∥.\mathbf{r}_k=\sum_{\lambda\in\Lambda_0\setminus\{\lambda_\star\}}\left(\frac{\lambda}{\lambda_\star}\right)^k\mathbf{p}_\lambda,\qquad \bigl(\operatorname{sgn}(\lambda_\star)\bigr)^k\mathbf{v}_k=\frac{\mathbf{p}_{\lambda_\star}+\mathbf{r}_k}{\sqrt{\|\mathbf{p}_{\lambda_\star}\|^2+\|\mathbf{r}_k\|^2}} \longrightarrow \mathbf{q}_\star=\frac{\Pi_{\lambda_\star}\mathbf{v}_0}{\|\Pi_{\lambda_\star}\mathbf{v}_0\|} = \frac{\mathbf{p}_{\lambda_\star}}{\|\mathbf{p}_{\lambda_\star}\|}.

The vectors pλ\mathbf{p}_\lambda lie in mutually orthogonal eigenspaces, so the squared norm of a combination of them is the sum of the squared norms of its terms (Pythagoras). Every ∣λ∣|\lambda| in the sum defining rk\mathbf{r}_k is at most ρ2\rho_2, hence

∥rk∥2=∑λ∈Λ0∖{λ⋆}∣λλ⋆∣2k∥pλ∥2≤(ρ2∣λ⋆∣)2k∑λ∈Λ0∖{λ⋆}∥pλ∥2=(ρ2∣λ⋆∣)2k∥v0−pλ⋆∥2,\|\mathbf{r}_k\|^2=\sum_{\lambda\in\Lambda_0\setminus\{\lambda_\star\}}\left|\frac{\lambda}{\lambda_\star}\right|^{2k}\|\mathbf{p}_\lambda\|^2 \le\left(\frac{\rho_2}{|\lambda_\star|}\right)^{2k}\sum_{\lambda\in\Lambda_0\setminus\{\lambda_\star\}}\|\mathbf{p}_\lambda\|^2 =\left(\frac{\rho_2}{|\lambda_\star|}\right)^{2k}\|\mathbf{v}_0-\mathbf{p}_{\lambda_\star}\|^2,

where the last equality is Pythagoras again, applied to v0−pλ⋆=∑λ≠λ⋆pλ\mathbf{v}_0-\mathbf{p}_{\lambda_\star}=\sum_{\lambda\neq\lambda_\star}\mathbf{p}_\lambda. Write tk=∥rk∥/∥pλ⋆∥t_k=\|\mathbf{r}_k\|/\|\mathbf{p}_{\lambda_\star}\|, so that tk≤(ρ2/∣λ⋆∣)ktan⁡(ϕ0)\boldsymbol{t_k\le(\rho_2/|\lambda_\star|)^k\tan(\phi_0)}. Since rk\mathbf{r}_k is orthogonal to pλ⋆\mathbf{p}_{\lambda_\star} and q⋆=pλ⋆/∥pλ⋆∥\mathbf{q}_\star=\mathbf{p}_{\lambda_\star}/\|\mathbf{p}_{\lambda_\star}\|, the inner product of the unit vector (sgn⁡(λ⋆))kvk\bigl(\operatorname{sgn}(\lambda_\star)\bigr)^k\mathbf{v}_k with q⋆\mathbf{q}_\star is

((sgn⁡(λ⋆))kvk)⊤q⋆=∥pλ⋆∥2∥pλ⋆∥∥pλ⋆∥2+∥rk∥2=11+tk2.\bigl(\bigl(\operatorname{sgn}(\lambda_\star)\bigr)^k\mathbf{v}_k\bigr)^\top\mathbf{q}_\star=\frac{\|\mathbf{p}_{\lambda_\star}\|^2}{\|\mathbf{p}_{\lambda_\star}\|\sqrt{\|\mathbf{p}_{\lambda_\star}\|^2+\|\mathbf{r}_k\|^2}}=\frac{1}{\sqrt{1+t_k^2}} .

For unit vectors w\mathbf{w} and q\mathbf{q}, ∥w−q∥2=∥w∥2−2w⊤q+∥q∥2=2−2w⊤q\|\mathbf{w}-\mathbf{q}\|^2=\|\mathbf{w}\|^2-2\mathbf{w}^\top\mathbf{q}+\|\mathbf{q}\|^2=2-2\mathbf{w}^\top\mathbf{q}, so

∥(sgn⁡(λ⋆))kvk−q⋆∥2=2−21+tk2≤tk2,\Bigl\|\bigl(\operatorname{sgn}(\lambda_\star)\bigr)^k\mathbf{v}_k-\mathbf{q}_\star\Bigr\|^2 =2-\frac{2}{\sqrt{1+t_k^2}} \le t_k^2,

because 1/1+t≥1−t/21/\sqrt{1+t}\ge1-t/2 for all t≥0t\ge0 (the convex function t↦1/1+tt\mapsto1/\sqrt{1+t} lies above its tangent line at 00). Taking square roots and using the bound on tkt_k gives the first inequality. For the Rayleigh quotient, recall equation (1) from the proof of Proposition 1, whose denominator equals ∥pλ⋆∥2+∥rk∥2\|\mathbf{p}_{\lambda_\star}\|^2+\|\mathbf{r}_k\|^2 by the expression of ∥rk∥2\|\mathbf{r}_k\|^2 above:

vk⊤Avk=λ⋆∥pλ⋆∥2+∑λ∈Λ0∖{λ⋆}λ∣λλ⋆∣2k∥pλ∥2∥pλ⋆∥2+∥rk∥2.\mathbf{v}_k^\top\mathbf{A}\mathbf{v}_k =\frac{\displaystyle\lambda_\star\|\mathbf{p}_{\lambda_\star}\|^2+\sum_{\lambda\in\Lambda_0\setminus\{\lambda_\star\}}\lambda\left|\frac{\lambda}{\lambda_\star}\right|^{2k}\|\mathbf{p}_\lambda\|^2}{\|\mathbf{p}_{\lambda_\star}\|^2+\|\mathbf{r}_k\|^2} .

Multiplying the expression of ∥rk∥2\|\mathbf{r}_k\|^2 above by λ⋆\lambda_\star gives λ⋆∥rk∥2=∑λ∈Λ0∖{λ⋆}λ⋆∣λ/λ⋆∣2k∥pλ∥2\lambda_\star\|\mathbf{r}_k\|^2=\sum_{\lambda\in\Lambda_0\setminus\{\lambda_\star\}}\lambda_\star\left|\lambda/\lambda_\star\right|^{2k}\|\mathbf{p}_\lambda\|^2, so λ⋆\lambda_\star can be written over the same denominator as

λ⋆=λ⋆∥pλ⋆∥2+λ⋆∥rk∥2∥pλ⋆∥2+∥rk∥2=λ⋆∥pλ⋆∥2+∑λ∈Λ0∖{λ⋆}λ⋆∣λλ⋆∣2k∥pλ∥2∥pλ⋆∥2+∥rk∥2.\lambda_\star=\frac{\lambda_\star\|\mathbf{p}_{\lambda_\star}\|^2+\lambda_\star\|\mathbf{r}_k\|^2}{\|\mathbf{p}_{\lambda_\star}\|^2+\|\mathbf{r}_k\|^2} =\frac{\displaystyle\lambda_\star\|\mathbf{p}_{\lambda_\star}\|^2+\sum_{\lambda\in\Lambda_0\setminus\{\lambda_\star\}}\lambda_\star\left|\frac{\lambda}{\lambda_\star}\right|^{2k}\|\mathbf{p}_\lambda\|^2}{\|\mathbf{p}_{\lambda_\star}\|^2+\|\mathbf{r}_k\|^2} .

Subtracting it from the Rayleigh quotient, the terms λ⋆∥pλ⋆∥2\lambda_\star\|\mathbf{p}_{\lambda_\star}\|^2 cancel and the two sums combine term by term, which gives

vk⊤Avk−λ⋆=∑λ∈Λ0∖{λ⋆}(λ−λ⋆)∣λλ⋆∣2k∥pλ∥2∥pλ⋆∥2+∥rk∥2.\mathbf{v}_k^\top\mathbf{A}\mathbf{v}_k-\lambda_\star =\frac{\displaystyle\sum_{\lambda\in\Lambda_0\setminus\{\lambda_\star\}}(\lambda-\lambda_\star)\left|\frac{\lambda}{\lambda_\star}\right|^{2k}\|\mathbf{p}_\lambda\|^2}{\|\mathbf{p}_{\lambda_\star}\|^2+\|\mathbf{r}_k\|^2} .

Taking absolute values,

∣vk⊤Avk−λ⋆∣≤∑λ∈Λ0∖{λ⋆}∣λ−λ⋆∣∣λλ⋆∣2k∥pλ∥2∥pλ⋆∥2+∥rk∥2≤2∣λ⋆∣∑λ∈Λ0∖{λ⋆}∣λλ⋆∣2k∥pλ∥2∥pλ⋆∥2=2∣λ⋆∣ ∥rk∥2∥pλ⋆∥2=2∣λ⋆∣ tk2≤2∣λ⋆∣(ρ2∣λ⋆∣)2ktan⁡2(ϕ0).\begin{aligned} \bigl|\mathbf{v}_k^\top\mathbf{A}\mathbf{v}_k-\lambda_\star\bigr| &\le\frac{\displaystyle\sum_{\lambda\in\Lambda_0\setminus\{\lambda_\star\}}|\lambda-\lambda_\star|\left|\frac{\lambda}{\lambda_\star}\right|^{2k}\|\mathbf{p}_\lambda\|^2}{\|\mathbf{p}_{\lambda_\star}\|^2+\|\mathbf{r}_k\|^2}\\ &\le\frac{\displaystyle2|\lambda_\star|\sum_{\lambda\in\Lambda_0\setminus\{\lambda_\star\}}\left|\frac{\lambda}{\lambda_\star}\right|^{2k}\|\mathbf{p}_\lambda\|^2}{\|\mathbf{p}_{\lambda_\star}\|^2} =\frac{2|\lambda_\star|\,\|\mathbf{r}_k\|^2}{\|\mathbf{p}_{\lambda_\star}\|^2} =2|\lambda_\star|\,t_k^2\\ &\le2|\lambda_\star|\left(\frac{\rho_2}{|\lambda_\star|}\right)^{2k}\tan^2(\phi_0). \end{aligned}

The first inequality moves the absolute value inside the sum (triangle inequality). The second uses ∣λ−λ⋆∣≤∣λ∣+∣λ⋆∣<2∣λ⋆∣|\lambda-\lambda_\star|\le|\lambda|+|\lambda_\star|<2|\lambda_\star|, since every other eigenvalue present satisfies ∣λ∣<∣λ⋆∣|\lambda|<|\lambda_\star|, and makes the denominator smaller by dropping ∥rk∥2\|\mathbf{r}_k\|^2. The two equalities are the expression of ∥rk∥2\|\mathbf{r}_k\|^2 above and the definition of tkt_k, and the last inequality squares the bound on tkt_k. This is the second inequality of the theorem.

■□\begin{array}{r} \blacksquare\Box \end{array}

Remark 4 [Which eigenvalue is found]

The hypothesis of Proposition 1 concerns distinct eigenvalues present in the initialization. It does not require the dominant eigenvalue to be A simple eigenvalue is an eigenvalue that appears only once as a root of a matrix’s characteristic polynomial λ↦det⁡(λ Id−A)\lambda\mapsto\det(\lambda\,\mathbb I_d-\mathbf A), that is, with algebraic multiplicity one. For a symmetric matrix, the number of times λ\lambda appears as a root equals the dimension mλm_\lambda of its eigenspace (geometric multiplicity), so λ\lambda is simple exactly when mλ=1m_\lambda=1. Its eigenspace EλE_\lambda is then a line, and its unit eigenvector is unique up to sign. For example, in diag⁡(3,3,1)\operatorname{diag}(3,3,1), the eigenvalue 11 is simple, with E1=span⁡{[0,0,1]⊤}E_1=\operatorname{span}\{[0,0,1]^\top\}, whereas 33 is a double root, with E3=span⁡{[1,0,0]⊤,[0,1,0]⊤}E_3=\operatorname{span}\{[1,0,0]^\top,[0,1,0]^\top\}. Power iteration started from v0=[a,b,c]⊤\mathbf v_0=[a,b,c]^\top, with (a,b)≠(0,0)(a,b)\neq(0,0), converges to [a,b,0]⊤a2+b2,\dfrac{[a,b,0]^\top}{\sqrt{a^2+b^2}}, an eigenvector of 33 that depends on v0\mathbf v_0, so different initializations give different eigenvectors. When the dominant eigenvalue is simple, every admissible initialization gives the same eigenvector, up to sign., since the limit is the normalized projection of v0\mathbf{v}_0 onto its entire eigenspace. To obtain an eigenvalue of globally largest absolute value, the initialization must have a nonzero projection onto a corresponding eigenspace. For example, if v0=g/∥g∥\mathbf{v}_0=\mathbf{g}/\|\mathbf{g}\| with g∼N(0,Id)\mathbf{g}\sim\mathcal{N}(0,\mathbb{I}_d), then Πλv0≠0\Pi_\lambda\mathbf{v}_0\neq0 for every λ∈Λ(A)\lambda\in\Lambda(\mathbf{A}) with probability one. Indeed, for each λ\lambda, the event Πλg=0\Pi_\lambda\mathbf{g}=0 means that g\mathbf{g} belongs to the A subspace of Rd\mathbb R^d is proper when it is not all of Rd\mathbb R^d, that is, when its dimension is less than dd. Here EλE_\lambda contains an eigenvector u≠0\mathbf u\neq0 of λ\lambda, and u⊤u=∥u∥2>0\mathbf u^\top\mathbf u=\|\mathbf u\|^2>0, so u\mathbf u is not orthogonal to itself and u∉Eλ⊥\mathbf u\notin E_\lambda^\perp. Hence Eλ⊥≠RdE_\lambda^\perp\neq\mathbb R^d, and indeed dim⁡Eλ⊥=d−mλ≤d−1<d.\dim E_\lambda^\perp=d-m_\lambda\le d-1<d. Eλ⊥E_\lambda^\perp, which has A proper subspace SS lies in a hyperplane {x:c⊤x=0}\{\mathbf x:\mathbf c^\top\mathbf x=0\} with c≠0\mathbf c\neq0. For g∼N(0,Id)\mathbf g\sim\mathcal N(0,\mathbb I_d), the number c⊤g\mathbf c^\top\mathbf g is Gaussian with variance ∥c∥2>0\|\mathbf c\|^2\gt0, so it equals zero with probability zero.. There are only finitely many eigenspaces. Consequently, such an initialization satisfies the hypotheses of Proposition 1 whenever A≠0\mathbf{A}\neq0 and exactly one distinct eigenvalue of A\mathbf{A} has maximal absolute value.

Remark 5 [Failure for opposite eigenvalues of equal dominant magnitude]

The condition examined here is the strict dominance assumption of Proposition 1. In words, some nonzero eigenvalue present in the initialization is strictly larger in absolute value than every other eigenvalue present. With Λ0={λ∈Λ(A):Πλv0≠0}\Lambda_0=\{\lambda\in\Lambda(\mathbf{A}):\Pi_\lambda\mathbf{v}_0\neq0\}, the set of eigenvalues present, it reads

∃ λ⋆∈Λ0∖{0}∀ λ∈Λ0∖{λ⋆}:∣λ⋆∣>∣λ∣.\exists\,\lambda_\star\in\Lambda_0\setminus\{0\}\quad\forall\,\lambda\in\Lambda_0\setminus\{\lambda_\star\}:\qquad|\lambda_\star|>|\lambda| .

The condition The matrix A=[0110]\mathbf A=\left[\begin{smallmatrix}0&1\\1&0\end{smallmatrix}\right] swaps the two coordinates of a vector. Its eigenvalues are 11, with the eigenvector [1,1]⊤[1,1]^\top, and −1-1, with the eigenvector [1,−1]⊤[1,-1]^\top. From v0=[1,0]⊤=12[1,1]⊤+12[1,−1]⊤\mathbf v_0=[1,0]^\top=\tfrac12[1,1]^\top+\tfrac12[1,-1]^\top, both are present, and each is matched in absolute value by the other. Power iteration gives v1=[0,1]⊤,v2=[1,0]⊤,v3=[0,1]⊤,…\mathbf v_1=[0,1]^\top,\quad\mathbf v_2=[1,0]^\top,\quad\mathbf v_3=[0,1]^\top,\quad\dots The iterates alternate between two vectors, neither of which is an eigenvector, and the Rayleigh quotient vk⊤Avk=0\mathbf v_k^\top\mathbf A\mathbf v_k=0 is constant but is not an eigenvalue. The condition also fails for diag⁡(2,−2,1)\operatorname{diag}(2,-2,1) when the first two coordinates of v0\mathbf v_0 are nonzero: 11 is exceeded by 22, and 22 and −2-2 match each other. It holds for the same matrix when v0=[1,0,1]⊤/2\mathbf v_0=[1,0,1]^\top/\sqrt2, because −2-2 is then absent and 22 dominates 11. It also holds for diag⁡(2,2,1)\operatorname{diag}(2,2,1), because 22 counts as one distinct eigenvalue, however many times it is repeated. when no eigenvalue present stands out in this way: every nonzero eigenvalue present is matched or exceeded in absolute value by another eigenvalue present, i.e.

∀ μ∈Λ0∖{0}∃ λ∈Λ0∖{μ}:∣λ∣≥∣μ∣.\forall\,\mu\in\Lambda_0\setminus\{0\}\quad\exists\,\lambda\in\Lambda_0\setminus\{\mu\}:\qquad|\lambda|\ge|\mu| .

Suppose that the condition fails, while some nonzero eigenvalue is present in the initialization. Let ρ=max⁡{∣λ∣:λ∈Λ0}\rho=\max\{|\lambda|:\lambda\in\Lambda_0\} be the largest absolute value among the eigenvalues present, so that ρ>0\rho>0. If only one element of Λ0\Lambda_0 had absolute value ρ\rho, it would be strictly larger in absolute value than every other eigenvalue present, and the condition would hold with λ⋆\lambda_\star equal to that element. Since the condition fails, at least two distinct elements of Λ0\Lambda_0 have absolute value ρ\rho, +ρ+\rho and −ρ-\rho, and both are present in the initialization. We show that ordinary power iteration can then fail to converge to any eigendirection, even while its Rayleigh quotient converges.

Suppose that p+=Πρv0≠0,\mathbf{p}_+=\Pi_\rho\mathbf{v}_0\neq0, p−=Π−ρv0≠0\mathbf{p}_-=\Pi_{-\rho}\mathbf{v}_0\neq0; and that every other eigenvalue present in v0\mathbf{v}_0 has absolute value smaller than ρ\rho. For k≥1k\ge1, define the scaled remainder

rk=∑λ∈Λ0∣λ∣<ρ(λρ)kpλ.\mathbf{r}_k=\sum_{\substack{\lambda\in\Lambda_0\\|\lambda|<\rho}}\left(\frac{\lambda}{\rho}\right)^k\mathbf{p}_\lambda .

Then

∥rk∥2=∑λ∈Λ0∣λ∣<ρ∣λρ∣2k∥pλ∥2⟶0,\|\mathbf{r}_k\|^2=\sum_{\substack{\lambda\in\Lambda_0\\|\lambda|<\rho}}\left|\frac{\lambda}{\rho}\right|^{2k}\|\mathbf{p}_\lambda\|^2\longrightarrow0,

since every ratio ∣λ/ρ∣|\lambda/\rho| in this sum is smaller than one, and

vk=Akv0∥Akv0∥=ρk(p++(−1)kp−+rk)ρk∥p+∥2+∥p−∥2+∥rk∥2=p++(−1)kp−+rk∥p+∥2+∥p−∥2+∥rk∥2.\begin{aligned} \mathbf{v}_k &=\frac{\mathbf{A}^k\mathbf{v}_0}{\|\mathbf{A}^k\mathbf{v}_0\|}\\ &=\frac{\rho^k\bigl(\textcolor{#2563eb}{\mathbf{p}_+}+\textcolor{#ea580c}{(-1)^k\mathbf{p}_-}+\mathbf{r}_k\bigr)}{\rho^k\sqrt{\|\mathbf{p}_+\|^2+\|\mathbf{p}_-\|^2+\|\mathbf{r}_k\|^2}}\\ &=\frac{\textcolor{#2563eb}{\mathbf{p}_+}+\textcolor{#ea580c}{(-1)^k\mathbf{p}_-}+\mathbf{r}_k}{\sqrt{\|\mathbf{p}_+\|^2+\|\mathbf{p}_-\|^2+\|\mathbf{r}_k\|^2}} . \end{aligned}

The second line uses the spectral decomposition Akv0=ρkp++(−ρ)kp−+∑∣λ∣<ρλkpλ\mathbf{A}^k\mathbf{v}_0=\rho^k\mathbf{p}_++(-\rho)^k\mathbf{p}_-+\sum_{|\lambda|<\rho}\lambda^k\mathbf{p}_\lambda, and its denominator follows from Pythagoras, since the three terms in the parentheses lie in EρE_\rho, in E−ρE_{-\rho} and in the sum of the other eigenspaces, which are mutually orthogonal. It is positive because p+≠0\mathbf{p}_+\neq0. The blue component keeps its sign, the orange component changes sign at every step, and the remainder vanishes. Hence

v2k⟶p++p−∥p+∥2+∥p−∥2,\mathbf{v}_{2k}\longrightarrow\frac{\textcolor{#2563eb}{\mathbf{p}_+}+\textcolor{#ea580c}{\mathbf{p}_-}}{\sqrt{\|\mathbf{p}_+\|^2+\|\mathbf{p}_-\|^2}},

whereas

v2k+1⟶p+−p−∥p+∥2+∥p−∥2.\mathbf{v}_{2k+1}\longrightarrow\frac{\textcolor{#2563eb}{\mathbf{p}_+}-\textcolor{#ea580c}{\mathbf{p}_-}}{\sqrt{\|\mathbf{p}_+\|^2+\|\mathbf{p}_-\|^2}} .

These two limits are not collinear. Indeed, if p++p−=c(p+−p−)\mathbf{p}_++\mathbf{p}_-=c(\mathbf{p}_+-\mathbf{p}_-) for some scalar cc, projecting onto EρE_\rho gives c=1c=1, whereas projecting onto E−ρE_{-\rho} gives c=−1c=-1. Thus no choice of an overall factor in {−1,1}\{-1,1\} can make the iterates converge to a single unit eigenvector. Nevertheless, the Rayleigh quotient satisfies

vk⊤Avk=ρ∥p+∥2−ρ∥p−∥2+∑λ∈Λ0∣λ∣<ρλ∣λρ∣2k∥pλ∥2∥p+∥2+∥p−∥2+∑λ∈Λ0∣λ∣<ρ∣λρ∣2k∥pλ∥2⟶ρ ∥p+∥2−∥p−∥2∥p+∥2+∥p−∥2.\begin{aligned} \mathbf{v}_k^\top\mathbf{A}\mathbf{v}_k &=\frac{\displaystyle\rho\|\mathbf{p}_+\|^2-\rho\|\mathbf{p}_-\|^2+\sum_{\substack{\lambda\in\Lambda_0\\|\lambda|<\rho}}\lambda\left|\frac{\lambda}{\rho}\right|^{2k}\|\mathbf{p}_\lambda\|^2}{\displaystyle\|\mathbf{p}_+\|^2+\|\mathbf{p}_-\|^2+\sum_{\substack{\lambda\in\Lambda_0\\|\lambda|<\rho}}\left|\frac{\lambda}{\rho}\right|^{2k}\|\mathbf{p}_\lambda\|^2} %\\& \longrightarrow\rho\,\frac{\|\mathbf{p}_+\|^2-\|\mathbf{p}_-\|^2}{\|\mathbf{p}_+\|^2+\|\mathbf{p}_-\|^2}. \end{aligned}

This limit need not be an eigenvalue. For example, let

A=[100−1],v0=12[11].\mathbf{A}=\begin{bmatrix}1&0\\0&-1\end{bmatrix}, \qquad \mathbf{v}_0=\frac{1}{\sqrt{2}}\begin{bmatrix}1\\1\end{bmatrix}.

Then, at every iteration,

vk=12[1(−1)k],vk⊤Avk=0.\mathbf{v}_k=\frac{1}{\sqrt{2}}\begin{bmatrix}\textcolor{#2563eb}{1}\\\textcolor{#ea580c}{(-1)^k}\end{bmatrix}, \qquad \mathbf{v}_k^\top\mathbf{A}\mathbf{v}_k=0 .

However,

0∉Λ(A),∥Avk−(vk⊤Avk)vk∥=∥Avk∥=1.0\notin\Lambda(\mathbf{A}), \qquad \bigl\|\mathbf{A}\mathbf{v}_k-(\mathbf{v}_k^\top\mathbf{A}\mathbf{v}_k)\mathbf{v}_k\bigr\|=\|\mathbf{A}\mathbf{v}_k\|=1 .

Thus a constant or convergent Rayleigh quotient does not by itself establish convergence to an eigenpair. This obstruction motivates the squared-power construction of Proposition 2 below and the use of an eigenpair residual as a stopping criterion. Panel (b) of Figure 2, below, shows this obstruction on a matrix whose eigenvalues +1+1 and −1-1 tie for the largest magnitude: the residual ∥Avk−(vk⊤Avk)vk∥\|\mathbf{A}\mathbf{v}_k-(\mathbf{v}_k^\top\mathbf{A}\mathbf{v}_k)\mathbf{v}_k\| of plain power iteration (orange) stays of order one.

Two panels of error curves against the number of matrix-vector products. Left: geometric decay of the sign-corrected eigenvector error and the faster decay of the Rayleigh-quotient error for a negative dominant eigenvalue, with the raw distance alternating near 2. Right: the residual of plain power iteration stalls when +1 and -1 tie, while squared power iteration with sign separation drives it to zero geometrically.
Figure 2. Power iteration on two symmetric matrices of size d=60d=60 with random eigenvectors. Each curve is the median over 200 Gaussian initializations, and its band contains the middle half of the runs (the interquartile range). (a) The dominant eigenvalue λ⋆=−1\lambda_\star=-1 has multiplicity 3 and the next largest magnitude is ρ2=0.8\rho_2=0.8. The sign-corrected error ∥(−1)kvk−q⋆∥\|(-1)^k\mathbf v_k-\mathbf q_\star\| (blue) decays like 0.8k0.8^k and the Rayleigh-quotient error (orange) like 0.82k0.8^{2k}, below the bounds of Theorem 1 (dashed), while the raw distance ∥vk−q⋆∥\|\mathbf v_k-\mathbf q_\star\| (grey) alternates between those small values and nearly 2 (Remark 2). (b) The eigenvalues +1+1 and −1-1 tie for the largest magnitude. The residual ∥Av−(v⊤Av)v∥\|\mathbf A\mathbf v-(\mathbf v^\top\mathbf A\mathbf v)\mathbf v\| of plain power iteration (orange) stalls at order one (Remark 5), whereas squared power iteration with sign separation (blue; Proposition 2, run as in Algorithm 1) drives the residual of its candidate to zero, by a factor of about 0.80.8 per product. Both horizontal axes count matrix–vector products: vk\mathbf v_k costs kk products and its Rayleigh quotient one more, and each squared step costs two.

3.3 Corollary 1 [Recovering algebraic extrema by shifting]

Let λmin⁡=min⁡Λ(A)\lambda_{\min}=\min\Lambda(\mathbf{A}) and λmax⁡=max⁡Λ(A)\lambda_{\max}=\max\Lambda(\mathbf{A}).

If α≥λmax⁡\alpha\ge\lambda_{\max} and α>λmin⁡\alpha>\lambda_{\min}, then power iteration applied to B=αId−A\mathbf{B}=\alpha\mathbb{I}_d-\mathbf{A} converges to a unit vector in Eλmin⁡E_{\lambda_{\min}}, provided its initialization has a nonzero projection onto that eigenspace. Its Rayleigh quotient converges to μmax⁡=α−λmin⁡\mu_{\max}=\alpha-\lambda_{\min}, so λmin⁡=α−μmax⁡\lambda_{\min}=\alpha-\mu_{\max}.

Similarly, if β≤λmin⁡\beta\le\lambda_{\min} and β<λmax⁡\beta<\lambda_{\max}, then power iteration applied to C=A−βId\mathbf{C}=\mathbf{A}-\beta\mathbb{I}_d converges to a unit vector in Eλmax⁡E_{\lambda_{\max}}, provided its initialization has a nonzero projection onto that eigenspace. Its Rayleigh quotient converges to νmax⁡=λmax⁡−β\nu_{\max}=\lambda_{\max}-\beta, so λmax⁡=β+νmax⁡\lambda_{\max}=\beta+\nu_{\max}.

Remark 6 [What a shift does to the spectrum]

Power iteration returns the eigenvalue of largest magnitude, which is λmax⁡\lambda_{\max} or λmin⁡\lambda_{\min} depending on the signs. A scalar shift moves the whole spectrum without changing the eigenvectors, and the shift αId−A\alpha\mathbb{I}_d-\mathbf{A} also reverses its order. With α≥λmax⁡\alpha\ge\lambda_{\max}, the spectrum of B\mathbf{B} lies in [0,α−λmin⁡][0,\alpha-\lambda_{\min}], so the eigenvalue of A\mathbf{A} farthest below α\alpha becomes the dominant eigenvalue of B\mathbf{B}.

Proof

For any eigenpair (λ,u)(\lambda,\mathbf{u}) of A\mathbf{A}, Bu=(αId−A)u=(α−λ)u.\mathbf{B}\mathbf{u}=(\alpha\mathbb{I}_d-\mathbf{A})\mathbf{u}=(\alpha-\lambda)\mathbf{u}. Since an orthonormal eigenbasis of A\mathbf{A} is also an eigenbasis of B\mathbf{B}, Λ(B)={α−λ:λ∈Λ(A)}.\Lambda(\mathbf{B})=\{\alpha-\lambda:\lambda\in\Lambda(\mathbf{A})\}. The assumptions on α\alpha give 0≤α−λ≤α−λmin⁡0\le\alpha-\lambda\le\textcolor{#2563eb}{\alpha-\lambda_{\min}} and α−λmin⁡>0.\textcolor{#2563eb}{\alpha-\lambda_{\min}}>0. Whenever λ>λmin⁡\lambda>\lambda_{\min}, α−λ<α−λmin⁡.\alpha-\lambda<\alpha-\lambda_{\min}. Therefore, B\mathbf{B} has a positive dominant eigenvalue α−λmin⁡\textcolor{#2563eb}{\alpha-\lambda_{\min}}, whose eigenspace is exactly Eλmin⁡E_{\lambda_{\min}}. Proposition 1 applies, including when this eigenvalue is repeated.

For C\mathbf{C}, Cu=(A−βId)u=(λ−β)u\mathbf{C}\mathbf{u}=(\mathbf{A}-\beta\mathbb{I}_d)\mathbf{u}=(\lambda-\beta)\mathbf{u} and Λ(C)={λ−β:λ∈Λ(A)}.\Lambda(\mathbf{C})=\{\lambda-\beta:\lambda\in\Lambda(\mathbf{A})\}. The assumptions on β\beta give 0≤λ−β≤λmax⁡−β0\le\lambda-\beta\le\textcolor{#2563eb}{\lambda_{\max}-\beta} and λmax⁡−β>0.\textcolor{#2563eb}{\lambda_{\max}-\beta}>0. Whenever λ<λmax⁡\lambda<\lambda_{\max}, λ−β<λmax⁡−β.\lambda-\beta<\lambda_{\max}-\beta. Thus C\mathbf{C} has a positive dominant eigenvalue λmax⁡−β\textcolor{#2563eb}{\lambda_{\max}-\beta}, with eigenspace Eλmax⁡E_{\lambda_{\max}}. Proposition 1 again applies.

■□\begin{array}{r} \blacksquare\Box \end{array}

In particular, choosing α=λmax⁡\alpha=\lambda_{\max} recovers the minimum eigenvalue from the maximum, unless A=λmax⁡Id\mathbf{A}=\lambda_{\max}\mathbb{I}_d. In that exceptional case, every eigenvalue already equals λmax⁡\lambda_{\max}. The analogous statement holds for β=λmin⁡\beta=\lambda_{\min}.

Remark 7 [The shift only needs to pass the midpoint]

The condition α≥λmax⁡\alpha\ge\lambda_{\max} is convenient but stronger than needed. Proposition 1 only requires that α−λmin⁡\alpha-\lambda_{\min} strictly dominate ∣α−λ∣|\alpha-\lambda| for every other eigenvalue λ\lambda present in the initialization. For λ≤α\lambda\le\alpha, this holds because λ>λmin⁡\lambda>\lambda_{\min}. For λ>α\lambda>\alpha, it reads λ−α<α−λmin⁡\lambda-\alpha<\alpha-\lambda_{\min}, that is, λ+λmin⁡<2α\lambda+\lambda_{\min}<2\alpha. Hence every shift α>(λmin⁡+λmax⁡)/2\alpha>(\lambda_{\min}+\lambda_{\max})/2 works. In particular, an underestimate of λmax⁡\lambda_{\max}, such as a Rayleigh quotient

x⊤Ax∥x∥2=∑λ∈Λ(A)λ ∥Πλx∥2∑λ∈Λ(A)∥Πλx∥2≤λmax⁡(x≠0),\frac{\mathbf{x}^\top\mathbf{A}\mathbf{x}}{\|\mathbf{x}\|^2}=\frac{\sum_{\lambda\in\Lambda(\mathbf{A})}\lambda\,\|\Pi_\lambda\mathbf{x}\|^2}{\sum_{\lambda\in\Lambda(\mathbf{A})}\|\Pi_\lambda\mathbf{x}\|^2}\le\lambda_{\max} \qquad(\mathbf{x}\neq0),

is a valid shift as long as it exceeds the midpoint of the spectrum. Symmetrically, every β<(λmin⁡+λmax⁡)/2\beta<(\lambda_{\min}+\lambda_{\max})/2 works for C\mathbf{C}.

The midpoint is unknown when λmin⁡\lambda_{\min} and λmax⁡\lambda_{\max} are, so x\mathbf{x} must be chosen without it. A random vector is not enough. For g∼N(0,Id)\mathbf{g}\sim\mathcal{N}(0,\mathbb{I}_d), the unit vector u=g/∥g∥\mathbf{u}=\mathbf{g}/\|\mathbf{g}\| is uniformly distributed on the sphere, so E[uu⊤]=Id/d\mathbb{E}[\mathbf{u}\mathbf{u}^\top]=\mathbb{I}_d/d and E[g⊤Ag/∥g∥2]=tr⁡(A E[uu⊤])=tr⁡(A)/d,\mathbb{E}\left[\mathbf{g}^\top\mathbf{A}\mathbf{g} / \|\mathbf{g}\|^2\right]=\operatorname{tr}\bigl(\mathbf{A}\,\mathbb{E}[\mathbf{u}\mathbf{u}^\top]\bigr)=\operatorname{tr}(\mathbf{A})/d, the mean of the eigenvalues counted with multiplicity, which can lie far below the midpoint. For the spectrum {10,0,…,0}\{10,0,\dots,0\}, the midpoint is 55, while the mean is 10/d10/d.

Power iteration itself supplies a suitable x\mathbf{x}. Assume that one of the two extremes is strictly larger in absolute value than the other, so that, with a random initialization (Remark 4), power iteration on A\mathbf{A} converges to it. Take for x\mathbf{x} the iterate vk\mathbf{v}_k, and for the shift its Rayleigh quotient θk=vk⊤Avk\theta_k=\mathbf{v}_k^\top\mathbf{A}\mathbf{v}_k. By Theorem 1, θk\theta_k converges to the dominant eigenvalue λ⋆∈{λmin⁡,λmax⁡}\lambda_\star\in\{\lambda_{\min},\lambda_{\max}\}, with ∣θk−λ⋆∣≤2∣λ⋆∣(ρ2/∣λ⋆∣)2ktan⁡2(ϕ0).|\theta_k-\lambda_\star|\le2|\lambda_\star|\left(\rho_2/|\lambda_\star|\right)^{2k}\tan^2(\phi_0). Both extremes lie at the distance (λmax⁡−λmin⁡)/2(\lambda_{\max}-\lambda_{\min})/2 from the midpoint. As soon as ∣θk−λ⋆∣|\theta_k-\lambda_\star| is smaller than this distance, θk\theta_k lies on the same side of the midpoint as λ⋆\lambda_\star, and θk\theta_k is a valid shift. The sign of λ⋆\lambda_\star tells which extreme was found. If λ⋆>0\lambda_\star>0, every other eigenvalue satisfies λ≤∣λ∣<λ⋆\lambda\le|\lambda|<\lambda_\star, so λ⋆=λmax⁡\lambda_\star=\lambda_{\max}. If λ⋆<0\lambda_\star<0, every other eigenvalue satisfies λ≥−∣λ∣>λ⋆\lambda\ge-|\lambda|>\lambda_\star, so λ⋆=λmin⁡\lambda_\star=\lambda_{\min}. This sign can be read from θk\theta_k. In both cases, the midpoint lies strictly between 00 and λ⋆\lambda_\star. For instance, if λ⋆=λmax⁡>0\lambda_\star=\lambda_{\max}>0, then ∣λmin⁡∣<λmax⁡|\lambda_{\min}|<\lambda_{\max} gives λmin⁡+λmax⁡>0\lambda_{\min}+\lambda_{\max}>0. Hence a θk\theta_k on the same side of the midpoint as λ⋆\lambda_\star has the sign of λ⋆\lambda_\star. The sign also shows in the iterates: vk⊤vk+1=θk/∥Avk∥\mathbf{v}_k^\top\mathbf{v}_{k+1}=\theta_k/\|\mathbf{A}\mathbf{v}_k\|, so consecutive iterates point to opposite sides exactly when θk<0\theta_k<0, which is the alternation of Remark 2. If θk>0\theta_k>0, the matrix to use is B=θkId−A\mathbf{B}=\theta_k\mathbb{I}_d-\mathbf{A} of Corollary 1, with α=θk\alpha=\theta_k. If θk<0\theta_k<0, it is C=A−θkId\mathbf{C}=\mathbf{A}-\theta_k\mathbb{I}_d, with β=θk\beta=\theta_k. Even this distinction is a convenience. The two matrices differ only by their sign, so they have the same eigenvectors, and power iteration on either, from a random initialization, converges, up to sign (Remark 2), to an eigenvector of the eigenvalue of A\mathbf{A} farthest from θk\theta_k, which is the other extreme.

Products alone cannot certify that θk\theta_k has passed the midpoint, because the spread λmax⁡−λmin⁡\lambda_{\max}-\lambda_{\min} is unknown. A failure is nevertheless visible. If θk\theta_k is still on the wrong side of the midpoint, the eigenvalue of A\mathbf{A} farthest from θk\theta_k is λ⋆\lambda_\star itself, so the second run converges to an eigenvector of λ⋆\lambda_\star, the eigenvalue already found by the first run, instead of the other extreme, and comparing the eigenvalues returned by the two runs reveals it. The remedy is to continue the first run, which brings θk\theta_k closer to λ⋆\lambda_\star, and to repeat the second. Once ∣θk−λ⋆∣<(λmax⁡−λmin⁡)/2|\theta_k-\lambda_\star|<(\lambda_{\max}-\lambda_{\min})/2, the second run reaches the other extreme. This can only fail if the half-spread is below the accuracy reached, that is, if every eigenvalue of A\mathbf{A} is within twice that accuracy of λ⋆\lambda_\star, and then the other extreme coincides with λ⋆\lambda_\star to that accuracy anyway. Algorithm 1 avoids the question altogether: it uses no shift, reaches the remaining eigenpairs by deflation, and separates eigenvalues of opposite signs by sign separation.

Beyond the two extremes, however, a scalar shift does not help. It changes every eigenvalue, and the dominant eigenvalue of A−σId\mathbf{A}-\sigma\mathbb{I}_d comes from the eigenvalue of A\mathbf{A} farthest from σ\sigma, which is λmin⁡\lambda_{\min} or λmax⁡\lambda_{\max} whatever σ\sigma is. No shift therefore makes an interior eigenvalue dominant. Deflation does. Power iteration finds one eigenpair, the dominant one, and running it again on A\mathbf{A} would only find the same pair. To reach the next pair, deflation removes from A\mathbf{A} the eigendirections already found and leaves every other eigenpair untouched. In an orthonormal eigenbasis q1,…,qd\mathbf{q}_1,\dots,\mathbf{q}_d of A\mathbf{A}, with Aqi=λiqi\mathbf{A}\mathbf{q}_i=\lambda_i\mathbf{q}_i, the spectral decomposition writes A\mathbf{A} as a sum of rank-one layers, one per eigenvector, and deflating the first rr eigenvectors means deleting their layers, which gives a new matrix, the deflated matrix B\mathbf{B}:

A=∑i=1rλiqiqi⊤+∑i=r+1dλiqiqi⊤⟶B:=∑i=r+1dλiqiqi⊤.\mathbf{A}=\textcolor{#ea580c}{\sum_{i=1}^r\lambda_i\mathbf{q}_i\mathbf{q}_i^\top}+\textcolor{#2563eb}{\sum_{i=r+1}^d\lambda_i\mathbf{q}_i\mathbf{q}_i^\top} \qquad\longrightarrow\qquad \mathbf{B}:=\textcolor{#2563eb}{\sum_{i=r+1}^d\lambda_i\mathbf{q}_i\mathbf{q}_i^\top} .

This matrix has the same eigenvectors as A\mathbf{A}. The ones already found (orange) now have the eigenvalue 00, and all the others (blue) keep their eigenvalues. The largest remaining eigenvalue of A\mathbf{A} in absolute value is therefore the dominant eigenvalue of B\mathbf{B}, and power iteration on B\mathbf{B} finds it. The layer picture uses every eigenvector, but computing B\mathbf{B} does not: the lemma below shows that it only needs the eigenvectors already found, through the projection P=Id−QQ⊤\mathbf{P}=\mathbb{I}_d-\mathbf{Q}\mathbf{Q}^\top that removes the components along them.

3.4 Lemma 1 [Orthogonal deflation]

Let q1,…,qr\mathbf{q}_1,\dots,\mathbf{q}_r be exact orthonormal eigenvectors of A\mathbf{A}, with associated eigenvalues λ1,…,λr\lambda_1,\dots,\lambda_r:

Aqi=λiqi,qi⊤qℓ=δiℓ,i,ℓ∈{1,…,r}.\mathbf{A}\mathbf{q}_i=\lambda_i\mathbf{q}_i, \qquad \mathbf{q}_i^\top\mathbf{q}_\ell=\delta_{i\ell}, \qquad i,\ell\in\{1,\dots,r\}.

Define

Q=[q1,…,qr],D=diag⁡(λ1,…,λr),P=Id−QQ⊤.\mathbf{Q}=[\mathbf{q}_1,\dots,\mathbf{q}_r], \qquad \mathbf{D}=\operatorname{diag}(\lambda_1,\dots,\lambda_r), \qquad \mathbf{P}=\mathbb{I}_d-\mathbf{Q}\mathbf{Q}^\top .

Then

B=PAP=A−QDQ⊤=A−∑i=1rλiqiqi⊤.\mathbf{B}=\mathbf{P}\mathbf{A}\mathbf{P}=\mathbf{A}-\mathbf{Q}\mathbf{D}\mathbf{Q}^\top=\mathbf{A}-\sum_{i=1}^r\lambda_i\mathbf{q}_i\mathbf{q}_i^\top .

Moreover,

  1. The eigenvectors already found have the eigenvalue 00 for B\mathbf{B}. For each column qi\mathbf{q}_i of Q\mathbf{Q}, Bqi=0\mathbf{B}\mathbf{q}_i=0, for i∈{1,…,r}i\in\{1,\dots,r\}.
  2. On the vectors orthogonal to the eigenvectors already found, B\mathbf{B} acts exactly as A\mathbf{A}. That is, Bx=Ax\mathbf{B}\mathbf{x}=\mathbf{A}\mathbf{x} for every x\mathbf{x} with Q⊤x=0\mathbf{Q}^\top\mathbf{x}=0, which is to say for every x∈range⁡(P)=span⁡{q1,…,qr}⊥\mathbf{x}\in\operatorname{range}(\mathbf{P})=\operatorname{span}\{\mathbf{q}_1,\dots,\mathbf{q}_r\}^\perp.
  3. The other eigenpairs of A\mathbf{A} are eigenpairs of B\mathbf{B}. Every eigenvector of A\mathbf{A} orthogonal to q1,…,qr\mathbf{q}_1,\dots,\mathbf{q}_r is an eigenvector of B\mathbf{B} with the same eigenvalue. Hence the restriction of B\mathbf{B} to range⁡(P)=span⁡{q1,…,qr}⊥\operatorname{range}(\mathbf{P}) = \operatorname{span}\{\mathbf{q}_1,\dots,\mathbf{q}_r\}^\perp has the remaining eigenvalues of A\mathbf{A}, counted with multiplicity, and B\mathbf{B} has the eigenvalue 00 on range⁡(P)⊥=span⁡{q1,…,qr}\operatorname{range}(\mathbf{P})^\perp = \operatorname{span}\{\mathbf{q}_1,\dots,\mathbf{q}_r\}.

Remark 8 [Two views of the deflated matrix]

The two formulas for B\mathbf{B} are two ways of computing a product Bx\mathbf{B}\mathbf{x} with one product by A\mathbf{A}.

  • Projection, Bx=P(A(Px))\mathbf{B}\mathbf{x}=\mathbf{P}\bigl(\mathbf{A}(\mathbf{P}\mathbf{x})\bigr): remove from x\mathbf{x} its components along the stored eigenvectors, apply A\mathbf{A}, and remove those components again. A vector orthogonal to every stored eigenvector passes through unchanged (item 2), and a stored eigenvector is sent to 00 (item 1).
  • Subtraction, Bx=Ax−∑i=1rλi(qi⊤x) qi\mathbf{B}\mathbf{x}=\mathbf{A}\mathbf{x}-\sum_{i=1}^r\lambda_i(\mathbf{q}_i^\top\mathbf{x})\,\mathbf{q}_i: apply A\mathbf{A}, then subtract the layers of the stored eigenpairs, exactly as in the picture above.

The two agree because the qi\mathbf{q}_i are exact eigenvectors, and the proof below uses AQ=QD\mathbf{A}\mathbf{Q}=\mathbf{Q}\mathbf{D}. For computed, approximate eigenvectors they differ. The projection still returns vectors exactly orthogonal to the stored ones, so the eigenvectors found later stay orthogonal to them, which is why the implementation below applies P\mathbf{P} explicitly.

Proof

Since

AQ=QD,Q⊤A=DQ⊤,Q⊤Q=Ir,\mathbf{A}\mathbf{Q}=\mathbf{Q}\mathbf{D}, \qquad \mathbf{Q}^\top\mathbf{A}=\mathbf{D}\mathbf{Q}^\top, \qquad \mathbf{Q}^\top\mathbf{Q}=\mathbb{I}_r,

we obtain

PAP=(Id−QQ⊤)A(Id−QQ⊤)=A−QQ⊤A−AQQ⊤+QQ⊤AQQ⊤=A−QDQ⊤−QDQ⊤+QDQ⊤=A−QDQ⊤.\begin{aligned} \mathbf{P}\mathbf{A}\mathbf{P} &=(\mathbb{I}_d-\mathbf{Q}\mathbf{Q}^\top)\mathbf{A}(\mathbb{I}_d-\mathbf{Q}\mathbf{Q}^\top)\\ &=\mathbf{A}-\mathbf{Q}\mathbf{Q}^\top\mathbf{A}-\mathbf{A}\mathbf{Q}\mathbf{Q}^\top+\mathbf{Q}\mathbf{Q}^\top\mathbf{A}\mathbf{Q}\mathbf{Q}^\top\\ &=\mathbf{A}-\mathbf{Q}\mathbf{D}\mathbf{Q}^\top\textcolor{#2563eb}{-\mathbf{Q}\mathbf{D}\mathbf{Q}^\top+\mathbf{Q}\mathbf{D}\mathbf{Q}^\top}\\ &=\mathbf{A}-\mathbf{Q}\mathbf{D}\mathbf{Q}^\top . \end{aligned}

In the third line, each of the three products reduces to QDQ⊤\mathbf{Q}\mathbf{D}\mathbf{Q}^\top, and the two blue terms cancel. For each i∈{1,…,r}i\in\{1,\dots,r\},

Bqi=Aqi−∑ℓ=1rλℓqℓ(qℓ⊤qi)=λiqi−λiqi=0.\begin{aligned} \mathbf{B}\mathbf{q}_i &=\mathbf{A}\mathbf{q}_i-\sum_{\ell=1}^r\lambda_\ell\mathbf{q}_\ell(\mathbf{q}_\ell^\top\mathbf{q}_i)\\ &=\lambda_i\mathbf{q}_i-\lambda_i\mathbf{q}_i\\ &=0 . \end{aligned}

If Q⊤x=0\mathbf{Q}^\top\mathbf{x}=0, then

Bx=Ax−QD(Q⊤x)=Ax.\mathbf{B}\mathbf{x}=\mathbf{A}\mathbf{x}-\mathbf{Q}\mathbf{D}(\mathbf{Q}^\top\mathbf{x})=\mathbf{A}\mathbf{x}.

Also,

Q⊤Ax=DQ⊤x=0,\mathbf{Q}^\top\mathbf{A}\mathbf{x}=\mathbf{D}\mathbf{Q}^\top\mathbf{x}=0,

so range⁡(P)\operatorname{range}(\mathbf{P}) is invariant under A\mathbf{A}.

Extend q1,…,qr\mathbf{q}_1,\dots,\mathbf{q}_r to an orthonormal eigenbasis q1,…,qd\mathbf{q}_1,\dots,\mathbf{q}_d of A\mathbf{A}. For every i>ri>r,

Q⊤qi=0,Bqi=Aqi=λiqi.\mathbf{Q}^\top\mathbf{q}_i=0, \qquad \mathbf{B}\mathbf{q}_i=\mathbf{A}\mathbf{q}_i=\lambda_i\mathbf{q}_i .

Thus the eigenpairs associated with qr+1,…,qd\mathbf{q}_{r+1},\dots,\mathbf{q}_d are preserved on range⁡(P)\operatorname{range}(\mathbf{P}).

■□\begin{array}{r} \blacksquare\Box \end{array}

When an eigenvalue is repeated, deflating one unit eigenvector removes only that direction. Other directions in the same eigenspace that are orthogonal to it retain their eigenvalue.

Ordinary power iteration can be applied repeatedly to the deflated operator whenever the hypotheses of Proposition 1 hold at each stage. The following modification also handles opposite eigenvalues of equal magnitude, without requiring a spectral bound, such as a lower bound β≤λmin⁡\beta\le\lambda_{\min} that would make A−βId\mathbf{A}-\beta\mathbb{I}_d positive semidefinite and thus free of opposite eigenvalues. It squares the operator instead, which makes it positive semidefinite without any bound, and then separates the signs.

3.5 Proposition 2 [Power iteration with sign separation]

Let B∈Rd×d\mathbf{B}\in\mathbb{R}^{d\times d} be symmetric, and let w0\mathbf{w}_0 be any unit vector. If Bw0=0\mathbf{B}\mathbf{w}_0=0, then (0,w0)(0,\mathbf{w}_0) is an eigenpair. Otherwise, the iteration

wk+1=B2wk∥B2wk∥\mathbf{w}_{k+1}=\frac{\mathbf{B}^2\mathbf{w}_k}{\|\mathbf{B}^2\mathbf{w}_k\|}

is well defined and converges to a unit vector w\mathbf{w} satisfying B2w=ρ2w\mathbf{B}^2\mathbf{w}=\rho^2\mathbf{w} for some ρ>0\rho>0. This value can be recovered as ρ=∥Bw∥.\rho=\|\mathbf{B}\mathbf{w}\|. Define

u+=12(w+Bwρ),u−=12(w−Bwρ).\textcolor{#2563eb}{\mathbf{u}_+}=\frac12\left(\mathbf{w}+\frac{\mathbf{B}\mathbf{w}}{\rho}\right), \qquad \textcolor{#ea580c}{\mathbf{u}_-}=\frac12\left(\mathbf{w}-\frac{\mathbf{B}\mathbf{w}}{\rho}\right).

Then

Bu+=ρ u+,Bu−=−ρ u−.\mathbf{B}\textcolor{#2563eb}{\mathbf{u}_+}=\rho\,\textcolor{#2563eb}{\mathbf{u}_+}, \qquad \mathbf{B}\textcolor{#ea580c}{\mathbf{u}_-}=-\rho\,\textcolor{#ea580c}{\mathbf{u}_-} .

At least one of u+\mathbf{u}_+ and u−\mathbf{u}_- is nonzero. Normalizing either nonzero vector gives an eigenvector of B\mathbf{B}.

Remark 9 [Sign separation is a reflection]

Squaring maps +ρ+\rho and −ρ-\rho to the same eigenvalue ρ2\rho^2 of B2\mathbf{B}^2, so the obstruction of Remark 5 disappears: B2\mathbf{B}^2 is positive semidefinite, and its largest eigenvalue present in w0\mathbf{w}_0 is strictly dominant. The price is that the limit w\mathbf{w} may mix the two eigenspaces of B\mathbf{B} for +ρ+\rho and −ρ-\rho. One more product separates them. The limit lies in the eigenspace of B2\mathbf{B}^2 for ρ2\rho^2, which is the sum of these two eigenspaces, so we can write w=w++w−\mathbf{w}=\textcolor{#2563eb}{\mathbf{w}_+}+\textcolor{#ea580c}{\mathbf{w}_-} with Bw±=±ρ w±\mathbf{B}\mathbf{w}_\pm=\pm\rho\,\mathbf{w}_\pm. Then Bw/ρ=w+−w−\mathbf{B}\mathbf{w}/\rho=\textcolor{#2563eb}{\mathbf{w}_+}-\textcolor{#ea580c}{\mathbf{w}_-} is the On the sum of the two eigenspaces, B/ρ\mathbf B/\rho fixes every vector of the +ρ+\rho eigenspace and reverses every vector of the −ρ-\rho eigenspace: it is the mirror reflection across the +ρ+\rho eigenspace. Averaging a vector with its mirror image keeps its part on the mirror; averaging it with minus its mirror image keeps the other part. of w\mathbf{w} that fixes the blue part and reverses the orange part, so u+=w+\mathbf{u}_+=\textcolor{#2563eb}{\mathbf{w}_+} and u−=w−\mathbf{u}_-=\textcolor{#ea580c}{\mathbf{w}_-} are exactly the orthogonal projections of w\mathbf{w} onto the two eigenspaces. The orthogonality and norm identities in the proof below are this observation written out. Panel (b) of Figure 2 runs this construction on a matrix whose eigenvalues +1+1 and −1-1 tie for the largest magnitude: the residual of its candidate tends to zero, by a factor of about 0.80.8 per product, where plain power iteration stalls.

Proof

Let ΠλB\Pi^{\mathbf{B}}_\lambda denote the orthogonal projection onto the eigenspace of B\mathbf{B} associated with λ\lambda. Since Bw0≠0\mathbf{B}\mathbf{w}_0\neq0, the initialization has a nonzero component in at least one nonzero eigenspace of B\mathbf{B}. Define

ρ=max⁡{∣λ∣:λ∈Λ(B),  ΠλBw0≠0}>0.\rho=\max\bigl\{|\lambda|:\lambda\in\Lambda(\mathbf{B}),\;\Pi^{\mathbf{B}}_\lambda\mathbf{w}_0\neq0\bigr\}>0 .

The eigenvalues of B2\mathbf{B}^2 are the numbers λ2\lambda^2. Its largest eigenvalue present in w0\mathbf{w}_0 is therefore ρ2>0\rho^2>0, and every other distinct eigenvalue present is strictly smaller than ρ2\rho^2. Proposition 1, applied to B2\mathbf{B}^2, shows that the iterates are well defined and converge to a unit vector w\mathbf{w} in the eigenspace associated with ρ2\rho^2: B2w=ρ2w.\mathbf{B}^2\mathbf{w}=\rho^2\mathbf{w}.

Furthermore,

∥Bw∥2=w⊤B⊤Bw=w⊤B2w=ρ2∥w∥2=ρ2.\begin{aligned} \|\mathbf{B}\mathbf{w}\|^2 &=\mathbf{w}^\top\mathbf{B}^\top\mathbf{B}\mathbf{w}\\ &=\mathbf{w}^\top\mathbf{B}^2\mathbf{w}\\ &=\rho^2\|\mathbf{w}\|^2\\ &=\rho^2 . \end{aligned}

Thus ρ=∥Bw∥\rho=\|\mathbf{B}\mathbf{w}\|. For either choice of the sign,

Bu±=12(Bw±B2wρ)=12(Bw±ρ w)=±ρ 12(w±Bwρ)=±ρ u±.\begin{aligned} \mathbf{B}\mathbf{u}_\pm &=\frac12\left(\mathbf{B}\mathbf{w}\pm\frac{\mathbf{B}^2\mathbf{w}}{\rho}\right)\\ &=\frac12\bigl(\mathbf{B}\mathbf{w}\pm\rho\,\mathbf{w}\bigr)\\ &=\pm\rho\,\frac12\left(\mathbf{w}\pm\frac{\mathbf{B}\mathbf{w}}{\rho}\right)\\ &=\pm\rho\,\mathbf{u}_\pm . \end{aligned}

Also, u++u−=w≠0,\textcolor{#2563eb}{\mathbf{u}_+}+\textcolor{#ea580c}{\mathbf{u}_-}=\mathbf{w}\neq0, so the two vectors cannot both be zero. More precisely,

u+⊤u−=14(∥w∥2−∥Bw∥2ρ2)=0,\textcolor{#2563eb}{\mathbf{u}_+}^\top\textcolor{#ea580c}{\mathbf{u}_-}=\frac14\left(\|\mathbf{w}\|^2-\frac{\|\mathbf{B}\mathbf{w}\|^2}{\rho^2}\right)=0,

and ∥u+∥2+∥u−∥2=1.\|\textcolor{#2563eb}{\mathbf{u}_+}\|^2+\|\textcolor{#ea580c}{\mathbf{u}_-}\|^2=1. Therefore, max⁡{∥u+∥,∥u−∥}≥1/2.\max\bigl\{\|\mathbf{u}_+\|,\|\mathbf{u}_-\|\bigr\}\ge 1/\sqrt{2}. Choosing the vector with larger norm avoids normalizing a potentially very small component.

■□\begin{array}{r} \blacksquare\Box \end{array}

This construction does not require forming B2\mathbf{B}^2. Its action is obtained through B2x=B(Bx)\mathbf{B}^2\mathbf{x}=\mathbf{B}(\mathbf{B}\mathbf{x}), using two applications of B\mathbf{B}. Squaring removes the distinction between the eigenvalues +ρ+\rho and −ρ-\rho during power iteration. The subsequent construction of u+\mathbf{u}_+ and u−\mathbf{u}_- separates their eigenspaces.

3.6 Corollary 2 [Recovery of a complete eigenbasis]

For every real symmetric matrix A\mathbf{A}, orthogonal deflation combined with Proposition 2 recovers a complete orthonormal eigenbasis, including repeated and zero eigenvalues, when each inner power iteration is taken to its limit. The procedure is as follows.

  1. Initialize Q0∈Rd×0\mathbf{Q}_0\in\mathbb{R}^{d\times0} as an empty matrix, that is, a matrix with no columns, so that Q0Q0⊤=0d×d\mathbf{Q}_0\mathbf{Q}_0^\top=0_{d\times d} (each entry is an empty sum).
  2. At stage j∈{1,…,d}j\in\{1,\dots,d\}, define Pj−1=Id−Qj−1Qj−1⊤\mathbf{P}_{j-1}=\mathbb{I}_d-\mathbf{Q}_{j-1}\mathbf{Q}_{j-1}^\top and Bj=Pj−1APj−1\mathbf{B}_j=\mathbf{P}_{j-1}\mathbf{A}\mathbf{P}_{j-1}. Choose z\mathbf{z} such that Pj−1z≠0\mathbf{P}_{j-1}\mathbf{z}\neq0, and set w0=Pj−1z/∥Pj−1z∥\mathbf{w}_0=\mathbf{P}_{j-1}\mathbf{z}/\|\mathbf{P}_{j-1}\mathbf{z}\|. For example, a fresh draw z∼N(0,Id)\mathbf{z}\sim\mathcal{N}(0,\mathbb{I}_d) gives a nonzero denominator with probability one.
  3. If Bjw0=0\mathbf{B}_j\mathbf{w}_0=0, set qj=w0\mathbf{q}_j=\mathbf{w}_0 and λj=0\lambda_j=0. Otherwise, apply Proposition 2 to Bj\mathbf{B}_j, choose the larger of the two sign-separated components in norm, and normalize it to obtain qj\mathbf{q}_j. Recover the eigenvalue as λj=qj⊤Aqj\lambda_j=\mathbf{q}_j^\top\mathbf{A}\mathbf{q}_j.
  4. Append the new eigenvector, Qj=[Qj−1,qj]\mathbf{Q}_j=[\mathbf{Q}_{j-1},\mathbf{q}_j], and continue to the next stage.

Proof

The proof is by induction on the stage jj. Assume that the columns of Qj−1\mathbf{Q}_{j-1} are orthonormal eigenvectors of A\mathbf{A}, which holds trivially for j=1j=1, since Q0\mathbf{Q}_0 has no columns. Let

Sj={x∈Rd:Qj−1⊤x=0}S_j=\{\mathbf{x}\in\mathbb{R}^d:\mathbf{Q}_{j-1}^\top\mathbf{x}=0\}

be the orthogonal complement of the eigenvectors already found, with S1=RdS_1=\mathbb{R}^d. We show that qj\mathbf{q}_j is a unit eigenvector of A\mathbf{A} that lies in SjS_j, so that the columns of Qj=[Qj−1,qj]\mathbf{Q}_j=[\mathbf{Q}_{j-1},\mathbf{q}_j] are again orthonormal eigenvectors of A\mathbf{A}.

On SjS_j, Bj\mathbf{B}_j acts as A\mathbf{A}. By Lemma 1, Bj=A−Qj−1Dj−1Qj−1⊤\mathbf{B}_j=\mathbf{A}-\mathbf{Q}_{j-1}\mathbf{D}_{j-1}\mathbf{Q}_{j-1}^\top, where Dj−1\mathbf{D}_{j-1} is the diagonal matrix of the eigenvalues already found. Hence Bjx=Ax\mathbf{B}_j\mathbf{x}=\mathbf{A}\mathbf{x} for every x∈Sj\mathbf{x}\in S_j.

Bj\mathbf{B}_j maps every vector into SjS_j. Since Qj−1⊤Qj−1=Ij−1\mathbf{Q}_{j-1}^\top\mathbf{Q}_{j-1}=\mathbb{I}_{j-1}, Qj−1⊤Pj−1=Qj−1⊤−Qj−1⊤Qj−1Qj−1⊤=0,\mathbf{Q}_{j-1}^\top\mathbf{P}_{j-1}=\mathbf{Q}_{j-1}^\top-\mathbf{Q}_{j-1}^\top\mathbf{Q}_{j-1}\mathbf{Q}_{j-1}^\top=0, so Pj−1y∈Sj\mathbf{P}_{j-1}\mathbf{y}\in S_j for every y∈Rd\mathbf{y}\in\mathbb{R}^d. In particular, Bjx=Pj−1(APj−1x)∈Sj\mathbf{B}_j\mathbf{x}=\mathbf{P}_{j-1}(\mathbf{A}\mathbf{P}_{j-1}\mathbf{x})\in S_j for every x\mathbf{x}.

Every vector computed at stage jj lies in SjS_j. The initialization w0=Pj−1z/∥Pj−1z∥\mathbf{w}_0=\mathbf{P}_{j-1}\mathbf{z}/\|\mathbf{P}_{j-1}\mathbf{z}\| does, by the previous step. Each iterate wk+1\mathbf{w}_{k+1} is a multiple of Bj(Bjwk)\mathbf{B}_j(\mathbf{B}_j\mathbf{w}_k), so it does too. The limit w\mathbf{w} does, because a subspace is closed. Finally, u±=12(w±Bjw/ρ)\mathbf{u}_\pm=\frac12(\mathbf{w}\pm\mathbf{B}_j\mathbf{w}/\rho) are linear combinations of the two vectors w\mathbf{w} and Bjw\mathbf{B}_j\mathbf{w} of SjS_j.

Conclusion. The matrix Bj\mathbf{B}_j is symmetric, so Proposition 2 applies to it. If Bjw0≠0\mathbf{B}_j\mathbf{w}_0\neq0, the vector qj\mathbf{q}_j is a normalized u+\mathbf{u}_+ or u−\mathbf{u}_-. It lies in SjS_j, that is, Qj−1⊤qj=0\mathbf{Q}_{j-1}^\top\mathbf{q}_j=0, and it satisfies Bjqj=μ qj\mathbf{B}_j\mathbf{q}_j=\mu\,\mathbf{q}_j with μ=ρ\mu=\rho or μ=−ρ\mu=-\rho. The first step turns this into Aqj=Bjqj=μ qj,\mathbf{A}\mathbf{q}_j=\mathbf{B}_j\mathbf{q}_j=\mu\,\mathbf{q}_j, so qj\mathbf{q}_j is an eigenvector of A\mathbf{A}, and λj=qj⊤Aqj=μ\lambda_j=\mathbf{q}_j^\top\mathbf{A}\mathbf{q}_j=\mu. If Bjw0=0\mathbf{B}_j\mathbf{w}_0=0, then qj=w0\mathbf{q}_j=\mathbf{w}_0 lies in SjS_j, and the first step gives Aw0=Bjw0=0,\mathbf{A}\mathbf{w}_0=\mathbf{B}_j\mathbf{w}_0=0, so w0\mathbf{w}_0 is an eigenvector of A\mathbf{A} with the eigenvalue λj=0\lambda_j=0.

Thus each stage adds one unit eigenvector orthogonal to all previously stored eigenvectors. After dd stages, Qd⊤Qd=Id\mathbf{Q}_d^\top\mathbf{Q}_d=\mathbb{I}_d and AQd=Qddiag⁡(λ1,…,λd).\mathbf{A}\mathbf{Q}_d=\mathbf{Q}_d\operatorname{diag}(\lambda_1,\dots,\lambda_d). Since the square matrix Qd\mathbf{Q}_d is orthogonal, QdQd⊤=Id\mathbf{Q}_d\mathbf{Q}_d^\top=\mathbb{I}_d, and hence A=Qddiag⁡(λ1,…,λd)Qd⊤.\mathbf{A}=\mathbf{Q}_d\operatorname{diag}(\lambda_1,\dots,\lambda_d)\mathbf{Q}_d^\top.

■□\begin{array}{r} \blacksquare\Box \end{array}

Any admissible nonzero initialization suffices to recover some eigenpair at each stage. With fresh Gaussian initializations, the procedure selects an eigenvalue of largest remaining absolute value with probability one. Consequently, the eigenvalues are obtained in nonincreasing absolute value, with arbitrary ordering within ties. Algebraic ordering can be obtained by sorting afterward.

The exact test Bjw0=0\mathbf{B}_j\mathbf{w}_0=0 identifies a zero eigenvector. It does not require concluding that the entire remaining operator is zero.

Figure 3 below shows the adjacency matrix of a bipartite graph, whose nonzero eigenvalues come in opposite pairs and whose eigenvalue 00 is repeated. Figure 4 runs this procedure on it and compares it with deflation combined with ordinary power iteration, with and without a shift.

Three panels. Left: a bipartite graph with 30 nodes on the left and 20 on the right, each side split into two communities drawn in teal and gold, with most edges joining nodes of the same community and a few grey dashed edges across communities. Middle: its 50 by 50 adjacency matrix, with zero diagonal blocks and dense blocks where the communities match. Right: its 50 eigenvalues in decreasing order, symmetric about zero, with ten zeros in the middle.
Figure 3. The bipartite graph used in Figures 4 and 11. (a) The graph has 30 nodes on one side and 20 on the other, each side split into two planted communities (teal and gold). Each of the 30×2030\times20 possible edges between the two sides is present with probability 0.45 when the communities match and 0.08 otherwise, and no edge joins two nodes of the same side. The draw has 148 edges, 128 within communities (colored) and 20 across (grey, dashed). (b) Its adjacency matrix W\mathbf W, with the nodes ordered side by side and community by community. The diagonal blocks are zero, and the off-diagonal blocks are the 30×2030\times20 biadjacency matrix B\mathbf B and its transpose, so a product Wx\mathbf W\mathbf x is one pass over the 148 edges. (c) The 50 eigenvalues of W\mathbf W in decreasing order. They are symmetric about 00. Writing a vector of R50\mathbb R^{50} as (x,y)(\mathbf x,\mathbf y) with x∈R30\mathbf x\in\mathbb R^{30} and y∈R20\mathbf y\in\mathbb R^{20}, W(x,y)=(By,B⊤x)\mathbf W(\mathbf x,\mathbf y)=(\mathbf B\mathbf y,\mathbf B^\top\mathbf x), so a pair of singular vectors with Bv=σu\mathbf B\mathbf v=\sigma\mathbf u and B⊤u=σv\mathbf B^\top\mathbf u=\sigma\mathbf v gives the eigenvector (u,v)(\mathbf u,\mathbf v) for σ\sigma and (u,−v)(\mathbf u,-\mathbf v) for −σ-\sigma. The 20 singular values of B\mathbf B give the 40 nonzero eigenvalues, and 00 is repeated 30−20=1030-20=10 times.
Three panels on the adjacency matrix of a bipartite graph with 50 nodes. Left: the eigenvalue found at each of the 50 deflation stages; Algorithm 1 alternates between opposite eigenvalues of decreasing magnitude and ends with ten zeros, while shifted deflation descends from the largest to the smallest eigenvalue. Middle: eigenpairs found against matrix-vector products on a log scale; Algorithm 1 finishes after about fifteen thousand products, shifted deflation after about sixty thousand, and plain deflation never finds one. Right: residuals, eigenvalue errors and inner products of Algorithm 1, all below one trillionth.
Figure 4. A complete eigenbasis of the adjacency matrix of the bipartite graph of Figure 3, applied through its edge list (Section 2.2). Because the graph is bipartite, every nonzero eigenvalue σ\sigma comes with −σ-\sigma, so plain power iteration meets the tie of Remark 5 at once, and 00 is an eigenvalue of multiplicity 10. Every stage starts from a fresh Gaussian vector and, as in Corollary 2, is taken to its limit: it runs until the residual of its candidate for the deflated matrix Bj\mathbf B_j is below 10−1310^{-13}. (a) Eigenvalue found at each stage. Algorithm 1 (blue) finds the eigenvalues in nonincreasing absolute value, the two members of each pair at consecutive stages, and the ten zero eigenvalues last. Power iteration on A−λmin⁡(A) Id\mathbf A-\lambda_{\min}(\mathbf A)\,\mathbb I_d with deflation (purple; Corollary 1 and Lemma 1) finds them in decreasing order. Grey lines mark the 41 distinct eigenvalues. (b) Number of eigenpairs found against the number of products. Algorithm 1 uses 15,296 products in all, two for each zero eigenvalue. The shifted iteration uses 61,453, even with the most favorable shift λmin⁡(A)=−6.48\lambda_{\min}(\mathbf A)=-6.48: adding 6.486.48 to every eigenvalue brings the ratios that set the speed of convergence (Theorem 1) closer to one, and each zero eigenvalue takes a full stage. Plain deflated power iteration (orange) never completes its first stage, and after 20,000 products its residual is still above 1.9. (c) Accuracy of the eigenbasis of Algorithm 1, far below the tolerance 10−10∥A∥10^{-10}\|\mathbf A\| (grey, dashed): residuals (blue) below 3.3⋅10−133.3\cdot10^{-13}, eigenvalues within 6.3⋅10−156.3\cdot10^{-15} of the spectrum (purple; exact zeros drawn at 10−1710^{-17}), inner products between distinct eigenvectors (grey) below 7.3⋅10−147.3\cdot10^{-14}, and ∥A−Q50diag⁡(λ1,…,λ50)Q50⊤∥=2.2⋅10−13\|\mathbf A-\mathbf Q_{50}\operatorname{diag}(\lambda_1,\dots,\lambda_{50})\mathbf Q_{50}^\top\|=2.2\cdot10^{-13}.

3.7 Lemma 2 [Residual certificate for an approximate eigenpair]

For any unit vector q\mathbf{q}, define λ^=q⊤Aq\widehat{\lambda}=\mathbf{q}^\top\mathbf{A}\mathbf{q} and r=Aq−λ^q.\mathbf{r} =\mathbf{A}\mathbf{q}-\widehat{\lambda}\mathbf{q} %=(\mathbf{A}-\widehat{\lambda}\mathbb{I})\mathbf{q} . Then min⁡λ∈Λ(A)∣λ^−λ∣≤∥r∥.\min_{\lambda\in\Lambda(\mathbf{A})}|\widehat{\lambda}-\lambda|\le\|\mathbf{r}\|.

Proof

Expand q\mathbf{q} in an orthonormal eigenbasis u1,…,ud\mathbf{u}_1,\dots,\mathbf{u}_d of A\mathbf{A}:

q=∑i=1dciui,Aui=λiui,∑i=1dci2=1.\mathbf{q}=\sum_{i=1}^dc_i\mathbf{u}_i, \qquad \mathbf{A}\mathbf{u}_i=\lambda_i\mathbf{u}_i, \qquad \sum_{i=1}^dc_i^2=1 .

Then r=∑i=1dci(λi−λ^)ui,\mathbf{r}=\sum_{i=1}^dc_i(\lambda_i-\widehat{\lambda})\mathbf{u}_i, and therefore

∥r∥2=∑i=1dci2 (λi−λ^)2≥(min⁡1≤i≤d∣λi−λ^∣2)∑i=1dci2=min⁡1≤i≤d∣λi−λ^∣2.\begin{aligned} \|\mathbf{r}\|^2 &=\sum_{i=1}^d\textcolor{#2563eb}{c_i^2}\,\textcolor{#ea580c}{(\lambda_i-\widehat{\lambda})^2}\\ &\ge\textcolor{#ea580c}{\left(\min_{1\le i\le d}|\lambda_i-\widehat{\lambda}|^2\right)}\textcolor{#2563eb}{\sum_{i=1}^dc_i^2}\\ &=\textcolor{#ea580c}{\min_{1\le i\le d}|\lambda_i-\widehat{\lambda}|^2} . \end{aligned}

The squared residual is thus an average of the squared distances from λ^\widehat\lambda to the eigenvalues, with weights ci2c_i^2 that sum to one, so it is at least the smallest of them. Taking square roots gives the result.

■□\begin{array}{r} \blacksquare\Box \end{array}

Remark 10 [A computable bound on an unknown distance]

The residual r=Aq−λ^q\mathbf{r}=\mathbf{A}\mathbf{q}-\widehat{\lambda}\mathbf{q} is computable with one product, and it bounds an unknown quantity: the distance from the estimate λ^=q⊤Aq\widehat\lambda=\mathbf{q}^\top\mathbf{A}\mathbf{q} to the nearest true eigenvalue. If q\mathbf{q} is exactly an eigenvector, the residual is zero, and the bound says that λ^\widehat\lambda is exactly an eigenvalue. The lemma has three consequences.

A stopping rule with a guarantee. The eigenvalues of A\mathbf{A} are unknown, so the error of λ^\widehat\lambda cannot be measured directly. The lemma converts the computable residual into a guarantee: the interval [λ^−∥r∥,λ^+∥r∥][\widehat\lambda-\|\mathbf{r}\|,\widehat\lambda+\|\mathbf{r}\|] contains an eigenvalue of A\mathbf{A}. Stopping when ∥r∥≤ε\|\mathbf{r}\|\le\varepsilon therefore ensures that λ^\widehat\lambda is within ε\varepsilon of an eigenvalue, and this is how Algorithm 1 and Algorithm 2 stop. Lemma 7 is the counterpart for nonsymmetric matrices.

Independence from the method. The lemma involves only A\mathbf{A}, q\mathbf{q} and one product, not the way q\mathbf{q} was obtained. It applies equally to an unconverged power iterate, an approximate eigenvector produced by the Lanczos method of Section 4, or a vector from a late deflation stage whose earlier eigenvectors carry rounding errors. This is why the algorithms compute the residual with the original matrix A\mathbf{A} rather than with the matrix iterated at stage jj of the deflation in Corollary 2, Bj=Pj−1APj−1\mathbf{B}_j=\mathbf{P}_{j-1}\mathbf{A}\mathbf{P}_{j-1}, where Pj−1=Id−Qj−1Qj−1⊤\mathbf{P}_{j-1}=\mathbb{I}_d-\mathbf{Q}_{j-1}\mathbf{Q}_{j-1}^\top removes the directions of the eigenvectors q1,…,qj−1\mathbf{q}_1,\dots,\mathbf{q}_{j-1} already found. Errors in these eigenvectors change Bj\mathbf{B}_j, but not the certificate.

What it does not say. It certifies some eigenvalue, not a particular one, such as the largest remaining one. Nor does a small residual alone make q\mathbf{q} close to an eigenvector. The expansion in the proof above also bounds the angle between q\mathbf{q} and an eigenspace. Fix an eigenvalue λ\lambda, and let δ=min⁡{∣μ−λ^∣:μ∈Λ(A)∖{λ}}\delta=\min\{|\mu-\widehat\lambda|:\mu\in\Lambda(\mathbf{A})\setminus\{\lambda\}\} be the distance from λ^\widehat\lambda to the other eigenvalues, assumed positive. Then

∥r∥2=∑i=1dci2(λi−λ^)2≥∑i: λi≠λci2(λi−λ^)2≥δ2∑i: λi≠λci2=δ2 ∥q−Πλq∥2=δ2sin⁡2∠(q,Eλ).\begin{aligned} \|\mathbf{r}\|^2 &=\sum_{i=1}^dc_i^2(\lambda_i-\widehat\lambda)^2\\ &\ge\sum_{i:\,\lambda_i\neq\lambda}c_i^2(\lambda_i-\widehat\lambda)^2\\ &\ge\delta^2\sum_{i:\,\lambda_i\neq\lambda}c_i^2\\ &=\delta^2\,\|\mathbf{q}-\Pi_\lambda\mathbf{q}\|^2\\ &=\delta^2\sin^2\angle(\mathbf{q},E_\lambda). \end{aligned}

The first line is the expansion of the proof. The second drops the terms with λi=λ\lambda_i=\lambda, which are nonnegative. The third uses ∣λi−λ^∣≥δ|\lambda_i-\widehat\lambda|\ge\delta for every λi≠λ\lambda_i\neq\lambda, which is the definition of δ\delta. For the fourth, the ui\mathbf{u}_i with λi=λ\lambda_i=\lambda form an orthonormal basis of EλE_\lambda, so Πλq=∑i: λi=λciui\Pi_\lambda\mathbf{q}=\sum_{i:\,\lambda_i=\lambda}c_i\mathbf{u}_i and q−Πλq=∑i: λi≠λciui\mathbf{q}-\Pi_\lambda\mathbf{q}=\sum_{i:\,\lambda_i\neq\lambda}c_i\mathbf{u}_i, whose squared norm is ∑i: λi≠λci2\sum_{i:\,\lambda_i\neq\lambda}c_i^2 by Pythagoras. The last is the sine of the angle between the unit vector q\mathbf{q} and EλE_\lambda, as in Theorem 1: the side of the right triangle opposite the angle, over the hypotenuse ∥q∥=1\|\mathbf{q}\|=1. Dividing by δ2\delta^2 and taking square roots gives

sin⁡∠(q,Eλ)≤∥r∥δ=∥Aq−λ^q∥min⁡{∣μ−λ^∣:μ∈Λ(A)∖{λ}}.\sin\angle(\mathbf{q},E_\lambda) \le\frac{\|\mathbf{r}\|}{\delta} = \frac{\|\mathbf{A}\mathbf{q}-\widehat{\lambda}\mathbf{q}\|}{\min\{|\mu-\widehat\lambda|:\mu\in\Lambda(\mathbf{A})\setminus\{\lambda\}\}}. %= \frac{\|(\mathbf{A} - \mathbf{q}^\top\mathbf{A}\mathbf{q} \mathbb{I}_d) \mathbf{q}\|}{\min\{|\mu-\mathbf{q}^\top\mathbf{A}\mathbf{q}|:\mu\in\Lambda(\mathbf{A})\setminus\{\lambda\}\}}.

The eigenvector is accurate only when λ^=q⊤Aq\widehat\lambda = \mathbf{q}^\top\mathbf{A}\mathbf{q} is well separated from the rest of the spectrum. When another eigenvalue is close, a small residual still allows q\mathbf{q} to mix the two eigenvectors.

For example, take A=diag⁡(1,3)\mathbf{A}=\operatorname{diag}(1,3) and the unit vector q=[cos⁡(t),sin⁡(t)]⊤\mathbf{q}=[\cos(t),\sin(t)]^\top, at the angle tt from the eigenvector [1,0]⊤[1,0]^\top of 11. Then

λ^=cos⁡2(t)+3sin⁡2(t)=1+2sin⁡2(t),r=[cos⁡(t)−λ^cos⁡(t),3sin⁡(t)−λ^sin⁡(t)]⊤=[−2sin⁡2(t)cos⁡(t),2sin⁡(t)−2sin⁡3(t)]⊤=2sin⁡(t)cos⁡(t) [−sin⁡(t),cos⁡(t)]⊤∥r∥=2∣sin⁡(t)cos⁡(t)∣sin⁡2(t)+cos⁡2(t)=∣sin⁡(2t)∣.\begin{aligned} &\widehat\lambda=\cos^2(t)+3\sin^2(t)=1+2\sin^2(t),\\ &\mathbf{r} = [\cos(t) - \widehat\lambda\cos(t), 3\sin(t) - \widehat\lambda\sin(t)]^\top = [-2\sin^2(t)\cos(t),2 \sin(t) - 2\sin^3(t)]^\top = 2\sin(t)\cos(t)\,[-\sin(t),\cos(t)]^\top\\ &\|\mathbf{r}\|= 2|\sin(t)\cos(t)| \sqrt{\sin^2(t)+\cos^2(t)} =|\sin(2t)| . \end{aligned}

For sin⁡(t)=0.1\sin(t)=0.1, λ^=1.02\widehat\lambda=1.02 and ∥r∥≈0.199\|\mathbf{r}\|\approx0.199, so the lemma guarantees an eigenvalue in [0.821,1.219][0.821,1.219], and 11 is there. The eigenvector bound gives sin⁡(t)≤0.199/1.98≈0.1005\sin(t)\le0.199/1.98\approx0.1005, close to the true 0.10.1. The actual eigenvalue error, 0.020.02, is ten times smaller than the residual: it is quadratic in the angle tt, while the residual is linear in it.

This holds in general. Since the ci2c_i^2 sum to one, λ^=∑ici2λi\widehat\lambda=\sum_ic_i^2\lambda_i, so λ^−λ=∑ici2(λi−λ)\widehat\lambda-\lambda=\sum_ic_i^2(\lambda_i-\lambda), where the terms with λi=λ\lambda_i=\lambda vanish. Hence

∣λ^−λ∣≤max⁡1≤i≤d∣λi−λ∣∑i: λi≠λci2=max⁡1≤i≤d∣λi−λ∣ sin⁡2∠(q,Eλ)≤max⁡1≤i≤d∣λi−λ∣ ∥r∥2δ2,|\widehat\lambda-\lambda| \le\max_{1\le i\le d}|\lambda_i-\lambda|\sum_{i:\,\lambda_i\neq\lambda}c_i^2 =\max_{1\le i\le d}|\lambda_i-\lambda|\,\sin^2\angle(\mathbf{q},E_\lambda) \le\max_{1\le i\le d}|\lambda_i-\lambda|\,\frac{\|\mathbf{r}\|^2}{\delta^2},

where the equality combines the last two lines of the chain above and the last step is the eigenvector bound. In the example, the right-hand side is 2⋅0.1992/1.982≈0.02022\cdot0.199^2/1.98^2\approx0.0202, against the true error 0.020.02. Once the residual is small compared with the gap δ\delta, the eigenvalue error is of the order of ∥r∥2\|\mathbf{r}\|^2, far below the certificate ∥r∥\|\mathbf{r}\|. The certificate is therefore valid but pessimistic: it guarantees roughly the square root of the accuracy actually reached, as Figure 5 shows.

Remark 11 [Any scalar, and the best one]

The proof never uses the definition of λ^\widehat\lambda. Replacing λ^\widehat\lambda by any scalar μ\mu, the same expansion gives ∥Aq−μq∥2=∑i=1dci2(λi−μ)2≥min⁡i(λi−μ)2\|\mathbf{A}\mathbf{q}-\mu\mathbf{q}\|^2=\sum_{i=1}^dc_i^2(\lambda_i-\mu)^2\ge\min_i(\lambda_i-\mu)^2, that is,

min⁡λ∈Λ(A)∣μ−λ∣≤∥Aq−μq∥for every unit vector q and every scalar μ.\min_{\lambda\in\Lambda(\mathbf{A})}|\mu-\lambda|\le\|\mathbf{A}\mathbf{q}-\mu\mathbf{q}\| \qquad\text{for every unit vector }\mathbf{q}\text{ and every scalar }\mu .

No relation between q\mathbf{q} and μ\mu is required. They can be chosen independently, and a poor match only makes the bound loose, never wrong. For A=diag⁡(1,3)\mathbf{A}=\operatorname{diag}(1,3), q=[1,0]⊤\mathbf{q}=[1,0]^\top and μ=10\mu=10, it reads 7≤97\le9. Hence the certificate applies to an eigenvalue estimate computed by any means, as long as it is paired with a unit vector. The Rayleigh quotient is the best choice of μ\mu. Indeed, expanding the square with ∥q∥=1\|\mathbf{q}\|=1 and λ^=q⊤Aq\widehat\lambda=\mathbf{q}^\top\mathbf{A}\mathbf{q} gives

∥Aq−μq∥2=∥Aq∥2−2μλ^+μ2=(μ−λ^)2+∥Aq∥2−λ^2=(μ−λ^)2+∥r∥2,\begin{aligned} \|\mathbf{A}\mathbf{q}-\mu\mathbf{q}\|^2 &=\|\mathbf{A}\mathbf{q}\|^2-2\mu\widehat\lambda+\mu^2\\ &=\textcolor{#ea580c}{(\mu-\widehat\lambda)^2}+\textcolor{#2563eb}{\|\mathbf{A}\mathbf{q}\|^2-\widehat\lambda^2}\\ &=\textcolor{#ea580c}{(\mu-\widehat\lambda)^2}+\textcolor{#2563eb}{\|\mathbf{r}\|^2}, \end{aligned}

where the last line is the second one at μ=λ^\mu=\widehat\lambda. The blue term does not depend on μ\mu, so the certificate is smallest at μ=λ^\mu=\widehat\lambda, where it equals the residual of Lemma 2, and the orange term is the price of any other estimate. As a function of μ\mu, the certificate (μ−λ^)2+∥r∥2\sqrt{(\mu-\widehat\lambda)^2+\|\mathbf{r}\|^2} is a hyperbola centered at the Rayleigh quotient λ^\widehat\lambda, and it lies above the distance min⁡λ∈Λ(A)∣μ−λ∣\min_{\lambda\in\Lambda(\mathbf{A})}|\mu-\lambda| from μ\mu to the spectrum, as panel (a) of Figure 5 below shows. This distance is the pointwise minimum of the functions μ↦∣μ−λ∣\mu\mapsto|\mu-\lambda|, one for each eigenvalue λ\lambda, whose graphs are V shapes with their vertex on the axis at λ\lambda. Its graph is therefore the lower envelope of these V shapes: a zigzag, piecewise linear with slopes ±1\pm1, that vanishes at each eigenvalue. Between two consecutive eigenvalues λ<λ′\lambda<\lambda', the nearest eigenvalue is λ\lambda up to the midpoint (λ+λ′)/2(\lambda+\lambda')/2 and λ′\lambda' after it, so the distance equals μ−λ\mu-\lambda, which rises with slope 11, and then λ′−μ\lambda'-\mu, which falls with slope −1-1. Each gap of the spectrum thus carries a triangle whose height (λ′−λ)/2(\lambda'-\lambda)/2 is half the gap, and beyond the extreme eigenvalues the distance grows along half-lines of slope ±1\pm1. The hyperbola has the same slopes far from its center, since it approaches ∣μ−λ^∣|\mu-\widehat\lambda| as ∣μ−λ^∣|\mu-\widehat\lambda| grows, and it is lowest at μ=λ^\mu=\widehat\lambda, where its height is ∥r∥\|\mathbf{r}\|. The bound says that the hyperbola never goes below this envelope. At its lowest point, this is Lemma 2: the height ∥r∥\|\mathbf{r}\| is at least the distance from λ^\widehat\lambda to the spectrum, so a small residual places λ^\widehat\lambda near a zero of the envelope, that is, near an eigenvalue.

The remark has three consequences.

Certifying an estimate obtained elsewhere. An eigenvalue estimate μ\mu that does not come from a Rayleigh quotient, such as a value known from theory, the value α−μmax⁡\alpha-\mu_{\max} recovered from a shifted run in Corollary 1, or the value ±ρ\pm\rho of Proposition 2, is certified by pairing it with a unit vector q\mathbf{q} and computing one product: some eigenvalue of A\mathbf{A} lies within ∥Aq−μq∥=(μ−λ^)2+∥r∥2\|\mathbf{A}\mathbf{q}-\mu\mathbf{q}\|=\sqrt{(\mu-\widehat\lambda)^2+\|\mathbf{r}\|^2} of μ\mu, r=Aq−λ^q\mathbf{r}=\mathbf{A}\mathbf{q}-\widehat\lambda\mathbf{q}.

Reporting the Rayleigh quotient. For a given q\mathbf{q}, replacing μ\mu by λ^\widehat\lambda never weakens the certificate, and strictly improves it when μ≠λ^\mu\neq\widehat\lambda. It costs no extra product, since λ^=q⊤(Aq)\widehat\lambda=\mathbf{q}^\top(\mathbf{A}\mathbf{q}) reuses the product already needed for the residual. This is why Corollary 2 recovers each eigenvalue as λj=qj⊤Aqj\lambda_j=\mathbf{q}_j^\top\mathbf{A}\mathbf{q}_j rather than reporting ±ρ\pm\rho: the two coincide in exact arithmetic, but in practice qj\mathbf{q}_j is only approximately an eigenvector. Geometrically, q⊤r=λ^−λ^=0\mathbf{q}^\top\mathbf{r}=\widehat\lambda-\widehat\lambda=0, so λ^q\widehat\lambda\mathbf{q} is the orthogonal projection of Aq\mathbf{A}\mathbf{q} onto the line spanned by q\mathbf{q}, the point of that line closest to Aq\mathbf{A}\mathbf{q}. The certificate measures how well the pair (μ,q)(\mu,\mathbf{q}) fits together, not the error of μ\mu alone. In the example of Remark 10, the exact eigenvalue μ=1\mu=1 receives the certificate ∥Aq−q∥=∥[0, 0.2]⊤∥=0.2\|\mathbf{A}\mathbf{q}-\mathbf{q}\|=\|[0,\,0.2]^\top\|=0.2, slightly worse than the 0.1990.199 of λ^=1.02\widehat\lambda=1.02, because q\mathbf{q} is not its eigenvector.

Testing a given value. For a fixed μ\mu, every unit vector q\mathbf{q} gives an upper bound on the distance from μ\mu to the spectrum, so a single well-chosen q\mathbf{q} suffices to show that μ\mu is nearly an eigenvalue. With μ=0\mu=0, the bound reads min⁡λ∈Λ(A)∣λ∣≤∥Aq∥\min_{\lambda\in\Lambda(\mathbf{A})}|\lambda|\le\|\mathbf{A}\mathbf{q}\|. Any unit vector q\mathbf{q} that A\mathbf{A} nearly annihilates proves that A\mathbf{A} has an eigenvalue near zero, that is, that A\mathbf{A} is nearly singular. Combined with ∥A∥=max⁡∥z∥=1∥Az∥≥∥Aq′∥\|\mathbf{A}\|=\max_{\|\mathbf z\|=1}\|\mathbf A\mathbf z\|\ge\|\mathbf{A}\mathbf{q}'\| for any other unit vector q′\mathbf{q}', it gives a lower bound on the condition number computed from two products, κ(A)=max⁡λ∈Λ(A)∣λ∣/min⁡λ∈Λ(A)∣λ∣=∥A∥/min⁡λ∈Λ(A)∣λ∣≥∥Aq′∥/∥Aq∥\kappa(\mathbf{A}) =\max_{\lambda\in\Lambda(\mathbf{A})}|\lambda|/\min_{\lambda\in\Lambda(\mathbf{A})}|\lambda| =\textcolor{#2563eb}{\|\mathbf{A}\|} / \textcolor{#ea580c}{\min_{\lambda\in\Lambda(\mathbf{A})}|\lambda|} \ge\textcolor{#2563eb}{\|\mathbf{A}\mathbf{q}'\|}/\textcolor{#ea580c}{\|\mathbf{A}\mathbf{q}\|}. The inequality bounds the two parts of the fraction separately. The numerator can only decrease, from ∥A∥\|\mathbf{A}\| to ∥Aq′∥\|\mathbf{A}\mathbf{q}'\|. The denominator can only increase, from min⁡λ∣λ∣\min_{\lambda}|\lambda| to ∥Aq∥\|\mathbf{A}\mathbf{q}\|, by the bound with μ=0\mu=0. Both changes make the fraction smaller. A vector q′\mathbf{q}' that A\mathbf{A} stretches and a vector q\mathbf{q} that it nearly annihilates therefore give a large ratio, which proves that A\mathbf{A} is ill conditioned.

Three panels on a 60 by 60 sample covariance matrix. Left: for several power-iteration iterates, the norm of A v minus mu v as a function of mu is a hyperbola lying above the saw-tooth distance from mu to the spectrum, with its minimum at the Rayleigh quotient. Middle: the residual decreases geometrically and the distance to the nearest eigenvalue twice as fast, down to rounding level. Right: a log-log scatter of distance against residual for many iterates, all below the diagonal.
Figure 5. The residual certificate on the sample covariance matrix A=1nX⊤X\mathbf A=\frac1n\mathbf X^\top\mathbf X of n=400n=400 centered observations of d=60d=60 variables, applied as X⊤(Xv)/n\mathbf X^\top(\mathbf X\mathbf v)/n (Section 2.2). Its three largest eigenvalues, the variances along the first three principal components, are 9.72, 4.92 and 3.20, and the other 57 lie in [0.40,1.80][0.40,1.80]. (a) For the iterates vk\mathbf v_k of power iteration from one Gaussian start, with Rayleigh quotients λ^k=vk⊤Avk\widehat\lambda_k=\mathbf v_k^\top\mathbf A\mathbf v_k and residuals rk=Avk−λ^kvk\mathbf r_k=\mathbf A\mathbf v_k-\widehat\lambda_k\mathbf v_k, the certificate μ↦∥Avk−μvk∥=(μ−λ^k)2+∥rk∥2\mu\mapsto\|\mathbf A\mathbf v_k-\mu\mathbf v_k\|=\sqrt{(\mu-\widehat\lambda_k)^2+\|\mathbf r_k\|^2} of Remark 11 (light to dark as kk grows) lies above the distance min⁡λ∈Λ(A)∣μ−λ∣\min_{\lambda\in\Lambda(\mathbf A)}|\mu-\lambda| from μ\mu to the spectrum (black, with the eigenvalues marked in orange on the axis) for every scalar μ\mu. This distance is the lower envelope of the V shapes ∣μ−λ∣|\mu-\lambda| (Remark 11), a zigzag with one triangle over each gap of the spectrum, of height half the gap. The tallest, of height 2.402.40, spans the gap from 4.924.92 to 9.729.72, and those over the 5757 closely spaced eigenvalues in [0.40,1.80][0.40,1.80] are too small to see. The minimum of each hyperbola, marked by a dot, is attained at μ=λ^k\mu=\widehat\lambda_k, whose value is written under the axis at the foot of the dashed line, and equals the residual norm ∥rk∥\|\mathbf r_k\| of Lemma 2. (b) The same quantities along the whole run rather than for a few iterates. Each curve is the median over 200 Gaussian starts of a quantity computed from vk\mathbf v_k, and its band contains the middle half of the runs. The residual ∥rk∥\|\mathbf r_k\| (blue) shrinks by the factor λ2/λ1≈0.51\lambda_2/\lambda_1\approx0.51 per product, and the distance from λ^k\widehat\lambda_k to the nearest eigenvalue (orange) by its square (Theorem 1), until rounding errors of order 10−1510^{-15} stop it. The certificate is valid but pessimistic: it bounds the error by the residual, whereas the error of a Rayleigh quotient is of the order of the squared residual (Remark 10). After 20 products, the median residual is 1.2⋅10−51.2\cdot10^{-5} and the median distance 3.2⋅10−113.2\cdot10^{-11}, about its square divided by the gap 4.814.81 between the two largest eigenvalues. In the first steps, λ^k\widehat\lambda_k lies among the small eigenvalues, and its distance to the nearest of them (orange) is much smaller than its distance to λmax⁡(A)\lambda_{\max}(\mathbf A) (grey, dotted): the certificate concerns some eigenvalue, not necessarily the largest. (c) The pairs formed by the residual and the distance, one point for each iterate vk\mathbf v_k, 0≤k≤390\le k\le39, of 50 runs, colored by kk from light to dark. None lies above the diagonal, as Lemma 2 requires, and over all 200 runs and 40 steps the largest ratio of the distance to the residual is 0.995. Distances below 10−1510^{-15}, at rounding level, are drawn at 10−1510^{-15}.

3.8 Algorithm 1 [Deflated squared power iteration with sign separation]

Corollary 2 recovers a complete eigenbasis, but each of its stages runs the iteration of Proposition 2 to its limit, which takes infinitely many products. The algorithm below is its finite version. It keeps the two loops of Corollary 2, an outer loop over deflation stages (Lemma 1) and an inner loop of squared power iteration on the deflated matrix B=PAP\mathbf{B}=\mathbf{P}\mathbf{A}\mathbf{P} of the current stage (Proposition 2), with three changes.

  • No matrix is formed. Neither A\mathbf{A}, P\mathbf{P} nor B\mathbf{B} is built. A product with B\mathbf{B} is a product with A\mathbf{A} followed by the projection Px=x−Q(Q⊤x)\mathbf{P}\mathbf{x}=\mathbf{x}-\mathbf{Q}(\mathbf{Q}^\top\mathbf{x}), as in the projection view of Remark 8.
  • The signs are separated at every step. Each inner step turns the current iterate into a candidate eigenvector by the construction of u±\mathbf{u}_\pm in Proposition 2, without waiting for the limit.
  • The inner loop stops on a certificate. The candidate is accepted as soon as its residual with A\mathbf{A} is below a tolerance, which by Lemma 2 places its Rayleigh quotient near an eigenvalue of A\mathbf{A}.

At a given deflation stage, let Q\mathbf{Q} contain the previously computed orthonormal vectors. At the first stage, no vector has been computed yet: Q\mathbf{Q} is the empty matrix with dd rows and no columns, as Q0\mathbf{Q}_0 in Corollary 2, so that QQ⊤=0d×d\mathbf{Q}\mathbf{Q}^\top=0_{d\times d} and P=Id\mathbf{P}=\mathbb{I}_d, and the steps below are plain squared power iteration with sign separation. Each stage ends by appending the vector it accepts to Q\mathbf{Q} (step 4), and the next stage starts with the enlarged Q\mathbf{Q}, until the desired number of eigenpairs has been found. Figure 6 draws these two loops.

Choose tolerances εabs>0\varepsilon_{\mathrm{abs}}>0 and εrel≥0\varepsilon_{\mathrm{rel}}\ge0. Step 4 accepts a candidate when ∥r∥≤εabs+εrel∥Aq∥\|\mathbf{r}\|\le\varepsilon_{\mathrm{abs}}+\varepsilon_{\mathrm{rel}}\|\mathbf{A}\mathbf{q}\|, and by Lemma 2 the accepted λ^\widehat\lambda then lies within this threshold of an eigenvalue of A\mathbf{A}.

  • In the simplest case εrel=0\varepsilon_{\mathrm{rel}}=0, every eigenvalue is found to within the same distance εabs\varepsilon_{\mathrm{abs}}. This is the recommended choice, used in Figures 4 and 11 and in the constant-threshold runs of Figure 7 with εabs=10−10∥A∥\varepsilon_{\mathrm{abs}}=10^{-10}\|\mathbf{A}\|. This tolerance must be positive, since rounding errors keep the computed residual of the order of the unit roundoff times ∥A∥\|\mathbf{A}\|, never exactly zero.
  • A positive εrel\varepsilon_{\mathrm{rel}} asks instead for a number of correct digits. The single tolerance εabs\varepsilon_{\mathrm{abs}} of the first case treats large and small eigenvalues unequally, since it accepts the same error on all of them. With εabs=10−10\varepsilon_{\mathrm{abs}}=10^{-10}, an error of 10−1010^{-10} on the eigenvalue λ=10\lambda=10 gives the estimate 10.000 000 000 110.000\,000\,000\,1, which agrees with λ\lambda in its first eleven significant digits, but the same error on λ=0.001\lambda=0.001 gives 0.001 000 000 10.001\,000\,000\,1, which agrees in only seven. The relative part removes this imbalance by accepting an error proportional to the eigenvalue. With a negligible εabs\varepsilon_{\mathrm{abs}}, the test accepts a residual up to εrel∥Aq∥\varepsilon_{\mathrm{rel}}\|\mathbf{A}\mathbf{q}\|, and ∥Aq∥\|\mathbf{A}\mathbf{q}\| is nearly ∣λ^∣|\widehat\lambda|: since Aq=λ^q+r\mathbf{A}\mathbf{q}=\widehat\lambda\mathbf{q}+\mathbf{r} with q⊤r=0\mathbf{q}^\top\mathbf{r}=0 and ∥q∥=1\|\mathbf{q}\|=1, we have ∥Aq∥2=λ^2+∥r∥2\|\mathbf{A}\mathbf{q}\|^2=\widehat\lambda^2+\|\mathbf{r}\|^2, and so ∣λ^∣≤∥Aq∥≤∣λ^∣+∥r∥|\widehat\lambda|\le\|\mathbf{A}\mathbf{q}\|\le|\widehat\lambda|+\|\mathbf{r}\|. With εrel=10−10\varepsilon_{\mathrm{rel}}=10^{-10}, the accepted residual is thus about 10−10∣λ^∣10^{-10}|\widehat\lambda|, that is, about 10−910^{-9} near λ=10\lambda=10 and about 10−1310^{-13} near λ=0.001\lambda=0.001. By Lemma 2, the estimates are then within these distances of λ\lambda, for instance 10.000 000 00110.000\,000\,001 and 0.001 000 000 000 10.001\,000\,000\,000\,1, and both agree with λ\lambda in about ten significant digits. In general, the upper bound ∣λ^∣+∥r∥|\widehat\lambda|+\|\mathbf{r}\| on ∥Aq∥\|\mathbf{A}\mathbf{q}\| turns the test ∥r∥≤εrel∥Aq∥\|\mathbf{r}\|\le\varepsilon_{\mathrm{rel}}\|\mathbf{A}\mathbf{q}\| into ∥r∥≤εrel∣λ^∣/(1−εrel)\|\mathbf{r}\|\le\varepsilon_{\mathrm{rel}}|\widehat\lambda|/(1-\varepsilon_{\mathrm{rel}}), and Lemma 2 bounds the relative error by ∣λ^−λ∣/∣λ^∣≤∥r∥/∣λ^∣≤εrel/(1−εrel)≈εrel|\widehat\lambda-\lambda|/|\widehat\lambda|\le\|\mathbf{r}\|/|\widehat\lambda|\le\varepsilon_{\mathrm{rel}}/(1-\varepsilon_{\mathrm{rel}})\approx\varepsilon_{\mathrm{rel}}, whatever the eigenvalue. Using ∥Aq∥\|\mathbf{A}\mathbf{q}\| rather than ∣λ^∣|\widehat\lambda| in the test thus changes little, and it gives the test a geometric meaning: r\mathbf{r} is the part of Aq\mathbf{A}\mathbf{q} orthogonal to q\mathbf{q}, so ∥r∥/∥Aq∥\|\mathbf{r}\|/\|\mathbf{A}\mathbf{q}\| is the sine of the angle between q\mathbf{q} and Aq\mathbf{A}\mathbf{q}, and the test asks that A\mathbf{A} map q\mathbf{q} nearly onto its own line. The absolute part remains as a floor. For the eigenvalue λ=0\lambda=0, the relative part accepts no residual at all, rounding errors never bring the residual to zero, and without εabs\varepsilon_{\mathrm{abs}} the stage would never stop. In deflation, this balance has a price. The eigenvalues are found in decreasing absolute value, so the accepted residual shrinks from stage to stage, from about 10−910^{-9} to about 10−1310^{-13} in the example, and later stages can stall, for a reason explained below.

At each stage, start from a unit vector w\mathbf{w} satisfying Q⊤w=0\mathbf{Q}^\top\mathbf{w}=0, for instance w=Pz/∥Pz∥\mathbf{w}=\mathbf{P}\mathbf{z}/\|\mathbf{P}\mathbf{z}\| for a fresh draw z∼N(0,Id)\mathbf{z}\sim\mathcal{N}(0,\mathbb{I}_d) (at the first stage, any unit vector qualifies), and repeat the following steps.

  1. First product. Compute h1=Aw\textcolor{#2563eb}{\mathbf{h}_1}=\mathbf{A}\mathbf{w}, a=Ph1\mathbf{a}=\mathbf{P}\textcolor{#2563eb}{\mathbf{h}_1} and ρ=∥a∥\rho=\|\mathbf{a}\|. If ρ=0\rho=0, go to step 5.
  2. Second product. Set y=a/ρ\mathbf{y}=\mathbf{a}/\rho, then compute h2=Ay\textcolor{#ea580c}{\mathbf{h}_2}=\mathbf{A}\mathbf{y} and b=Ph2\mathbf{b}=\mathbf{P}\textcolor{#ea580c}{\mathbf{h}_2}.
  3. Candidate. Choose the scalar sign s=+1s=+1 if w⊤y≥0\mathbf{w}^\top\mathbf{y}\ge0 and s=−1s=-1 if w⊤y<0\mathbf{w}^\top\mathbf{y}<0. This selects whichever of w+y\mathbf{w}+\mathbf{y} and w−y\mathbf{w}-\mathbf{y} has larger norm. Form n=∥w+sy∥n=\|\mathbf{w}+s\mathbf{y}\| and q=(w+sy)/n\mathbf{q}=(\mathbf{w}+s\mathbf{y})/n. The product of the candidate with the original matrix is available by linearity: Aq=(h1+sh2)/n\mathbf{A}\mathbf{q}=(\textcolor{#2563eb}{\mathbf{h}_1}+s\textcolor{#ea580c}{\mathbf{h}_2})/n.
  4. Check or update. Compute λ^=q⊤Aq\widehat{\lambda}=\mathbf{q}^\top\mathbf{A}\mathbf{q} and r=Aq−λ^q\mathbf{r}=\mathbf{A}\mathbf{q}-\widehat{\lambda}\mathbf{q}. If ∥r∥≤εabs+εrel∥Aq∥\|\mathbf{r}\|\le\varepsilon_{\mathrm{abs}}+\varepsilon_{\mathrm{rel}}\|\mathbf{A}\mathbf{q}\|, accept (λ^,q)(\widehat{\lambda},\mathbf{q}), append q\mathbf{q} to Q\mathbf{Q}, and end the stage. Otherwise, update w←b/∥b∥\mathbf{w}\leftarrow\mathbf{b}/\|\mathbf{b}\| and return to step 1.
  5. Zero projected product. If ρ=0\rho=0, use q=w\mathbf{q}=\mathbf{w} as the candidate, compute λ^=q⊤Aq\widehat{\lambda}=\mathbf{q}^\top\mathbf{A}\mathbf{q} and r=Aq−λ^q\mathbf{r}=\mathbf{A}\mathbf{q}-\widehat{\lambda}\mathbf{q}, where Aq=h1\mathbf{A}\mathbf{q}=\textcolor{#2563eb}{\mathbf{h}_1}, and apply the test of step 4. Either way, the stage ends here and does not return to step 1. The vector w\mathbf{w} satisfies Q⊤w=0\mathbf{Q}^\top\mathbf{w}=0: the starting vector is chosen so, and each update b/∥b∥\mathbf{b}/\|\mathbf{b}\| is a projected vector, with Q⊤P=Q⊤−(Q⊤Q)Q⊤=0\mathbf{Q}^\top\mathbf{P}=\mathbf{Q}^\top-(\mathbf{Q}^\top\mathbf{Q})\mathbf{Q}^\top=0 since Q⊤Q=I\mathbf{Q}^\top\mathbf{Q}=\mathbb{I}. Hence Pw=w−Q(Q⊤w)=w\mathbf{P}\mathbf{w}=\mathbf{w}-\mathbf{Q}(\mathbf{Q}^\top\mathbf{w})=\mathbf{w}, and the condition ρ=0\rho=0 means Bw=PAPw=0\mathbf{B}\mathbf{w}=\mathbf{P}\mathbf{A}\mathbf{P}\mathbf{w}=0, so there is no direction y\mathbf{y} to iterate on. If the test passes, accept (λ^,q)(\widehat{\lambda},\mathbf{q}) and append q\mathbf{q} to Q\mathbf{Q}, as in step 4. In exact arithmetic it always passes, with λ^=0\widehat\lambda=0, by the zero case of Corollary 2. If it fails, which can only come from errors in the stored vectors or from rounding, report nonconvergence or restart the stage from a new w\mathbf{w}.
■□\begin{array}{r} \blacksquare\Box \end{array}
Flowchart of Algorithm 1. A setup box sets the tolerances and an empty Q. A stage frame contains a start box, w equals Pz over its norm, then an inner-loop frame with step 1 (first product, blue tint), a decision rho equals 0, step 2 (second product, orange tint), step 3 (candidate), step 4 (check), and the decision whether the residual is below the tolerance. A failed test returns to step 1 through a blue arrow labelled w becomes b over its norm. When rho is 0, step 5 on the right uses q equal to w and joins the accept box if its test passes. An accepted pair is appended to Q; if all desired pairs are found the algorithm stops, otherwise a green arrow starts the next stage.
Figure 6. The execution of Algorithm 1. Each stage (outer frame) computes one eigenpair and appends its vector to Q\mathbf Q, and the green arrow starts the next stage, on the matrix deflated further. Within a stage, the inner loop (inner frame) is squared power iteration on B=PAP\mathbf B=\mathbf P\mathbf A\mathbf P. Each inner step costs the two products of steps 1 and 2, tinted with the colours of h1\textcolor{#2563eb}{\mathbf h_1} and h2\textcolor{#ea580c}{\mathbf h_2}, and the blue arrow returns to step 1 when the test fails. Step 5 handles the case ρ=0\rho=0, where Bw=0\mathbf B\mathbf w=0. If its test fails, which can only come from rounding, the stage is restarted from a new w\mathbf w or nonconvergence is reported.

How the steps implement the theory

Let B=PAP\mathbf{B}=\mathbf{P}\mathbf{A}\mathbf{P} be the deflated matrix of the current stage. The vectors w\mathbf{w} and y=Ph1/∥Ph1∥\mathbf{y}=\mathbf{P}\textcolor{#2563eb}{\mathbf{h}_1}/\|\mathbf{P}\textcolor{#2563eb}{\mathbf{h}_1}\| are orthogonal to the stored vectors (the columns of Q\mathbf{Q}): w\mathbf{w} by the choice of the start and because each update is a projected vector, and y\mathbf{y} because Q⊤P=0\mathbf{Q}^\top\mathbf{P}=0. Hence Pw=w−QQ⊤w=w\mathbf{P}\mathbf{w}=\mathbf{w}-\mathbf{Q}\mathbf{Q}^\top\mathbf{w}=\mathbf{w} and Py=y−QQ⊤y=y\mathbf{P}\mathbf{y}=\mathbf{y}-\mathbf{Q}\mathbf{Q}^\top\mathbf{y}=\mathbf{y}, and the quantities computed in steps 1 and 2 are products with B\mathbf{B}:

a=PAw=PAPw=Bw,ρ=∥Bw∥,y=aρ=Bwρ,b=PAy=PAPy=By=B2wρ.\mathbf{a}=\mathbf{P}\mathbf{A}\mathbf{w} = \mathbf{P}\mathbf{A}\mathbf{P}\mathbf{w}=\mathbf{B}\mathbf{w}, \quad \rho=\|\mathbf{B}\mathbf{w}\|, \quad \mathbf{y}=\frac{\mathbf{a}}{\rho}=\frac{\mathbf{B}\mathbf{w}}{\rho}, \quad \mathbf{b}=\mathbf{P}\mathbf{A}\mathbf{y}=\mathbf{P}\mathbf{A}\mathbf{P}\mathbf{y}=\mathbf{B}\mathbf{y}=\frac{\mathbf{B}^2\mathbf{w}}{\rho}.

The table lists what each step computes in terms of B\mathbf{B} and the result it implements. The paragraphs after it justify each line.

StepIn terms of B\mathbf{B}Implements
1. First producta=Bw\mathbf{a}=\mathbf{B}\mathbf{w} and ρ=∥Bw∥\rho=\lVert\mathbf{B}\mathbf{w}\rVertthe first half of a step of squared power iteration, by the projection view of Remark 8
2. Second productb=B2w/ρ\mathbf{b}=\mathbf{B}^2\mathbf{w}/\rhothe second half
3. Candidateq=us/∥us∥\mathbf{q}=\mathbf{u}_s/\lVert\mathbf{u}_s\rVert, with u±=12(w±Bw/ρ)\mathbf{u}_\pm=\frac12(\mathbf{w}\pm\mathbf{B}\mathbf{w}/\rho) and s=±1s=\pm1 the sign of w⊤y\mathbf{w}^\top\mathbf{y} (+1+1 if it is zero), which picks the longer of u+\mathbf{u}_+ and u−\mathbf{u}_-the sign separation of Proposition 2, applied to the current iterate
4. Check∥Aq−λ^q∥≤εabs+εrel∥Aq∥\lVert\mathbf{A}\mathbf{q}-\widehat\lambda\mathbf{q}\rVert\le\varepsilon_{\mathrm{abs}}+\varepsilon_{\mathrm{rel}}\lVert\mathbf{A}\mathbf{q}\rVertthe certificate of Lemma 2, with the Rayleigh quotient of Remark 11
4. Updatew←B2w/∥B2w∥\mathbf{w}\leftarrow\mathbf{B}^2\mathbf{w}/\lVert\mathbf{B}^2\mathbf{w}\rVertthe iteration of Proposition 2
5. Zero projected productBw=0\mathbf{B}\mathbf{w}=0the case Bw0=0\mathbf{B}\mathbf{w}_0=0 of Proposition 2 and of Corollary 2

The update is the iteration of Proposition 2. Normalizing b\mathbf{b} gives w←B2w/∥B2w∥\mathbf{w}\leftarrow\mathbf{B}^2\mathbf{w}/\|\mathbf{B}^2\mathbf{w}\|, the iteration of Proposition 2 on B\mathbf{B}, at the cost of two products with A\mathbf{A} per step. It is well defined: ρ>0\rho>0 implies b≠0\mathbf{b}\neq0, because

w⊤B2w=∥Bw∥2=ρ2>0.\mathbf{w}^\top\mathbf{B}^2\mathbf{w}=\|\mathbf{B}\mathbf{w}\|^2=\rho^2>0 .

By Proposition 2, the iterates converge to a unit vector w\mathbf{w} with B2w=ρ2w\mathbf{B}^2\mathbf{w}=\rho^2\mathbf{w}, where ρ\rho is the largest absolute value among the eigenvalues of B\mathbf{B} present in the starting vector. Squaring turns the eigenvalues +ρ+\rho and −ρ-\rho of B\mathbf{B} into the same eigenvalue ρ2\rho^2 of B2\mathbf{B}^2, so the tie of Remark 5 cannot stall the iteration.

The candidate is the sign separation of Proposition 2, before the limit. Since w+sy=w+sBw/ρ=2us\mathbf{w}+s\mathbf{y}=\mathbf{w}+s\mathbf{B}\mathbf{w}/\rho=2\mathbf{u}_s, the candidate q=us/∥us∥\mathbf{q}=\mathbf{u}_s/\|\mathbf{u}_s\| is the normalized u+\mathbf{u}_+ when s=+1s=+1 and the normalized u−\mathbf{u}_- when s=−1s=-1, computed from the current iterate instead of the limit. The sign picks the longer of the two, since ∥u+∥2−∥u−∥2=w⊤Bw/ρ=w⊤y\|\mathbf{u}_+\|^2-\|\mathbf{u}_-\|^2=\mathbf{w}^\top\mathbf{B}\mathbf{w}/\rho=\mathbf{w}^\top\mathbf{y}, and the normalization is never small:

n2=∥w+sy∥2=∥w∥2+∥y∥2+2s w⊤y=2+2∣w⊤y∣≥2,n^2=\|\mathbf{w}+s\mathbf{y}\|^2=\|\mathbf{w}\|^2+\|\mathbf{y}\|^2+2s\,\mathbf{w}^\top\mathbf{y}=2+2|\mathbf{w}^\top\mathbf{y}|\ge2,

which is the bound max⁡{∥u+∥,∥u−∥}≥1/2\max\{\|\mathbf{u}_+\|,\|\mathbf{u}_-\|\}\ge1/\sqrt2 of the proof of Proposition 2. Forming the candidate before the limit is justified by a direct calculation:

(B−sρ Id)q=Bw+sB2w/ρ−sρ w−Bwn=s(B2w−ρ2w)ρ n.\begin{aligned} (\mathbf{B}-s\rho\,\mathbb{I}_d)\mathbf{q} &=\frac{\textcolor{#2563eb}{\mathbf{B}\mathbf{w}}+s\mathbf{B}^2\mathbf{w}/\rho-s\rho\,\mathbf{w}\textcolor{#2563eb}{-\mathbf{B}\mathbf{w}}}{n}\\ &=\frac{s\bigl(\mathbf{B}^2\mathbf{w}-\rho^2\mathbf{w}\bigr)}{\rho\,n}. \end{aligned}

The blue terms cancel because s2=1s^2=1. Since n≥2n\ge\sqrt2, the residual of (sρ,q)(s\rho,\mathbf{q}) as an eigenpair of B\mathbf{B} is at most ∥B2w−ρ2w∥/(2 ρ)\|\mathbf{B}^2\mathbf{w}-\rho^2\mathbf{w}\|/(\sqrt2\,\rho), which measures how far the current iterate is from an eigenvector of B2\mathbf{B}^2. As squared power iteration converges, the candidate therefore becomes an eigenvector of B\mathbf{B}, for the eigenvalue ρ\rho or −ρ-\rho, and nothing is lost by separating the signs at every step.

The check uses A\mathbf{A}, not B\mathbf{B}. With exact stored eigenvectors, an eigenvector of B\mathbf{B} orthogonal to them is an eigenvector of A\mathbf{A} with the same eigenvalue, by the first step of the proof of Corollary 2, and its Rayleigh quotient λ^=q⊤Aq\widehat\lambda=\mathbf{q}^\top\mathbf{A}\mathbf{q} is then sρs\rho. Computed eigenvectors are only approximate, so B\mathbf{B} is not exactly the deflated matrix of Lemma 1, and an eigenvector of B\mathbf{B} need not be one of A\mathbf{A}. The test therefore computes the residual with A\mathbf{A} itself, which Lemma 2 turns into a guarantee however q\mathbf{q} was obtained (Remark 10), and it reports the Rayleigh quotient, the scalar with the smallest certificate (Remark 11). For the same reason, the exact recovery of Corollary 2 does not carry over to finite computations: convergence for B\mathbf{B} need not drive the residual for A\mathbf{A} below an arbitrary tolerance, as the end of this section shows.

The zero case. If ρ=0\rho=0, then Bw=0\mathbf{B}\mathbf{w}=0, and w\mathbf{w} is an eigenvector of B\mathbf{B} for the eigenvalue 00, the first case of Proposition 2. In exact arithmetic, this can only happen at the first step of a stage: if Bw≠0\mathbf{B}\mathbf{w}\neq0, then w\mathbf{w} has a component in an eigenspace of B\mathbf{B} with a nonzero eigenvalue, and so does every later iterate, since it is a multiple of B2kw\mathbf{B}^{2k}\mathbf{w}. A small computed ρ\rho does not establish that w\mathbf{w} is an eigenvector for 00, still less that every remaining eigenvalue is zero, which is why the zero case is also accepted only through the residual test of step 4.

Floating-point safeguards. The implementation should reorthogonalize projected vectors, impose a maximum number of inner iterations, and report nonconvergence if the original residual does not reach the requested tolerance. No vector with computed norm zero should be normalized. A numerical breakdown should instead trigger a residual check, a restart, or a report of nonconvergence.

Why a stage can stall. The residual for A\mathbf{A} splits exactly into a part that the inner iteration reduces and a part that it inherits. Let λ^1,…,λ^r\widehat\lambda_1,\dots,\widehat\lambda_r be the eigenvalue estimates of the stored pairs, and let the columns of R=AQ−Qdiag⁡(λ^1,…,λ^r)\mathbf{R}=\mathbf{A}\mathbf{Q}-\mathbf{Q}\operatorname{diag}(\widehat\lambda_1,\dots,\widehat\lambda_r) be their residuals. For a unit candidate q\mathbf{q} with Q⊤q=0\mathbf{Q}^\top\mathbf{q}=0 and λ^=q⊤Aq\widehat\lambda=\mathbf{q}^\top\mathbf{A}\mathbf{q}, we have Pq=q\mathbf{P}\mathbf{q}=\mathbf{q}, hence Aq=Bq+QQ⊤Aq\mathbf{A}\mathbf{q}=\mathbf{B}\mathbf{q}+\mathbf{Q}\mathbf{Q}^\top\mathbf{A}\mathbf{q}, where Bq−λ^q\mathbf{B}\mathbf{q}-\widehat\lambda\mathbf{q} lies in range⁡(P)\operatorname{range}(\mathbf{P}) and QQ⊤Aq\mathbf{Q}\mathbf{Q}^\top\mathbf{A}\mathbf{q} in range⁡(Q)\operatorname{range}(\mathbf{Q}). Since Q⊤q=0\mathbf{Q}^\top\mathbf{q}=0, we also have Q⊤Aq=(AQ)⊤q=R⊤q\mathbf{Q}^\top\mathbf{A}\mathbf{q}=(\mathbf{A}\mathbf{Q})^\top\mathbf{q}=\mathbf{R}^\top\mathbf{q}. The two parts are orthogonal, so

∥Aq−λ^q∥2=∥Bq−λ^q∥2+∥R⊤q∥2.\textcolor{#2563eb}{\|\mathbf{A}\mathbf{q}-\widehat\lambda\mathbf{q}\|^2}=\textcolor{#ea580c}{\|\mathbf{B}\mathbf{q}-\widehat\lambda\mathbf{q}\|^2}+\textcolor{#7c3aed}{\|\mathbf{R}^\top\mathbf{q}\|^2}.

The inner iteration drives the orange term to zero. The purple term is inherited from the stored pairs: each entry of R⊤q\mathbf{R}^\top\mathbf{q} is the inner product of q\mathbf{q} with a stored residual, so the term is at most the sum of their squared norms, but nothing in the inner iteration makes it small. A stage therefore stalls when its threshold εabs+εrel∥Aq∥\varepsilon_{\mathrm{abs}}+\varepsilon_{\mathrm{rel}}\|\mathbf{A}\mathbf{q}\| is below the inherited part. This happens readily with εrel>0\varepsilon_{\mathrm{rel}}>0, because the threshold shrinks with ∣λ^∣|\widehat\lambda|, whereas the inherited part comes from earlier stages, whose eigenvalues are larger in absolute value and whose accepted residuals can be nearly as large as their own thresholds. A threshold that is the same at every stage (εrel=0\varepsilon_{\mathrm{rel}}=0) removes this systematic mismatch, but over many stages the inherited parts can still exceed it. Continuing each stage until the residual for B\mathbf{B} reaches rounding level, and only then checking the residual for A\mathbf{A}, keeps every inherited part far below the threshold, at the price of more products. Figure 7 below shows the stall on the Hessian of a neural network. The complete eigenbasis in Figure 4 was computed in the last way. With the same constant threshold but without the continuation, that run stalls at stage 20 of 50, where the inherited part is 6.89⋅10−106.89\cdot10^{-10} and the threshold 6.48⋅10−106.48\cdot10^{-10}.

Six panels on the Hessian of a small neural network. Top left: the training and test losses decreasing over 8,000 gradient-descent steps, with the point where the Hessian is taken. Top middle: the Hessian eigenvalues during training on a scale that is logarithmic away from zero; the eight largest are lines, five of them rising to between 3.0 and 6.5, and a grey band holds the others, its lower edge, the smallest eigenvalue, rising from about -0.8 to nearly zero. Top right: the eigenvalues at the last step counted by absolute value on a log scale from 1e-8 to 10, positive ones as bars above the axis and negative ones below, with ticks marking the eight largest. Bottom left: eight deflation stages, each with a residual decreasing geometrically until a constant threshold. Bottom middle: at a stalled second stage, the residual for the deflated matrix keeps decreasing to rounding level while the residual for the original matrix levels off at the inherited part, just above the threshold. Bottom right: the fraction of twenty runs certifying j pairs stays at one with the constant threshold and falls to 0.3 with the relative threshold.
Figure 7. Algorithm 1 on the Hessian A=∇2f(θ)\mathbf A=\nabla^2f(\theta) of the training loss ff of a small neural network, applied by automatic differentiation (Section 2.1). The network is a fully connected tanh network with layer widths 4, 16, 16 and 1, so that θ∈R369\theta\in\mathbb R^{369}, trained by 8,000 steps of gradient descent on n=256n=256 Gaussian inputs labelled by a random teacher network. The top row describes the matrix, and the bottom row runs the algorithm on it. The 8 eigenvalues of largest absolute value at the last step, which the algorithm computes, are colored from light to dark in panels (b), (c) and (d). (a) The squared losses along gradient descent, on the training inputs (blue) and on 1,024 fresh inputs labelled by the same teacher (orange, dashed). The Hessian A\mathbf A of panels (c) to (f) is taken at the last step (black dot), where the training loss is 4.8⋅10−44.8\cdot10^{-4} and the test loss reaches its lowest value, 1.2⋅10−31.2\cdot10^{-3}. (b) The eigenvalues of the Hessian along the same run, computed from the dense 369×369369\times369 matrix every 80 steps, on a vertical scale that is logarithmic beyond ±0.01\pm0.01 and linear in between. The 8 largest are drawn as lines, and the other 361 lie in the grey band, whose lower edge is the smallest eigenvalue. Training sharpens the top of the spectrum: the five largest eigenvalues rise from between 1.07 and 2.32 at initialization to between 3.04 and 6.50, and they separate from the next three, which settle between 0.25 and 0.34. The negative curvature nearly disappears: the smallest eigenvalue rises from −0.83-0.83 to −0.0014-0.0014, and the number of negative eigenvalues falls from 191 to 139. (c) The 369 eigenvalues at the last step, counted by absolute value in bins of half a decade, the positive ones above the axis (blue) and the negative ones below it (orange). Their absolute values span more than eight orders of magnitude, from 1.1⋅10−81.1\cdot10^{-8} to 6.50, and 269 of them lie between 10−510^{-5} and 10−210^{-2}. The five largest stand far above the rest, and every negative eigenvalue lies above −0.0015-0.0015. The ticks at the top mark the 8 largest, which the bottom row computes. The bottom row uses two threshold rules (Section 3.8): a constant one, εabs=10−10∥A∥\varepsilon_{\mathrm{abs}}=10^{-10}\|\mathbf A\| and εrel=0\varepsilon_{\mathrm{rel}}=0, where ∥A∥=6.50\|\mathbf A\|=6.50 is the absolute value of the first eigenvalue found, and a relative one, εabs=εrel=10−10\varepsilon_{\mathrm{abs}}=\varepsilon_{\mathrm{rel}}=10^{-10}. (d) One run with the constant threshold: the residual of the candidate against the number of Hessian–vector products, counted over all stages, with each stage labelled by the eigenvalue it finds. Each stage decreases geometrically, by a factor per product equal to the ratio of the next largest remaining absolute value to its own, until it reaches the threshold (grey, dashed), and the eight stages take 1,072 products. (e) A run with the relative threshold, at its second stage. By the splitting of Section 3.8, the squared residual for A\mathbf A (blue), which the algorithm checks, is the sum of the squares of the residual for the deflated matrix B\mathbf B (orange, dashed) and of the inherited part ∥Q⊤Aq∥\|\mathbf Q^\top\mathbf A\mathbf q\| (purple, dotted). The inner iteration drives the first down to 5⋅10−165\cdot10^{-16}, but the second stays at 7.31⋅10−107.31\cdot10^{-10}, the residual accepted at the first stage. The threshold of the second stage, 10−10(1+5.90)=6.90⋅10−1010^{-10}(1+5.90)=6.90\cdot10^{-10}, is just below it, so the stage never stops. Stage 2 is where stalls are most common, and the run shown is the first of the 20 to stall there. (f) Fraction of 20 runs, each with its own Gaussian starting vectors, that certify the jj largest pairs. With the relative threshold (orange), 14 runs stall: 8 at stage 2, 3 at stage 4, and one each at stages 5, 6 and 7. With the constant threshold (blue), all 20 runs certify the 8 pairs, and in the run of panel (d) every eigenvalue is within 5⋅10−155\cdot10^{-15} of the spectrum.

The operator must stay fixed for the whole run. For a Hessian A=∇θ2f(θ)\mathbf{A}=\nabla_\theta^2f(\theta), each product is computed as in Section 2.1, with θ\theta and everything that defines ff held fixed.

Each nondegenerate inner iteration above uses two matrix–vector products, h1\textcolor{#2563eb}{\mathbf{h}_1} and h2\textcolor{#ea580c}{\mathbf{h}_2}, since Aq\mathbf{A}\mathbf{q} comes for free by linearity. After j−1j-1 eigenvectors have been stored, projecting a vector costs O(d(j−1))O(d(j-1)) arithmetic operations. Retaining mm eigenvectors requires O(dm)O(dm) storage. Thus computing and storing a complete eigenbasis still requires O(d2)O(d^2) storage, even though A\mathbf{A} itself is never formed.

4. The Lanczos method

The Lanczos method constructs an orthonormal basis of a Krylov subspace and projects the original eigenvalue problem onto that subspace. This produces a smaller symmetric tridiagonal matrix whose eigenpairs provide approximations to those of the original matrix. The construction requires only matrix–vector products (Lanczos, 1950). Unless stated otherwise, all identities and termination results below concern exact arithmetic and a fixed matrix A\mathbf{A}.

4.1 Definition 1 [Krylov subspace]

Given a unit vector q1\mathbf{q}_1, the Krylov subspace of order mm is

Km(A,q1)=span⁡{q1,Aq1,…,Am−1q1}.\mathcal{K}_m(\mathbf{A},\mathbf{q}_1)=\operatorname{span}\{\mathbf{q}_1,\mathbf{A}\mathbf{q}_1,\dots,\mathbf{A}^{m-1}\mathbf{q}_1\}.

Equivalently,

Km(A,q1)={p(A)q1:p is a polynomial of degree at most m−1}.\mathcal{K}_m(\mathbf{A},\mathbf{q}_1)=\bigl\{p(\mathbf{A})\mathbf{q}_1:p\text{ is a polynomial of degree at most }m-1\bigr\}.

These subspaces are nested:

Km(A,q1)⊆Km+1(A,q1).\mathcal{K}_m(\mathbf{A},\mathbf{q}_1)\subseteq\mathcal{K}_{m+1}(\mathbf{A},\mathbf{q}_1). ■□\begin{array}{r} \blacksquare\Box \end{array}

Power iteration started at q1\mathbf{q}_1 keeps only the last vector Am−1q1\mathbf{A}^{m-1}\mathbf{q}_1 of this list. The Krylov subspace keeps all of them, so it contains every polynomial filter of degree at most m−1m-1 applied to q1\mathbf{q}_1. By the spectral decomposition, p(A)q1=∑λp(λ)Πλq1p(\mathbf{A})\mathbf{q}_1=\sum_\lambda p(\lambda)\Pi_\lambda\mathbf{q}_1, so a polynomial that is large at one eigenvalue and small at the others can isolate that eigencomponent much better than the monomial tm−1t^{m-1} used by power iteration.

4.2 The Gram–Schmidt process

The Gram–Schmidt process turns linearly independent vectors v1,…,vm\mathbf{v}_1,\dots,\mathbf{v}_m of Rd\mathbb{R}^d into orthonormal vectors q1,…,qm\mathbf{q}_1,\dots,\mathbf{q}_m, that is, vectors with qi⊤qj=δij\mathbf{q}_i^\top\mathbf{q}_j=\delta_{ij} that span the same subspaces: span⁡{q1,…,qj}=span⁡{v1,…,vj}\operatorname{span}\{\mathbf{q}_1,\dots,\mathbf{q}_j\}=\operatorname{span}\{\mathbf{v}_1,\dots,\mathbf{v}_j\} for every jj. It builds them one at a time. The first is q1=v1/∥v1∥\mathbf{q}_1=\mathbf{v}_1/\|\mathbf{v}_1\|. At step j≥2j\ge2, it subtracts from vj\mathbf{v}_j its components along the vectors already built, and normalizes the remainder:

rj=vj−∑i=1j−1(qi⊤vj) qi,qj=rj∥rj∥.\mathbf{r}_j=\mathbf{v}_j-\sum_{i=1}^{j-1}(\mathbf{q}_i^\top\mathbf{v}_j)\,\mathbf{q}_i, \qquad \mathbf{q}_j=\frac{\mathbf{r}_j}{\|\mathbf{r}_j\|}.

Both properties are proved together, by induction on jj. Suppose that q1,…,qj−1\mathbf{q}_1,\dots,\mathbf{q}_{j-1} are orthonormal and span the same subspace as v1,…,vj−1\mathbf{v}_1,\dots,\mathbf{v}_{j-1}. This holds for j=2j=2, since q1\mathbf{q}_1 is a unit multiple of v1\mathbf{v}_1. Three facts carry it over to jj.

  • First, the remainder rj\mathbf{r}_j is not zero, so the division by ∥rj∥\|\mathbf{r}_j\| is allowed. If rj\mathbf{r}_j were zero, its definition would give vj=∑i<j(qi⊤vj) qi\mathbf{v}_j=\sum_{i<j}(\mathbf{q}_i^\top\mathbf{v}_j)\,\mathbf{q}_i, a vector of span⁡{q1,…,qj−1}\operatorname{span}\{\mathbf{q}_1,\dots,\mathbf{q}_{j-1}\}. By the hypothesis, this subspace is span⁡{v1,…,vj−1}\operatorname{span}\{\mathbf{v}_1,\dots,\mathbf{v}_{j-1}\}, so vj\mathbf{v}_j would be a combination of v1,…,vj−1\mathbf{v}_1,\dots,\mathbf{v}_{j-1}, which linear independence forbids. Without independence, rj=0\mathbf{r}_j=0 is exactly the signal that vj\mathbf{v}_j adds no new direction.

  • Second, qj\mathbf{q}_j is orthogonal to q1,…,qj−1\mathbf{q}_1,\dots,\mathbf{q}_{j-1}. For k<jk<j, every term of the sum but i=ki=k vanishes in the inner product with qk\mathbf{q}_k since qk⊤qi=δki\mathbf{q}_k^\top\mathbf{q}_i=\delta_{ki}, that is qk⊤rj=qk⊤vj−∑i=1j−1(qi⊤vj) qk⊤qi=qk⊤vj−qk⊤vj=0\mathbf{q}_k^\top\mathbf{r}_j=\mathbf{q}_k^\top\mathbf{v}_j-\sum_{i=1}^{j-1}(\mathbf{q}_i^\top\mathbf{v}_j)\,\mathbf{q}_k^\top\mathbf{q}_i =\mathbf{q}_k^\top\mathbf{v}_j-\mathbf{q}_k^\top\mathbf{v}_j =0. Dividing by ∥rj∥\|\mathbf{r}_j\| keeps this orthogonality and gives qj=rj/∥rj∥\mathbf{q}_j=\mathbf{r}_j/\|\mathbf{r}_j\| norm one, so q1,…,qj\mathbf{q}_1,\dots,\mathbf{q}_j are orthonormal.

  • Third, the spans agree. The vector qj\mathbf{q}_j is a combination of vj\mathbf{v}_j and q1,…,qj−1\mathbf{q}_1,\dots,\mathbf{q}_{j-1}, hence of v1,…,vj\mathbf{v}_1,\dots,\mathbf{v}_j by the hypothesis. Conversely, vj=∥rj∥ qj+∑i<j(qi⊤vj) qi\mathbf{v}_j=\|\mathbf{r}_j\|\,\mathbf{q}_j+\sum_{i<j}(\mathbf{q}_i^\top\mathbf{v}_j)\,\mathbf{q}_i is a combination of q1,…,qj\mathbf{q}_1,\dots,\mathbf{q}_j.

For example, v1=[1,1,0]⊤\mathbf{v}_1=[1,1,0]^\top and v2=[1,0,1]⊤\mathbf{v}_2=[1,0,1]^\top give q1=[1,1,0]⊤/2\mathbf{q}_1=[1,1,0]^\top/\sqrt2, then q1⊤v2=1/2\mathbf{q}_1^\top\mathbf{v}_2=1/\sqrt2, r2=v2−q1/2=[12,−12,1]⊤\mathbf{r}_2=\mathbf{v}_2-\mathbf{q}_1/\sqrt2=[\tfrac12,-\tfrac12,1]^\top and q2=[1,−1,2]⊤/6\mathbf{q}_2=[1,-1,2]^\top/\sqrt6, and indeed q1⊤q2=(1−1+0)/12=0\mathbf{q}_1^\top\mathbf{q}_2=(1-1+0)/\sqrt{12}=0. Step jj costs j−1j-1 inner products and subtractions, so the cost per step grows with jj. The following section applies the process to the spanning vectors q1,Aq1,A2q1,…\mathbf{q}_1,\mathbf{A}\mathbf{q}_1,\mathbf{A}^2\mathbf{q}_1,\dots of the Krylov subspace.

4.3 How the Lanczos method works

The idea The Lanczos method runs the Gram–Schmidt process on the Krylov subspace Km(A,q1)=span⁡{q1,Aq1,…,Am−1q1}\mathcal{K}_m(\mathbf{A},\mathbf{q}_1) = \operatorname{span}\{\mathbf{q}_1,\mathbf{A}\mathbf{q}_1,\dots,\mathbf{A}^{m-1}\mathbf{q}_1\}, one matrix–vector product per step. The numbers that Gram–Schmidt computes along the way form a small symmetric matrix, and the eigenvalues of that matrix approximate eigenvalues of A\mathbf{A}.

This section unpacks these sentences. It first explains why the search for eigenvalues needs an orthonormal basis of Km(A,q1)\mathcal{K}_m(\mathbf{A},\mathbf{q}_1), then runs Gram–Schmidt on the Krylov subspace by hand for four steps, states the general step, and finally shows how eigenvalues and eigenvectors come out of the coefficients. The proofs are in Lemmas 3 to 5 and Proposition 3.

After m−1m-1 products, every vector of Km(A,q1)\mathcal{K}_m(\mathbf{A},\mathbf{q}_1) is within reach. It is a combination c0q1+c1Aq1+⋯+cm−1Am−1q1=p(A)q1c_0\mathbf{q}_1+c_1\mathbf{A}\mathbf{q}_1+\dots+c_{m-1}\mathbf{A}^{m-1}\mathbf{q}_1=p(\mathbf{A})\mathbf{q}_1, and by the spectral decomposition, p(A)q1=∑λp(λ) Πλq1p(\mathbf{A})\mathbf{q}_1=\sum_{\lambda}p(\lambda)\,\Pi_\lambda\mathbf{q}_1 reweights each eigencomponent of q1\mathbf{q}_1 by the value p(λ)p(\lambda). Power iteration only ever uses the polynomial t↦tm−1t \mapsto t^{m-1}. The Lanczos method considers all of them at once.

To turn these vectors into eigenvalue estimates, recall that the Rayleigh quotient of a unit vector never exceeds λmax⁡(A)=max⁡∥x∥=1x⊤Ax\lambda_{\max}(\mathbf{A})=\max_{\|\mathbf{x}\|=1}\mathbf{x}^\top\mathbf{A}\mathbf{x} and never falls below λmin⁡(A)=min⁡∥x∥=1x⊤Ax\lambda_{\min}(\mathbf{A})=\min_{\|\mathbf{x}\|=1}\mathbf{x}^\top\mathbf{A}\mathbf{x} (Remark 7), with equality at the corresponding eigenvectors. These optimizations run over all unit vectors of Rd\mathbb{R}^d, which are out of reach. Running them over the unit vectors of Km(A,q1)\mathcal{K}_m(\mathbf{A},\mathbf{q}_1) only gives two numbers ϑmax⁡(m)≤λmax⁡(A)\vartheta_{\max}^{(m)}\le\lambda_{\max}(\mathbf{A}) and ϑmin⁡(m)≥λmin⁡(A)\vartheta_{\min}^{(m)}\ge\lambda_{\min}(\mathbf{A}). They are the best estimates of the extreme eigenvalues that Rayleigh quotients of vectors of Km(A,q1)\mathcal{K}_m(\mathbf{A},\mathbf{q}_1) can give, and they improve as mm grows, because the subspaces are nested. The power iterate v=Am−1q1/∥Am−1q1∥\mathbf{v}=\mathbf{A}^{m-1}\mathbf{q}_1/\|\mathbf{A}^{m-1}\mathbf{q}_1\| is a unit vector of Km(A,q1)\mathcal{K}_m(\mathbf{A},\mathbf{q}_1), so the estimate of power iteration, v⊤Av\mathbf{v}^\top\mathbf{A}\mathbf{v}, lies between ϑmin⁡(m)\vartheta_{\min}^{(m)} and ϑmax⁡(m)\vartheta_{\max}^{(m)}: whichever extreme eigenvalue power iteration approaches, the corresponding estimate of the Lanczos method is at least as close. Lemma 5 states these facts precisely.

Searching a subspace needs coordinates, and the convenient ones come from an orthonormal basis q1,…,qm\mathbf{q}_1,\dots,\mathbf{q}_m of Km(A,q1)\mathcal{K}_m(\mathbf{A},\mathbf{q}_1), the columns of Qm=[q1,…,qm]\mathbf{Q}_m=[\mathbf{q}_1,\dots,\mathbf{q}_m]. Every vector of the subspace is then x=Qmy=y1q1+⋯+ymqm\mathbf{x}=\mathbf{Q}_m\mathbf{y}=y_1\mathbf{q}_1+\dots+y_m\mathbf{q}_m for a unique y∈Rm\mathbf{y}\in\mathbb{R}^m, lengths are preserved, ∥x∥=∥y∥\|\mathbf{x}\|=\|\mathbf{y}\|, and

x⊤Ax=y⊤Tmy,Tm=Qm⊤AQm∈Rm×m.\mathbf{x}^\top\mathbf{A}\mathbf{x}=\mathbf{y}^\top\mathbf{T}_m\mathbf{y}, \qquad \mathbf{T}_m=\mathbf{Q}_m^\top\mathbf{A}\mathbf{Q}_m\in\mathbb{R}^{m\times m}.

The search over Km(A,q1)\mathcal{K}_m(\mathbf{A},\mathbf{q}_1) thus becomes the eigenvalue problem of the m×mm\times m matrix Tm\mathbf{T}_m, whose entry (Tm)ij=qi⊤Aqj(\mathbf{T}_m)_{ij}=\mathbf{q}_i^\top\mathbf{A}\mathbf{q}_j is the coordinate of Aqj\mathbf{A}\mathbf{q}_j along qi\mathbf{q}_i. Gram–Schmidt applied to the spanning vectors q1,Aq1,A2q1,…\mathbf{q}_1,\mathbf{A}\mathbf{q}_1,\mathbf{A}^2\mathbf{q}_1,\dots of the Krylov subspace produces the orthonormal basis, and, as the following steps show, it computes these coordinates on the way.

Step 0: Gram–Schmidt on K1(A,q1)=span⁡{q1}={c0q1:c0∈R}\mathcal{K}_1(\mathbf{A},\mathbf{q}_1)=\operatorname{span}\{\mathbf{q}_1\}=\{c_0\mathbf{q}_1:c_0\in\mathbb{R}\}. There is nothing to do. The starting vector q1\mathbf{q}_1 is a unit vector, so on its own it is already an orthonormal basis of K1(A,q1)\mathcal{K}_1(\mathbf{A},\mathbf{q}_1): it is the first basis vector, obtained without any product.

Step 1: Gram–Schmidt on K2(A,q1)=span⁡{q1,Aq1}={(c0Id+c1A)q1:c0,c1∈R}\mathcal{K}_2(\mathbf{A},\mathbf{q}_1)=\operatorname{span}\{\mathbf{q}_1, \mathbf{A}\mathbf{q}_1\}=\{(c_0\mathbb{I}_d+c_1\mathbf{A})\mathbf{q}_1:c_0,c_1\in\mathbb{R}\}. The first product gives Aq1\mathbf{A}\mathbf{q}_1, the vector that K2(A,q1)\mathcal{K}_2(\mathbf{A},\mathbf{q}_1) adds. Gram–Schmidt removes its component along q1\mathbf{q}_1, whose coefficient α1=q1⊤Aq1\textcolor{#7c3aed}{\alpha_1}=\mathbf{q}_1^\top\mathbf{A}\mathbf{q}_1 is the Rayleigh quotient of q1\mathbf{q}_1. It is the first eigenvalue estimate, the same as that of power iteration. The remainder r1=Aq1−α1q1\mathbf{r}_1=\mathbf{A}\mathbf{q}_1-\alpha_1\mathbf{q}_1 is orthogonal to q1\mathbf{q}_1, and dividing it by its length β1=∥r1∥\textcolor{#16a34a}{\beta_1}=\|\mathbf{r}_1\| gives the second basis vector q2=r1/β1\mathbf{q}_2=\mathbf{r}_1/\textcolor{#16a34a}{\beta_1}. Rearranged, the step reads

Aq1=α1q1+r1=α1q1+β1q2,q2=r1β1=A−α1Idβ1q1.\mathbf{A}\mathbf{q}_1=\alpha_1\mathbf{q}_1+\mathbf{r}_1=\textcolor{#7c3aed}{\alpha_1\mathbf{q}_1}+\textcolor{#16a34a}{\beta_1\mathbf{q}_2}, \qquad \mathbf{q}_2 =\frac{\mathbf{r}_1}{\beta_1} =\frac{\mathbf{A}-\alpha_1\mathbb{I}_d}{\beta_1} \mathbf{q}_1.

So q1,q2\mathbf{q}_1,\mathbf{q}_2 is an orthonormal basis of K2(A,q1)\mathcal{K}_2(\mathbf{A},\mathbf{q}_1), and q2=p1(A)q1\mathbf{q}_2=p_1(\mathbf{A})\mathbf{q}_1 for the polynomial p1(t)=(t−α1)/β1p_1(t)=(t-\alpha_1)/\beta_1 of degree one. In the colors used throughout this section, a purple coefficient is computed at the current step, and a green one is the length of the new direction.

Step 2: Gram–Schmidt on K3(A,q1)=span⁡{q1,Aq1,A2q1}\mathcal{K}_3(\mathbf{A},\mathbf{q}_1)=\operatorname{span}\{\mathbf{q}_1, \mathbf{A}\mathbf{q}_1, \mathbf{A}^2\mathbf{q}_1\}. The vector that K3(A,q1)\mathcal{K}_3(\mathbf{A},\mathbf{q}_1) adds is A2q1\mathbf{A}^2\mathbf{q}_1, and textbook Gram–Schmidt would orthogonalize it next. The Lanczos method applies A\mathbf{A} to the newest basis vector q2\mathbf{q}_2 instead, which also costs one product. Indeed, by Step 1,

Aq2=1β1 A2q1−α1β1 Aq1.\mathbf{A}\mathbf{q}_2=\frac{1}{\beta_1}\,\textcolor{#2563eb}{\mathbf{A}^2\mathbf{q}_1}-\frac{\alpha_1}{\beta_1}\,\textcolor{#ea580c}{\mathbf{A}\mathbf{q}_1}.

The orange vector already lies in K2(A,q1)=span⁡{q1,q2}\mathcal{K}_2(\mathbf{A},\mathbf{q}_1)=\operatorname{span}\{\mathbf{q}_1,\mathbf{q}_2\}, so removing the components along q1\mathbf{q}_1 and q2\mathbf{q}_2 deletes it, and only the blue power contributes. Hence Aq2\mathbf{A}\mathbf{q}_2 brings the same new direction as A2q1\mathbf{A}^2\mathbf{q}_1. Gram–Schmidt needs two coefficients. The one on q1\mathbf{q}_1 comes for free from symmetry and Step 1:

q1⊤Aq2=(Aq1)⊤q2=(α1q1+β1q2)⊤q2=β1.\mathbf{q}_1^\top\mathbf{A}\mathbf{q}_2=(\mathbf{A}\mathbf{q}_1)^\top\mathbf{q}_2=(\alpha_1\mathbf{q}_1+\beta_1\mathbf{q}_2)^\top\mathbf{q}_2=\textcolor{#ea580c}{\beta_1}.

It is the length found in Step 1, now reused, and orange marks such known coefficients. The one on q2\mathbf{q}_2 is the only new number, α2=q2⊤Aq2\textcolor{#7c3aed}{\alpha_2}=\mathbf{q}_2^\top\mathbf{A}\mathbf{q}_2. Subtracting both components and normalizing gives

r2=Aq2−β1q1−α2q2,β2=∥r2∥,q3=r2β2=(A−α1Id)p1(A)−β1Idβ2q1,\mathbf{r}_2=\mathbf{A}\mathbf{q}_2-\beta_1\mathbf{q}_1-\alpha_2\mathbf{q}_2, \qquad \textcolor{#16a34a}{\beta_2}=\|\mathbf{r}_2\|, \qquad \mathbf{q}_3=\frac{\mathbf{r}_2}{\beta_2}=\frac{(\mathbf{A}-\alpha_1\mathbb{I}_d)p_1(\mathbf{A})-\beta_1\mathbb{I}_d}{\beta_2} \mathbf{q}_1,

that is, Aq2=β1q1+α2q2+β2q3\mathbf{A}\mathbf{q}_2=\textcolor{#ea580c}{\beta_1\mathbf{q}_1}+\textcolor{#7c3aed}{\alpha_2\mathbf{q}_2}+\textcolor{#16a34a}{\beta_2\mathbf{q}_3}. Now q1,q2,q3\mathbf{q}_1,\mathbf{q}_2,\mathbf{q}_3 is an orthonormal basis of K3(A,q1)\mathcal{K}_3(\mathbf{A},\mathbf{q}_1), and q3=p2(A)q1\mathbf{q}_3=p_2(\mathbf{A})\mathbf{q}_1 for the polynomial p2(t)=((t−α2) p1(t)−β1)/β2p_2(t)=\bigl((t-\alpha_2)\,p_1(t)-\beta_1\bigr)/\beta_2 of degree two. The coefficients found so far already give the matrix of the Rayleigh quotient on K2(A,q1)\mathcal{K}_2(\mathbf{A},\mathbf{q}_1),

T2=Q2⊤AQ2=[α1β1β1α2],\mathbf{T}_2=\mathbf{Q}_2^\top\mathbf{A}\mathbf{Q}_2=\begin{bmatrix}\alpha_1&\beta_1\\\beta_1&\alpha_2\end{bmatrix},

whose two eigenvalues are the smallest and largest values of x⊤Ax\mathbf{x}^\top\mathbf{A}\mathbf{x} over the unit vectors of K2(A,q1)\mathcal{K}_2(\mathbf{A},\mathbf{q}_1).

Step 3: Gram–Schmidt on K4(A,q1)=span⁡{q1,Aq1,A2q1,A3q1}\mathcal{K}_4(\mathbf{A},\mathbf{q}_1)=\operatorname{span}\{\mathbf{q}_1, \mathbf{A}\mathbf{q}_1, \mathbf{A}^2\mathbf{q}_1, \mathbf{A}^3\mathbf{q}_1\}, where a coefficient vanishes. The vector that K4(A,q1)\mathcal{K}_4(\mathbf{A},\mathbf{q}_1) adds is A3q1\mathbf{A}^3\mathbf{q}_1, and, as in Step 2, the third product is applied to the newest basis vector instead, giving Aq3\mathbf{A}\mathbf{q}_3. The argument of Step 2 carries over. Since q3=p2(A)q1\mathbf{q}_3=p_2(\mathbf{A})\mathbf{q}_1, where p2p_2 has degree two and leading coefficient 1/(β1β2)1/(\beta_1\beta_2),

Aq3=1β1β2 A3q1+k,k∈K3(A,q1)=span⁡{q1,q2,q3},\mathbf{A}\mathbf{q}_3=\frac{1}{\beta_1\beta_2}\,\textcolor{#2563eb}{\mathbf{A}^3\mathbf{q}_1}+\textcolor{#ea580c}{\mathbf{k}}, \qquad \textcolor{#ea580c}{\mathbf{k}}\in\mathcal{K}_3(\mathbf{A},\mathbf{q}_1)=\operatorname{span}\{\mathbf{q}_1, \mathbf{q}_2, \mathbf{q}_3\},

where the orange vector collects the terms of lower degree. Removing the components along q1,q2,q3\mathbf{q}_1,\mathbf{q}_2,\mathbf{q}_3 deletes it, so Aq3\mathbf{A}\mathbf{q}_3 brings the same new direction as A3q1\mathbf{A}^3\mathbf{q}_1. Its coefficient on q1\mathbf{q}_1 is

q1⊤Aq3=(Aq1)⊤q3=(α1q1+β1q2)⊤q3=0,\mathbf{q}_1^\top\mathbf{A}\mathbf{q}_3=(\mathbf{A}\mathbf{q}_1)^\top\mathbf{q}_3=(\alpha_1\mathbf{q}_1+\beta_1\mathbf{q}_2)^\top\mathbf{q}_3=\textcolor{#7d8783}{0},

because Aq1\mathbf{A}\mathbf{q}_1 lies in K2(A,q1)\mathcal{K}_2(\mathbf{A},\mathbf{q}_1), to which q3\mathbf{q}_3 is orthogonal. Gram–Schmidt has nothing to subtract along q1\mathbf{q}_1, and grey marks such vanishing coefficients. The coefficient on q2\mathbf{q}_2 is (Aq2)⊤q3=β2(\mathbf{A}\mathbf{q}_2)^\top\mathbf{q}_3=\textcolor{#ea580c}{\beta_2}, known from Step 2, and the one on q3\mathbf{q}_3 is the new number α3=q3⊤Aq3\textcolor{#7c3aed}{\alpha_3}=\mathbf{q}_3^\top\mathbf{A}\mathbf{q}_3. Two subtractions and a normalization give q4\mathbf{q}_4: Aq3=β2q2+α3q3+β3q4\mathbf{A}\mathbf{q}_3=\textcolor{#ea580c}{\beta_2\mathbf{q}_2}+\textcolor{#7c3aed}{\alpha_3\mathbf{q}_3}+\textcolor{#16a34a}{\beta_3\mathbf{q}_4}, and q1,…,q4\mathbf{q}_1,\dots,\mathbf{q}_4 is an orthonormal basis of K4(A,q1)\mathcal{K}_4(\mathbf{A},\mathbf{q}_1). Solving this relation for q4\mathbf{q}_4, with q2=p1(A)q1\mathbf{q}_2=p_1(\mathbf{A})\mathbf{q}_1 and q3=p2(A)q1\mathbf{q}_3=p_2(\mathbf{A})\mathbf{q}_1, gives q4=p3(A)q1\mathbf{q}_4=p_3(\mathbf{A})\mathbf{q}_1 for the polynomial p3(t)=((t−α3) p2(t)−β2 p1(t))/β3p_3(t)=\bigl((t-\alpha_3)\,p_2(t)-\beta_2\,p_1(t)\bigr)/\beta_3 of degree three. The coefficients found so far give the matrix of the Rayleigh quotient on K3(A,q1)\mathcal{K}_3(\mathbf{A},\mathbf{q}_1),

T3=Q3⊤AQ3=[α1β10β1α2β20β2α3],\mathbf{T}_3=\mathbf{Q}_3^\top\mathbf{A}\mathbf{Q}_3=\begin{bmatrix}\alpha_1&\beta_1&\textcolor{#7d8783}{0}\\\beta_1&\alpha_2&\beta_2\\\textcolor{#7d8783}{0}&\beta_2&\alpha_3\end{bmatrix},

where the grey zeros are the vanishing coefficient q1⊤Aq3\mathbf{q}_1^\top\mathbf{A}\mathbf{q}_3 and its symmetric copy. Its smallest and largest eigenvalues are the smallest and largest values of x⊤Ax\mathbf{x}^\top\mathbf{A}\mathbf{x} over the unit vectors of K3(A,q1)\mathcal{K}_3(\mathbf{A},\mathbf{q}_1).

Step 4: Gram–Schmidt on K5(A,q1)=span⁡{q1,Aq1,A2q1,A3q1,A4q1}\mathcal{K}_5(\mathbf{A},\mathbf{q}_1)=\operatorname{span}\{\mathbf{q}_1, \mathbf{A}\mathbf{q}_1, \mathbf{A}^2\mathbf{q}_1, \mathbf{A}^3\mathbf{q}_1, \mathbf{A}^4\mathbf{q}_1\}, and the pattern. The fourth product gives Aq4\mathbf{A}\mathbf{q}_4, which, by the argument of Steps 2 and 3, brings the same new direction as A4q1\mathbf{A}^4\mathbf{q}_1. Its coefficients on q1\mathbf{q}_1 and q2\mathbf{q}_2 vanish, since Aq1\mathbf{A}\mathbf{q}_1 and Aq2\mathbf{A}\mathbf{q}_2 lie in K3(A,q1)\mathcal{K}_3(\mathbf{A},\mathbf{q}_1), to which q4\mathbf{q}_4 is orthogonal. Its coefficient on q3\mathbf{q}_3 is β3\textcolor{#ea580c}{\beta_3}, known from Step 3, and the new number is α4=q4⊤Aq4\textcolor{#7c3aed}{\alpha_4}=\mathbf{q}_4^\top\mathbf{A}\mathbf{q}_4, so that Aq4=β3q3+α4q4+β4q5\mathbf{A}\mathbf{q}_4=\textcolor{#ea580c}{\beta_3\mathbf{q}_3}+\textcolor{#7c3aed}{\alpha_4\mathbf{q}_4}+\textcolor{#16a34a}{\beta_4\mathbf{q}_5}, and q5=p4(A)q1\mathbf{q}_5=p_4(\mathbf{A})\mathbf{q}_1 for the polynomial p4(t)=((t−α4) p3(t)−β3 p2(t))/β4p_4(t)=\bigl((t-\alpha_4)\,p_3(t)-\beta_3\,p_2(t)\bigr)/\beta_4 of degree four. The four steps have computed the coordinates of Aq1,…,Aq4\mathbf{A}\mathbf{q}_1,\dots,\mathbf{A}\mathbf{q}_4 in the basis:

on q1\mathbf{q}_1on q2\mathbf{q}_2on q3\mathbf{q}_3on q4\mathbf{q}_4on q5\mathbf{q}_5
Aq1\mathbf{A}\mathbf{q}_1 (step 1)α1\textcolor{#7c3aed}{\alpha_1}β1\textcolor{#16a34a}{\beta_1}
Aq2\mathbf{A}\mathbf{q}_2 (step 2)β1\textcolor{#ea580c}{\beta_1}α2\textcolor{#7c3aed}{\alpha_2}β2\textcolor{#16a34a}{\beta_2}
Aq3\mathbf{A}\mathbf{q}_3 (step 3)0\textcolor{#7d8783}{0}β2\textcolor{#ea580c}{\beta_2}α3\textcolor{#7c3aed}{\alpha_3}β3\textcolor{#16a34a}{\beta_3}
Aq4\mathbf{A}\mathbf{q}_4 (step 4)0\textcolor{#7d8783}{0}0\textcolor{#7d8783}{0}β3\textcolor{#ea580c}{\beta_3}α4\textcolor{#7c3aed}{\alpha_4}β4\textcolor{#16a34a}{\beta_4}

Each green length reappears in orange in the next row, by symmetry. The first four columns are the matrix of the Rayleigh quotient on K4(A,q1)\mathcal{K}_4(\mathbf{A},\mathbf{q}_1), which Gram–Schmidt has therefore filled for free:

T4=Q4⊤AQ4=[α1β100β1α2β200β2α3β300β3α4].\mathbf{T}_4=\mathbf{Q}_4^\top\mathbf{A}\mathbf{Q}_4=\begin{bmatrix} \textcolor{#7c3aed}{\alpha_1}&\textcolor{#16a34a}{\beta_1}&\textcolor{#7d8783}{0}&\textcolor{#7d8783}{0}\\ \textcolor{#ea580c}{\beta_1}&\textcolor{#7c3aed}{\alpha_2}&\textcolor{#16a34a}{\beta_2}&\textcolor{#7d8783}{0}\\ \textcolor{#7d8783}{0}&\textcolor{#ea580c}{\beta_2}&\textcolor{#7c3aed}{\alpha_3}&\textcolor{#16a34a}{\beta_3}\\ \textcolor{#7d8783}{0}&\textcolor{#7d8783}{0}&\textcolor{#ea580c}{\beta_3}&\textcolor{#7c3aed}{\alpha_4} \end{bmatrix}.

It is tridiagonal: only the diagonal and its two neighbors are nonzero. The last column of the table, β4\beta_4 on q5\mathbf{q}_5, lies outside K4(A,q1)\mathcal{K}_4(\mathbf{A},\mathbf{q}_1), and it plays a central role below.

The general step. The same reasoning holds at every step j∈{1,2,3,… }j\in\{1,2,3,\dots\}, as long as the previous steps have produced qj\mathbf{q}_j, which for j≥2j\ge2 means that the length βj−1=∥rj−1∥\beta_{j-1}=\|\mathbf{r}_{j-1}\| found at step j−1j-1 is positive. For j=1j=1, there is no earlier basis vector, and the conventions q0=0\mathbf{q}_0=0 and β0=0\beta_0=0 of Definition 2 let the formulas below cover this case too. By symmetry, the coefficient of Aqj\mathbf{A}\mathbf{q}_j on an earlier basis vector qi\mathbf{q}_i is (Aqi)⊤qj(\mathbf{A}\mathbf{q}_i)^\top\mathbf{q}_j, and Aqi\mathbf{A}\mathbf{q}_i lies in Ki+1(A,q1)=span⁡{q1,…,qi+1}\mathcal{K}_{i+1}(\mathbf{A},\mathbf{q}_1)=\operatorname{span}\{\mathbf{q}_1,\dots,\mathbf{q}_{i+1}\}, to which qj\mathbf{q}_j is orthogonal as soon as i+2≤ji+2\le j. Only two coefficients then survive, i=j−1i=j-1 and i=ji=j:

  • The one on qj−1\mathbf{q}_{j-1} is the length βj−1=∥rj−1∥\beta_{j-1}=\|\mathbf{r}_{j-1}\| already computed at the previous step, as for β1\beta_1 in Step 2:
qj−1⊤Aqj=(Aqj−1)⊤qj=(βj−2qj−2+αj−1qj−1+βj−1qj)⊤qj=βj−1.\mathbf{q}_{j-1}^\top\mathbf{A}\mathbf{q}_j =(\mathbf{A}\mathbf{q}_{j-1})^\top\mathbf{q}_j =(\beta_{j-2}\mathbf{q}_{j-2}+\alpha_{j-1}\mathbf{q}_{j-1}+\beta_{j-1}\mathbf{q}_j)^\top\mathbf{q}_j =\textcolor{#ea580c}{\beta_{j-1}}. % by symmetry, the relation of step $j-1$, and orthonormality.
  • The one on qj\mathbf{q}_j is the new number αj=qj⊤Aqj\textcolor{#7c3aed}{\alpha_j}=\mathbf{q}_j^\top\mathbf{A}\mathbf{q}_j.

Subtracting both components from Aqj\mathbf{A}\mathbf{q}_j leaves the remainder rj\mathbf{r}_j, orthogonal to q1,…,qj\mathbf{q}_1,\dots,\mathbf{q}_j, and when its length βj=∥rj∥\textcolor{#16a34a}{\beta_j}=\|\mathbf{r}_j\| is positive, dividing by it gives the next basis vector qj+1\mathbf{q}_{j+1}:

rj=Aqj−βj−1qj−1−αjqj=βjqj+1.\mathbf{r}_j =\mathbf{A}\mathbf{q}_j\textcolor{#ea580c}{-\beta_{j-1}\mathbf{q}_{j-1}}\textcolor{#7c3aed}{-\alpha_j\mathbf{q}_j} =\textcolor{#16a34a}{\beta_j\mathbf{q}_{j+1}}.

Step jj of Definition 2 below is therefore the following Gram–Schmidt step, which makes the two subtractions one after the other.

qj→ A Aqj→ −βj−1qj−1 zj→ −αjqj rj→ ÷βj qj+1.\mathbf{q}_j \xrightarrow{\ \mathbf{A}\ } \mathbf{A}\mathbf{q}_j \xrightarrow{\ \textcolor{#ea580c}{-\beta_{j-1}\mathbf{q}_{j-1}}\ } \mathbf{z}_j \xrightarrow{\ \textcolor{#7c3aed}{-\alpha_j\mathbf{q}_j}\ } \mathbf{r}_j \xrightarrow{\ \textcolor{#16a34a}{\div\beta_j}\ } \textcolor{#16a34a}{\mathbf{q}_{j+1}}.
QuantityWhat it isWhy it is needed
Aqj\mathbf{A}\mathbf{q}_jthe only product of step jjtemporary candidate that carries the new Krylov direction
zj=Aqj−βj−1qj−1\mathbf{z}_j=\mathbf{A}\mathbf{q}_j\textcolor{#ea580c}{-\beta_{j-1}\mathbf{q}_{j-1}}the candidate without its component on qj−1\mathbf{q}_{j-1}that coefficient is βj−1\beta_{j-1}, already known from step j−1j-1 by symmetry
αj=qj⊤zj\textcolor{#7c3aed}{\alpha_j}=\mathbf{q}_j^\top\mathbf{z}_jthe coefficient on qj\mathbf{q}_j, equal to qj⊤Aqj\mathbf{q}_j^\top\mathbf{A}\mathbf{q}_jremoves the last old component and fills the diagonal of Tm\mathbf{T}_m
rj=zj−αjqj\mathbf{r}_j=\mathbf{z}_j\textcolor{#7c3aed}{-\alpha_j\mathbf{q}_j}the part of Aqj\mathbf{A}\mathbf{q}_j orthogonal to q1,…,qj\mathbf{q}_1,\dots,\mathbf{q}_jthe new direction, not yet normalized
βj=∥rj∥\textcolor{#16a34a}{\beta_j}=\lVert\mathbf{r}_j\rVertthe length of the new directionnormalizes it and fills the off-diagonal of Tm\mathbf{T}_m. The value βj=0\beta_j=0 means that no new direction exists (exact breakdown).
qj+1=rj/βj\textcolor{#16a34a}{\mathbf{q}_{j+1}}=\mathbf{r}_j/\textcolor{#16a34a}{\beta_j}the new basis vectorextends the orthonormal basis by one vector

Rearranging the definitions of zj\mathbf{z}_j and rj\mathbf{r}_j gives the three-term recurrence Aqj=βj−1qj−1+αjqj+βjqj+1\mathbf{A}\mathbf{q}_j=\textcolor{#ea580c}{\beta_{j-1}\mathbf{q}_{j-1}}+\textcolor{#7c3aed}{\alpha_j\mathbf{q}_j}+\textcolor{#16a34a}{\beta_j\mathbf{q}_{j+1}}. The orange term was found at the previous step, the purple term is the only coefficient computed at step jj, and the green term is the new direction. In terms of polynomials, qj+1=pj(A)q1\mathbf{q}_{j+1}=p_j(\mathbf{A})\mathbf{q}_1 with p0=1p_0=1 and βj pj(t)=(t−αj) pj−1(t)−βj−1 pj−2(t)\beta_j\,p_j(t)=(t-\alpha_j)\,p_{j-1}(t)-\beta_{j-1}\,p_{j-2}(t) for all j≥1j \ge 1, where p−1=0p_{-1}=0. Gram–Schmidt on Km(A,q1)\mathcal{K}_m(\mathbf{A},\mathbf{q}_1) is thus Gram–Schmidt on the polynomials 1,t,t2,…1,t,t^2,\dots for the inner product ⟨p,r⟩=(p(A)q1)⊤r(A)q1=∑λp(λ) r(λ) ∥Πλq1∥2\langle p,r\rangle=\bigl(p(\mathbf{A})\mathbf{q}_1\bigr)^\top r(\mathbf{A})\mathbf{q}_1=\sum_\lambda p(\lambda)\,r(\lambda)\,\|\Pi_\lambda\mathbf{q}_1\|^2, and the polynomials pjp_j are Everything follows from qj+1=pj(A)q1\mathbf{q}_{j+1}=p_j(\mathbf{A})\mathbf{q}_1. First, the polynomials are orthonormal because the basis vectors are: for all i,j≥0i,j\ge0, ⟨pi,pj⟩=(pi(A)q1)⊤pj(A)q1=qi+1⊤qj+1=δij.\langle p_i,p_j\rangle=\bigl(p_i(\mathbf{A})\mathbf{q}_1\bigr)^\top p_j(\mathbf{A})\mathbf{q}_1=\mathbf{q}_{i+1}^\top\mathbf{q}_{j+1}=\delta_{ij}. Second, the sum over eigenvalues comes from the expansion Akq1=∑λλk Πλq1\mathbf{A}^k\mathbf{q}_1=\sum_\lambda\lambda^k\,\Pi_\lambda\mathbf{q}_1 of the introduction. By linearity, p(A)q1=∑λp(λ) Πλq1p(\mathbf{A})\mathbf{q}_1=\sum_\lambda p(\lambda)\,\Pi_\lambda\mathbf{q}_1 for every polynomial pp, and since the eigenspaces of distinct eigenvalues are orthogonal, only the terms with μ=λ\mu=\lambda survive in the product: (p(A)q1)⊤r(A)q1=∑λ,μp(λ) r(μ) (Πλq1)⊤Πμq1=∑λp(λ) r(λ) ∥Πλq1∥2.\bigl(p(\mathbf{A})\mathbf{q}_1\bigr)^\top r(\mathbf{A})\mathbf{q}_1=\sum_{\lambda,\mu}p(\lambda)\,r(\mu)\,(\Pi_\lambda\mathbf{q}_1)^\top\Pi_\mu\mathbf{q}_1=\sum_\lambda p(\lambda)\,r(\lambda)\,\|\Pi_\lambda\mathbf{q}_1\|^2. Third, this is an inner product on the polynomials that matter. It is symmetric and bilinear, and ⟨p,p⟩=∑λp(λ)2 ∥Πλq1∥2\langle p,p\rangle=\sum_\lambda p(\lambda)^2\,\|\Pi_\lambda\mathbf{q}_1\|^2 vanishes only if pp is zero at every eigenvalue λ\lambda with Πλq1≠0\Pi_\lambda\mathbf{q}_1\neq0. If there are ss such eigenvalues, a nonzero polynomial of degree less than ss cannot vanish at all of them, and these degrees cover p0,…,ps−1p_0,\dots,p_{s-1}, all the polynomials the method produces, since it stops at step ss by Proposition 3. Finally, pjp_j has degree jj and the positive leading coefficient 1/(β1⋯βj)1/(\beta_1\cdots\beta_j), so p0,…,pjp_0,\dots,p_j are exactly what Gram–Schmidt produces from 1,t,…,tj1,t,\dots,t^j for this inner product..

Compared with textbook Gram–Schmidt on q1,Aq1,A2q1,…\mathbf{q}_1,\mathbf{A}\mathbf{q}_1,\mathbf{A}^2\mathbf{q}_1,\dots, the method makes two changes, and neither changes the subspaces.

  • First, at step jj it multiplies the newest basis vector qj\mathbf{q}_j by A\mathbf{A} instead of forming the next power Ajq1\mathbf{A}^j\mathbf{q}_1. In general, qj\mathbf{q}_j has a nonzero coefficient on Aj−1q1\mathbf{A}^{j-1}\mathbf{q}_1 (recall that qj\mathbf{q}_j exists only when βj−1=∥rj−1∥>0\beta_{j-1}=\|\mathbf{r}_{j-1}\|>0), since otherwise it would lie in Kj−1(A,q1)=span⁡{q1,Aq1,…,Aj−2q1}=span⁡{q1,…,qj−1}\mathcal{K}_{j-1}(\mathbf{A},\mathbf{q}_1)=\operatorname{span}\{\mathbf{q}_1,\mathbf{A}\mathbf{q}_1,\dots,\mathbf{A}^{j-2}\mathbf{q}_1\}=\operatorname{span}\{\mathbf{q}_1,\dots,\mathbf{q}_{j-1}\}, to which it is orthogonal. By the recurrence for the polynomials pjp_j above, this coefficient is 1/(β1β2⋯βj−1)1/(\beta_1\beta_2\cdots\beta_{j-1}), the leading coefficient of pj−1p_{j-1}. Hence Aqj\mathbf{A}\mathbf{q}_j is a nonzero multiple of Ajq1\mathbf{A}^j\mathbf{q}_1 plus a vector of Kj(A,q1)\mathcal{K}_j(\mathbf{A},\mathbf{q}_1), and the two bring the same new direction, the direction qj+1\mathbf{q}_{j+1} orthogonal to Kj(A,q1)\mathcal{K}_j(\mathbf{A},\mathbf{q}_1), as in Step 2, where Aq2\mathbf{A}\mathbf{q}_2 and A2q1\mathbf{A}^2\mathbf{q}_1 both bring q3\mathbf{q}_3. In exact arithmetic, both choices therefore give the same basis. In floating-point arithmetic they do not: the basis computed from the powers Ajq1\mathbf{A}^j\mathbf{q}_1 loses its orthogonality within a few steps, as the example below shows, and the reason is the following. Since pjp_j has leading coefficient 1/(β1⋯βj)1/(\beta_1\cdots\beta_j), and by the three-term recurrence,

    Ajq1=β1β2⋯βj qj+1+kj⏟∈ Kj(A,q1),Aqj=βj qj+1+βj−1qj−1+αjqj⏟∈ Kj(A,q1),\mathbf{A}^j\mathbf{q}_1=\textcolor{#16a34a}{\beta_1\beta_2\cdots\beta_j\,\mathbf{q}_{j+1}}+\underbrace{\mathbf{k}_j}_{\in\,\mathcal{K}_j(\mathbf{A},\mathbf{q}_1)}, \qquad \mathbf{A}\mathbf{q}_j=\textcolor{#16a34a}{\beta_j\,\mathbf{q}_{j+1}}+\underbrace{\beta_{j-1}\mathbf{q}_{j-1}+\alpha_j\mathbf{q}_j}_{\in\,\mathcal{K}_j(\mathbf{A},\mathbf{q}_1)},

    for some vector kj\mathbf{k}_j. In each of the two vectors, the green term is orthogonal to Kj(A,q1)=span⁡{q1,…,qj}\mathcal{K}_j(\mathbf{A},\mathbf{q}_1)=\operatorname{span}\{\mathbf{q}_1,\dots,\mathbf{q}_j\} and the other terms lie in it, so Gram–Schmidt removes the other terms and keeps only the green term. Let x\mathbf{x} be either vector, Ajq1\mathbf{A}^j\mathbf{q}_1 or Aqj\mathbf{A}\mathbf{q}_j, and g\textcolor{#16a34a}{\mathbf{g}} its green term. What decides the accuracy is the ratio f=∥g∥/∥x∥f=\|\textcolor{#16a34a}{\mathbf{g}}\|/\|\mathbf{x}\|. Since g\textcolor{#16a34a}{\mathbf{g}} is orthogonal to Kj(A,q1)\mathcal{K}_j(\mathbf{A},\mathbf{q}_1) and x−g\mathbf{x}-\textcolor{#16a34a}{\mathbf{g}} lies in it, ff is the sine of the angle between x\mathbf{x} and Kj(A,q1)\mathcal{K}_j(\mathbf{A},\mathbf{q}_1). It lies in [0,1][0,1]. It equals 11 when x\mathbf{x} is orthogonal to Kj(A,q1)\mathcal{K}_j(\mathbf{A},\mathbf{q}_1) and there is nothing to remove, the best case. It is close to 00 when x\mathbf{x} is close to Kj(A,q1)\mathcal{K}_j(\mathbf{A},\mathbf{q}_1), the bad case, because the computed qj+1\mathbf{q}_{j+1} then loses orthogonality to the earlier basis vectors, by an amount that grows as ff shrinks, as shown next. Gram–Schmidt removes the terms x−g\mathbf{x}-\textcolor{#16a34a}{\mathbf{g}} from x\mathbf{x}. In double precision, whose unit roundoff is u≈1.1⋅10−16u\approx1.1\cdot10^{-16}, it does so with rounding errors Gram–Schmidt computes the coefficients ci=qi⊤xc_i=\mathbf{q}_i^\top\mathbf{x} of x\mathbf{x} on the basis vectors of Kj(A,q1)\mathcal{K}_j(\mathbf{A},\mathbf{q}_1) and subtracts the nonzero terms ciqic_i\mathbf{q}_i from x\mathbf{x} one at a time. There are n=2n=2 of them for Aqj\mathbf{A}\mathbf{q}_j and n=jn=j for Ajq1\mathbf{A}^j\mathbf{q}_1. Write yk\mathbf{y}_k for the intermediate vector left after the first kk subtractions, so that y0=x\mathbf{y}_0=\mathbf{x} and yn=g\mathbf{y}_n=\textcolor{#16a34a}{\mathbf{g}}. In floating-point arithmetic, every addition, subtraction and multiplication is rounded: its computed result is the exact one times 1+δ1+\delta, with ∣δ∣≤u|\delta|\le u. Each operation therefore errs by at most uu times the size of its result, and the results here have the size of x\mathbf{x}, not of g\textcolor{#16a34a}{\mathbf{g}}. Indeed, ∣ci∣≤∥qi∥∥x∥=∥x∥|c_i|\le\|\mathbf{q}_i\|\|\mathbf{x}\|=\|\mathbf{x}\| by the Cauchy–Schwarz inequality, and the vectors yk\mathbf{y}_k are no longer than x\mathbf{x}. The difference x−yk\mathbf{x}-\mathbf{y}_k, the sum of the first kk terms, is the orthogonal projection of x\mathbf{x} onto the span of the first kk basis vectors used, and yk\mathbf{y}_k is orthogonal to this span. Pythagoras’ theorem therefore gives ∥x∥2=∥x−yk∥2+∥yk∥2\|\mathbf{x}\|^2=\|\mathbf{x}-\mathbf{y}_k\|^2+\|\mathbf{y}_k\|^2, so ∥yk∥≤∥x∥\|\mathbf{y}_k\|\le\|\mathbf{x}\| (the triangle inequality would only give ∥yk∥≤(k+1)∥x∥\|\mathbf{y}_k\|\le(k+1)\|\mathbf{x}\| because it ignores that the terms ciqic_i\mathbf{q}_i are orthogonal). An inner product of two vectors of Rd\mathbb{R}^d sums dd rounded products, so each cic_i is computed with an error of at most about d u ∥x∥d\,u\,\|\mathbf{x}\|, and each subtraction of a term adds at most about 2u∥x∥2u\|\mathbf{x}\|, one u∥x∥u\|\mathbf{x}\| for forming the term and one for subtracting it from yk−1\mathbf{y}_{k-1}. Up to terms of order u2u^2, the computed green term g^\widehat{\mathbf{g}} therefore satisfies ∥g^−g∥≤n (d+2) u ∥x∥.\|\widehat{\mathbf{g}}-\textcolor{#16a34a}{\mathbf{g}}\|\le n\,(d+2)\,u\,\|\mathbf{x}\|. The factor n(d+2)n(d+2) is a worst case, and actual errors are usually much smaller, because rounding errors of different signs partly cancel. The number of terms makes this bound j/2j/2 times larger for Ajq1\mathbf{A}^j\mathbf{q}_1 than for Aqj\mathbf{A}\mathbf{q}_j, which costs only log⁡10(j/2)\log_{10}(j/2) digits, one digit at j=20j=20. The large difference between the two vectors comes from the ratio f=∥g∥/∥x∥f=\|\textcolor{#16a34a}{\mathbf{g}}\|/\|\mathbf{x}\|, not from nn: at j=20j=20, in the example below, ff is 8⋅10−128\cdot10^{-12} for A20q1\mathbf{A}^{20}\mathbf{q}_1 and 0.40.4 for Aq20\mathbf{A}\mathbf{q}_{20}. What matters here is that the bound is proportional to ∥x∥\|\mathbf{x}\|, not to ∥g∥\|\textcolor{#16a34a}{\mathbf{g}}\|: a small g\textcolor{#16a34a}{\mathbf{g}} does not come with a small error., and these errors stay in the computed g\textcolor{#16a34a}{\mathbf{g}}. Relative to ∥g∥=f∥x∥\|\textcolor{#16a34a}{\mathbf{g}}\|=f\|\mathbf{x}\|, they are therefore of the order of u/fu/f, and so are the components that the computed qj+1\mathbf{q}_{j+1} keeps on the earlier basis vectors. This loss of accuracy is called cancellation. The same thing happens with a number in place of the vector x\mathbf{x}. Subtracting 11 from x=1.000001x=1.000001 leaves g=10−6\textcolor{#16a34a}{g}=10^{-6}, so f=g/x≈10−6f=\textcolor{#16a34a}{g}/x\approx10^{-6}, and the error of about 10−1610^{-16} with which xx is stored stays in g\textcolor{#16a34a}{g}, where it is a relative error of about u/f=10−10u/f=10^{-10}.

    The two ratios behave very differently. For x=Aqj\mathbf{x}=\mathbf{A}\mathbf{q}_j, the three terms are orthogonal, so ∥x∥2=βj−12+αj2+βj2\|\mathbf{x}\|^2=\beta_{j-1}^2+\alpha_j^2+\beta_j^2 and

    f=βjβj−12+αj2+βj2,f=\frac{\beta_j}{\sqrt{\beta_{j-1}^2+\alpha_j^2+\beta_j^2}},

    which depends only on the coefficients of step jj, and is close to 00 only if βj\beta_j is small compared with βj−12+αj2\sqrt{\beta_{j-1}^2+\alpha_j^2}. For x=Ajq1\mathbf{x}=\mathbf{A}^j\mathbf{q}_1, the green term has length β1β2⋯βj\beta_1\beta_2\cdots\beta_j, so

    f=β1β2⋯βj∥Ajq1∥.f=\frac{\beta_1\beta_2\cdots\beta_j}{\|\mathbf{A}^j\mathbf{q}_1\|}.

    Up to scaling, the powers q1,Aq1,A2q1,…\mathbf{q}_1,\mathbf{A}\mathbf{q}_1,\mathbf{A}^2\mathbf{q}_1,\dots are the iterates of power iteration started from q1\mathbf{q}_1 (Section 3), which, under the hypotheses of Theorem 1, converge up to sign to the dominant eigenvector, so the angle between Ajq1\mathbf{A}^j\mathbf{q}_1 and the previous power Aj−1q1\mathbf{A}^{j-1}\mathbf{q}_1, which lies in Kj(A,q1)\mathcal{K}_j(\mathbf{A},\mathbf{q}_1), tends to 00. As a result, this ratio shrinks Write vk=Akq1/∥Akq1∥\mathbf{v}_k=\mathbf{A}^k\mathbf{q}_1/\|\mathbf{A}^k\mathbf{q}_1\| for the iterates of power iteration started from q1\mathbf{q}_1, and s=sgn⁡(λ⋆)s=\operatorname{sgn}(\lambda_\star). The green term of vj\mathbf{v}_j has length ff and is orthogonal to Kj(A,q1)\mathcal{K}_j(\mathbf{A},\mathbf{q}_1), so ff is the distance from vj\mathbf{v}_j to this subspace, which contains s vj−1s\,\mathbf{v}_{j-1}. Under the hypotheses of Theorem 1, skvks^k\mathbf{v}_k lies within (ρ2/∣λ⋆∣)ktan⁡(ϕ0)(\rho_2/|\lambda_\star|)^k\tan(\phi_0) of q⋆\mathbf{q}_\star for every kk, and since s2=1s^2=1, f≤∥vj−s vj−1∥=∥sjvj−sj−1vj−1∥≤∥sjvj−q⋆∥+∥q⋆−sj−1vj−1∥≤2(ρ2∣λ⋆∣)j−1tan⁡(ϕ0).f\le\|\mathbf{v}_j-s\,\mathbf{v}_{j-1}\|=\|s^j\mathbf{v}_j-s^{j-1}\mathbf{v}_{j-1}\|\le\|s^j\mathbf{v}_j-\mathbf{q}_\star\|+\|\mathbf{q}_\star-s^{j-1}\mathbf{v}_{j-1}\|\le2\left(\dfrac{\rho_2}{|\lambda_\star|}\right)^{j-1}\tan(\phi_0). This bound uses only the last power in Kj(A,q1)\mathcal{K}_j(\mathbf{A},\mathbf{q}_1). Using all of them gives the much faster decrease seen in practice. with jj, and in practice much faster, since Kj(A,q1)\mathcal{K}_j(\mathbf{A},\mathbf{q}_1) contains all the earlier powers, not only the last one. For example, we ran both methods in double precision on the diagonal matrix of size 10001000 with eigenvalues drawn uniformly from [0,1][0,1], from a random unit vector q1\mathbf{q}_1, and measured the ratios:

    step jj115510102020
    ff for Ajq1\mathbf{A}^j\mathbf{q}_10.50.54⋅10−34\cdot10^{-3}6⋅10−66\cdot10^{-6}8⋅10−128\cdot10^{-12}
    ff for Aqj\mathbf{A}\mathbf{q}_j0.50.50.40.40.40.40.40.4

    The same runs also measured how far each computed basis is from orthonormal. Let Qm\mathbf{Q}_m be the matrix whose columns are the first mm computed basis vectors. The entries of Qm⊤Qm−Im\mathbf{Q}_m^\top\mathbf{Q}_m-\mathbb{I}_m are the numbers qi⊤qk−δik\mathbf{q}_i^\top\mathbf{q}_k-\delta_{ik}, so its norm is 00 for an exactly orthonormal basis, and close to 11 when two of the basis vectors are nearly parallel. The measured norms are:

    number mm of basis vectors1010202025253030
    basis from the powers Ajq1\mathbf{A}^j\mathbf{q}_19⋅10−119\cdot10^{-11}4⋅10−34\cdot10^{-3}0.90.90.90.9
    basis from the Lanczos recurrence, without reorthogonalization3⋅10−153\cdot10^{-15}5⋅10−155\cdot10^{-15}5⋅10−155\cdot10^{-15}6⋅10−156\cdot10^{-15}

    The basis built from the powers thus loses its orthogonality step by step and is far from orthonormal after 2525 vectors, while the Lanczos basis stays orthonormal to within 10−1410^{-14}.

  • Second, it skips the coefficients that vanish. Full Gram–Schmidt on Aqj\mathbf{A}\mathbf{q}_j computes the jj coefficients qi⊤Aqj\mathbf{q}_i^\top\mathbf{A}\mathbf{q}_j, i=1,…,ji=1,\dots,j, and subtracts the jj terms, which costs O(jd)O(jd) operations at step jj, a cost that grows with jj. By symmetry, the coefficients with i≤j−2i\le j-2 are zero, as shown in the general step above. The Lanczos method therefore computes only αj\alpha_j, reuses βj−1\beta_{j-1}, and subtracts two terms, so that every step costs one product and O(d)O(d) further operations, whatever jj. This saving has a price in floating-point arithmetic. The proof that qi⊤Aqj=0\mathbf{q}_i^\top\mathbf{A}\mathbf{q}_j=0 for i≤j−2i\le j-2 uses that qj\mathbf{q}_j is exactly orthogonal to q1,…,qj−1\mathbf{q}_1,\dots,\mathbf{q}_{j-1}, and the computed basis vectors are orthogonal only up to rounding errors. The skipped coefficients are therefore small but not zero, and since the method does not remove them, they stay in the computed rj\mathbf{r}_j. For i≤j−2i\le j-2, the new basis vector qj+1=rj/βj\mathbf{q}_{j+1}=\mathbf{r}_j/\beta_j then has, up to the rounding errors of step jj itself, the component

    qi⊤qj+1=qi⊤Aqj−βj−1 qi⊤qj−1−αj qi⊤qjβj\mathbf{q}_i^\top\mathbf{q}_{j+1} =\frac{\mathbf{q}_i^\top\mathbf{A}\mathbf{q}_j-\beta_{j-1}\,\mathbf{q}_i^\top\mathbf{q}_{j-1}-\alpha_j\,\mathbf{q}_i^\top\mathbf{q}_j}{\beta_j}

    on the earlier vector qi\mathbf{q}_i, which is zero in exact arithmetic. Its numerator is made of inner products between earlier basis vectors: qi⊤qj−1\mathbf{q}_i^\top\mathbf{q}_{j-1} and qi⊤qj\mathbf{q}_i^\top\mathbf{q}_j directly, and qi⊤Aqj=(Aqi)⊤qj\mathbf{q}_i^\top\mathbf{A}\mathbf{q}_j=(\mathbf{A}\mathbf{q}_i)^\top\mathbf{q}_j through the recurrence Aqi=βi−1qi−1+αiqi+βiqi+1\mathbf{A}\mathbf{q}_i=\beta_{i-1}\mathbf{q}_{i-1}+\alpha_i\mathbf{q}_i+\beta_i\mathbf{q}_{i+1}, up to rounding. The loss of orthogonality of the previous steps thus feeds into every new basis vector, and it accumulates. The same runs as in the first item measured ∥Qm⊤Qm−Im∥\lVert\mathbf{Q}_m^\top\mathbf{Q}_m-\mathbb{I}_m\rVert for the Lanczos basis, without reorthogonalization and with the reorthogonalization of Algorithm 2 described below:

    number mm of basis vectors3030100100150150200200
    without reorthogonalization6⋅10−156\cdot10^{-15}3⋅10−123\cdot10^{-12}6⋅10−106\cdot10^{-10}1⋅10−61\cdot10^{-6}
    with reorthogonalization9⋅10−169\cdot10^{-16}1⋅10−151\cdot10^{-15}1⋅10−151\cdot10^{-15}1⋅10−151\cdot10^{-15}

    Without reorthogonalization, the loss is much slower than for the powers, where it reached 0.90.9 after 2525 vectors, but it does not stop. This is why Algorithm 2 below reorthogonalizes: after the three-term step, it removes from rj\mathbf{r}_j its components on all the stored basis vectors q1,…,qj\mathbf{q}_1,\dots,\mathbf{q}_j once more, here in two passes, and the basis then stays orthonormal to about 10−1510^{-15} at every mm of the table. This gives back the O(jd)O(jd) cost per step that symmetry had saved. Unlike Gram–Schmidt on the powers, however, this extra pass is accurate. The components it removes have the size of the loss of orthogonality, tiny compared with ∥rj∥\|\mathbf{r}_j\|, so the ratio ff of the first item is close to 11 for it.

Eigenvalues and eigenvectors from the coefficients. After mm steps, the coefficients fill the m×mm\times m tridiagonal matrix

Tm=[α1β1β1α2β2⋱⋱⋱βm−2αm−1βm−1βm−1αm],\mathbf{T}_m=\begin{bmatrix} \alpha_1&\beta_1&&&\\ \beta_1&\alpha_2&\beta_2&&\\ &\ddots&\ddots&\ddots&\\ &&\beta_{m-2}&\alpha_{m-1}&\beta_{m-1}\\ &&&\beta_{m-1}&\alpha_m \end{bmatrix},

and the mm recurrences Aqj=βj−1qj−1+αjqj+βjqj+1\mathbf{A}\mathbf{q}_j=\beta_{j-1}\mathbf{q}_{j-1}+\alpha_j\mathbf{q}_j+\beta_j\mathbf{q}_{j+1}, for j=1,…,mj=1,\dots,m, combine into Compare the columns. Column jj of AQm\mathbf{A}\mathbf{Q}_m is Aqj\mathbf{A}\mathbf{q}_j. Column jj of QmTm\mathbf{Q}_m\mathbf{T}_m is Qm\mathbf{Q}_m times column jj of Tm\mathbf{T}_m, whose only nonzero entries are βj−1\beta_{j-1}, αj\alpha_j and βj\beta_j, in rows j−1j-1, jj and j+1j+1. It is therefore βj−1qj−1+αjqj+βjqj+1\beta_{j-1}\mathbf{q}_{j-1}+\alpha_j\mathbf{q}_j+\beta_j\mathbf{q}_{j+1}, without the first term when j=1j=1 since β0=0\beta_0=0, which is Aqj\mathbf{A}\mathbf{q}_j by the recurrence. The last column is the exception: Tm\mathbf{T}_m has no row m+1m+1, so column mm of QmTm\mathbf{Q}_m\mathbf{T}_m stops at βm−1qm−1+αmqm\beta_{m-1}\mathbf{q}_{m-1}+\alpha_m\mathbf{q}_m and misses the term βmqm+1\beta_m\mathbf{q}_{m+1} of the recurrence. The green matrix βmqm+1em⊤\beta_m\mathbf{q}_{m+1}\mathbf{e}_m^\top adds it back: its columns are zero except the last, which is βmqm+1\beta_m\mathbf{q}_{m+1}.:

AQm=QmTm+βmqm+1em⊤,\mathbf{A}\mathbf{Q}_m=\mathbf{Q}_m\mathbf{T}_m+\textcolor{#16a34a}{\beta_m\mathbf{q}_{m+1}\mathbf{e}_m^\top},

where em\mathbf{e}_m is the last standard basis vector of Rm\mathbb{R}^m. Inside Km(A,q1)=span⁡{q1,…,qm}\mathcal{K}_m(\mathbf{A},\mathbf{q}_1)=\operatorname{span}\{\mathbf{q}_1,\dots,\mathbf{q}_m\}, the matrix A\mathbf{A} acts on coordinates as the small matrix Tm\mathbf{T}_m, except for the green term, through which the last basis vector leaks out of the subspace. Every eigenpair (ϑ,y)(\vartheta,\mathbf{y}) of Tm\mathbf{T}_m, with ∥y∥=1\|\mathbf{y}\|=1, therefore gives a candidate eigenpair (ϑ,Qmy)(\vartheta,\mathbf{Q}_m\mathbf{y}) of A\mathbf{A}. Such a candidate is called a Ritz pair: the Ritz value ϑ\vartheta estimates an eigenvalue of A\mathbf{A}, and the Ritz vector Qmy\mathbf{Q}_m\mathbf{y}, a unit vector of Km(A,q1)\mathcal{K}_m(\mathbf{A},\mathbf{q}_1), estimates a corresponding eigenvector. Lemma 4 states their properties. In short,

A⏟d×d  ⟶  Tm=Qm⊤AQm⏟m×m  ⟶  (ϑ,y)  ⟶  (ϑ,Qmy).\underbrace{\mathbf{A}}_{d\times d} \;\longrightarrow\; \underbrace{\mathbf{T}_m=\mathbf{Q}_m^\top\mathbf{A}\mathbf{Q}_m}_{m\times m} \;\longrightarrow\; (\vartheta,\mathbf{y}) \;\longrightarrow\; (\vartheta,\mathbf{Q}_m\mathbf{y}).

Multiplying the matrix identity AQm=QmTm+βmqm+1em⊤\mathbf{A}\mathbf{Q}_m=\mathbf{Q}_m\mathbf{T}_m+\textcolor{#16a34a}{\beta_m\mathbf{q}_{m+1}\mathbf{e}_m^\top} above on the right by y\mathbf{y} gives

AQmy=QmTmy+βmqm+1 (em⊤y)=ϑ Qmy+βm ym qm+1.\mathbf{A}\mathbf{Q}_m\mathbf{y} =\mathbf{Q}_m\mathbf{T}_m\mathbf{y}+\textcolor{#16a34a}{\beta_m\mathbf{q}_{m+1}\,(\mathbf{e}_m^\top\mathbf{y})} =\vartheta\,\mathbf{Q}_m\mathbf{y}+\textcolor{#16a34a}{\beta_m\,y_m\,\mathbf{q}_{m+1}}.

The residual of the Ritz pair is therefore exactly the leak, and since qm+1\mathbf{q}_{m+1} is a unit vector,

∥AQmy−ϑ Qmy∥=βm∣ym∣.\bigl\|\mathbf{A}\mathbf{Q}_m\mathbf{y}-\vartheta\,\mathbf{Q}_m\mathbf{y}\bigr\|=\beta_m|y_m| .

The residual is available without any further product, and Lemma 2 turns it into a certificate. The basis vectors are building blocks, not approximate eigenvectors. An approximate eigenvector Qmy\mathbf{Q}_m\mathbf{y} combines all of them, so the basis must be stored to form it, whereas the Ritz values need only the numbers αj\alpha_j and βj\beta_j.

Gram–Schmidt also explains why the Ritz values approach eigenvalues. The argument has three steps.

  • First, the green term of Amq1\mathbf{A}^m\mathbf{q}_1 has the smallest Euclidean norm among the vectors of a certain form. As shown above with j=mj=m, Amq1=β1β2⋯βm qm+1+km\mathbf{A}^m\mathbf{q}_1=\textcolor{#16a34a}{\beta_1\beta_2\cdots\beta_m\,\mathbf{q}_{m+1}}+\mathbf{k}_m with km∈Km(A,q1)\mathbf{k}_m\in\mathcal{K}_m(\mathbf{A},\mathbf{q}_1). Every k∈Km(A,q1)\mathbf{k}\in\mathcal{K}_m(\mathbf{A},\mathbf{q}_1) is a combination of q1,Aq1,…,Am−1q1\mathbf{q}_1,\mathbf{A}\mathbf{q}_1,\dots,\mathbf{A}^{m-1}\mathbf{q}_1, say k=∑i=0m−1aiAiq1\mathbf{k}=\sum_{i=0}^{m-1}a_i\mathbf{A}^i\mathbf{q}_1, so Amq1−k=π(A)q1\mathbf{A}^m\mathbf{q}_1-\mathbf{k} %=\mathbf{A}^m\mathbf{q}_1-\sum_{i=0}^{m-1}a_i\mathbf{A}^i\mathbf{q}_1 =\pi(\mathbf{A})\mathbf{q}_1 with π(t)=tm−∑i=0m−1ai ti\pi(t)=t^m-\sum_{i=0}^{m-1}a_i\,t^i a A polynomial of degree mm is called monic if its coefficient of tmt^m is 11, i.e. if it has the form t↦tm+∑i=m−10ci tit\mapsto t^m+\sum_{i=m-1}^{0}c_i\,t^i. of degree mm. Conversely, any monic polynomial tm+∑i=0m−1ci tit^m+\sum_{i=0}^{m-1}c_i\,t^i of degree mm arises in this way from ai=−cia_i=-c_i. The vectors Amq1−k\mathbf{A}^m\mathbf{q}_1-\mathbf{k} with k∈Km(A,q1)\mathbf{k}\in\mathcal{K}_m(\mathbf{A},\mathbf{q}_1) are therefore exactly the vectors π(A)q1\pi(\mathbf{A})\mathbf{q}_1 with π\pi monic of degree mm. Each of them is the green term β1β2⋯βm qm+1\textcolor{#16a34a}{\beta_1\beta_2\cdots\beta_m\,\mathbf{q}_{m+1}} plus km−k∈Km(A,q1)\mathbf{k}_m-\mathbf{k}\in\mathcal{K}_m(\mathbf{A},\mathbf{q}_1), two orthogonal vectors, so Pythagoras’ theorem gives ∥Amq1−k∥2=(β1⋯βm)2+∥km−k∥2\|\mathbf{A}^m\mathbf{q}_1-\mathbf{k}\|^2=(\beta_1\cdots\beta_m)^2+\|\mathbf{k}_m-\mathbf{k}\|^2, which is smallest for k=km\mathbf{k}=\mathbf{k}_m, where the vector is the green term itself. Among the vectors π(A)q1\pi(\mathbf{A})\mathbf{q}_1 with π\pi monic of degree mm, the green term thus has the smallest Euclidean norm ∥π(A)q1∥\|\pi(\mathbf{A})\mathbf{q}_1\|. Its own polynomial follows from qm+1=pm(A)q1\mathbf{q}_{m+1}=p_m(\mathbf{A})\mathbf{q}_1: the green term is πm(A)q1\pi_m(\mathbf{A})\mathbf{q}_1 for πm(t)=β1⋯βm pm(t)\pi_m(t)=\beta_1\cdots\beta_m\,p_m(t), which is monic because pmp_m has leading coefficient 1/(β1⋯βm)1/(\beta_1\cdots\beta_m). Hence πm\pi_m minimizes ∥π(A)q1∥\|\pi(\mathbf{A})\mathbf{q}_1\| over the monic polynomials of degree mm. Recall the inner product on polynomials defined with the three-term recurrence, ⟨p,r⟩=(p(A)q1)⊤r(A)q1=∑λp(λ) r(λ) ∥Πλq1∥2\langle p,r\rangle=\bigl(p(\mathbf{A})\mathbf{q}_1\bigr)^\top r(\mathbf{A})\mathbf{q}_1=\sum_\lambda p(\lambda)\,r(\lambda)\,\|\Pi_\lambda\mathbf{q}_1\|^2. It gives ∥π(A)q1∥2=⟨π,π⟩\|\pi(\mathbf{A})\mathbf{q}_1\|^2=\langle\pi,\pi\rangle, so this Euclidean norm of the vector π(A)q1\pi(\mathbf{A})\mathbf{q}_1 is also the norm of the polynomial π\pi for that inner product, and with its expression as a sum over the eigenvalues, the minimization reads

    ∑λ∈Λ(A)πm(λ)2 ∥Πλq1∥2=min⁡π monic, deg⁡π=m ∑λ∈Λ(A)π(λ)2 ∥Πλq1∥2.\sum_{\lambda\in\Lambda(\mathbf{A})}\pi_m(\lambda)^2\,\|\Pi_\lambda\mathbf{q}_1\|^2 =\min_{\pi\ \text{monic},\ \deg\pi=m}\ \sum_{\lambda\in\Lambda(\mathbf{A})}\pi(\lambda)^2\,\|\Pi_\lambda\mathbf{q}_1\|^2 .

    In words, πm\pi_m is the monic polynomial of degree mm that is smallest on the eigenvalues of A\mathbf{A}, each eigenvalue weighted by ∥Πλq1∥2\|\Pi_\lambda\mathbf{q}_1\|^2, the squared length of the component of q1\mathbf{q}_1 in its eigenspace.

  • Second, the Ritz values at step mm are exactly the roots of πm\pi_m, because Let Dk(t)=det⁡(t Ik−Tk)D_k(t)=\det(t\,\mathbb{I}_k-\mathbf{T}_k), with D0=1D_0=1 and D−1=0D_{-1}=0. The matrix t Ik−Tkt\,\mathbb{I}_k-\mathbf{T}_k is tridiagonal, and its last row has only two nonzero entries, −βk−1-\beta_{k-1} and t−αkt-\alpha_k. Expanding the determinant along this row, and the remaining minor along its last column, gives Dk(t)=(t−αk) Dk−1(t)−βk−12 Dk−2(t).D_k(t)=(t-\alpha_k)\,D_{k-1}(t)-\beta_{k-1}^2\,D_{k-2}(t). Multiplying the recurrence βk pk=(t−αk) pk−1−βk−1 pk−2\beta_k\,p_k=(t-\alpha_k)\,p_{k-1}-\beta_{k-1}\,p_{k-2} by β1⋯βk−1\beta_1\cdots\beta_{k-1} shows that Pk=β1⋯βk pkP_k=\beta_1\cdots\beta_k\,p_k satisfies the same recurrence, Pk(t)=(t−αk) Pk−1(t)−βk−12 Pk−2(t),P_k(t)=(t-\alpha_k)\,P_{k-1}(t)-\beta_{k-1}^2\,P_{k-2}(t), with the same starting values P0=1P_0=1 and P−1=0P_{-1}=0. Hence Dk=PkD_k=P_k for every kk, and in particular det⁡(t Im−Tm)=Pm=πm\det(t\,\mathbb{I}_m-\mathbf{T}_m)=P_m=\pi_m.. If ϑ1,…,ϑm\vartheta_1,\dots,\vartheta_m are the Ritz values, then πm(t)=∏i=1m(t−ϑi)\pi_m(t)=\prod_{i=1}^m(t-\vartheta_i).

  • Third, the two steps combine into one statement. Any mm real numbers z1,…,zmz_1,\dots,z_m define the monic polynomial ∏i=1m(t−zi)\prod_{i=1}^m(t-z_i) of degree mm, and πm\pi_m is of this form with zi=ϑiz_i=\vartheta_i, since Tm\mathbf{T}_m is symmetric and its eigenvalues are real. Since πm\pi_m minimizes over all monic polynomials of degree mm, the Ritz values minimize in particular, over all (z1,…,zm)∈Rm(z_1,\dots,z_m)\in\mathbb{R}^m, the sum

    ∑λ∈Λ(A)∥Πλq1∥2∏i=1m(λ−zi)2.\sum_{\lambda\in\Lambda(\mathbf{A})}\|\Pi_\lambda\mathbf{q}_1\|^2\prod_{i=1}^m(\lambda-z_i)^2 .

    Each term is the weight of an eigenvalue λ\lambda times the product of its squared distances to z1,…,zmz_1,\dots,z_m. A term with a large weight is reduced by placing one of the ziz_i close to its eigenvalue, and this is why the Ritz values approach the eigenvalues that q1\mathbf{q}_1 contains. Two statements make this exact. When mm equals the number ss of eigenvalues with Πλq1≠0\Pi_\lambda\mathbf{q}_1\neq0, choosing the ziz_i equal to these eigenvalues makes the sum zero, so the minimum is zero, β1⋯βs=0\beta_1\cdots\beta_s=0, hence βs=0\beta_s=0, and the Ritz values are exactly these eigenvalues (Proposition 3). Before that, Lemma 5 shows that the extreme Ritz values move monotonically toward λmin⁡(A)\lambda_{\min}(\mathbf{A}) and λmax⁡(A)\lambda_{\max}(\mathbf{A}).

4.4 A three-dimensional example

The steps of Section 4.3 can be followed with numbers on a small matrix. Take

A=[100020003],q1=13[111].\mathbf{A}=\begin{bmatrix}1&0&0\\0&2&0\\0&0&3\end{bmatrix}, \qquad \mathbf{q}_1=\frac{1}{\sqrt{3}}\begin{bmatrix}1\\1\\1\end{bmatrix}.

Step 1. The candidate Aq1=13[1,2,3]⊤\mathbf{A}\mathbf{q}_1=\frac{1}{\sqrt3}[1,2,3]^\top has the coefficient α1=q1⊤Aq1=2\alpha_1=\mathbf{q}_1^\top\mathbf{A}\mathbf{q}_1=2 on q1\mathbf{q}_1, and there is no q0\mathbf{q}_0 to remove. The rest, r1=13[−1,0,1]⊤\mathbf{r}_1=\frac{1}{\sqrt3}[-1,0,1]^\top, has length β1=2/3\beta_1=\sqrt{2/3} and gives q2=12[−1,0,1]⊤\mathbf{q}_2=\frac{1}{\sqrt2}[-1,0,1]^\top.

Step 2. The candidate Aq2=12[−1,0,3]⊤\mathbf{A}\mathbf{q}_2=\frac{1}{\sqrt2}[-1,0,3]^\top has the coefficient q1⊤Aq2=2/3=β1\mathbf{q}_1^\top\mathbf{A}\mathbf{q}_2=\sqrt{2/3}=\beta_1 on q1\mathbf{q}_1, as symmetry predicts, and the coefficient α2=2\alpha_2=2 on q2\mathbf{q}_2. Removing both leaves r2=132[1,−2,1]⊤\mathbf{r}_2=\frac{1}{3\sqrt2}[1,-2,1]^\top, of length β2=1/3\beta_2=1/\sqrt3, which gives q3=16[1,−2,1]⊤\mathbf{q}_3=\frac{1}{\sqrt6}[1,-2,1]^\top.

Step 3. The candidate Aq3=16[1,−4,3]⊤\mathbf{A}\mathbf{q}_3=\frac{1}{\sqrt6}[1,-4,3]^\top minus β2q2\beta_2\mathbf{q}_2 equals 16[2,−4,2]⊤=2q3\frac{1}{\sqrt6}[2,-4,2]^\top=2\mathbf{q}_3. Hence α3=2\alpha_3=2 and r3=0\mathbf{r}_3=0, an exact breakdown: K3(A,q1)\mathcal{K}_3(\mathbf{A},\mathbf{q}_1) is already all of R3\mathbb{R}^3, so no new direction exists.

The small matrices are

T1=[2],T2=[22/32/32],T3=[22/302/321/301/32],\mathbf{T}_1=\begin{bmatrix}2\end{bmatrix}, \qquad \mathbf{T}_2=\begin{bmatrix}2&\sqrt{2/3}\\\sqrt{2/3}&2\end{bmatrix}, \qquad \mathbf{T}_3=\begin{bmatrix}2&\sqrt{2/3}&0\\\sqrt{2/3}&2&1/\sqrt3\\0&1/\sqrt3&2\end{bmatrix},

and their eigenvalues, the Ritz values, are {2}\{2\}, then {2−2/3, 2+2/3}≈{1.18, 2.82}\{2-\sqrt{2/3},\,2+\sqrt{2/3}\}\approx\{1.18,\,2.82\}, then {1,2,3}\{1,2,3\}. The extreme Ritz values move outward toward the extreme eigenvalues 11 and 33, as Lemma 5 guarantees. At m=3m=3, they are exactly the eigenvalues of A\mathbf{A}, as Proposition 3 guarantees for a starting vector with a nonzero component on every eigenvector. At m=2m=2, the eigenvectors of T2\mathbf{T}_2 are 12[1,±1]⊤\frac{1}{\sqrt2}[1,\pm1]^\top, so both Ritz pairs have residual β2∣y2∣=13⋅12≈0.41\beta_2|y_2|=\frac{1}{\sqrt3}\cdot\frac{1}{\sqrt2}\approx0.41 (Lemma 4). This bounds their actual distances to the spectrum, 0.180.18 in both cases (Lemma 2). For comparison, power iteration from the same q1\mathbf{q}_1 estimates λmax⁡(A)=3\lambda_{\max}(\mathbf{A})=3 after the same two products by v1⊤Av1=36/14≈2.57\mathbf{v}_1^\top\mathbf{A}\mathbf{v}_1=36/14\approx2.57, with v1=Aq1/∥Aq1∥\mathbf{v}_1=\mathbf{A}\mathbf{q}_1/\|\mathbf{A}\mathbf{q}_1\|, which is farther from 33 than the Ritz value 2.822.82. In the polynomial reading of Section 4.3, the Ritz values 2±2/32\pm\sqrt{2/3} are the roots of π2(t)=(t−2)2−2/3\pi_2(t)=(t-2)^2-2/3, the monic quadratic that makes ∥π(A)q1∥\|\pi(\mathbf{A})\mathbf{q}_1\| smallest, and at m=3m=3 the polynomial (t−1)(t−2)(t−3)(t-1)(t-2)(t-3) makes it zero, which is the breakdown.

4.5 Definition 2 [Lanczos recurrence and exact breakdown]

The Lanczos construction starts with

q0=0,β0=0,∥q1∥=1.\mathbf{q}_0=0, \qquad \beta_0=0, \qquad \|\mathbf{q}_1\|=1 .

At iteration j≥1j\ge1, compute

zj=Aqj−βj−1qj−1,αj=qj⊤zj,rj=zj−αjqj,βj=∥rj∥.\begin{aligned} \mathbf{z}_j&=\mathbf{A}\mathbf{q}_j-\beta_{j-1}\mathbf{q}_{j-1},\\ \alpha_j&=\mathbf{q}_j^\top\mathbf{z}_j,\\ \mathbf{r}_j&=\mathbf{z}_j-\alpha_j\mathbf{q}_j,\\ \beta_j&=\|\mathbf{r}_j\| . \end{aligned}

If βj>0\beta_j>0, define qj+1=rj/βj\mathbf{q}_{j+1}=\mathbf{r}_j/\beta_j and continue. If βj=0\beta_j=0, stop the current run. We refer to this event as an exact breakdown. As shown below, it means that the generated subspace is invariant under A\mathbf{A}.

■□\begin{array}{r} \blacksquare\Box \end{array}

The vectors qj\mathbf{q}_j are basis vectors, not generally eigenvectors of A\mathbf{A}. Each step orthogonalizes Aqj\mathbf{A}\mathbf{q}_j against the two most recent basis vectors only, for the reasons given in Section 4.3. This Orthogonalizing Aqj\mathbf A\mathbf q_j against every previous basis vector, as in Gram–Schmidt, would cost more at every step. For symmetric A\mathbf A, the coefficients against q1,…,qj−2\mathbf q_1,\dots,\mathbf q_{j-2} vanish (Lemma 3), so the two coefficients αj\alpha_j and βj−1\beta_{j-1} suffice. is enough because A\mathbf{A} is symmetric. The following lemma shows that, in exact arithmetic, Aqj\mathbf{A}\mathbf{q}_j is automatically orthogonal to q1,…,qj−2\mathbf{q}_1,\dots,\mathbf{q}_{j-2}, so the projected matrix is tridiagonal and each step costs one product plus O(d)O(d) further operations.

4.6 Lemma 3 [Orthogonality and tridiagonal projection]

Before and including the first exact breakdown, the Lanczos vectors satisfy

qi⊤qj=δij,span⁡{q1,…,qm}=Km(A,q1).\mathbf{q}_i^\top\mathbf{q}_j=\delta_{ij}, \qquad \operatorname{span}\{\mathbf{q}_1,\dots,\mathbf{q}_m\}=\mathcal{K}_m(\mathbf{A},\mathbf{q}_1).

Let Qm=[q1,…,qm]\mathbf{Q}_m=[\mathbf{q}_1,\dots,\mathbf{q}_m], and let Tm∈Rm×m\mathbf{T}_m\in\mathbb{R}^{m\times m} be the symmetric tridiagonal matrix

Tm=[α1β1β1α2β2⋱⋱⋱βm−2αm−1βm−1βm−1αm],\mathbf{T}_m= \begin{bmatrix} \alpha_1&\beta_1&&&\\ \beta_1&\alpha_2&\beta_2&&\\ &\ddots&\ddots&\ddots&\\ &&\beta_{m-2}&\alpha_{m-1}&\beta_{m-1}\\ &&&\beta_{m-1}&\alpha_m \end{bmatrix},

that is, (Tm)ii=αi(\mathbf{T}_m)_{ii}=\alpha_i for 1≤i≤m1\le i\le m, (Tm)i,i+1=(Tm)i+1,i=βi(\mathbf{T}_m)_{i,i+1}=(\mathbf{T}_m)_{i+1,i}=\beta_i for 1≤i<m1\le i<m, and all other entries equal to zero. Then

AQm=QmTm+rmem⊤.\mathbf{A}\mathbf{Q}_m=\mathbf{Q}_m\mathbf{T}_m+\mathbf{r}_m\mathbf{e}_m^\top .

Moreover,

Qm⊤rm=0,Tm=Qm⊤AQm.\mathbf{Q}_m^\top\mathbf{r}_m=0, \qquad \mathbf{T}_m=\mathbf{Q}_m^\top\mathbf{A}\mathbf{Q}_m .

Remark 12 [What the tridiagonal matrix represents]

The identity Tm=Qm⊤AQm\mathbf{T}_m=\mathbf{Q}_m^\top\mathbf{A}\mathbf{Q}_m says that Tm\mathbf{T}_m represents A\mathbf{A} compressed to the Krylov subspace, in the orthonormal basis q1,…,qm\mathbf{q}_1,\dots,\mathbf{q}_m. The rank-one term rmem⊤\mathbf{r}_m\mathbf{e}_m^\top measures how far that subspace is from being invariant under A\mathbf{A}: only the image of the last basis vector leaves it.

Proof

Orthogonality. We argue by induction. The initial vector is normalized by assumption. Suppose that q1,…,qj\mathbf{q}_1,\dots,\mathbf{q}_j are orthonormal and that the previous iterations have been completed. We show that rj\mathbf{r}_j is orthogonal to each qi\mathbf{q}_i with i≤ji\le j.

The case i=ji=j. Since qj⊤qj−1=0\mathbf{q}_j^\top\mathbf{q}_{j-1}=0, with q0=0\mathbf{q}_0=0 when j=1j=1, we have αj=qj⊤zj=qj⊤(Aqj−βj−1qj−1)=qj⊤Aqj\alpha_j=\mathbf{q}_{j}^\top\mathbf{z}_j=\mathbf{q}_j^\top\bigl(\mathbf{A}\mathbf{q}_j-\beta_{j-1}\mathbf{q}_{j-1}\bigr)=\mathbf{q}_j^\top\mathbf{A}\mathbf{q}_j. Therefore, qj⊤rj=qj⊤zj−αjqj⊤qj=αj−αj=0\mathbf{q}_j^\top\mathbf{r}_j =\mathbf{q}_j^\top\mathbf{z}_j-\alpha_j\mathbf{q}_j^\top\mathbf{q}_j =\alpha_j-\alpha_j =0.

The case i=j−1i=j-1, for j≥2j\ge2. The previous recurrence gives Aqj−1=βj−2qj−2+αj−1qj−1+βj−1qj\mathbf{A}\mathbf{q}_{j-1}=\beta_{j-2}\mathbf{q}_{j-2}+\alpha_{j-1}\mathbf{q}_{j-1}+\beta_{j-1}\mathbf{q}_j. Using symmetry,

qj−1⊤rj=qj−1⊤zj−αjqj−1⊤qj⏟=0=qj−1⊤(Aqj−βj−1qj−1)=qj−1⊤Aqj−βj−1=(Aqj−1)⊤qj−βj−1=βj−1−βj−1=0.\begin{aligned} \mathbf{q}_{j-1}^\top\mathbf{r}_j &=\mathbf{q}_{j-1}^\top\mathbf{z}_j-\alpha_j\underbrace{\mathbf{q}_{j-1}^\top\mathbf{q}_j}_{=0} \\ &=\mathbf{q}_{j-1}^\top \bigl(\mathbf{A}\mathbf{q}_j-\beta_{j-1}\mathbf{q}_{j-1}\bigr) =\mathbf{q}_{j-1}^\top\mathbf{A}\mathbf{q}_j-\beta_{j-1} \\ &=\textcolor{#2563eb}{(\mathbf{A}\mathbf{q}_{j-1})^\top\mathbf{q}_j}-\beta_{j-1} =\beta_{j-1}-\beta_{j-1}=0. \end{aligned}

The case i≤j−2i\le j-2. The recurrence at step ii shows that Aqi∈span⁡{q1,…,qi+1}\mathbf{A}\mathbf{q}_i\in\operatorname{span}\{\mathbf{q}_1,\dots,\mathbf{q}_{i+1}\}. Since i+1≤j−1i+1\le j-1, this vector is orthogonal to qj\mathbf{q}_j. Hence

qi⊤rj=qi⊤zj−αjqi⊤qj⏟=0=qi⊤Aqj−βj−1qi⊤qj−1⏟=0=(Aqi)⊤qj=βi−1qi−1⊤qj⏟=0+αiqi⊤qj⏟=0+βiqi+1⊤qj⏟=0=0.\begin{aligned} \mathbf{q}_i^\top\mathbf{r}_j &=\mathbf{q}_i^\top\mathbf{z}_j-\alpha_j\underbrace{\mathbf{q}_i^\top\mathbf{q}_j}_{=0} =\mathbf{q}_i^\top\mathbf{A}\mathbf{q}_j-\beta_{j-1}\underbrace{\mathbf{q}_i^\top\mathbf{q}_{j-1}}_{=0} \\ &=\textcolor{#2563eb}{(\mathbf{A}\mathbf{q}_i)^\top\mathbf{q}_j} =\beta_{i-1}\underbrace{\mathbf{q}_{i-1}^\top\mathbf{q}_j}_{=0}+\alpha_i\underbrace{\mathbf{q}_i^\top\mathbf{q}_j}_{=0}+\beta_i\underbrace{\mathbf{q}_{i+1}^\top\mathbf{q}_j}_{=0} =0 . \end{aligned}

The first line expands zj=Aqj−βj−1qj−1\mathbf{z}_j=\mathbf{A}\mathbf{q}_j-\beta_{j-1}\mathbf{q}_{j-1}, and the two inner products vanish by the induction hypothesis, since ii differs from j−1j-1 and jj. The second line moves A\mathbf{A} onto qi\mathbf{q}_i by symmetry and expands Aqi=βi−1qi−1+αiqi+βiqi+1\mathbf{A}\mathbf{q}_i=\beta_{i-1}\mathbf{q}_{i-1}+\alpha_i\mathbf{q}_i+\beta_i\mathbf{q}_{i+1} by the recurrence at step ii, with q0=0\mathbf{q}_0=0 when i=1i=1, and its three terms are orthogonal to qj\mathbf{q}_j, as noted above. The blue terms are where symmetry enters. Moving A\mathbf{A} from qj\mathbf{q}_j onto an older basis vector qi\mathbf{q}_i turns the inner product into one with Aqi\mathbf{A}\mathbf{q}_i, and an earlier step of the recurrence has already expanded Aqi\mathbf{A}\mathbf{q}_i in the basis. This is why orthogonalizing against the two most recent vectors suffices.

Thus rj\mathbf{r}_j is orthogonal to every column of Qj\mathbf{Q}_j. If βj>0\beta_j>0, normalizing rj\mathbf{r}_j extends the orthonormal family.

Krylov subspaces. We prove span⁡{q1,…,qm}=Km(A,q1)\operatorname{span}\{\mathbf{q}_1,\dots,\mathbf{q}_m\}=\mathcal{K}_m(\mathbf{A},\mathbf{q}_1) by induction on mm. It holds at m=1m=1, since both sides equal span⁡{q1}\operatorname{span}\{\mathbf{q}_1\}. Suppose it holds at m=jm=j and βj>0\beta_j>0. Then βjqj+1=Aqj−βj−1qj−1−αjqj∈Kj+1(A,q1)\beta_j \mathbf{q}_{j+1}=\mathbf{A}\mathbf{q}_j-\beta_{j-1}\mathbf{q}_{j-1}-\alpha_j\mathbf{q}_j \in\mathcal{K}_{j+1}(\mathbf{A},\mathbf{q}_1), because qj−1\mathbf{q}_{j-1} and qj\mathbf{q}_j belong to Kj(A,q1)⊆Kj+1(A,q1)\mathcal{K}_j(\mathbf{A},\mathbf{q}_1)\subseteq\mathcal{K}_{j+1}(\mathbf{A},\mathbf{q}_1), and Aqj\mathbf{A}\mathbf{q}_j Since qj∈Kj(A,q1)\mathbf{q}_j\in\mathcal{K}_j(\mathbf{A},\mathbf{q}_1), there are numbers c0,…,cj−1c_0,\dots,c_{j-1} with qj=∑k=0j−1ckAkq1\mathbf{q}_j=\sum_{k=0}^{j-1}c_k\mathbf{A}^k\mathbf{q}_1, so Aqj=∑k=0j−1ckAk+1q1\mathbf{A}\mathbf{q}_j=\sum_{k=0}^{j-1}c_k\mathbf{A}^{k+1}\mathbf{q}_1 is a combination of Aq1,…,Ajq1\mathbf{A}\mathbf{q}_1,\dots,\mathbf{A}^j\mathbf{q}_1, which belong to Kj+1(A,q1)\mathcal{K}_{j+1}(\mathbf{A},\mathbf{q}_1) by Definition 1.. Consequently, span⁡{q1,…,qj+1}⊆Kj+1(A,q1)\operatorname{span}\{\mathbf{q}_1,\dots,\mathbf{q}_{j+1}\}\subseteq\mathcal{K}_{j+1}(\mathbf{A},\mathbf{q}_1). The left-hand side has dimension j+1j+1, because its vectors are orthonormal, so j+1≤dim⁡Kj+1(A,q1)j+1\le\dim\mathcal{K}_{j+1}(\mathbf{A},\mathbf{q}_1). We also have dim⁡Kj+1(A,q1)≤j+1\dim\mathcal{K}_{j+1}(\mathbf{A},\mathbf{q}_1)\le j+1, since Kj+1(A,q1)\mathcal{K}_{j+1}(\mathbf{A},\mathbf{q}_1) is generated by j+1j+1 vectors. We thus have dim⁡Kj+1(A,q1)=dim⁡span⁡{q1,…,qj+1}=j+1\dim\mathcal{K}_{j+1}(\mathbf{A},\mathbf{q}_1)=\dim\operatorname{span}\{\mathbf{q}_1,\dots,\mathbf{q}_{j+1}\}=j+1. The two spaces are therefore equal, since span⁡{q1,…,qj+1}\operatorname{span}\{\mathbf{q}_1,\dots,\mathbf{q}_{j+1}\} is contained in Kj+1(A,q1)\mathcal{K}_{j+1}(\mathbf{A},\mathbf{q}_1) and both have the same finite dimension.

Matrix identity. For each completed iteration j<mj<m, Aqj=βj−1qj−1+αjqj+βjqj+1\mathbf{A}\mathbf{q}_j=\beta_{j-1}\mathbf{q}_{j-1}+\alpha_j\mathbf{q}_j+\beta_j\mathbf{q}_{j+1}. For the final column, Aqm=βm−1qm−1+αmqm+rm\mathbf{A}\mathbf{q}_m=\beta_{m-1}\mathbf{q}_{m-1}+\alpha_m\mathbf{q}_m+\mathbf{r}_m. Collecting these identities column by column gives AQm=QmTm+rmem⊤\mathbf{A}\mathbf{Q}_m=\mathbf{Q}_m\mathbf{T}_m+\mathbf{r}_m\mathbf{e}_m^\top. Multiplying on the left by Qm⊤\mathbf{Q}_m^\top, and using Qm⊤Qm=Im\mathbf{Q}_m^\top\mathbf{Q}_m=\mathbb{I}_m and Qm⊤rm=0\mathbf{Q}_m^\top\mathbf{r}_m=0 gives Qm⊤AQm=Tm\mathbf{Q}_m^\top\mathbf{A}\mathbf{Q}_m=\mathbf{T}_m.

■□\begin{array}{r} \blacksquare\Box \end{array}

The residual form of this identity remains valid when βm=0\beta_m=0. When βm>0\beta_m>0, it can also be written as AQm=QmTm+βmqm+1em⊤\mathbf{A}\mathbf{Q}_m=\mathbf{Q}_m\mathbf{T}_m+\beta_m\mathbf{q}_{m+1}\mathbf{e}_m^\top. No vector qm+1\mathbf{q}_{m+1} needs to be defined at an exact breakdown.

4.7 Lemma 4 [Ritz pairs and their residuals]

Let

Tmy=ϑ y,∥y∥=1,\mathbf{T}_m\mathbf{y}=\vartheta\,\mathbf{y}, \qquad \|\mathbf{y}\|=1,

and define x=Qmy.\mathbf{x}=\mathbf{Q}_m\mathbf{y}. Then

∥x∥=1,x⊤Ax=ϑ,\|\mathbf{x}\|=1, \qquad \mathbf{x}^\top\mathbf{A}\mathbf{x}=\vartheta,

and

Ax−ϑx=rm ym,∥Ax−ϑx∥=βm∣ym∣.\mathbf{A}\mathbf{x}-\vartheta\mathbf{x}=\mathbf{r}_m\,y_m, \qquad \|\mathbf{A}\mathbf{x}-\vartheta\mathbf{x}\|=\beta_m|y_m| .

Here ym=em⊤yy_m=\mathbf{e}_m^\top\mathbf{y} is the last coordinate of y\mathbf{y}. In particular,

min⁡λ∈Λ(A)∣ϑ−λ∣≤βm∣ym∣.\min_{\lambda\in\Lambda(\mathbf{A})}|\vartheta-\lambda|\le\beta_m|y_m| .

The scalar ϑ\vartheta is called a Ritz value, and x\mathbf{x} a Ritz vector.

Remark 13 [Residuals at no extra cost]

Ritz pairs are the eigenpairs of the compression of A\mathbf{A} to the Krylov subspace, lifted back to Rd\mathbb{R}^d. Computing them is the Approximating the eigenpairs of A\mathbf A by those of its compression Q⊤AQ\mathbf Q^\top\mathbf A\mathbf Q to a subspace with orthonormal basis Q\mathbf Q is the Rayleigh–Ritz procedure. Lanczos applies it to Krylov subspaces, where the compression is tridiagonal. on a Krylov subspace. Their residuals cost nothing extra: βm\beta_m and the last coordinate of y\mathbf{y} are available from the small problem. A Ritz pair can therefore be certified as accurate even when βm\beta_m is not small, as long as ∣ym∣|y_m| is.

Proof

Orthonormality of the columns of Qm\mathbf{Q}_m gives ∥x∥2=y⊤Qm⊤Qmy=y⊤y=1\|\mathbf{x}\|^2 =\mathbf{y}^\top\mathbf{Q}_m^\top\mathbf{Q}_m\mathbf{y} =\mathbf{y}^\top\mathbf{y} =1. Also, x⊤Ax=y⊤Qm⊤AQmy=y⊤Tmy=ϑ y⊤y=ϑ \mathbf{x}^\top\mathbf{A}\mathbf{x} =\mathbf{y}^\top\mathbf{Q}_m^\top\mathbf{A}\mathbf{Q}_m\mathbf{y} =\mathbf{y}^\top\mathbf{T}_m\mathbf{y} =\vartheta\,\mathbf{y}^\top\mathbf{y} =\vartheta. Using Lemma 3, Ax−ϑx=AQmy−ϑQmy=QmTmy+rmem⊤y−ϑQmy=Qm(Tmy−ϑy)+rmym=rmym\mathbf{A}\mathbf{x}-\vartheta\mathbf{x} =\mathbf{A}\mathbf{Q}_m\mathbf{y}-\vartheta\mathbf{Q}_m\mathbf{y} =\mathbf{Q}_m\mathbf{T}_m\mathbf{y}+\mathbf{r}_m\mathbf{e}_m^\top\mathbf{y}-\vartheta\mathbf{Q}_m\mathbf{y} =\mathbf{Q}_m\textcolor{#2563eb}{(\mathbf{T}_m\mathbf{y}-\vartheta\mathbf{y})}+\mathbf{r}_m y_m =\mathbf{r}_m y_m. The blue factor vanishes because y\mathbf{y} is an eigenvector of Tm\mathbf{T}_m. Taking norms gives ∥Ax−ϑx∥=∥rm∥ ∣ym∣=βm∣ym∣\|\mathbf{A}\mathbf{x}-\vartheta\mathbf{x}\|=\|\mathbf{r}_m\|\,|y_m|=\beta_m|y_m|.

The eigenvalue bound min⁡λ∈Λ(A)∣ϑ−λ∣≤βm∣ym∣\min_{\lambda\in\Lambda(\mathbf{A})}|\vartheta-\lambda|\le\beta_m|y_m| is Lemma 2 applied to the unit vector x\mathbf{x}, whose Rayleigh quotient is ϑ\vartheta.

The eigenbasis expansion, written out for the Ritz vector

Lemma 2 states that every unit vector q\mathbf{q}, with Rayleigh quotient λ^=q⊤Aq\widehat{\lambda}=\mathbf{q}^\top\mathbf{A}\mathbf{q} and residual r=Aq−λ^q\mathbf{r}=\mathbf{A}\mathbf{q}-\widehat{\lambda}\mathbf{q}, satisfies min⁡λ∈Λ(A)∣λ^−λ∣≤∥r∥\min_{\lambda\in\Lambda(\mathbf{A})}|\widehat{\lambda}-\lambda|\le\|\mathbf{r}\|. Take q=x\mathbf{q}=\mathbf{x}. It is a unit vector, its Rayleigh quotient is λ^=x⊤Ax=ϑ\widehat{\lambda}=\mathbf{x}^\top\mathbf{A}\mathbf{x}=\vartheta, and its residual is r=Ax−ϑx\mathbf{r}=\mathbf{A}\mathbf{x}-\vartheta\mathbf{x}, all by the computations above. Lemma 2 therefore gives min⁡λ∈Λ(A)∣ϑ−λ∣≤∥Ax−ϑx∥=βm∣ym∣\min_{\lambda\in\Lambda(\mathbf{A})}|\vartheta-\lambda| \le\|\mathbf{A}\mathbf{x}-\vartheta\mathbf{x}\| =\beta_m|y_m|.

More specifically, expand x\mathbf{x} in an orthonormal eigenbasis u1,…,ud\mathbf{u}_1,\dots,\mathbf{u}_d of A\mathbf{A}: x=∑i=1dciui \mathbf{x}=\sum_{i=1}^dc_i\mathbf{u}_i, Aui=λiui\mathbf{A}\mathbf{u}_i=\lambda_i\mathbf{u}_i, ∑i=1dci2=1\sum_{i=1}^dc_i^2=1. Then Ax−ϑx=∑i=1dci(λi−ϑ)ui\mathbf{A}\mathbf{x}-\vartheta\mathbf{x}=\sum_{i=1}^dc_i(\lambda_i-\vartheta)\mathbf{u}_i, and therefore

∥Ax−ϑx∥2=∑i=1dci2(λi−ϑ)2≥(min⁡1≤i≤d∣λi−ϑ∣2)∑i=1dci2=min⁡1≤i≤d∣λi−ϑ∣2.\begin{aligned} \|\mathbf{A}\mathbf{x}-\vartheta\mathbf{x}\|^2 &=\sum_{i=1}^dc_i^2(\lambda_i-\vartheta)^2\\ &\ge\left(\min_{1\le i\le d}|\lambda_i-\vartheta|^2\right)\sum_{i=1}^dc_i^2\\ &=\min_{1\le i\le d}|\lambda_i-\vartheta|^2 . \end{aligned}

Taking square roots proves the bound.

■□\begin{array}{r} \blacksquare\Box \end{array}

This bound certifies proximity to some eigenvalue of A\mathbf{A}. By itself, a small residual does not certify that the eigenvalue is a global extremum or that all eigenvalues have been found.

4.8 Lemma 5 [Variational characterization and monotonicity]

Let

ϑmin⁡(m)=λmin⁡(Tm),ϑmax⁡(m)=λmax⁡(Tm).\vartheta_{\min}^{(m)}=\lambda_{\min}(\mathbf{T}_m), \qquad \vartheta_{\max}^{(m)}=\lambda_{\max}(\mathbf{T}_m).

Then

ϑmin⁡(m)=min⁡x∈Km(A,q1)∥x∥=1x⊤Ax,ϑmax⁡(m)=max⁡x∈Km(A,q1)∥x∥=1x⊤Ax.\vartheta_{\min}^{(m)}=\min_{\substack{\mathbf{x}\in\mathcal{K}_m(\mathbf{A},\mathbf{q}_1)\\\|\mathbf{x}\|=1}}\mathbf{x}^\top\mathbf{A}\mathbf{x}, \qquad \vartheta_{\max}^{(m)}=\max_{\substack{\mathbf{x}\in\mathcal{K}_m(\mathbf{A},\mathbf{q}_1)\\\|\mathbf{x}\|=1}}\mathbf{x}^\top\mathbf{A}\mathbf{x}.

Whenever the next iteration exists,

λmin⁡(A)≤ϑmin⁡(m+1)≤ϑmin⁡(m),ϑmax⁡(m)≤ϑmax⁡(m+1)≤λmax⁡(A).\lambda_{\min}(\mathbf{A})\le\textcolor{#16a34a}{\vartheta_{\min}^{(m+1)}}\le\textcolor{#16a34a}{\vartheta_{\min}^{(m)}}, \qquad \textcolor{#16a34a}{\vartheta_{\max}^{(m)}}\le\textcolor{#16a34a}{\vartheta_{\max}^{(m+1)}}\le\lambda_{\max}(\mathbf{A}).

Remark 14 [Extreme Ritz values move outward]

The extreme Ritz values are the extreme Rayleigh quotients over a growing family of subspaces. They can therefore only move outward, toward the extreme eigenvalues of A\mathbf{A}, and never overshoot them, as the green curves of panel (a) in Figure 8 show.

Proof

Every vector in Km(A,q1)\mathcal{K}_m(\mathbf{A},\mathbf{q}_1) has a unique representation x=Qmy.\mathbf{x}=\mathbf{Q}_m\mathbf{y}. Moreover, ∥x∥2=y⊤Qm⊤Qmy=∥y∥2,\|\mathbf{x}\|^2=\mathbf{y}^\top\mathbf{Q}_m^\top\mathbf{Q}_m\mathbf{y}=\|\mathbf{y}\|^2, and x⊤Ax=y⊤Tmy.\mathbf{x}^\top\mathbf{A}\mathbf{x}=\mathbf{y}^\top\mathbf{T}_m\mathbf{y}. Let s1,…,sm\mathbf{s}_1,\dots,\mathbf{s}_m be an orthonormal eigenbasis of Tm\mathbf{T}_m, with eigenvalues ordered as ϑ1≤ϑ2≤⋯≤ϑm\vartheta_1\le\vartheta_2\le\dots\le\vartheta_m, so that ϑmin⁡(m)=ϑ1\vartheta_{\min}^{(m)}=\vartheta_1 and ϑmax⁡(m)=ϑm\vartheta_{\max}^{(m)}=\vartheta_m. For any unit vector y=∑i=1mcisi\mathbf{y}=\sum_{i=1}^mc_i\mathbf{s}_i, ∑i=1mci2=1\sum_{i=1}^mc_i^2=1, we have y⊤Tmy=∑i=1mϑici2\mathbf{y}^\top\mathbf{T}_m\mathbf{y}=\sum_{i=1}^m\vartheta_i c_i^2. Thus ϑ1≤y⊤Tmy≤ϑm\vartheta_1\le\mathbf{y}^\top\mathbf{T}_m\mathbf{y}\le\vartheta_m, with equality for y=s1\mathbf{y}=\mathbf{s}_1 and y=sm\mathbf{y}=\mathbf{s}_m respectively. This proves the two variational identities.

Since Km(A,q1)⊆Km+1(A,q1),\mathcal{K}_m(\mathbf{A},\mathbf{q}_1)\subseteq\mathcal{K}_{m+1}(\mathbf{A},\mathbf{q}_1), minimizing over the larger set can only decrease the minimum, while maximizing over the larger set can only increase the maximum. Therefore, ϑmin⁡(m+1)≤ϑmin⁡(m)\vartheta_{\min}^{(m+1)}\le\vartheta_{\min}^{(m)} and ϑmax⁡(m)≤ϑmax⁡(m+1)\vartheta_{\max}^{(m)}\le\vartheta_{\max}^{(m+1)}.

Finally, every unit vector x∈Rd\mathbf{x}\in\mathbb{R}^d satisfies λmin⁡(A)≤x⊤Ax≤λmax⁡(A),\lambda_{\min}(\mathbf{A})\le\mathbf{x}^\top\mathbf{A}\mathbf{x}\le\lambda_{\max}(\mathbf{A}), as follows from the same eigenbasis expansion for A\mathbf{A}. Apply this to the Ritz vectors x=Qms1\mathbf{x}=\mathbf{Q}_m\mathbf{s}_1 and x=Qmsm\mathbf{x}=\mathbf{Q}_m\mathbf{s}_m. They are unit vectors, since ∥Qmsi∥=∥si∥=1\|\mathbf{Q}_m\mathbf{s}_i\|=\|\mathbf{s}_i\|=1, and their Rayleigh quotients are s1⊤Tms1=ϑ1=ϑmin⁡(m)\mathbf{s}_1^\top\mathbf{T}_m\mathbf{s}_1=\vartheta_1=\vartheta_{\min}^{(m)} and sm⊤Tmsm=ϑm=ϑmax⁡(m)\mathbf{s}_m^\top\mathbf{T}_m\mathbf{s}_m=\vartheta_m=\vartheta_{\max}^{(m)}. Hence λmin⁡(A)≤ϑmin⁡(m)\lambda_{\min}(\mathbf{A})\le\vartheta_{\min}^{(m)} and ϑmax⁡(m)≤λmax⁡(A)\vartheta_{\max}^{(m)}\le\lambda_{\max}(\mathbf{A}) for every mm, and with m+1m+1 in place of mm, these are the remaining bounds.

■□\begin{array}{r} \blacksquare\Box \end{array}

This characterization provides a precise connection with power iteration. Started from v0=q1\mathbf{v}_0=\mathbf{q}_1, and whenever Am−1q1≠0\mathbf{A}^{m-1}\mathbf{q}_1\neq0, the normalized power iterate vm−1=Am−1q1/∥Am−1q1∥\mathbf{v}_{m-1}=\mathbf{A}^{m-1}\mathbf{q}_1/\|\mathbf{A}^{m-1}\mathbf{q}_1\| belongs to Km(A,q1)\mathcal{K}_m(\mathbf{A},\mathbf{q}_1). Consequently, ϑmin⁡(m)≤vm−1⊤Avm−1≤ϑmax⁡(m)\vartheta_{\min}^{(m)}\le\mathbf{v}_{m-1}^\top\mathbf{A}\mathbf{v}_{m-1}\le\vartheta_{\max}^{(m)}. Lanczos optimizes the Rayleigh quotient over all unit vectors in the available Krylov subspace. The normalized power vector is one particular member of that subspace. Both estimates cost mm matrix–vector products: Tm\mathbf{T}_m needs Aq1,…,Aqm\mathbf{A}\mathbf{q}_1,\dots,\mathbf{A}\mathbf{q}_m, and the Rayleigh quotient of vm−1\mathbf{v}_{m-1} needs Av0,…,Avm−1\mathbf{A}\mathbf{v}_0,\dots,\mathbf{A}\mathbf{v}_{m-1}. The eigenvalue of largest magnitude is λmax⁡(A)\lambda_{\max}(\mathbf{A}) or λmin⁡(A)\lambda_{\min}(\mathbf{A}). In the first case, vm−1⊤Avm−1≤ϑmax⁡(m)≤λmax⁡(A)\mathbf{v}_{m-1}^\top\mathbf{A}\mathbf{v}_{m-1}\le\vartheta_{\max}^{(m)}\le\lambda_{\max}(\mathbf{A}), and in the second, λmin⁡(A)≤ϑmin⁡(m)≤vm−1⊤Avm−1\lambda_{\min}(\mathbf{A})\le\vartheta_{\min}^{(m)}\le\mathbf{v}_{m-1}^\top\mathbf{A}\mathbf{v}_{m-1}. Either way, at an equal number of products, the extreme Ritz value on the side of the dominant eigenvalue is at least as close to it as the power-iteration estimate (middle panel of the figure in Section 4.10).

This variational statement does not imply that Lanczos has a lower total runtime for every matrix. Constructing and retaining the basis introduces additional work and storage.

4.9 Proposition 3 [Exact termination and the eigenvalues recovered by one run]

For each λ∈Λ(A)\lambda\in\Lambda(\mathbf{A}), let Πλ\Pi_\lambda be the orthogonal projection onto the eigenspace Eλ=ker⁡(A−λId)E_\lambda=\ker(\mathbf{A}-\lambda\mathbb{I}_d). Define Λ1={λ∈Λ(A):Πλq1≠0}\Lambda_1=\{\lambda\in\Lambda(\mathbf{A}):\Pi_\lambda\mathbf{q}_1\neq0\} and let s=∣Λ1∣s=|\Lambda_1|. Here Λ1\Lambda_1 contains distinct eigenvalues, irrespective of their multiplicities. Then, a single run of the Lanczos recurrence of Definition 2 terminates at exactly iteration ss:

βj>0(1≤j<s),βs=0.\beta_j>0\quad(1\le j<s), \qquad \beta_s=0.

Moreover, at termination, AQs=QsTs\mathbf{A}\mathbf{Q}_s=\mathbf{Q}_s\mathbf{T}_s and Λ(Ts)=Λ1\Lambda(\mathbf{T}_s)=\Lambda_1. Since Ts\mathbf{T}_s has size s=∣Λ1∣s=|\Lambda_1|, each of these eigenvalues is simple for Ts\mathbf{T}_s.

Remark 15 [One direction per distinct eigenvalue]

A run can only discover the eigenvalues present in q1\mathbf{q}_1, and it discovers each of them once, however large its multiplicity. Inside the Krylov subspace, the whole eigenspace EλE_\lambda is represented by the single vector Πλq1\Pi_\lambda\mathbf{q}_1. The number of steps before an exact breakdown is therefore the number of distinct eigenvalues present in q1\mathbf{q}_1, not dd. In Figure 8, below, the matrix of size 6060 has 1212 distinct eigenvalues: βm\beta_m falls from about 0.30.3 at m=11m=11 to about 10−1210^{-12} at m=12m=12 (panel (c)), and the 1212 Ritz values are then the 1212 distinct eigenvalues, each appearing once (panel (a)).

Three panels. Left: Ritz values at each Lanczos step spreading outward until, at step 12, they coincide with the 12 distinct eigenvalues of a 60 by 60 matrix. Middle: error of the largest Ritz value against the power-iteration estimate at equal numbers of products, Lanczos reaching rounding level at step 12. Right: the coefficient beta dropping by about eleven orders of magnitude at step 12.
Figure 8. The Lanczos method on a symmetric matrix A=Udiag⁡(λ1,…,λ60)U⊤\mathbf A=\mathbf U\operatorname{diag}(\lambda_1,\dots,\lambda_{60})\mathbf U^\top of size d=60d=60 with only s=12s=12 distinct eigenvalues, of multiplicities 1 to 9 (labels on the right of panel a), including the eigenvalue 0 with multiplicity 8. The numbers λ1,…,λ60\lambda_1,\dots,\lambda_{60} are these eigenvalues, each repeated according to its multiplicity, and the eigenvectors, the columns of U\mathbf U, are random: U\mathbf U is uniformly distributed over the orthogonal matrices, and is sampled as the orthogonal factor of the QR decomposition of a 60×6060\times60 matrix with independent standard Gaussian entries (with the signs chosen so that the triangular factor has a positive diagonal). (a) One run: Ritz values at each step mm (black dots) against the distinct eigenvalues (grey lines). The extreme Ritz values (green) move outward monotonically (Lemma 5), the power-iteration estimate after the same number of products (orange) stays between them, and at m=s=12m=s=12 the Ritz values are exactly the 12 distinct eigenvalues, each appearing once (Proposition 3). (b) Distance from λmax⁡(A)=2\lambda_{\max}(\mathbf A)=2 of the largest Ritz value (green) and of the power-iteration estimate (orange), at equal numbers of matrix–vector products. (c) The coefficient βm\beta_m falls from about 0.30.3 at m=11m=11 to about 10−1210^{-12} at m=12m=12: the exact breakdown of Proposition 3, up to floating-point error. For every starting vector, the 12 Ritz values at m=12m=12 match the 12 distinct eigenvalues to within 3⋅10−153\cdot10^{-15}. Panels (b) and (c) show medians over 200 Gaussian starting vectors, with bands containing the middle half of the runs (the interquartile range), and all runs use full reorthogonalization.

Proof

Write pλ=Πλq1\mathbf{p}_\lambda=\Pi_\lambda\mathbf{q}_1 for λ∈Λ1\lambda\in\Lambda_1, and define W=span⁡{pλ:λ∈Λ1}W=\operatorname{span}\{\mathbf{p}_\lambda:\lambda\in\Lambda_1\}. The vectors pλ\mathbf{p}_\lambda are nonzero and mutually orthogonal, so dim⁡W=s\dim W=s.

The Krylov subspaces lie in WW. Every power of A\mathbf{A} applied to q1\mathbf{q}_1 belongs to WW, because q1=∑λ∈Λ1pλ\mathbf{q}_1=\sum_{\lambda\in\Lambda_1}\mathbf{p}_\lambda and, for k≥1k\ge1, Akq1=∑λ∈Λ1λkpλ\mathbf{A}^k\mathbf{q}_1=\sum_{\lambda\in\Lambda_1}\lambda^k\mathbf{p}_\lambda. Therefore, Km(A,q1)⊆W\mathcal{K}_m(\mathbf{A},\mathbf{q}_1)\subseteq W for every mm.

The Krylov subspace of order ss equals WW. For each λ∈Λ1\lambda\in\Lambda_1, define the ℓλ\ell_\lambda is the unique polynomial of degree at most s−1s-1 that equals 11 at λ\lambda and 00 at the other s−1s-1 points of Λ1\Lambda_1. Applied to A\mathbf A, it keeps the component of q1\mathbf q_1 along EλE_\lambda and removes every other component present in q1\mathbf q_1.

ℓλ(t)=∏μ∈Λ1μ≠λt−μλ−μ.\ell_\lambda(t)=\prod_{\substack{\mu\in\Lambda_1\\\mu\neq\lambda}}\frac{t-\mu}{\lambda-\mu}.

When s=1s=1, the empty product is defined as 11. This polynomial has degree at most s−1s-1 and satisfies ℓλ(μ)=δλ,μ\ell_\lambda(\mu)=\delta_{\lambda,\mu} for all μ∈Λ1\mu\in\Lambda_1, with the Kronecker delta of the notation. Consequently, ℓλ(A)q1=∑μ∈Λ1ℓλ(μ)pμ=pλ\ell_\lambda(\mathbf{A})\mathbf{q}_1 =\sum_{\mu\in\Lambda_1}\ell_\lambda(\mu)\mathbf{p}_\mu =\mathbf{p}_\lambda. Since ℓλ\ell_\lambda has degree at most s−1s-1, pλ∈Ks(A,q1)\mathbf{p}_\lambda\in\mathcal{K}_s(\mathbf{A},\mathbf{q}_1). Thus W⊆Ks(A,q1)W\subseteq\mathcal{K}_s(\mathbf{A},\mathbf{q}_1), and hence Ks(A,q1)=W\mathcal{K}_s(\mathbf{A},\mathbf{q}_1)=W.

No breakdown before iteration ss. Suppose a breakdown occurred at some m<sm<s. Lemma 3 would give AQm=QmTm\mathbf{A}\mathbf{Q}_m=\mathbf{Q}_m\mathbf{T}_m, so Km(A,q1)=range⁡(Qm)\mathcal{K}_m(\mathbf{A},\mathbf{q}_1)=\operatorname{range}(\mathbf{Q}_m) would be invariant under A\mathbf{A}. Since it contains q1\mathbf{q}_1, it would then contain every power Akq1\mathbf{A}^k\mathbf{q}_1 with k∈{0,1,2,… }k\in\{0,1,2,\dots\}, not only the powers with k≤m−1k\le m-1 that span it by definition. In particular, it would contain q1,Aq1,…,As−1q1\mathbf{q}_1,\mathbf{A}\mathbf{q}_1,\dots,\mathbf{A}^{s-1}\mathbf{q}_1, and therefore Ks(A,q1)⊆Km(A,q1)\mathcal{K}_s(\mathbf{A},\mathbf{q}_1)\subseteq\mathcal{K}_m(\mathbf{A},\mathbf{q}_1). This is impossible, because dim⁡Ks(A,q1)=s>m=dim⁡Km(A,q1)\dim\mathcal{K}_s(\mathbf{A},\mathbf{q}_1)=s>m=\dim\mathcal{K}_m(\mathbf{A},\mathbf{q}_1). Thus no breakdown occurs before iteration ss.

Breakdown at iteration ss. At iteration ss, W=Ks(A,q1)=range⁡(Qs)W=\mathcal{K}_s(\mathbf{A},\mathbf{q}_1)=\operatorname{range}(\mathbf{Q}_s). The first equality was shown above, and the second is the identity span⁡{q1,…,qs}=Ks(A,q1)\operatorname{span}\{\mathbf{q}_1,\dots,\mathbf{q}_s\}=\mathcal{K}_s(\mathbf{A},\mathbf{q}_1) of Lemma 3, which applies because no breakdown occurs before iteration ss. Since WW is spanned by eigenvectors, it is invariant under A\mathbf{A}. Therefore, rs=Aqs−βs−1qs−1−αsqs∈W\mathbf{r}_s=\mathbf{A}\mathbf{q}_s-\beta_{s-1}\mathbf{q}_{s-1}-\alpha_s\mathbf{q}_s\in W. But Lemma 3 also gives rs⊥range⁡(Qs)=W\mathbf{r}_s\perp\operatorname{range}(\mathbf{Q}_s)=W. Hence rs=0\mathbf{r}_s=0, and βs=0\beta_s=0. The identity AQs=QsTs+rses⊤\mathbf{A}\mathbf{Q}_s=\mathbf{Q}_s\mathbf{T}_s+\mathbf{r}_s\mathbf{e}_s^\top of Lemma 3 then becomes AQs=QsTs\mathbf{A}\mathbf{Q}_s=\mathbf{Q}_s\mathbf{T}_s.

The eigenvalues of Ts\mathbf{T}_s. The normalized vectors uλ=pλ/∥pλ∥\mathbf{u}_\lambda=\mathbf{p}_\lambda/\|\mathbf{p}_\lambda\| for λ∈Λ1\lambda\in\Lambda_1 form an orthonormal eigenbasis of WW. Set yλ=Qs⊤uλ\mathbf{y}_\lambda=\mathbf{Q}_s^\top\mathbf{u}_\lambda. Transposing AQs=QsTs\mathbf{A}\mathbf{Q}_s=\mathbf{Q}_s\mathbf{T}_s, with A\mathbf{A} and Ts\mathbf{T}_s symmetric, gives Qs⊤A=TsQs⊤\mathbf{Q}_s^\top\mathbf{A}=\mathbf{T}_s\mathbf{Q}_s^\top, so Tsyλ=TsQs⊤uλ=Qs⊤Auλ=λ Qs⊤uλ=λ yλ \mathbf{T}_s\mathbf{y}_\lambda =\mathbf{T}_s\mathbf{Q}_s^\top\mathbf{u}_\lambda =\mathbf{Q}_s^\top\mathbf{A}\mathbf{u}_\lambda =\lambda\,\mathbf{Q}_s^\top\mathbf{u}_\lambda =\lambda\,\mathbf{y}_\lambda. Moreover, uμ∈W=range⁡(Qs)\mathbf{u}_\mu\in W=\operatorname{range}(\mathbf{Q}_s), so QsQs⊤uμ=uμ\mathbf{Q}_s\mathbf{Q}_s^\top\mathbf{u}_\mu=\mathbf{u}_\mu, and for λ,μ∈Λ1\lambda,\mu\in\Lambda_1, yλ⊤yμ=uλ⊤QsQs⊤uμ=uλ⊤uμ=δλ,μ\mathbf{y}_\lambda^\top\mathbf{y}_\mu =\mathbf{u}_\lambda^\top\mathbf{Q}_s\mathbf{Q}_s^\top\mathbf{u}_\mu =\mathbf{u}_\lambda^\top\mathbf{u}_\mu =\delta_{\lambda,\mu}. Thus the ss vectors yλ\mathbf{y}_\lambda, λ∈Λ1\lambda\in\Lambda_1, are orthonormal, hence an orthonormal basis of Rs\mathbb{R}^s, and each of them is an eigenvector of Ts\mathbf{T}_s. Every λ∈Λ1\lambda\in\Lambda_1 is therefore an eigenvalue of Ts\mathbf{T}_s, with the nonzero eigenvector yλ\mathbf{y}_\lambda. Conversely, let Tsz=ξz\mathbf{T}_s\mathbf{z}=\xi\mathbf{z} with z≠0\mathbf{z}\neq0, and expand z=∑λ∈Λ1cλyλ\mathbf{z}=\sum_{\lambda\in\Lambda_1}c_\lambda\mathbf{y}_\lambda in this basis. Then 0=Tsz−ξz=∑λ∈Λ1cλ(λ−ξ) yλ0=\mathbf{T}_s\mathbf{z}-\xi\mathbf{z}=\sum_{\lambda\in\Lambda_1}c_\lambda(\lambda-\xi)\,\mathbf{y}_\lambda, so cλ(λ−ξ)=0 ∀λ∈Λ1c_\lambda(\lambda-\xi)=0 \ \forall \lambda\in\Lambda_1, by linear independence. Some cλc_\lambda is nonzero, since z≠0\mathbf{z}\neq0, so ξ\xi equals that λ\lambda. The elements of Λ1\Lambda_1 being distinct, cμ=0 ∀μ≠ξc_\mu=0 \ \forall \mu\neq\xi, and z\mathbf{z} is a multiple of yξ\mathbf{y}_\xi. Hence Λ(Ts)=Λ1\Lambda(\mathbf{T}_s)=\Lambda_1, and each eigenvalue of Ts\mathbf{T}_s is simple, with eigenvectors the multiples of a single yλ\mathbf{y}_\lambda.

■□\begin{array}{r} \blacksquare\Box \end{array}

4.10 Corollary 3 [Random initialization and repeated eigenvalues]

If g∼N(0,Id)\mathbf{g}\sim\mathcal{N}(0,\mathbb{I}_d) and q1=g/∥g∥\mathbf{q}_1=\mathbf{g}/\|\mathbf{g}\|, then, with probability one, a terminating Lanczos run recovers every distinct eigenvalue of A\mathbf{A}. If A\mathbf{A} has dd distinct eigenvalues, the run reaches s=ds=d and yields a complete eigenbasis. If eigenvalues are repeated, a single run yields only one eigenvector from each corresponding eigenspace. With probability one, the eigenvector found in EλE_\lambda at termination is, up to sign, the normalized projection of q1\mathbf{q}_1 onto EλE_\lambda.

Proof

For each λ∈Λ(A)\lambda\in\Lambda(\mathbf{A}), the event Πλg=0\Pi_\lambda\mathbf{g}=0 means that g\mathbf{g} lies in the proper linear subspace Eλ⊥E_\lambda^\perp, which has Gaussian probability zero. Since there are finitely many distinct eigenvalues, the For finitely many events, the probability that at least one of them occurs is at most the sum of their probabilities. A finite union of probability-zero events therefore has probability zero. gives P(∃λ∈Λ(A):Πλg=0)≤∑λ∈Λ(A)P(Πλg=0)=0\mathbb{P}\bigl(\exists\lambda\in\Lambda(\mathbf{A}):\Pi_\lambda\mathbf{g}=0\bigr) \le\sum_{\lambda\in\Lambda(\mathbf{A})}\mathbb{P}(\Pi_\lambda\mathbf{g}=0) =0. Thus Λ1=Λ(A)\Lambda_1=\Lambda(\mathbf{A}) with probability one, and Proposition 3 applies.

For any polynomial pp, Πλp(A)q1=p(λ)Πλq1\Pi_\lambda p(\mathbf{A})\mathbf{q}_1=p(\lambda)\Pi_\lambda\mathbf{q}_1. Therefore, the projection of the entire Krylov subspace onto EλE_\lambda is contained in span⁡{Πλq1}\operatorname{span}\{\Pi_\lambda\mathbf{q}_1\}, which is one-dimensional when Πλq1≠0\Pi_\lambda\mathbf{q}_1\neq0. A single run cannot recover additional independent directions in that eigenspace. At termination, the proof of Proposition 3 gives, for each λ∈Λ1\lambda\in\Lambda_1, the unit eigenvector yλ=Qs⊤uλ\mathbf{y}_\lambda=\mathbf{Q}_s^\top\mathbf{u}_\lambda of Ts\mathbf{T}_s, where uλ=Πλq1/∥Πλq1∥\mathbf{u}_\lambda=\Pi_\lambda\mathbf{q}_1/\|\Pi_\lambda\mathbf{q}_1\| is the normalized projection of q1\mathbf{q}_1 onto EλE_\lambda. Its Ritz vector is Qsyλ=QsQs⊤uλ=uλ\mathbf{Q}_s\mathbf{y}_\lambda=\mathbf{Q}_s\mathbf{Q}_s^\top\mathbf{u}_\lambda=\mathbf{u}_\lambda, where the last equality holds because QsQs⊤\mathbf{Q}_s\mathbf{Q}_s^\top is the orthogonal projection onto range⁡(Qs)\operatorname{range}(\mathbf{Q}_s), which contains uλ\mathbf{u}_\lambda. Since λ\lambda is a simple eigenvalue of Ts\mathbf{T}_s, every unit eigenvector of Ts\mathbf{T}_s for λ\lambda is ±yλ\pm\mathbf{y}_\lambda, so the eigenvector found in EλE_\lambda is ±uλ\pm\mathbf{u}_\lambda.

When the spectrum is simple and every eigenvalue is present in the initialization, s=ds=d. In this case, Qd\mathbf{Q}_d is an orthogonal matrix, and A=QdTdQd⊤\mathbf{A}=\mathbf{Q}_d\mathbf{T}_d\mathbf{Q}_d^\top. An orthonormal eigenbasis of Td\mathbf{T}_d therefore yields a complete orthonormal eigenbasis of A\mathbf{A} after multiplication by Qd\mathbf{Q}_d.

■□\begin{array}{r} \blacksquare\Box \end{array}

An early exact breakdown does not necessarily mean that a complete eigenbasis of A\mathbf{A} has been found. It means that the current Krylov subspace has become invariant under A\mathbf{A}. For example, when A=c Id\mathbf{A}=c\,\mathbb{I}_d, every initialization produces a breakdown after one iteration, even though the eigenspace has dimension dd. To recover all eigendirections, the construction can continue with new starting vectors orthogonal to the previously generated basis.

4.11 Proposition 4 [Complete decomposition by continuation with new starting vectors]

Let A∈Rd×d\mathbf{A}\in\mathbb{R}^{d\times d} be symmetric. Initialize q0=0\mathbf{q}_0=0, β0=0\beta_0=0, and any unit vector q1\mathbf{q}_1. Run the Lanczos recurrence of Definition 2 for j=1,…,dj=1,\dots,d, with the following rule whenever j<dj<d:

qj+1={rj/βj,βj>0,any unit vector orthogonal to q1,…,qj,βj=0.\mathbf{q}_{j+1}= \begin{cases} \mathbf{r}_j/\beta_j,&\beta_j>0,\\ \text{any unit vector orthogonal to }\mathbf{q}_1,\dots,\mathbf{q}_j,&\beta_j=0 . \end{cases}

At a breakdown, retain βj=0\beta_j=0 and all previously generated basis vectors.

Then the following hold.

  1. Orthogonal basis. The matrix Qd=[q1,…,qd]\mathbf{Q}_d=[\mathbf{q}_1,\dots,\mathbf{q}_d] is orthogonal, Qd⊤Qd=Id\mathbf{Q}_d^\top\mathbf{Q}_d=\mathbb{I}_d.
  2. Tridiagonal form. βd=0\beta_d=0 and AQd=QdTd\mathbf{A}\mathbf{Q}_d=\mathbf{Q}_d\mathbf{T}_d, hence A=QdTdQd⊤\mathbf{A}=\mathbf{Q}_d\mathbf{T}_d\mathbf{Q}_d^\top. The matrix Td\mathbf{T}_d is symmetric and tridiagonal, with a zero off-diagonal entry at every boundary between runs.
  3. Complete eigenbasis. If Td=ZDZ⊤\mathbf{T}_d=\mathbf{Z}\mathbf{D}\mathbf{Z}^\top with Z⊤Z=Id\mathbf{Z}^\top\mathbf{Z}=\mathbb{I}_d and D∈Rd×d\mathbf{D}\in\mathbb{R}^{d\times d} the diagonal matrix of the eigenvalues of Td\mathbf{T}_d, then V=QdZ\mathbf{V}=\mathbf{Q}_d\mathbf{Z} is a complete orthogonal eigenvector matrix of A\mathbf{A}: V⊤V=Id\mathbf{V}^\top\mathbf{V}=\mathbb{I}_d and AV=VD\mathbf{A}\mathbf{V}=\mathbf{V}\mathbf{D}.

Remark 16 [Why continuation completes the basis]

Each run discovers one direction in every eigenspace that its starting vector reaches, then stops at a subspace invariant under A\mathbf{A} (Proposition 3). Continuing with a new starting vector in the orthogonal complement, which is invariant under A\mathbf{A} as well, lets the next run find the directions that the previous runs could not see. Figure 9 shows the resulting basis and tridiagonal matrix on an example.

Two panels. Left: nine column vectors q_1 to q_9 drawn as tall rounded strips, grouped into three runs: q_1 to q_4 in blue (run 1 from q_1), q_5 to q_7 in green (run 2 from P_4 g) and q_8, q_9 in purple (run 3 from P_7 g), with beta_4 = 0, beta_7 = 0 and beta_9 = 0 written above the end of each run. Right: the 9 by 9 matrix T_9 with alpha_1 to alpha_9 on its diagonal and beta entries on the neighbouring diagonals inside three blocks framed in blue, green and purple; the four entries between the blocks are grey zeros, labelled beta_4 = 0 and beta_7 = 0.
Figure 9. The structure built by Proposition 4, on an example with d=9d=9 and runs of lengths 4, 3 and 2. Left: the columns of Q9\mathbf Q_9, coloured by run. Each run ends with an exact breakdown, β4=0\beta_4=0, β7=0\beta_7=0 and β9=0\beta_9=0, and the next run starts from Pjg/∥Pjg∥\mathbf P_j\mathbf g/\|\mathbf P_j\mathbf g\|, a unit vector orthogonal to q1,…,qj\mathbf q_1,\dots,\mathbf q_j, chosen as described after the proof. Right: the matrix T9\mathbf T_9 of the identity AQ9=Q9T9\mathbf A\mathbf Q_9=\mathbf Q_9\mathbf T_9. Its diagonal blocks, framed in the colour of their run, are the tridiagonal matrices of the three runs, and the entries that would couple two runs are β4=β7=0\beta_4=\beta_7=0 (grey).

Proof

We follow the runs one after the other and prove, by induction over the runs, the following claim: if a run ends with an exact breakdown after iteration jj, then q1,…,qj\mathbf{q}_1,\dots,\mathbf{q}_j are orthonormal and AQj=QjTj\mathbf{A}\mathbf{Q}_j=\mathbf{Q}_j\mathbf{T}_j. The three items then follow from it.

The first run. At its exact breakdown, after iteration jj, Lemma 3 gives orthonormal vectors q1,…,qj\mathbf{q}_1,\dots,\mathbf{q}_j and AQj=QjTj+rjej⊤\mathbf{A}\mathbf{Q}_j=\mathbf{Q}_j\mathbf{T}_j+\mathbf{r}_j\mathbf{e}_j^\top with rj=0\mathbf{r}_j=0, since βj=∥rj∥=0\beta_j=\|\mathbf{r}_j\|=0, that is, AQj=QjTj\mathbf{A}\mathbf{Q}_j=\mathbf{Q}_j\mathbf{T}_j.

From one run to the next. Suppose that a run ends with an exact breakdown after iteration j<dj<d, with q1,…,qj\mathbf{q}_1,\dots,\mathbf{q}_j orthonormal and AQj=QjTj\mathbf{A}\mathbf{Q}_j=\mathbf{Q}_j\mathbf{T}_j. Then range⁡(Qj)\operatorname{range}(\mathbf{Q}_j) and its orthogonal complement are both A subspace SS is invariant under A\mathbf{A} if Ay∈S\mathbf{A}\mathbf{y}\in S for every y∈S\mathbf{y}\in S. The range. If y∈range⁡(Qj)\mathbf{y}\in\operatorname{range}(\mathbf{Q}_j), there is x∈Rj\mathbf{x}\in\mathbb{R}^j with y=Qjx\mathbf{y}=\mathbf{Q}_j\mathbf{x}, so Ay=AQjx=QjTjx∈range⁡(Qj).\mathbf{A}\mathbf{y}=\mathbf{A}\mathbf{Q}_j\mathbf{x}=\mathbf{Q}_j\mathbf{T}_j\mathbf{x}\in\operatorname{range}(\mathbf{Q}_j). Its orthogonal complement. The orthogonal complement of range⁡(Qj)\operatorname{range}(\mathbf{Q}_j) is ker⁡(Qj⊤)\ker(\mathbf{Q}_j^\top). In fact, y∈range⁡(Qj)⊥  ⟺  y⊤Qjx=(Qj⊤y)⊤x=0  ∀x∈Rj  ⟺  Qj⊤y=0.\mathbf{y}\in\operatorname{range}(\mathbf{Q}_j)^\perp\iff\mathbf{y}^\top\mathbf{Q}_j\mathbf{x}=(\mathbf{Q}_j^\top\mathbf{y})^\top\mathbf{x}=0\ \ \forall\mathbf{x}\in\mathbb{R}^j\iff\mathbf{Q}_j^\top\mathbf{y}=0. Now let y∈ker⁡(Qj⊤)\mathbf{y}\in\ker(\mathbf{Q}_j^\top). The symmetry of A\mathbf{A} and of Tj\mathbf{T}_j gives Qj⊤Ay=(AQj)⊤y=(QjTj)⊤y=TjQj⊤y=0,\mathbf{Q}_j^\top\mathbf{A}\mathbf{y}=(\mathbf{A}\mathbf{Q}_j)^\top\mathbf{y}=(\mathbf{Q}_j\mathbf{T}_j)^\top\mathbf{y}=\mathbf{T}_j\mathbf{Q}_j^\top\mathbf{y}=0, so Ay∈ker⁡(Qj⊤)\mathbf{A}\mathbf{y}\in\ker(\mathbf{Q}_j^\top).. The next run starts from a unit vector qj+1\mathbf{q}_{j+1} of this complement, which exists because the complement has dimension d−j>0d-j>0. Since βj=0\beta_j=0, its first step computes zj+1=Aqj+1\mathbf{z}_{j+1}=\mathbf{A}\mathbf{q}_{j+1}, with no term in qj\mathbf{q}_j, so the run follows Definition 2 from qj+1\mathbf{q}_{j+1}, and Lemma 3 applies to it. Its vectors are therefore orthonormal and lie in the Krylov subspaces Km(A,qj+1)\mathcal{K}_m(\mathbf{A},\mathbf{q}_{j+1}). These subspaces lie in the complement, because it contains qj+1\mathbf{q}_{j+1} and is invariant under A\mathbf{A}, so the vectors of the new run are orthogonal to q1,…,qj\mathbf{q}_1,\dots,\mathbf{q}_j. If the new run ends with an exact breakdown after iteration j′j', Lemma 3 also gives A[qj+1,…,qj′]=[qj+1,…,qj′] T′\mathbf{A}[\mathbf{q}_{j+1},\dots,\mathbf{q}_{j'}]=[\mathbf{q}_{j+1},\dots,\mathbf{q}_{j'}]\,\mathbf{T}', where T′\mathbf{T}' is the tridiagonal matrix of this run, with no residual term since βj′=0\beta_{j'}=0. Together with AQj=QjTj\mathbf{A}\mathbf{Q}_j=\mathbf{Q}_j\mathbf{T}_j, this gives AQj′=Qj′Tj′\mathbf{A}\mathbf{Q}_{j'}=\mathbf{Q}_{j'}\mathbf{T}_{j'}, because the entries of Tj′\mathbf{T}_{j'} that couple the two runs are βj=0\beta_j=0. This proves the claim for the new run.

1. Orthogonal basis. At every iteration j<dj<d, the rule produces a unit vector qj+1\mathbf{q}_{j+1}, either rj/βj\mathbf{r}_j/\beta_j or a new starting vector, so the construction reaches qd\mathbf{q}_d. By the previous paragraph, the vectors of each run are orthonormal and orthogonal to those of the earlier runs. Hence q1,…,qd\mathbf{q}_1,\dots,\mathbf{q}_d are orthonormal, that is, Qd⊤Qd=Id\mathbf{Q}_d^\top\mathbf{Q}_d=\mathbb{I}_d.

2. Tridiagonal form. At iteration dd, the residual rd=Aqd−βd−1qd−1−αdqd\mathbf{r}_d=\mathbf{A}\mathbf{q}_d-\beta_{d-1}\mathbf{q}_{d-1}-\alpha_d\mathbf{q}_d of the last run is orthogonal to the vectors of that run, by Lemma 3. It also lies in the orthogonal complement of the earlier runs, which is invariant under A\mathbf{A} and contains the vectors of the last run, since rd\mathbf{r}_d is a combination of Aqd\mathbf{A}\mathbf{q}_d and of vectors of the last run (if qd−1\mathbf{q}_{d-1} belongs to an earlier run, then βd−1=0\beta_{d-1}=0). Thus rd\mathbf{r}_d is orthogonal to every column of Qd\mathbf{Q}_d. These columns form a basis of Rd\mathbb{R}^d, so rd=0\mathbf{r}_d=0 and βd=0\beta_d=0. The last run therefore ends with an exact breakdown after iteration dd, and the claim gives AQd=QdTd\mathbf{A}\mathbf{Q}_d=\mathbf{Q}_d\mathbf{T}_d. Since Qd\mathbf{Q}_d is square with Qd⊤Qd=Id\mathbf{Q}_d^\top\mathbf{Q}_d=\mathbb{I}_d, also QdQd⊤=Id\mathbf{Q}_d\mathbf{Q}_d^\top=\mathbb{I}_d, and multiplying on the right by Qd⊤\mathbf{Q}_d^\top gives A=QdTdQd⊤\mathbf{A}=\mathbf{Q}_d\mathbf{T}_d\mathbf{Q}_d^\top. By construction, Td\mathbf{T}_d is symmetric and tridiagonal, and its off-diagonal entry βj\beta_j is zero at every boundary between runs.

3. Complete eigenbasis. Since TdZ=ZDZ⊤Z=ZD\mathbf{T}_d\mathbf{Z}=\mathbf{Z}\mathbf{D}\mathbf{Z}^\top\mathbf{Z}=\mathbf{Z}\mathbf{D}, A(QdZ)=QdTdZ=QdZD\mathbf{A}(\mathbf{Q}_d\mathbf{Z}) =\mathbf{Q}_d\mathbf{T}_d\mathbf{Z} =\mathbf{Q}_d\mathbf{Z}\mathbf{D} and (QdZ)⊤(QdZ)=Z⊤Qd⊤QdZ=Z⊤Z=Id(\mathbf{Q}_d\mathbf{Z})^\top(\mathbf{Q}_d\mathbf{Z}) =\mathbf{Z}^\top\mathbf{Q}_d^\top\mathbf{Q}_d\mathbf{Z} =\mathbf{Z}^\top\mathbf{Z} =\mathbb{I}_d. Therefore, V=QdZ\mathbf{V}=\mathbf{Q}_d\mathbf{Z} is a complete orthonormal eigenbasis.

■□\begin{array}{r} \blacksquare\Box \end{array}

Proposition 4 accepts any unit vector orthogonal to q1,…,qj\mathbf{q}_1,\dots,\mathbf{q}_j as the new starting vector. One way to choose it is to draw a Gaussian vector g\mathbf{g}, independently of q1,…,qj\mathbf{q}_1,\dots,\mathbf{q}_j, and to remove its components along q1,…,qj\mathbf{q}_1,\dots,\mathbf{q}_j by applying Pj=Id−QjQj⊤\mathbf{P}_j=\mathbb{I}_d-\mathbf{Q}_j\mathbf{Q}_j^\top. Since Pj\mathbf{P}_j is symmetric and Pj2=Id−2QjQj⊤+Qj(Qj⊤Qj)Qj⊤=Pj\mathbf{P}_j^2=\mathbb{I}_d-2\mathbf{Q}_j\mathbf{Q}_j^\top+\mathbf{Q}_j(\mathbf{Q}_j^\top\mathbf{Q}_j)\mathbf{Q}_j^\top=\mathbf{P}_j, the vector u=Pjg\mathbf{u}=\mathbf{P}_j\mathbf{g} is Gaussian with covariance PjPj⊤=Pj\mathbf{P}_j\mathbf{P}_j^\top=\mathbf{P}_j:

g∼N(0,Id),u=Pjg=g−Qj(Qj⊤g)∼N(0,Pj),qj+1=u∥u∥.\mathbf{g}\sim\mathcal{N}(0,\mathbb{I}_d), \qquad \mathbf{u}=\mathbf{P}_j\mathbf{g}=\mathbf{g}-\mathbf{Q}_j(\mathbf{Q}_j^\top\mathbf{g})\sim\mathcal{N}(0,\mathbf{P}_j), \qquad \mathbf{q}_{j+1}=\frac{\mathbf{u}}{\|\mathbf{u}\|}.

The matrix Pj\mathbf{P}_j is the orthogonal projection onto range⁡(Qj)⊥=ker⁡(Qj⊤)\operatorname{range}(\mathbf{Q}_j)^\perp=\ker(\mathbf{Q}_j^\top) since QjQj⊤\mathbf{Q}_j\mathbf{Q}_j^\top is the one onto range⁡(Qj)\operatorname{range}(\mathbf{Q}_j), so Qj⊤qj+1=0\mathbf{Q}_j^\top\mathbf{q}_{j+1}=0, that is, qj+1\mathbf{q}_{j+1} is orthogonal to q1,…,qj\mathbf{q}_1,\dots,\mathbf{q}_j. The division by ∥u∥\|\mathbf{u}\| requires u≠0\mathbf{u}\neq0, which holds with probability one when j<dj<d. Indeed, u=0\mathbf{u}=0 means that g∈range⁡(Qj)\mathbf{g}\in\operatorname{range}(\mathbf{Q}_j), a subspace of dimension j<dj<d, which has Gaussian probability zero, as in the proof of Corollary 3.

This continuation keeps all the vectors q1,…,qj\mathbf{q}_1,\dots,\mathbf{q}_j already computed, and the new run appends its vectors to them, so that Qd\mathbf{Q}_d contains the vectors of every run. A restart, in contrast, limits memory by discarding the basis and running the method again from a vector that combines a few Ritz vectors, as described after Algorithm 3.

4.12 Algorithm 2 [Lanczos with reorthogonalization and residual checks]

Proposition 3 and Proposition 4 recover eigenpairs exactly, but only at exact breakdowns and in exact arithmetic. The algorithm below is their finite version. It keeps the recurrence of Definition 2 and the Ritz pairs of Lemma 4, with three changes.

  • The basis is reorthogonalized. In floating-point arithmetic, the short recurrence gradually loses orthogonality, as measured in Section 4.3. Each new remainder is therefore projected once more against all the stored basis vectors, rj←rj−Qj(Qj⊤rj)\mathbf{r}_j\leftarrow\mathbf{r}_j-\mathbf{Q}_j(\mathbf{Q}_j^\top\mathbf{r}_j), before βj\beta_j is computed. Such See the discussion of full reorthogonalization in Bai et al., Templates for the Solution of Algebraic Eigenvalue Problems. The projection is carried out with classical or modified Gram–Schmidt, and it is repeated when the norm of the new vector drops below about 1/21/\sqrt2 of its previous value, which rarely happens. is a standard part of practical Lanczos implementations (Bai et al., 2000).
  • Ritz pairs are accepted on a certificate. Instead of waiting for an exact breakdown, the algorithm tests the Ritz pairs as the basis grows, and accepts a pair as soon as its residual with A\mathbf{A} is below a tolerance, which by Lemma 2 places its Rayleigh quotient near an eigenvalue of A\mathbf{A}.
  • Breakdowns are detected with a tolerance. A computed βj\beta_j is almost never exactly zero. A step is treated as a breakdown when βj\beta_j falls below a small threshold, and for a complete decomposition the basis is then continued from a new starting vector, as in Proposition 4.

The algorithm uses three tolerances.

  • The tolerances εabs>0\varepsilon_{\mathrm{abs}}>0 and εrel≥0\varepsilon_{\mathrm{rel}}\ge0 play the same roles as in Algorithm 1. Step 5 accepts a candidate (λ^,x)(\widehat\lambda,\mathbf{x}) when ∥Ax−λ^x∥≤εabs+εrel∥Ax∥\|\mathbf{A}\mathbf{x}-\widehat\lambda\mathbf{x}\|\le\varepsilon_{\mathrm{abs}}+\varepsilon_{\mathrm{rel}}\|\mathbf{A}\mathbf{x}\|, and by Lemma 2 the accepted λ^\widehat\lambda then lies within this threshold of an eigenvalue of A\mathbf{A}. With εrel=0\varepsilon_{\mathrm{rel}}=0, every eigenvalue is found to within the same distance εabs\varepsilon_{\mathrm{abs}}, and a positive εrel\varepsilon_{\mathrm{rel}} asks instead for about the same number of correct digits on every eigenvalue, as explained for Algorithm 1. One difference makes the relative rule safer here. Algorithm 2 does not deflate, so the residual of an accepted pair does not enter the test of any other pair, and the stall of Algorithm 1, where residuals inherited from earlier stages exceed the threshold, cannot occur. The floor remains: rounding errors keep computed residuals of the order of the unit roundoff times ∥A∥\|\mathbf{A}\|, so εabs\varepsilon_{\mathrm{abs}} must exceed that level. Figure 11 uses the constant threshold εabs=10−10∥A∥\varepsilon_{\mathrm{abs}}=10^{-10}\|\mathbf{A}\| and εrel=0\varepsilon_{\mathrm{rel}}=0, the same as for Algorithm 1, so that the two algorithms are compared on equal terms.
  • The breakdown tolerance τ>0\tau>0 decides when βj\beta_j counts as zero in step 3. Even when the Krylov subspace is invariant under A\mathbf{A}, rounding errors leave a computed βj\beta_j of the order of the unit roundoff times ∥A∥\|\mathbf{A}\|, so τ\tau must exceed that level. The runs of Figure 11 use τ=10−10\tau=10^{-10} times the largest ∣αi∣|\alpha_i| or βi\beta_i computed so far, an estimate of ∥A∥\|\mathbf{A}\| that costs nothing.

Choose the number kk of requested eigenpairs (with k=dk=d for a complete decomposition), a period p≥1p\ge1 for the checks of steps 4 and 5, and a maximum number of iterations, at most dd. Steps 1 and 2 are done once. Steps 3 to 6 form one iteration, which adds one vector to the basis. The iterations are numbered j=1,2,…j=1,2,\dots, and step 6 either stops the algorithm or increases jj by one and starts the next iteration at step 3. Figure 10 draws this execution.

Setup.

  1. Fix the operator. Provide a routine computing x↦Ax\mathbf{x}\mapsto\mathbf{A}\mathbf{x}, and keep everything that defines A\mathbf{A} fixed throughout the run, so that every product applies the same matrix. For a Hessian ∇θ2f(θ)\nabla_\theta^2f(\theta), this means the point θ\theta and the function ff, as noted in Section 2.1.
  2. Initialize the basis. Choose a unit vector q1\mathbf{q}_1, for instance q1=g/∥g∥\mathbf{q}_1=\mathbf{g}/\|\mathbf{g}\| with g∼N(0,Id)\mathbf{g}\sim\mathcal{N}(0,\mathbb{I}_d), which by Corollary 3 has a component in every eigenspace of A\mathbf{A} with probability one. Set q0=0\mathbf{q}_0=0, β0=0\beta_0=0, Q1=[q1]\mathbf{Q}_1=[\mathbf{q}_1] and j=1j=1.

Iteration j≥1j\ge1.

  1. Extend the basis (one product). Compute zj=Aqj−βj−1qj−1\mathbf{z}_j=\mathbf{A}\mathbf{q}_j-\beta_{j-1}\mathbf{q}_{j-1}, αj=qj⊤zj\alpha_j=\mathbf{q}_j^\top\mathbf{z}_j and rj=zj−αjqj\mathbf{r}_j=\mathbf{z}_j-\alpha_j\mathbf{q}_j, as in Definition 2. Reorthogonalize, rj←rj−Qj(Qj⊤rj)\mathbf{r}_j\leftarrow\mathbf{r}_j-\mathbf{Q}_j(\mathbf{Q}_j^\top\mathbf{r}_j), repeating the projection once when needed, and set βj=∥rj∥\beta_j=\|\mathbf{r}_j\|. If βj>τ\beta_j>\tau, set qj+1=rj/βj\mathbf{q}_{j+1}=\mathbf{r}_j/\beta_j. Otherwise, the run has broken down: set βj=0\beta_j=0, and step 6 draws qj+1\mathbf{q}_{j+1}.
  2. Solve the small eigenvalue problem. Do this step and step 5 only when jj is a multiple of pp or the run has just broken down, and otherwise go to step 6. Assemble Tm\mathbf{T}_m with m=jm=j, and compute the eigenpairs Tmyi=ϑiyi\mathbf{T}_m\mathbf{y}_i=\vartheta_i\mathbf{y}_i with ∥yi∥=1\|\mathbf{y}_i\|=1 that correspond to the requested ones, for instance the min⁡(j,k)\min(j,k) whose eigenvalues ϑi\vartheta_i have the largest absolute values, since Tm\mathbf{T}_m has only m=jm=j eigenpairs. The candidates for step 5 are the pairs with a small residual estimate, βm∣(yi)m∣≤εabs+εrel∣ϑi∣\beta_m|(\mathbf{y}_i)_m|\le\varepsilon_{\mathrm{abs}}+\varepsilon_{\mathrm{rel}}|\vartheta_i|, so there are at most min⁡(j,k)\min(j,k) of them. A pair with a larger estimate is not accurate yet: it is skipped at this iteration and examined again at the next check. By Lemma 4, this estimate equals the residual norm ∥AQmyi−ϑiQmyi∥\|\mathbf{A}\mathbf{Q}_m\mathbf{y}_i-\vartheta_i\mathbf{Q}_m\mathbf{y}_i\| in exact arithmetic, and it costs no product, whereas step 5 costs one product per pair. After a breakdown, βm=0\beta_m=0, so every pair becomes a candidate. If there are fewer than kk candidates, which is always the case when j<kj<k, go to step 6: the algorithm stops only when all kk pairs pass step 5 at the same iteration, so step 5 would spend products in vain.
  3. Check the kk candidates with the original operator (one product each). For each candidate of step 4, form xi=Qmyi/∥Qmyi∥\mathbf{x}_i=\mathbf{Q}_m\mathbf{y}_i/\|\mathbf{Q}_m\mathbf{y}_i\|, compute λ^i=xi⊤Axi\widehat{\lambda}_i=\mathbf{x}_i^\top\mathbf{A}\mathbf{x}_i and εi=∥Axi−λ^ixi∥\varepsilon_i=\|\mathbf{A}\mathbf{x}_i-\widehat{\lambda}_i\mathbf{x}_i\|, and accept (λ^i,xi)(\widehat\lambda_i,\mathbf{x}_i) when εi≤εabs+εrel∥Axi∥\varepsilon_i\le\varepsilon_{\mathrm{abs}}+\varepsilon_{\mathrm{rel}}\|\mathbf{A}\mathbf{x}_i\|.
  4. Stop or continue. Apply the first of the following three cases that holds.
    • Success. If step 5 has run at this iteration and accepted all kk candidates, stop and return them. Pairs accepted at an earlier iteration do not count, since step 4 recomputes all the Ritz pairs at each check, and the same eigenpair would be counted twice.
    • Failure. If jj has reached the maximum number of iterations, stop and report nonconvergence.
    • Next iteration. Otherwise, obtain qj+1\mathbf{q}_{j+1}. If the run has not broken down in step 3, qj+1=rj/βj\mathbf{q}_{j+1}=\mathbf{r}_j/\beta_j was computed there. If it has broken down, start a new run as in Proposition 4, from the new starting vector described after it: draw g∼N(0,Id)\mathbf{g}\sim\mathcal{N}(0,\mathbb{I}_d) and set qj+1=Pjg/∥Pjg∥\mathbf{q}_{j+1}=\mathbf{P}_j\mathbf{g}/\|\mathbf{P}_j\mathbf{g}\| with Pjg=g−Qj(Qj⊤g)\mathbf{P}_j\mathbf{g}=\mathbf{g}-\mathbf{Q}_j(\mathbf{Q}_j^\top\mathbf{g}), keeping βj=0\beta_j=0. In both cases, set Qj+1=[Qj,qj+1]\mathbf{Q}_{j+1}=[\mathbf{Q}_j,\mathbf{q}_{j+1}], increase jj by one, and go to step 3.
■□\begin{array}{r} \blacksquare\Box \end{array}
Flowchart of Algorithm 2. A setup box (steps 1 and 2) leads into an iteration frame. Step 3 extends the basis with one product (blue tint). A decision asks whether j is a multiple of p or the run has broken down; if not, a lane on the left skips to the decision j equals maximum. Otherwise step 4 computes the Ritz pairs of T_j and the candidates, and a decision asks whether there are k candidates; if not, the same lane skips ahead. Step 5 checks the k candidates with A (k products, blue tint). Step 6 asks in turn whether all k are accepted (then stop and return the pairs), whether j equals the maximum (then stop and report nonconvergence), and whether the run has broken down: if not, q_{j+1} equals r_j over beta_j; if so, a new run starts from P_j g over its norm. Both join the box Q_{j+1} = [Q_j, q_{j+1}], j becomes j + 1, from which a blue arrow labelled next iteration returns to step 3.
Figure 10. The execution of Algorithm 2. Steps 1 and 2 run once. Steps 3 to 6 form iteration jj, which adds one vector to the basis, and the blue arrow is the passage to iteration j+1j+1. The blue-tinted boxes cost products with A\mathbf A: one in step 3 and kk in step 5. Steps 4 and 5 are skipped when jj is not a multiple of pp and the run has not broken down, and step 5 is skipped when fewer than kk Ritz pairs are candidates, since the algorithm stops only when all kk pass step 5 at the same iteration. Step 6 then stops, or obtains qj+1\mathbf q_{j+1}: from step 3 while the run continues, or as a new starting vector after a breakdown, as in Proposition 4.

How the steps implement the theory

The table lists what each step computes and the result it implements. The paragraphs after it justify the three points where the finite computation departs from the exact theory.

StepComputesImplements
3. Extendαj\alpha_j, βj\beta_j and qj+1\mathbf{q}_{j+1}one step of the recurrence of Definition 2
3. Reorthogonalizerj←rj−Qj(Qj⊤rj)\mathbf{r}_j\leftarrow\mathbf{r}_j-\mathbf{Q}_j(\mathbf{Q}_j^\top\mathbf{r}_j)the orthogonality Qj⊤rj=0\mathbf{Q}_j^\top\mathbf{r}_j=0 of Lemma 3, which rounding errors would otherwise erode
3. Breakdownβj≤τ\beta_j\le\tauthe exact breakdown of Definition 2 and Proposition 3
4. Small problemTmyi=ϑiyi\mathbf{T}_m\mathbf{y}_i=\vartheta_i\mathbf{y}_i and βm∣(yi)m∣\beta_m\lvert(\mathbf{y}_i)_m\rvertthe Ritz pairs of Lemma 4 and the norm of their residual
5. Check∥Axi−λ^ixi∥≤εabs+εrel∥Axi∥\lVert\mathbf{A}\mathbf{x}_i-\widehat\lambda_i\mathbf{x}_i\rVert\le\varepsilon_{\mathrm{abs}}+\varepsilon_{\mathrm{rel}}\lVert\mathbf{A}\mathbf{x}_i\rVertthe certificate of Lemma 2, with the Rayleigh quotient of Remark 11
6. Continuea new unit vector orthogonal to Qj\mathbf{Q}_j, with βj=0\beta_j=0the continuation of Proposition 4

Reorthogonalization restores what the theory assumes. Lemma 3, and through it Lemma 4 and Propositions 3 and 4, assume that the basis vectors are exactly orthonormal. The short recurrence keeps them orthogonal only up to errors that accumulate from step to step, and the projection of step 3 removes these errors at every step. In the example of Section 4.3, it keeps ∥Qm⊤Qm−Im∥\|\mathbf{Q}_m^\top\mathbf{Q}_m-\mathbb{I}_m\| at about 10−1510^{-15} up to m=200m=200, against 10−610^{-6} without it.

The inexpensive estimate selects, the explicit residual certifies. In exact arithmetic, βm∣(yi)m∣\beta_m|(\mathbf{y}_i)_m| equals the residual norm ∥Axi−ϑixi∥\|\mathbf{A}\mathbf{x}_i-\vartheta_i\mathbf{x}_i\| (Lemma 4). In floating-point arithmetic, the remaining loss of orthogonality and the corrections of the reorthogonalization perturb the identity AQm=QmTm+rmem⊤\mathbf{A}\mathbf{Q}_m=\mathbf{Q}_m\mathbf{T}_m+\mathbf{r}_m\mathbf{e}_m^\top on which this equality rests. Step 4 therefore uses the estimate only to decide which pairs are worth a product, and step 5 computes the residual with A\mathbf{A} itself, which Lemma 2 turns into a guarantee however xi\mathbf{x}_i was obtained. The normalization by ∥Qmyi∥\|\mathbf{Q}_m\mathbf{y}_i\| in step 5 matters for the same reason: when the computed basis is not exactly orthonormal, Qmyi\mathbf{Q}_m\mathbf{y}_i need not have unit norm, and the inexpensive estimate can then be too optimistic (see the implementation discussion of the Lanczos algorithm in Bai et al., 2000).

A small βj\beta_j is an approximate breakdown. By Lemma 3, ∥AQj−QjTj∥=∥rjej⊤∥=βj\|\mathbf{A}\mathbf{Q}_j-\mathbf{Q}_j\mathbf{T}_j\|=\|\mathbf{r}_j\mathbf{e}_j^\top\|=\beta_j, so βj≤τ\beta_j\le\tau means that A\mathbf{A} maps range⁡(Qj)\operatorname{range}(\mathbf{Q}_j) into itself up to an error τ\tau. It is not an exact proof of invariance or spectral completeness. Likewise, satisfying a residual tolerance certifies an approximate eigenpair, not that no more extreme eigenvalue has been missed.

Each iteration requires one matrix–vector product, in step 3. If CAC_{\mathbf{A}} denotes its cost, mm iterations require mm such products, with total cost mCAmC_{\mathbf{A}}. Step 5 adds kk products each time it runs, which happens only when all kk pairs are candidates. Retaining Qm\mathbf{Q}_m requires O(dm)O(dm) storage. Full reorthogonalization costs O(dj)O(dj) operations at iteration jj, and therefore ∑j=1mO(dj)=O(dm2)\sum_{j=1}^mO(dj)=O(dm^2) operations over the run, in addition to the eigenvalue problems of Tj\mathbf{T}_j that step 4 solves every pp iterations and after each breakdown.

When A\mathbf{A} is available only through products, as in the examples of Section 2, the run never forms A\mathbf{A}. Nevertheless, a complete decomposition with m=dm=d still requires O(d2)O(d^2) storage for the basis, and full reorthogonalization then costs O(d3)O(d^3) operations. The practical benefit is greatest when the required eigenpairs reach the desired accuracy with m≪dm\ll d.

Figure 11 below compares the two algorithms on the network Hessian of Figure 7 and on the bipartite graph of Figure 3.

Two panels comparing Algorithm 2 (Lanczos) with Algorithm 1. Left: Hessian-vector products needed to certify the j largest eigenpairs of a network Hessian, from about 13 to 35 for Lanczos and from about 220 to 1100 for Algorithm 1. Right: eigenpairs certified against products for a 50-node bipartite graph; Lanczos with continuation reaches all 50 after 50 products, Algorithm 1 after about fifteen thousand.
Figure 11. Algorithm 2 (green) against Algorithm 1 (blue), with the same constant threshold 10−10∥A∥10^{-10}\|\mathbf A\| on the residuals for A\mathbf A. (a) The network Hessian of Figure 7: Hessian–vector products used until the jj eigenpairs of largest absolute value are certified, medians over 20 starting vectors with bands containing the middle half of the runs. For Algorithm 1, the count runs over stages 1 to jj. For Algorithm 2, with checks at every iteration (p=1p=1), it is the number of Lanczos steps until the jj Ritz pairs of largest absolute value pass the inexpensive test βm∣(yi)m∣≤10−10∥A∥\beta_m|(\mathbf y_i)_m|\le10^{-10}\|\mathbf A\| of Lemma 4, plus one product per pair for the explicit check of step 5, whose residuals were all below 5.6⋅10−105.6\cdot10^{-10}. The eight pairs cost 35 products with Algorithm 2 and about 1,100 with Algorithm 1. (b) The complete eigenbasis of the bipartite graph of Figure 3. The first Lanczos run breaks down at step 41, the number of distinct eigenvalues (Proposition 3), where its 41 Ritz pairs all pass the test. Each of the nine continuation runs of Proposition 4 starts in the eigenspace of 00, orthogonally to the basis built so far, and breaks down after one step. The 50 products, plus 50 explicit checks (green square), give all 50 eigenpairs with residuals below 1.2⋅10−111.2\cdot10^{-11}, against 15,296 products for Algorithm 1 with every stage taken to its limit, as in Figure 4.

5. The Arnoldi method

All the matrices of Section 2 are symmetric, and every proof so far uses the spectral theorem. Many matrices known through their products are not symmetric, and for them three facts of Section 1 fail. First, the eigenvalues of a real matrix can be complex, and then they come in conjugate pairs λ,λˉ\lambda,\bar\lambda. Second, eigenvectors of distinct eigenvalues need not be orthogonal. Third, the eigenvectors need not span the whole space: the matrix [0100]\left[\begin{smallmatrix}0&1\\0&0\end{smallmatrix}\right] has the double eigenvalue 00, but its only eigenvectors are the multiples of [1,0]⊤[1,0]^\top.

The Krylov subspace of Definition 1 and the Gram–Schmidt process need no symmetry. The Arnoldi method (Arnoldi, 1951) runs Gram–Schmidt on Km(A,q1)\mathcal{K}_m(\mathbf{A},\mathbf{q}_1) for any square matrix, as the Lanczos method does for a symmetric one, and Saad (1980) developed it into a method for approximating a few eigenvalues of a large nonsymmetric matrix. This section follows the plan of Section 4: examples first, then the method worked by hand, its exact properties, the certificate that replaces Lemma 2, and an implementable procedure.

From here on, A∈Rd×d\mathbf{A}\in\mathbb{R}^{d\times d} is any real square matrix, and Λ(A)⊂C\Lambda(\mathbf{A})\subset\mathbb{C} is the set of its distinct eigenvalues. For a complex vector y\mathbf{y}, y∗\mathbf{y}^* is its conjugate transpose and ∥y∥2=y∗y\|\mathbf{y}\|^2=\mathbf{y}^*\mathbf{y}.

5.1 Nonsymmetric matrices known through their products

  • Convection–diffusion. The operator u↦−u′′+c u′u\mapsto-u''+c\,u' on [0,1][0,1], with u(0)=u(1)=0u(0)=u(1)=0, describes a quantity that diffuses while a flow of speed cc carries it, such as heat or a pollutant in a moving fluid. When c=0c=0, it is the operator u↦−u′′u\mapsto-u'' discretized in Section 2.2, and we discretize it in the same way. The grid points are ti=iht_i=ih for i∈{0,…,d+1}i\in\{0,\dots,d+1\}, with step h=1/(d+1)h=1/(d+1). A function uu is represented by the vector x∈Rd\mathbf{x}\in\mathbb{R}^d of its values xi=u(ti)x_i=u(t_i) at the dd interior points tit_i for i∈{1,…,d}i\in\{1,\dots,d\}, and the boundary conditions fix x0=xd+1=0x_0=x_{d+1}=0. Replacing both derivatives at tit_i by If uu has four continuous derivatives on [0,1][0,1], Taylor’s theorem gives u(ti±1)=u(ti±h)=u(ti)±h u′(ti)+h22u′′(ti)±h36u′′′(ti)+O(h4).u(t_{i\pm1})=u(t_{i}\pm h)=u(t_i)\pm h\,u'(t_i)+\frac{h^2}{2}u''(t_i)\pm\frac{h^3}{6}u'''(t_i)+O(h^4). Adding the two expansions cancels the odd powers of hh and gives the difference for −u′′(ti)-u''(t_i) of Section 2.2, with error O(h2)O(h^2). Subtracting them cancels the even powers: u(ti+1)−u(ti−1)=2h u′(ti)+h33u′′′(ti)+O(h4),u(t_{i+1})-u(t_{i-1})=2h\,u'(t_i)+\frac{h^3}{3}u'''(t_i)+O(h^4), so (xi+1−xi−1)/(2h)=u′(ti)+O(h2)(x_{i+1}-x_{i-1})/(2h)=u'(t_i)+O(h^2) when xj=u(tj)x_j=u(t_j). gives −u′′(ti)+c u′(ti)≈2xi−xi−1−xi+1h2+c xi+1−xi−12h=2xi−(1+γ) xi−1−(1−γ) xi+1h2,γ=ch2,\begin{aligned} -u''(t_i)+c\,u'(t_i) &\approx\frac{2x_i-x_{i-1}-x_{i+1}}{h^2}+c\,\frac{x_{i+1}-x_{i-1}}{2h}\\ &=\frac{2x_i-(1+\gamma)\,x_{i-1}-(1-\gamma)\,x_{i+1}}{h^2}, \qquad \gamma=\frac{ch}{2}, \end{aligned} where the equality writes c/(2h)c/(2h) as γ/h2\gamma/h^2 and collects the terms in xi−1x_{i-1} and in xi+1x_{i+1}. As in Section 2.2, the last expression is a linear function of x\mathbf{x}, so it defines a matrix A∈Rd×d\mathbf{A}\in\mathbb{R}^{d\times d}: for every x∈Rd\mathbf{x}\in\mathbb{R}^d and i∈{1,…,d}i\in\{1,\dots,d\}, (Ax)i(\mathbf{A}\mathbf{x})_i is this expression. When x\mathbf{x} holds the values of uu, the vector Ax\mathbf{A}\mathbf{x} therefore holds approximations of the values of −u′′+c u′-u''+c\,u' at the interior points. The diagonal entries of A\mathbf{A} are 2/h22/h^2, its entries below the diagonal are Ai,i−1=−(1+γ)/h2A_{i,i-1}=-(1+\gamma)/h^2, and its entries above the diagonal are Ai−1,i=−(1−γ)/h2A_{i-1,i}=-(1-\gamma)/h^2. When c=0c=0, γ=0\gamma=0 and A\mathbf{A} is the symmetric matrix of Section 2.2. When c≠0c\neq0, Ai,i−1≠Ai−1,iA_{i,i-1}\neq A_{i-1,i}, so A\mathbf{A} is not symmetric. For 0<γ<10<\gamma<1, it is similar to a symmetric matrix. With s=(1+γ)/(1−γ)s=\sqrt{(1+\gamma)/(1-\gamma)} and S=diag⁡(1,s,s2,…,sd−1)\mathbf{S}=\operatorname{diag}(1,s,s^2,\dots,s^{d-1}), the matrix A~=S−1AS\widetilde{\mathbf{A}}=\mathbf{S}^{-1}\mathbf{A}\mathbf{S} is Since S\mathbf{S} is diagonal with Sii=si−1S_{ii}=s^{i-1}, the entries of A~=S−1AS\widetilde{\mathbf{A}}=\mathbf{S}^{-1}\mathbf{A}\mathbf{S} are A~ik=Sii−1AikSkk=sk−iAik\widetilde A_{ik}=S_{ii}^{-1}A_{ik}S_{kk}=s^{k-i}A_{ik}. We check that A~ik=A~ki\widetilde A_{ik}=\widetilde A_{ki} in three cases. If ∣i−k∣≥2|i-k|\ge2, then Aik=Aki=0A_{ik}=A_{ki}=0, because A\mathbf{A} is tridiagonal, so A~ik=A~ki=0\widetilde A_{ik}=\widetilde A_{ki}=0. If k=ik=i, there is nothing to check, and A~ii=Aii=2/h2\widetilde A_{ii}=A_{ii}=2/h^2. If ∣i−k∣=1|i-k|=1, the two entries are, for i∈{2,…,d}i\in\{2,\dots,d\}, A~i,i−1=Ai,i−1s=−1+γh21−γ1+γ=−1−γ2h2,A~i−1,i=s Ai−1,i=−1−γh21+γ1−γ=−1−γ2h2.\begin{aligned}\widetilde A_{i,i-1}&=\frac{A_{i,i-1}}{s}=-\frac{1+\gamma}{h^2}\sqrt{\frac{1-\gamma}{1+\gamma}}=-\frac{\sqrt{1-\gamma^2}}{h^2},\\\widetilde A_{i-1,i}&=s\,A_{i-1,i}=-\frac{1-\gamma}{h^2}\sqrt{\frac{1+\gamma}{1-\gamma}}=-\frac{\sqrt{1-\gamma^2}}{h^2}.\end{aligned} They are equal, so A~\widetilde{\mathbf{A}} is symmetric, and it is tridiagonal by the first case. The rescaling makes the weight 1+γ1+\gamma of the upstream neighbor and the weight 1−γ1-\gamma of the downstream one meet at their geometric mean., with 2/h22/h^2 on its diagonal and −1−γ2/h2-\sqrt{1-\gamma^2}/h^2 on both neighboring diagonals. The eigenvalues of A\mathbf{A} are therefore real. They are (2−21−γ2cos⁡(kπh))/h2\bigl(2-2\sqrt{1-\gamma^2}\cos(k\pi h)\bigr)/h^2 for k=1,…,dk=1,\dots,d, because the computation of Section 2.2, with −1−γ2/h2-\sqrt{1-\gamma^2}/h^2 in place of −1/h2-1/h^2 on the neighboring diagonals, shows that the vector with entries sin⁡(kπti)\sin(k\pi t_i) is an eigenvector of A~\widetilde{\mathbf{A}} with this eigenvalue. The eigenvectors of A\mathbf{A}, however, are not orthogonal. Since A=SA~S−1\mathbf{A}=\mathbf{S}\widetilde{\mathbf{A}}\mathbf{S}^{-1}, an eigenvector v~\widetilde{\mathbf{v}} of A~\widetilde{\mathbf{A}} gives the eigenvector Sv~\mathbf{S}\widetilde{\mathbf{v}} of A\mathbf{A} for the same eigenvalue, so the eigenvector of A\mathbf{A} for the kk-th eigenvalue has the entries si−1sin⁡(kπti)s^{i-1}\sin(k\pi t_i). For c>0c>0, the fluid that carries the heat or pollutant moves at speed cc in the direction of increasing tt, toward t=1t=1, and γ=ch/2>0\gamma=ch/2>0 gives s>1s>1. The factor si−1s^{i-1} then grows geometrically along the grid, from 11 at t1t_1 to sd−1s^{d-1} at tdt_d, so every eigenvector has most of its norm near t=1t=1. For d=40d=40 and γ=0.2\gamma=0.2, the matrix of Figure 13, sd−1≈2.7⋅103s^{d-1}\approx2.7\cdot10^3, every unit eigenvector has at least 85%85\% of its squared norm at the grid points with ti≥3/4t_i\ge3/4, and two of them have an inner product of 0.980.98 in absolute value. The matrix V=SV~\mathbf{V}=\mathbf{S}\widetilde{\mathbf{V}}, where the columns of V~\widetilde{\mathbf{V}} are the orthonormal eigenvectors of A~\widetilde{\mathbf{A}}, diagonalizes A\mathbf{A} with the condition number κ(V)=κ(S)=sd−1\kappa(\mathbf{V})=\kappa(\mathbf{S})=s^{d-1}, the factor of Lemma 7. A product costs O(d)O(d) operations, as for −u′′-u''.
  • Jacobians of dynamical systems. A system that evolves by x˙=F(x)\dot{\mathbf{x}}=F(\mathbf{x}), for a map F:Rd→RdF:\mathbb{R}^d\to\mathbb{R}^d, is at rest at a point x⋆\mathbf{x}^\star where F(x⋆)=0F(\mathbf{x}^\star)=0. A small perturbation y=x−x⋆\mathbf{y}=\mathbf{x}-\mathbf{x}^\star then evolves approximately by y˙=Jy\dot{\mathbf{y}}=\mathbf{J}\mathbf{y}, where J\mathbf{J} is the Jacobian of FF at x⋆\mathbf{x}^\star, with entries Jij=∂Fi(x⋆)/∂xjJ_{ij}=\partial F_i(\mathbf{x}^\star)/\partial x_j, because F(x⋆+y)≈JyF(\mathbf{x}^\star+\mathbf{y})\approx\mathbf{J}\mathbf{y} to first order. If J\mathbf{J} has a basis of eigenvectors v1,…,vd\mathbf{v}_1,\dots,\mathbf{v}_d, with Jvj=λjvj\mathbf{J}\mathbf{v}_j=\lambda_j\mathbf{v}_j, and the perturbation starts at y(0)=∑j=1dcjvj\mathbf{y}(0)=\sum_{j=1}^dc_j\mathbf{v}_j, then Each term solves the equation, ddt(cjeλjtvj)=λjcjeλjtvj=J(cjeλjtvj),\frac{d}{dt}\bigl(c_je^{\lambda_jt}\mathbf v_j\bigr)=\lambda_jc_je^{\lambda_jt}\mathbf v_j=\mathbf J\bigl(c_je^{\lambda_jt}\mathbf v_j\bigr), so their sum does too, because the equation is linear, and at t=0t=0 the sum equals y(0)\mathbf y(0). A linear system with a constant matrix has exactly one solution for each starting point, so this sum is the solution. of y˙=Jy\dot{\mathbf{y}}=\mathbf{J}\mathbf{y} at time tt is y(t)=∑j=1dcjeλjtvj\mathbf{y}(t)=\sum_{j=1}^dc_je^{\lambda_jt}\mathbf{v}_j. Since ∣eλjt∣=eRe⁡(λj)t|e^{\lambda_jt}|=e^{\operatorname{Re}(\lambda_j)t}, the term of λj\lambda_j decays when the real part of λj\lambda_j is negative and grows when it is positive. The largest real part, α=max⁡jRe⁡(λj)\alpha=\max_j\operatorname{Re}(\lambda_j), therefore decides whether small perturbations die out, since ∥y(t)∥≤(∑j∣cj∣ ∥vj∥)eαt\|\mathbf{y}(t)\|\le\bigl(\sum_j|c_j|\,\|\mathbf{v}_j\|\bigr)e^{\alpha t}. When α<0\alpha<0, every perturbation decays at least like eαte^{\alpha t}, and the equilibrium is stable. When α>0\alpha>0, a perturbation with cj≠0c_j\neq0 for some λj\lambda_j of real part α\alpha grows like eαte^{\alpha t}, and the equilibrium is unstable. The matrix J\mathbf{J} is not symmetric in general. A product with it is a directional derivative, Jx=ddεF(x⋆+εx)∣ε=0\mathbf{J}\mathbf{x}=\frac{d}{d\varepsilon}F(\mathbf{x}^\star+\varepsilon\mathbf{x})\big|_{\varepsilon=0}, which forward-mode automatic differentiation computes at the cost of a few evaluations of FF. In machine learning, simultaneous gradient steps on the two players of a game, such as the generator and the discriminator of a generative adversarial network (GAN), follow such a vector field, and eigenvalues of its Jacobian with large imaginary parts make the iterates circle around an equilibrium rather than approach it (Mescheder et al., 2017). The simplest case is min⁡θmax⁡ϕθϕ\min_\theta\max_\phi\theta\phi, where θ˙=−ϕ\dot\theta=-\phi and ϕ˙=θ\dot\phi=\theta, so that J=[0−110]\mathbf{J}=\left[\begin{smallmatrix}0&-1\\1&0\end{smallmatrix}\right], whose eigenvalues ±i\pm i describe a pure rotation.
  • Random walks on directed graphs. On a directed graph with dd nodes, let Wij≥0W_{ij}\ge0 be the weight of the edge from node ii to node jj, with Wij=0W_{ij}=0 when there is no such edge. An edge from ii to jj need not come with an edge from jj to ii, so W\mathbf{W} is not symmetric. A random walk steps from node ii to node jj with probability Pij=Wij/∑kWikP_{ij}=W_{ij}/\sum_kW_{ik}, assuming that every node has an outgoing edge. The rows of the transition matrix P=diag⁡(W1)−1W\mathbf{P}=\operatorname{diag}(\mathbf{W}\mathbf{1})^{-1}\mathbf{W} sum to one, P1=1\mathbf{P}\mathbf{1}=\mathbf{1}. If (pk)i(\mathbf{p}_k)_i is the probability that the walker is at node ii after kk steps, then (pk+1)j=∑i(pk)iPij(\mathbf{p}_{k+1})_j=\sum_i(\mathbf{p}_k)_iP_{ij}, that is, pk+1=P⊤pk\mathbf{p}_{k+1}=\mathbf{P}^\top\mathbf{p}_k. A stationary distribution, which one step of the walk leaves unchanged, is therefore an eigenvector of P⊤\mathbf{P}^\top with eigenvalue 11, P⊤π=π\mathbf{P}^\top\boldsymbol{\pi}=\boldsymbol{\pi}. It gives the long-run fraction of time that the walker spends at each node, and on the graph of hyperlinks between web pages, with random jumps added, it is the PageRank of Brin and Page (1998). The other eigenvalues of P⊤\mathbf{P}^\top set how Assume that P⊤\mathbf P^\top is diagonalizable and that 11 is a simple eigenvalue, and scale π\boldsymbol\pi so that its entries sum to one. Let λ2,…,λd\lambda_2,\dots,\lambda_d be the other eigenvalues of P⊤\mathbf P^\top, repeated according to multiplicity, with eigenvectors w2,…,wd\mathbf w_2,\dots,\mathbf w_d such that π,w2,…,wd\boldsymbol\pi,\mathbf w_2,\dots,\mathbf w_d is a basis of Cd\mathbb C^d, which exists because P⊤\mathbf P^\top is diagonalizable. Write p0=c1π+∑j=2dcjwj\mathbf p_0=c_1\boldsymbol\pi+\sum_{j=2}^dc_j\mathbf w_j. Since P1=1\mathbf P\mathbf 1=\mathbf 1, we have 1⊤P⊤=1⊤\mathbf 1^\top\mathbf P^\top=\mathbf 1^\top, so 1⊤wj=1⊤P⊤wj=λj 1⊤wj,j∈{2,…,d},\mathbf 1^\top\mathbf w_j=\mathbf 1^\top\mathbf P^\top\mathbf w_j=\lambda_j\,\mathbf 1^\top\mathbf w_j,\qquad j\in\{2,\dots,d\}, and λj≠1\lambda_j\neq1, because 11 is simple, gives 1⊤wj=0\mathbf 1^\top\mathbf w_j=0. Summing the entries of p0\mathbf p_0, a distribution, therefore gives c1=1⊤p0=1c_1=\mathbf 1^\top\mathbf p_0=1. Since pk=(P⊤)kp0\mathbf p_k=(\mathbf P^\top)^k\mathbf p_0, and (P⊤)k(\mathbf P^\top)^k multiplies each eigenvector by the kk-th power of its eigenvalue, the term of π\boldsymbol\pi stays and, as c1=1c_1=1, pk−π=(P⊤)kp0−π=c1(P⊤)kπ−π+∑j=2dcj(P⊤)kwj=c1π−π+∑j=2dcjλjkwj=∑j=2dcjλjkwj.\begin{aligned}\mathbf p_k-\boldsymbol\pi&=(\mathbf P^\top)^k\mathbf p_0-\boldsymbol\pi=c_1(\mathbf P^\top)^k\boldsymbol\pi-\boldsymbol\pi+\sum_{j=2}^dc_j(\mathbf P^\top)^k\mathbf w_j\\&=c_1\boldsymbol\pi-\boldsymbol\pi+\sum_{j=2}^dc_j\lambda_j^k\mathbf w_j=\sum_{j=2}^dc_j\lambda_j^k\mathbf w_j.\end{aligned} The term of λj\lambda_j shrinks by the factor ∣λj∣|\lambda_j| at each step, so the slowest terms, those of largest modulus, set the pace. Precisely, if every λj\lambda_j has modulus at most r<1r<1, then ∥pk−π∥≤C rk,C=∑j=2d∣cj∣ ∥wj∥.\|\mathbf p_k-\boldsymbol\pi\|\le C\,r^k,\qquad C=\sum_{j=2}^d|c_j|\,\|\mathbf w_j\|. In Theorem 1, the error shrinks by the factor ρ2/∣λ⋆∣\rho_2/|\lambda_\star| per step, where λ⋆\lambda_\star is the eigenvalue of largest modulus present in the starting vector and ρ2\rho_2 is the largest modulus among the other eigenvalues present. Here that eigenvalue is 11, and rr plays the role of ρ2\rho_2. That theorem does not apply here, because it assumes a symmetric matrix and P⊤\mathbf P^\top is not one: the wj\mathbf w_j need not be orthogonal, and CC can be much larger than ∥p0−π∥\|\mathbf p_0-\boldsymbol\pi\|. Power iteration without symmetry, below, states what carries over., and complex ones make it Assume that P⊤\mathbf P^\top is diagonalizable, and expand p0\mathbf p_0 on a basis of its eigenvectors. Since P⊤\mathbf P^\top is real, conjugating P⊤w=λw\mathbf P^\top\mathbf w=\lambda\mathbf w gives P⊤wˉ=λˉwˉ\mathbf P^\top\bar{\mathbf w}=\bar\lambda\bar{\mathbf w}, so the basis can be chosen so that the eigenvectors for λˉ\bar\lambda are the conjugates of those for λ\lambda. Since p0\mathbf p_0 is real, conjugating its expansion gives an expansion of p0\mathbf p_0 in the same basis, and by uniqueness the coefficient of wˉ\bar{\mathbf w} is the conjugate cˉ\bar c of the coefficient cc of w\mathbf w. Write λ=ρeiω\lambda=\rho e^{i\omega} with ρ>0\rho>0 and ω∈(0,π)\omega\in(0,\pi), and cw=a+ibc\mathbf w=\mathbf a+i\mathbf b with a,b∈Rd\mathbf a,\mathbf b\in\mathbb R^d. After kk steps, the two terms of the pair add up to the real vector cλkw+cˉλˉkwˉ=2Re⁡(cλkw)=2ρk(cos⁡(kω) a−sin⁡(kω) b).c\lambda^k\mathbf w+\bar c\bar\lambda^k\bar{\mathbf w}=2\operatorname{Re}\bigl(c\lambda^k\mathbf w\bigr)=2\rho^k\bigl(\cos(k\omega)\,\mathbf a-\sin(k\omega)\,\mathbf b\bigr). Writing ai+ibi=mieiϕia_i+ib_i=m_ie^{i\phi_i} with mi≥0m_i\ge0, its entry ii is 2ρkmicos⁡(kω+ϕi)2\rho^km_i\cos(k\omega+\phi_i), which changes sign every π/ω\pi/\omega steps on average while its size shrinks like ρk\rho^k. When this pair has the largest modulus among the eigenvalues other than 11 and c≠0c\neq0, it dominates pk−π\mathbf p_k-\boldsymbol\pi for large kk, so at every node with mi>0m_i>0 the probability alternately exceeds and falls short of its limit. In Figure 12, ω≈119∘\omega\approx119^\circ, so the pattern repeats about every three steps. A negative real eigenvalue is the case ω=π\omega=\pi: its term changes sign at every step. A positive one keeps its sign and decays without oscillating. on the way, as Figure 12 below shows. A product with P⊤\mathbf{P}^\top costs one pass over the edges, (P⊤x)j=∑iPijxi(\mathbf{P}^\top\mathbf{x})_j=\sum_iP_{ij}x_i over the edges i→ji\to j.
Four panels on a random walk. Top left: a directed graph with three groups of twenty nodes on the corners of a triangle, with most edges going from each group to the next, counterclockwise. Top right: its transition matrix, with three dense blocks above the block diagonal and in the bottom-left corner. Bottom left: the probability of each group over thirty steps, oscillating with period three and settling at one third. Bottom right: the eigenvalues in the complex plane, with the eigenvalue 1, a complex pair of modulus 0.81 at angles plus and minus 119 degrees, and the others within radius 0.45.
Figure 12. The random walk on a directed graph used in this section (Section 5.1). (a) The graph: 60 nodes in three groups of 20, teal, gold and pink, arranged in the cycle 1 → 2 → 3 → 1 that the large arrows show. Every node has five outgoing edges: four to distinct nodes of the next group, and one to a node anywhere else, other than itself and these four, all drawn uniformly at random. The 259 edges that end in the next group are drawn in the color of the group they leave, and the other 41 in black (dashed). (b) The transition matrix P\mathbf P, with rows and columns ordered by group and Pij=1/5P_{ij}=1/5 for every edge i→ji\to j: the edges into the next group fill three colored blocks, and the other edges are the scattered black entries. (c) The probability of each group under the distribution pk=(P⊤)kp0\mathbf p_k=(\mathbf P^\top)^k\mathbf p_0 of the walker, started uniformly on group 1. It circulates through the groups with period three and settles at the stationary values 0.335, 0.331 and 0.334, close to 1/31/3 (grey, dashed). Between steps 10 and 30, the largest gap to these values shrinks by a factor of 0.80 per step on average, measured as the 20th root of the ratio of the gaps at steps 30 and 10. This is close to the modulus 0.81 of the pair λ2,λˉ2\lambda_2,\bar\lambda_2 of panel (d), whose terms dominate the gap and shrink by that factor at each step. The two numbers differ slightly because these terms oscillate. The slider above the figure chooses a step kk from 0 to 30: panel (c) marks it (black, dashed), and panel (a) draws at each node a disc, in the color of its group, whose area is proportional to the probability (pk)i(\mathbf p_k)_i that the walker is at that node after kk steps. (d) The eigenvalues of P\mathbf P in the complex plane, all inside the unit circle (grey, dashed). The eigenvalue 1 has the eigenvector 1\mathbf 1 for P\mathbf P, and the stationary distribution for P⊤\mathbf P^\top. The pair λ2,λˉ2=0.81 e±i 119∘\lambda_2,\bar\lambda_2=0.81\,e^{\pm i\,119^\circ} produces the circulation of panel (c), a third of a turn per step damped by the factor 0.81. The other 57 eigenvalues have modulus below 0.45.

The figures of this section use a random walk on a graph with three groups of 20 nodes arranged in a cycle, shown in Figure 12 above. Every node has five outgoing edges, four to distinct nodes of the next group and one to another node anywhere, all drawn uniformly at random, and the walk follows one of them, chosen uniformly. The walk therefore tends to move from group 1 to group 2, then to group 3, and back to group 1. Started in group 1, its distribution circulates through the groups while it settles (panel c), and the eigenvalues of P⊤\mathbf{P}^\top account for both behaviors. The 6060 eigenvalues of P⊤\mathbf{P}^\top are distinct, so it has a basis of eigenvectors. Let w\mathbf{w} be the eigenvector for λ2\lambda_2, the eigenvalue of largest modulus after 11 with a positive imaginary part, and let cc be the coefficient of w\mathbf{w} when p0\mathbf{p}_0 is expanded in this basis. As shown in the item on random walks above, the coefficient of π\boldsymbol{\pi} is 11, the coefficient of wˉ\bar{\mathbf{w}}, the eigenvector for λˉ2\bar\lambda_2, is cˉ\bar c, and each step multiplies each term by its eigenvalue, so

pk=π+c λ2k w+cˉ λˉ2k wˉ+rk=π+2Re⁡(c λ2k w)+rk,\mathbf{p}_k=\boldsymbol{\pi}+c\,\lambda_2^k\,\mathbf{w}+\bar c\,\bar\lambda_2^k\,\bar{\mathbf{w}}+\mathbf{r}_k=\boldsymbol{\pi}+2\operatorname{Re}\bigl(c\,\lambda_2^k\,\mathbf{w}\bigr)+\mathbf{r}_k,

where rk\mathbf{r}_k is the sum of the terms of the other 5757 eigenvalues. These have modulus below 0.450.45, so rk\mathbf{r}_k shrinks by at least that factor per step and soon becomes negligible against the middle term. Write λ2=ρ eiω\lambda_2=\rho\,e^{i\omega}, with ρ≈0.81\rho\approx0.81 and ω≈119∘\omega\approx119^\circ (panel d). The middle term equals 2ρkRe⁡(eikωc w)2\rho^k\operatorname{Re}\bigl(e^{ik\omega}c\,\mathbf{w}\bigr): it shrinks by the factor ρ\rho at each step, which is the settling, and its phase advances by ω\omega, about a third of a turn, which is the circulation. In other words, the pair λ2,λˉ2\lambda_2,\bar\lambda_2 is the cycle 1→2→3→11\to2\to3\to1 of the graph, seen in the spectrum. The items below show this by following the probability of each group g∈{1,2,3}g\in\{1,2,3\}, the sum of the entries of pk\mathbf{p}_k over the nodes of gg, where the group after group 33 is group 11.

  • The deviation of a group. Let sg=c∑i∈gwis_g=c\sum_{i\in g}w_i, and write sg=∣sg∣ eiϕgs_g=|s_g|\,e^{i\phi_g}. After kk steps, the probability of group gg Recall the expansion pk=π+2Re⁡(c λ2k w)+rk.\mathbf p_k=\boldsymbol\pi+2\operatorname{Re}\bigl(c\,\lambda_2^k\,\mathbf w\bigr)+\mathbf r_k. Sum it over the nodes ii of gg. A sum of real parts is the real part of the sum, so ∑i∈g(pk)i−∑i∈gπi=2Re⁡(λ2k c∑i∈gwi)+∑i∈g(rk)i=2Re⁡(λ2ksg)+∑i∈g(rk)i.\sum_{i\in g}(\mathbf p_k)_i-\sum_{i\in g}\pi_i=2\operatorname{Re}\Bigl(\lambda_2^k\,c\sum_{i\in g}w_i\Bigr)+\sum_{i\in g}(\mathbf r_k)_i=2\operatorname{Re}\bigl(\lambda_2^ks_g\bigr)+\sum_{i\in g}(\mathbf r_k)_i. Since λ2ksg=ρkeikω ∣sg∣eiϕg=ρk∣sg∣ ei(kω+ϕg)\lambda_2^ks_g=\rho^ke^{ik\omega}\,|s_g|e^{i\phi_g}=\rho^k|s_g|\,e^{i(k\omega+\phi_g)}, its real part is ρk∣sg∣cos⁡(kω+ϕg)\rho^k|s_g|\cos(k\omega+\phi_g), which gives δg(k)\delta_g(k). by δg(k)=2ρk ∣sg∣cos⁡(kω+ϕg)\delta_g(k)=2\rho^k\,|s_g|\cos\bigl(k\omega+\phi_g\bigr), up to the sum of the entries of rk\mathbf{r}_k over gg.
  • The phases. For this walk, ∣s1∣≈0.32|s_1|\approx0.32, ∣s2∣≈∣s3∣≈0.33|s_2|\approx|s_3|\approx0.33, and ϕ1,ϕ2,ϕ3≈−1∘,−120∘,118∘\phi_1,\phi_2,\phi_3\approx-1^\circ,-120^\circ,118^\circ. Since 118∘=−242∘+360∘118^\circ=-242^\circ+360^\circ, each phase is about 120∘120^\circ below the previous one: ϕg+1≈ϕg−120∘\phi_{g+1}\approx\phi_g-120^\circ, also from group 33 to group 11.
  • The deviation moves to the next group. For group g+1g+1 at step k+1k+1, the angle in the cosine is (k+1)ω+ϕg+1≈kω+ϕg+(119∘−120∘)≈kω+ϕg(k+1)\omega+\phi_{g+1}\approx k\omega+\phi_g+(119^\circ-120^\circ)\approx k\omega+\phi_g, the angle for group gg at step kk, and the factor in front is 2ρk+1∣sg+1∣≈ρ⋅2ρk∣sg∣2\rho^{k+1}|s_{g+1}|\approx\rho\cdot2\rho^k|s_g|. Therefore δg+1(k+1)≈0.81 δg(k)\delta_{g+1}(k+1)\approx0.81\,\delta_g(k). For instance, the deviations −0.26-0.26, 0.540.54 and −0.28-0.28 of groups 11, 22 and 33 after one step become −0.20-0.20, 0.430.43 and −0.23-0.23 in groups 22, 33 and 11 after two steps.

Two numbers of one eigenvalue therefore describe panel (c) without running the walk. The angle ω≈119∘\omega\approx119^\circ, about a third of a turn, is the part of the cycle that the deviation travels in one step, so it returns to the same group every 360∘/ω≈3360^\circ/\omega\approx3 steps. The modulus ρ≈0.81\rho\approx0.81 is the part of the deviation that survives each step. Power iteration cannot compute λ2\lambda_2, as the next paragraph shows, because λ2\lambda_2 and λˉ2\bar\lambda_2 have the same modulus. The Arnoldi method can.

Power iteration without symmetry. The iteration vk+1=Avk/∥Avk∥\mathbf{v}_{k+1}=\mathbf{A}\mathbf{v}_k/\|\mathbf{A}\mathbf{v}_k\| of Section 3 needs no symmetry. For A=P⊤\mathbf{A}=\mathbf{P}^\top started from a distribution, it is the walk itself, rescaled: vk=pk/∥pk∥\mathbf{v}_k=\mathbf{p}_k/\|\mathbf{p}_k\|. Suppose that A\mathbf{A} is diagonalizable, that a single real eigenvalue λ1\lambda_1 has the largest modulus, as 11 does here, and that v0\mathbf{v}_0 has a nonzero component on its eigenvector. Let ∣λ2∣|\lambda_2| be the largest modulus among the other eigenvalues. Then the iterates approach the eigenvector of λ1\lambda_1, with an error that shrinks like Expand v0=∑jcjwj\mathbf v_0=\sum_jc_j\mathbf w_j in a basis of eigenvectors, with Awj=λjwj\mathbf A\mathbf w_j=\lambda_j\mathbf w_j and c1≠0c_1\neq0. Since A\mathbf A and λ1\lambda_1 are real, w1\mathbf w_1 can be taken real, and then c1c_1 is real. Then Akv0=λ1k(c1w1+ek),ek=∑j≥2cj(λjλ1)kwj,∥ek∥≤(∑j≥2∣cj∣ ∥wj∥)(∣λ2∣∣λ1∣)k.\begin{aligned}\mathbf A^k\mathbf v_0&=\lambda_1^k\bigl(c_1\mathbf w_1+\mathbf e_k\bigr),\\\mathbf e_k&=\sum_{j\ge2}c_j\Bigl(\frac{\lambda_j}{\lambda_1}\Bigr)^k\mathbf w_j,\\\|\mathbf e_k\|&\le\Bigl(\sum_{j\ge2}|c_j|\,\|\mathbf w_j\|\Bigr)\Bigl(\frac{|\lambda_2|}{|\lambda_1|}\Bigr)^k.\end{aligned} Write xk=c1w1+ek\mathbf x_k=c_1\mathbf w_1+\mathbf e_k, a real vector since it equals Akv0/λ1k\mathbf A^k\mathbf v_0/\lambda_1^k. Then sgn⁡(λ1)kvk=sgn⁡(λ1)kAkv0∥Akv0∥=sgn⁡(λ1)kλ1k xk∣λ1∣k ∥xk∥=xk∥xk∥,\operatorname{sgn}(\lambda_1)^k \mathbf v_k= \operatorname{sgn}(\lambda_1)^k \frac{\mathbf A^k\mathbf v_0}{\|\mathbf A^k\mathbf v_0\|}=\operatorname{sgn}(\lambda_1)^k \frac{\lambda_1^k\,\mathbf x_k}{|\lambda_1|^k\,\|\mathbf x_k\|}=\frac{\mathbf x_k}{\|\mathbf x_k\|}, because λ1k/∣λ1∣k=sgn⁡(λ1)k\lambda_1^k/|\lambda_1|^k=\operatorname{sgn}(\lambda_1)^k and sgn⁡(λ1)2k=1\operatorname{sgn}(\lambda_1)^{2k}=1. When λ1<0\lambda_1<0, the iterates therefore alternate in sign, as in Remark 2. With u=c1w1/∥c1w1∥\mathbf u=c_1\mathbf w_1/\|c_1\mathbf w_1\| and the inequality ∥x/∥x∥−a/∥a∥∥≤2∥x−a∥/∥a∥\bigl\|\mathbf x/\|\mathbf x\|-\mathbf a/\|\mathbf a\|\bigr\|\le2\|\mathbf x-\mathbf a\|/\|\mathbf a\| for nonzero x\mathbf x and a\mathbf a, applied to x=xk\mathbf x=\mathbf x_k and a=c1w1\mathbf a=c_1\mathbf w_1, this gives ∥sgn⁡(λ1)k vk−u∥=∥xk∥xk∥−c1w1∥c1w1∥∥≤2∥ek∥∥c1w1∥≤2∑j≥2∣cj∣ ∥wj∥∥c1w1∥(∣λ2∣∣λ1∣)k.\bigl\|\operatorname{sgn}(\lambda_1)^k\,\mathbf v_k-\mathbf u\bigr\|=\left\|\frac{\mathbf x_k}{\|\mathbf x_k\|}-\frac{c_1\mathbf w_1}{\|c_1\mathbf w_1\|}\right\|\le\frac{2\|\mathbf e_k\|}{\|c_1\mathbf w_1\|}\le\frac{2 \sum_{j\ge2}|c_j|\,\|\mathbf w_j\|}{\|c_1\mathbf w_1\|} \left(\frac{|\lambda_2|}{|\lambda_1|}\right)^k. This is the rate of Theorem 1, with ∣λ2∣|\lambda_2| in the role of ρ2\rho_2, but that theorem does not prove it here: its proof uses orthogonal eigenvectors. Without orthogonality, the constant 2∑j≥2∣cj∣ ∥wj∥/∥c1w1∥2\sum_{j\ge2}|c_j|\,\|\mathbf w_j\|/\|c_1\mathbf w_1\| can be much larger than tan⁡(ϕ0)\tan(\phi_0).. Two features of Section 3 are lost. The Rayleigh quotient vk⊤Avk\mathbf{v}_k^\top\mathbf{A}\mathbf{v}_k converges at that same rate, not at its square as in Theorem 1, because the eigenvectors of the other eigenvalues, which make up the error of the iterate, are Recall Awj=λjwj\mathbf A\mathbf w_j=\lambda_j\mathbf w_j, v0=∑jcjwj\mathbf v_0=\sum_jc_j\mathbf w_j with c1≠0c_1\neq0 and c1w1c_1\mathbf w_1 real, α=∥c1w1∥\alpha=\|c_1\mathbf w_1\| and u=c1w1/α\mathbf u=c_1\mathbf w_1/\alpha, so that Au=λ1u\mathbf A\mathbf u=\lambda_1\mathbf u and ∥u∥=1\|\mathbf u\|=1. Then sgn⁡(λ1)kvk=αu+ek∥αu+ek∥=u+dk,ek=∑j≥2cj(λjλ1)kwj,\begin{aligned}\operatorname{sgn}(\lambda_1)^k\mathbf v_k&=\frac{\alpha\mathbf u+\mathbf e_k}{\|\alpha\mathbf u+\mathbf e_k\|}=\mathbf u+\mathbf d_k,\\\mathbf e_k&=\sum_{j\ge2}c_j\Bigl(\frac{\lambda_j}{\lambda_1}\Bigr)^k\mathbf w_j,\end{aligned} which defines dk\mathbf d_k. Here ∥ek∥\|\mathbf e_k\| shrinks like (∣λ2∣/∣λ1∣)k(|\lambda_2|/|\lambda_1|)^k, and ∥dk∥≤2∥ek∥/α\|\mathbf d_k\|\le2\|\mathbf e_k\|/\alpha by ∥x/∥x∥−a/∥a∥∥≤2∥x−a∥/∥a∥\bigl\|\mathbf x/\|\mathbf x\|-\mathbf a/\|\mathbf a\|\bigr\|\le2\|\mathbf x-\mathbf a\|/\|\mathbf a\|. Since ∥u+dk∥=∥u∥=1\|\mathbf u+\mathbf d_k\|=\|\mathbf u\|=1 gives dk⊤u=−∥dk∥2/2\mathbf d_k^\top\mathbf u=-\|\mathbf d_k\|^2/2, vk⊤Avk−λ1=(u+dk)⊤A(u+dk)−λ1=u⊤Adk+λ1 dk⊤u+dk⊤Adk=u⊤Adk−λ12∥dk∥2+dk⊤Adk.\begin{aligned}\mathbf v_k^\top\mathbf A\mathbf v_k-\lambda_1&=(\mathbf u+\mathbf d_k)^\top\mathbf A(\mathbf u+\mathbf d_k)-\lambda_1\\&=\mathbf u^\top\mathbf A\mathbf d_k+\lambda_1\,\mathbf d_k^\top\mathbf u+\mathbf d_k^\top\mathbf A\mathbf d_k\\&=\mathbf u^\top\mathbf A\mathbf d_k-\frac{\lambda_1}{2}\|\mathbf d_k\|^2+\mathbf d_k^\top\mathbf A\mathbf d_k.\end{aligned} Hence, using ∣dk⊤Adk∣≤∥A∥ ∥dk∥2|\mathbf d_k^\top\mathbf A\mathbf d_k|\le\|\mathbf A\|\,\|\mathbf d_k\|^2 and ∥dk∥≤2∥ek∥/α\|\mathbf d_k\|\le2\|\mathbf e_k\|/\alpha, ∣vk⊤Avk−λ1−u⊤Adk∣=∣−λ12∥dk∥2+dk⊤Adk∣≤(∣λ1∣2+∥A∥)∥dk∥2≤2(∣λ1∣+2∥A∥)∥ek∥2α2.\begin{aligned}\bigl|\mathbf v_k^\top\mathbf A\mathbf v_k-\lambda_1-\mathbf u^\top\mathbf A\mathbf d_k\bigr|&=\Bigl|-\frac{\lambda_1}{2}\|\mathbf d_k\|^2+\mathbf d_k^\top\mathbf A\mathbf d_k\Bigr|\\&\le\Bigl(\frac{|\lambda_1|}{2}+\|\mathbf A\|\Bigr)\|\mathbf d_k\|^2\\&\le2\bigl(|\lambda_1|+2\|\mathbf A\|\bigr)\frac{\|\mathbf e_k\|^2}{\alpha^2}.\end{aligned} So the error equals u⊤Adk\mathbf u^\top\mathbf A\mathbf d_k up to a term of the order of ∥ek∥2\|\mathbf e_k\|^2. Let N=∥αu+ek∥N=\|\alpha\mathbf u+\mathbf e_k\|. Then ∣N−α∣≤∥ek∥|N-\alpha|\le\|\mathbf e_k\|, because the triangle inequality ∥a+b∥≤∥a∥+∥b∥\|\mathbf a+\mathbf b\|\le\|\mathbf a\|+\|\mathbf b\| gives both N−α≤∥αu∥+∥ek∥−α=∥ek∥N-\alpha\le\|\alpha\mathbf u\|+\|\mathbf e_k\|-\alpha=\|\mathbf e_k\| and α−N=∥(αu+ek)−ek∥−N≤∥ek∥\alpha-N=\|(\alpha\mathbf u+\mathbf e_k)-\mathbf e_k\|-N\le \|\mathbf e_k\|. So N≥α/2N\ge\alpha/2 once ∥ek∥≤α/2\|\mathbf e_k\|\le\alpha/2, which holds for large enough kk. More precisely, with C=∑j≥2∣cj∣ ∥wj∥C=\sum_{j\ge2}|c_j|\,\|\mathbf w_j\|, the triangle inequality gives ∥ek∥≤C (∣λ2∣/∣λ1∣)k\|\mathbf e_k\|\le C\,(|\lambda_2|/|\lambda_1|)^k, so ∥ek∥≤α/2\|\mathbf e_k\|\le\alpha/2, and hence N≥α/2N\ge\alpha/2, for every k≥ln⁡(2C/α)ln⁡(∣λ1∣/∣λ2∣).k\ge\frac{\ln(2C/\alpha)}{\ln(|\lambda_1|/|\lambda_2|)}. With u⊤Au=λ1\mathbf u^\top\mathbf A\mathbf u=\lambda_1, exactly, dk=αu+ekN−u=(α−N) u+ekN,u⊤Adk=u⊤Aek−λ1(N−α)N,N−α=N2−α2N+α=2α u⊤ek+∥ek∥2N+α.\begin{aligned}\mathbf d_k&=\frac{\alpha\mathbf u+\mathbf e_k}{N}-\mathbf u=\frac{(\alpha-N)\,\mathbf u+\mathbf e_k}{N},\\\mathbf u^\top\mathbf A\mathbf d_k&=\frac{\mathbf u^\top\mathbf A\mathbf e_k-\lambda_1(N-\alpha)}{N},\\N-\alpha&=\frac{N^2-\alpha^2}{N+\alpha}=\frac{2\alpha\,\mathbf u^\top\mathbf e_k+\|\mathbf e_k\|^2}{N+\alpha}.\end{aligned} In the formula for u⊤Adk\mathbf u^\top\mathbf A\mathbf d_k, replace NN by α\alpha in the denominator and N−αN-\alpha by u⊤ek\mathbf u^\top\mathbf e_k, which is its first-order part. This gives Sk=u⊤Aek−λ1 u⊤ekα=u⊤(A−λ1Id) ekα.S_k=\frac{\mathbf u^\top\mathbf A\mathbf e_k-\lambda_1\,\mathbf u^\top\mathbf e_k}{\alpha}=\frac{\mathbf u^\top(\mathbf A-\lambda_1\mathbb I_d)\,\mathbf e_k}{\alpha}. Then u⊤Adk−Sk=u⊤Aek(1N−1α)−λ1(N−αN−u⊤ekα).\mathbf u^\top\mathbf A\mathbf d_k-S_k=\mathbf u^\top\mathbf A\mathbf e_k\Bigl(\frac1N-\frac1\alpha\Bigr)-\lambda_1\Bigl(\frac{N-\alpha}{N}-\frac{\mathbf u^\top\mathbf e_k}{\alpha}\Bigr). In the first term, 1N−1α=α−NαN\frac1N-\frac1\alpha=\frac{\alpha-N}{\alpha N}. In the second, substitute the formula for N−αN-\alpha, put both fractions over αN(N+α)\alpha N(N+\alpha), and factor 2α2−N(N+α)=(α−N)(2α+N)2\alpha^2-N(N+\alpha)=(\alpha-N)(2\alpha+N): N−αN−u⊤ekα=2α u⊤ek+∥ek∥2N(N+α)−u⊤ekα=2α2 u⊤ek+α∥ek∥2−N(N+α) u⊤ekαN(N+α)=(2α2−N(N+α)) u⊤ekαN(N+α)+∥ek∥2N(N+α)=(α−N)(2α+N) u⊤ekαN(N+α)+∥ek∥2N(N+α).\begin{aligned}\frac{N-\alpha}{N}-\frac{\mathbf u^\top\mathbf e_k}{\alpha}&=\frac{2\alpha\,\mathbf u^\top\mathbf e_k+\|\mathbf e_k\|^2}{N(N+\alpha)}-\frac{\mathbf u^\top\mathbf e_k}{\alpha}\\&=\frac{2\alpha^2\,\mathbf u^\top\mathbf e_k+\alpha\|\mathbf e_k\|^2-N(N+\alpha)\,\mathbf u^\top\mathbf e_k}{\alpha N(N+\alpha)}\\&=\frac{\bigl(2\alpha^2-N(N+\alpha)\bigr)\,\mathbf u^\top\mathbf e_k}{\alpha N(N+\alpha)}+\frac{\|\mathbf e_k\|^2}{N(N+\alpha)}\\&=\frac{(\alpha-N)(2\alpha+N)\,\mathbf u^\top\mathbf e_k}{\alpha N(N+\alpha)}+\frac{\|\mathbf e_k\|^2}{N(N+\alpha)}.\end{aligned} Both terms of u⊤Adk−Sk\mathbf u^\top\mathbf A\mathbf d_k-S_k now carry a factor α−N\alpha-N or ∥ek∥2\|\mathbf e_k\|^2. Bound each factor with ∣u⊤Aek∣≤∥A∥ ∥ek∥|\mathbf u^\top\mathbf A\mathbf e_k|\le\|\mathbf A\|\,\|\mathbf e_k\|, ∣α−N∣≤∥ek∥|\alpha-N|\le\|\mathbf e_k\|, ∣u⊤ek∣≤∥ek∥|\mathbf u^\top\mathbf e_k|\le\|\mathbf e_k\|, (2α+N)/(N+α)≤2(2\alpha+N)/(N+\alpha)\le2 and 1/(N+α)≤1/α1/(N+\alpha)\le1/\alpha, then use N≥α/2N\ge\alpha/2: ∣u⊤Adk−Sk∣≤∣u⊤Aek∣ ∣α−N∣αN≤+∣λ1∣ ∣α−N∣ (2α+N) ∣u⊤ek∣αN(N+α)≤+∣λ1∣ ∥ek∥2N(N+α)≤∥A∥ ∥ek∥2αN+2∣λ1∣ ∥ek∥2αN+∣λ1∣ ∥ek∥2αN=(∥A∥+3∣λ1∣)∥ek∥2αN≤2(∥A∥+3∣λ1∣)∥ek∥2α2.\begin{aligned}\bigl|\mathbf u^\top\mathbf A\mathbf d_k-S_k\bigr|&\le|\mathbf u^\top\mathbf A\mathbf e_k|\,\frac{|\alpha-N|}{\alpha N}\\&\phantom{\le}+|\lambda_1|\,\frac{|\alpha-N|\,(2\alpha+N)\,|\mathbf u^\top\mathbf e_k|}{\alpha N(N+\alpha)}\\&\phantom{\le}+|\lambda_1|\,\frac{\|\mathbf e_k\|^2}{N(N+\alpha)}\\&\le\|\mathbf A\|\,\frac{\|\mathbf e_k\|^2}{\alpha N}+2|\lambda_1|\,\frac{\|\mathbf e_k\|^2}{\alpha N}+|\lambda_1|\,\frac{\|\mathbf e_k\|^2}{\alpha N}\\&=\bigl(\|\mathbf A\|+3|\lambda_1|\bigr)\frac{\|\mathbf e_k\|^2}{\alpha N}\\&\le2\bigl(\|\mathbf A\|+3|\lambda_1|\bigr)\frac{\|\mathbf e_k\|^2}{\alpha^2}.\end{aligned} Adding this bound to the bound on ∣vk⊤Avk−λ1−u⊤Adk∣|\mathbf v_k^\top\mathbf A\mathbf v_k-\lambda_1-\mathbf u^\top\mathbf A\mathbf d_k| above, ∣vk⊤Avk−λ1−Sk∣≤∣vk⊤Avk−λ1−u⊤Adk∣≤+∣u⊤Adk−Sk∣≤2(∣λ1∣+2∥A∥)∥ek∥2α2≤+2(∥A∥+3∣λ1∣)∥ek∥2α2=2(4∣λ1∣+3∥A∥)∥ek∥2α2,\begin{aligned}\bigl|\mathbf v_k^\top\mathbf A\mathbf v_k-\lambda_1-S_k\bigr|&\le\bigl|\mathbf v_k^\top\mathbf A\mathbf v_k-\lambda_1-\mathbf u^\top\mathbf A\mathbf d_k\bigr|\\&\phantom{\le}+\bigl|\mathbf u^\top\mathbf A\mathbf d_k-S_k\bigr|\\&\le2\bigl(|\lambda_1|+2\|\mathbf A\|\bigr)\frac{\|\mathbf e_k\|^2}{\alpha^2}\\&\phantom{\le}+2\bigl(\|\mathbf A\|+3|\lambda_1|\bigr)\frac{\|\mathbf e_k\|^2}{\alpha^2}\\&=2\bigl(4|\lambda_1|+3\|\mathbf A\|\bigr)\frac{\|\mathbf e_k\|^2}{\alpha^2},\end{aligned} where Sk=1α u⊤(A−λ1Id) ek=1α u⊤(A−λ1Id)∑j≥2cj(λjλ1)kwj=1α∑j≥2cj(λjλ1)k u⊤(A−λ1Id) wj=1α∑j≥2cj(λjλ1)k (λj−λ1) u⊤wj.\begin{aligned}S_k&=\frac1\alpha\,\mathbf u^\top(\mathbf A-\lambda_1\mathbb I_d)\,\mathbf e_k\\&=\frac1\alpha\,\mathbf u^\top(\mathbf A-\lambda_1\mathbb I_d)\sum_{j\ge2}c_j\Bigl(\frac{\lambda_j}{\lambda_1}\Bigr)^k\mathbf w_j\\&=\frac1\alpha\sum_{j\ge2}c_j\Bigl(\frac{\lambda_j}{\lambda_1}\Bigr)^k\,\mathbf u^\top(\mathbf A-\lambda_1\mathbb I_d)\,\mathbf w_j\\&=\frac1\alpha\sum_{j\ge2}c_j\Bigl(\frac{\lambda_j}{\lambda_1}\Bigr)^k\,(\lambda_j-\lambda_1)\,\mathbf u^\top\mathbf w_j\end{aligned}. If A\mathbf A is symmetric, u⊤wj=(c1/α)w1⊤wj=0\mathbf u^\top\mathbf w_j=(c_1/\alpha) \mathbf w_1^\top\mathbf w_j=0 for j≥2j \ge 2, so Sk=0S_k=0 and the error is of the order of ∥ek∥2\|\mathbf e_k\|^2, the square of the rate, as in Theorem 1. Otherwise u⊤wj≠0\mathbf u^\top\mathbf w_j\neq0 in general, and SkS_k, hence the error, is of the order of (∣λ2∣/∣λ1∣)k(|\lambda_2|/|\lambda_1|)^k, the rate itself. to the eigenvector of λ1\lambda_1. And the next eigenvalues can form a conjugate pair of equal modulus, which defeats power iteration in the way the opposite eigenvalues of Remark 5 do. Once the eigenvector of 11 is deflated, the pair dominates, and the iterates keep turning in the real plane that carries λ2\lambda_2 and λˉ2\bar\lambda_2, without settling on a direction. Panel (b) of Figure 13 below shows both effects, and the Arnoldi method removes them.

5.2 How the Arnoldi method works

The idea The Arnoldi method runs the Gram–Schmidt process on the Krylov subspace Km(A,q1)=span⁡{q1,Aq1,…,Am−1q1}={p(A)q1:p is a polynomial of degree at most m−1}\mathcal{K}_m(\mathbf{A},\mathbf{q}_1)=\operatorname{span}\{\mathbf{q}_1,\mathbf{A}\mathbf{q}_1,\dots,\mathbf{A}^{m-1}\mathbf{q}_1\}=\bigl\{p(\mathbf{A})\mathbf{q}_1:p\text{ is a polynomial of degree at most }m-1\bigr\}, one matrix–vector product per step, exactly as the Lanczos method does, but for a matrix that need not be symmetric. Without symmetry, no coefficient vanishes for free: each step removes the components of the new vector along all the previous basis vectors. The coefficients fill a small upper Hessenberg matrix, and its eigenvalues, real or complex, approximate eigenvalues of A\mathbf{A}.

After m−1m-1 products, the Krylov subspace contains every vector p(A)q1p(\mathbf{A})\mathbf{q}_1 with pp of degree at most m−1m-1, whatever A\mathbf{A} is. To search it, we again need an orthonormal basis q1,…,qm\mathbf{q}_1,\dots,\mathbf{q}_m, the columns of Qm\mathbf{Q}_m, and the coordinates of Aqj\mathbf{A}\mathbf{q}_j in that basis, which form the matrix Hm=Qm⊤AQm\mathbf{H}_m=\mathbf{Q}_m^\top\mathbf{A}\mathbf{Q}_m with entries (Hm)ij=qi⊤Aqj(\mathbf{H}_m)_{ij}=\mathbf{q}_i^\top\mathbf{A}\mathbf{q}_j. The approximations are defined as in Lemma 4: the eigenpairs (ϑ,y)(\vartheta,\mathbf{y}) of Hm\mathbf{H}_m, lifted to x=Qmy\mathbf{x}=\mathbf{Q}_m\mathbf{y}, now possibly complex. What changes is why they are good approximations. For a symmetric matrix, Lemma 5 locates the extreme Ritz values through the extreme values of the Rayleigh quotient. Without symmetry, a Ritz value is still the Rayleigh quotient x∗Ax\mathbf{x}^*\mathbf{A}\mathbf{x} of its unit Ritz vector (Proposition 5), but these quotients are complex numbers, which have no order, and they fill a region that can be much larger than the spectrum (Remark 18). There are no extreme values to locate the eigenvalues. What remains is a condition: we look for a vector x=Qmy\mathbf{x}=\mathbf{Q}_m\mathbf{y} of the Krylov subspace Km(A,q1)=range⁡(Qm)\mathcal{K}_m(\mathbf{A},\mathbf{q}_1)=\operatorname{range}(\mathbf{Q}_m) and a number ϑ\vartheta whose residual Ax−ϑx\mathbf{A}\mathbf{x}-\vartheta\mathbf{x} is orthogonal to Km(A,q1)\mathcal{K}_m(\mathbf{A},\mathbf{q}_1). This choice has four consequences.

  • It is the eigenvalue problem of Hm\mathbf{H}_m. The columns of Qm\mathbf{Q}_m are an orthonormal basis of Km(A,q1)\mathcal{K}_m(\mathbf{A},\mathbf{q}_1) (Lemma 6), so a vector is orthogonal to Km(A,q1)\mathcal{K}_m(\mathbf{A},\mathbf{q}_1) exactly when Qm⊤\mathbf{Q}_m^\top maps it to 0\mathbf{0}, and Qm⊤Qm=Im\mathbf{Q}_m^\top\mathbf{Q}_m=\mathbb{I}_m. Hence Qm⊤(Ax−ϑx)=Qm⊤AQmy−ϑ Qm⊤Qmy=Hmy−ϑy.\mathbf{Q}_m^\top(\mathbf{A}\mathbf{x}-\vartheta\mathbf{x})=\mathbf{Q}_m^\top\mathbf{A}\mathbf{Q}_m\mathbf{y}-\vartheta\,\mathbf{Q}_m^\top\mathbf{Q}_m\mathbf{y}=\mathbf{H}_m\mathbf{y}-\vartheta\mathbf{y}. The condition Qm⊤(Ax−ϑx)=0\mathbf{Q}_m^\top(\mathbf{A}\mathbf{x}-\vartheta\mathbf{x})=\mathbf{0} is therefore Hmy=ϑy\mathbf{H}_m\mathbf{y}=\vartheta\mathbf{y}, which has mm solutions ϑ\vartheta, counted with multiplicity, found by a small dense eigenvalue solver.
  • It is the most that can be asked of a vector of the subspace. The residual Ax−ϑx\mathbf{A}\mathbf{x}-\vartheta\mathbf{x} has dd entries, while x\mathbf{x} has only the mm free coordinates of y\mathbf{y}, so the residual cannot be made zero in general. The condition asks that its mm coordinates in the basis q1,…,qm\mathbf{q}_1,\dots,\mathbf{q}_m vanish, which gives mm equations for the mm entries of y\mathbf{y}.
  • No eigenpair of the subspace is lost. If an eigenvector of A\mathbf{A} lies in the subspace, its residual is zero, so it satisfies the condition, and the method returns it exactly.
  • What is left of the residual is visible. The residual Ax−ϑx\mathbf{A}\mathbf{x}-\vartheta\mathbf{x} has no component in the subspace, and Proposition 5 shows that it is a multiple of the next basis direction, with norm hm+1,m∣ym∣h_{m+1,m}|y_m|. As in the symmetric case, its size costs no extra product.

Gram–Schmidt on q1,Aq1,A2q1,…\mathbf{q}_1,\mathbf{A}\mathbf{q}_1,\mathbf{A}^2\mathbf{q}_1,\dots computes the basis and the matrix Hm\mathbf{H}_m together, and its first steps, compared with those of Section 4.3, show what symmetry was providing. The colors are those of Section 4.3: a purple coefficient is computed by an inner product at the current step, a green one is the length of the new direction, and a grey one vanishes.

Step 0: Gram–Schmidt on K1(A,q1)=span⁡{q1}\mathcal{K}_1(\mathbf{A},\mathbf{q}_1)=\operatorname{span}\{\mathbf{q}_1\}. There is nothing to do, as in Step 0 of Section 4.3.

Step 1: Gram–Schmidt on K2(A,q1)\mathcal{K}_2(\mathbf{A},\mathbf{q}_1). The first product gives Aq1\mathbf{A}\mathbf{q}_1, and Gram–Schmidt removes its component h11=q1⊤Aq1\textcolor{#7c3aed}{h_{11}}=\mathbf{q}_1^\top\mathbf{A}\mathbf{q}_1 along q1\mathbf{q}_1 and divides the remainder r1=Aq1−h11q1\mathbf{r}_1=\mathbf{A}\mathbf{q}_1-h_{11}\mathbf{q}_1 by its length h21=∥r1∥\textcolor{#16a34a}{h_{21}}=\|\mathbf{r}_1\|. This is Step 1 of Section 4.3, where these numbers were called α1\alpha_1 and β1\beta_1:

Aq1=h11q1+h21q2,q2=r1h21=A−h11Idh21 q1.\mathbf{A}\mathbf{q}_1=\textcolor{#7c3aed}{h_{11}\mathbf{q}_1}+\textcolor{#16a34a}{h_{21}\mathbf{q}_2}, \qquad \mathbf{q}_2=\frac{\mathbf{r}_1}{h_{21}}=\frac{\mathbf{A}-h_{11}\mathbb{I}_d}{h_{21}}\,\mathbf{q}_1 .

As in Section 4.3, write each basis vector as a polynomial in A\mathbf{A} applied to q1\mathbf{q}_1, qj+1=pj(A)q1\mathbf{q}_{j+1}=p_j(\mathbf{A})\mathbf{q}_1, with p0=1p_0=1. Step 1 gives q2=p1(A)q1\mathbf{q}_2=p_1(\mathbf{A})\mathbf{q}_1 for the polynomial of degree one

h21 p1(t)=t p0(t)−h11 p0(t),that is,p1(t)=t−h11h21.h_{21}\,p_1(t)=t\,p_0(t)-h_{11}\,p_0(t),\qquad\text{that is,}\qquad p_1(t)=\frac{t-h_{11}}{h_{21}}.

Each later step solves its relation for the new basis vector and gives the next polynomial in the same way.

Step 2: Gram–Schmidt on K3(A,q1)\mathcal{K}_3(\mathbf{A},\mathbf{q}_1). The second product gives Aq2\mathbf{A}\mathbf{q}_2, which brings the same new direction as A2q1\mathbf{A}^2\mathbf{q}_1, by the argument of Step 2 of Section 4.3, which used no symmetry. Its component along q1\mathbf{q}_1 is where the two methods part. For a symmetric matrix, this component was (Aq1)⊤q2=β1(\mathbf{A}\mathbf{q}_1)^\top\mathbf{q}_2=\beta_1, the length found in Step 1. In general, q1⊤Aq2=(A⊤q1)⊤q2\mathbf{q}_1^\top\mathbf{A}\mathbf{q}_2=(\mathbf{A}^\top\mathbf{q}_1)^\top\mathbf{q}_2, and nothing relates A⊤q1\mathbf{A}^\top\mathbf{q}_1 to the Krylov subspace, so this component is a new number h12\textcolor{#7c3aed}{h_{12}}, computed by an inner product. Removing it and the component h22=q2⊤Aq2\textcolor{#7c3aed}{h_{22}}=\mathbf{q}_2^\top\mathbf{A}\mathbf{q}_2 along q2\mathbf{q}_2, then normalizing, gives

Aq2=h12q1+h22q2+h32q3.\mathbf{A}\mathbf{q}_2=\textcolor{#7c3aed}{h_{12}\mathbf{q}_1}+\textcolor{#7c3aed}{h_{22}\mathbf{q}_2}+\textcolor{#16a34a}{h_{32}\mathbf{q}_3}.

Solving for q3\mathbf{q}_3, with q1=p0(A)q1\mathbf{q}_1=p_0(\mathbf{A})\mathbf{q}_1 and q2=p1(A)q1\mathbf{q}_2=p_1(\mathbf{A})\mathbf{q}_1, gives q3=p2(A)q1\mathbf{q}_3=p_2(\mathbf{A})\mathbf{q}_1 for the polynomial of degree two defined by

h32 p2(t)=t p1(t)−h12 p0(t)−h22 p1(t).h_{32}\,p_2(t)=t\,p_1(t)-h_{12}\,p_0(t)-h_{22}\,p_1(t).

The coefficients found so far give H2=Q2⊤AQ2=[h11h12h21h22]\mathbf{H}_2=\mathbf{Q}_2^\top\mathbf{A}\mathbf{Q}_2=\left[\begin{smallmatrix}h_{11}&h_{12}\\h_{21}&h_{22}\end{smallmatrix}\right], which has the shape of T2\mathbf{T}_2 in Section 4.3, except that its entry h12h_{12} above the diagonal is a new number, not the length h21h_{21} found in Step 1.

Step 3: Gram–Schmidt on K4(A,q1)\mathcal{K}_4(\mathbf{A},\mathbf{q}_1). The third product gives Aq3\mathbf{A}\mathbf{q}_3. In Section 4.3, its component along q1\mathbf{q}_1 vanished because q1⊤Aq3=(Aq1)⊤q3=0\mathbf{q}_1^\top\mathbf{A}\mathbf{q}_3=(\mathbf{A}\mathbf{q}_1)^\top\mathbf{q}_3=0. Here this component is (A⊤q1)⊤q3(\mathbf{A}^\top\mathbf{q}_1)^\top\mathbf{q}_3, nonzero in general, and all three components have to be computed and removed:

Aq3=h13q1+h23q2+h33q3+h43q4.\mathbf{A}\mathbf{q}_3=\textcolor{#7c3aed}{h_{13}\mathbf{q}_1}+\textcolor{#7c3aed}{h_{23}\mathbf{q}_2}+\textcolor{#7c3aed}{h_{33}\mathbf{q}_3}+\textcolor{#16a34a}{h_{43}\mathbf{q}_4}.

Solving for q4\mathbf{q}_4 in the same way gives q4=p3(A)q1\mathbf{q}_4=p_3(\mathbf{A})\mathbf{q}_1 for the polynomial of degree three defined by

h43 p3(t)=t p2(t)−h13 p0(t)−h23 p1(t)−h33 p2(t).h_{43}\,p_3(t)=t\,p_2(t)-h_{13}\,p_0(t)-h_{23}\,p_1(t)-h_{33}\,p_2(t).

Some coefficients still vanish. The vector Aq1\mathbf{A}\mathbf{q}_1 lies in K2(A,q1)=span⁡{q1,q2}\mathcal{K}_2(\mathbf{A},\mathbf{q}_1)=\operatorname{span}\{\mathbf{q}_1,\mathbf{q}_2\}, so it has no component along q3\mathbf{q}_3, and Aq2\mathbf{A}\mathbf{q}_2, which lies in K3(A,q1)\mathcal{K}_3(\mathbf{A},\mathbf{q}_1), has none along q4\mathbf{q}_4. These zeros use only the nesting of the Krylov subspaces, not symmetry. Writing the coefficients of Aqj\mathbf{A}\mathbf{q}_j in column jj, as the identity (H3)ij=qi⊤Aqj(\mathbf{H}_3)_{ij}=\mathbf{q}_i^\top\mathbf{A}\mathbf{q}_j requires, and doing the same for the Lanczos coefficients, gives

H3=[h11h12h13h21h22h230h32h33],T3=[α1β10β1α2β20β2α3].\mathbf{H}_3=\begin{bmatrix} \textcolor{#7c3aed}{h_{11}}&\textcolor{#7c3aed}{h_{12}}&\textcolor{#7c3aed}{h_{13}}\\ \textcolor{#16a34a}{h_{21}}&\textcolor{#7c3aed}{h_{22}}&\textcolor{#7c3aed}{h_{23}}\\ \textcolor{#7d8783}{0}&\textcolor{#16a34a}{h_{32}}&\textcolor{#7c3aed}{h_{33}} \end{bmatrix}, \qquad \mathbf{T}_3=\begin{bmatrix} \textcolor{#7c3aed}{\alpha_1}&\textcolor{#ea580c}{\beta_1}&\textcolor{#7d8783}{0}\\ \textcolor{#16a34a}{\beta_1}&\textcolor{#7c3aed}{\alpha_2}&\textcolor{#ea580c}{\beta_2}\\ \textcolor{#7d8783}{0}&\textcolor{#16a34a}{\beta_2}&\textcolor{#7c3aed}{\alpha_3} \end{bmatrix}.

In T3\mathbf{T}_3, symmetry made each entry above the diagonal either a length already found (orange) or zero (grey). In H3\mathbf{H}_3, these entries are new numbers (purple). The zeros below the first subdiagonal remain in both matrices, because they come from the nesting of Krylov subspaces. A matrix whose entries below the first subdiagonal are zero is called upper Hessenberg.

Step 4: Gram–Schmidt on K5(A,q1)\mathcal{K}_5(\mathbf{A},\mathbf{q}_1). The fourth product gives Aq4\mathbf{A}\mathbf{q}_4. By the argument of Step 3, its components along q1\mathbf{q}_1, q2\mathbf{q}_2 and q3\mathbf{q}_3 are nonzero in general, and the one along q4\mathbf{q}_4 is a new number too. Since Aq4\mathbf{A}\mathbf{q}_4 lies in K5(A,q1)=span⁡{q1,…,q5}\mathcal{K}_5(\mathbf{A},\mathbf{q}_1)=\operatorname{span}\{\mathbf{q}_1,\dots,\mathbf{q}_5\}, it has no component beyond q5\mathbf{q}_5:

Aq4=h14q1+h24q2+h34q3+h44q4+h54q5.\mathbf{A}\mathbf{q}_4=\textcolor{#7c3aed}{h_{14}\mathbf{q}_1}+\textcolor{#7c3aed}{h_{24}\mathbf{q}_2}+\textcolor{#7c3aed}{h_{34}\mathbf{q}_3}+\textcolor{#7c3aed}{h_{44}\mathbf{q}_4}+\textcolor{#16a34a}{h_{54}\mathbf{q}_5}.

The number of inner products grows by one at each step: step jj computes jj of them, where the Lanczos method computes one. Solving the relation above for q5\mathbf{q}_5, as in Steps 1 to 3, gives q5=p4(A)q1\mathbf{q}_5=p_4(\mathbf{A})\mathbf{q}_1 for the polynomial of degree four defined by

h54 p4(t)=t p3(t)−h14 p0(t)−h24 p1(t)−h34 p2(t)−h44 p3(t).h_{54}\,p_4(t)=t\,p_3(t)-h_{14}\,p_0(t)-h_{24}\,p_1(t)-h_{34}\,p_2(t)-h_{44}\,p_3(t).

Each new polynomial involves all the previous ones, and not only the last two as in the three-term recurrence of Section 4.3. The coefficients found so far fill the upper Hessenberg matrix

H4=Q4⊤AQ4=[h11h12h13h14h21h22h23h240h32h33h3400h43h44],\mathbf{H}_4=\mathbf{Q}_4^\top\mathbf{A}\mathbf{Q}_4=\begin{bmatrix} \textcolor{#7c3aed}{h_{11}}&\textcolor{#7c3aed}{h_{12}}&\textcolor{#7c3aed}{h_{13}}&\textcolor{#7c3aed}{h_{14}}\\ \textcolor{#16a34a}{h_{21}}&\textcolor{#7c3aed}{h_{22}}&\textcolor{#7c3aed}{h_{23}}&\textcolor{#7c3aed}{h_{24}}\\ \textcolor{#7d8783}{0}&\textcolor{#16a34a}{h_{32}}&\textcolor{#7c3aed}{h_{33}}&\textcolor{#7c3aed}{h_{34}}\\ \textcolor{#7d8783}{0}&\textcolor{#7d8783}{0}&\textcolor{#16a34a}{h_{43}}&\textcolor{#7c3aed}{h_{44}} \end{bmatrix},

whose grey zeros are the three entries below the first subdiagonal. The last coefficient, h54h_{54} on q5\mathbf{q}_5, lies outside K4(A,q1)\mathcal{K}_4(\mathbf{A},\mathbf{q}_1), as β4\beta_4 did in Section 4.3.

The general step. The same reasoning holds at every step j∈{1,2,3,… }j\in\{1,2,3,\dots\}, as long as the previous steps have produced qj\mathbf{q}_j, which for j≥2j\ge2 means that hj,j−1>0h_{j,j-1}>0. The product Aqj\mathbf{A}\mathbf{q}_j lies in Kj+1(A,q1)=span⁡{q1,…,qj+1}\mathcal{K}_{j+1}(\mathbf{A},\mathbf{q}_1)=\operatorname{span}\{\mathbf{q}_1,\dots,\mathbf{q}_{j+1}\}, because qj∈Kj(A,q1)\mathbf{q}_j\in\mathcal{K}_j(\mathbf{A},\mathbf{q}_1), so it has no component beyond qj+1\mathbf{q}_{j+1}. Its components hij=qi⊤Aqj\textcolor{#7c3aed}{h_{ij}}=\mathbf{q}_i^\top\mathbf{A}\mathbf{q}_j along all of q1,…,qj\mathbf{q}_1,\dots,\mathbf{q}_j, on the other hand, have to be computed and removed. What remains is orthogonal to q1,…,qj\mathbf{q}_1,\dots,\mathbf{q}_j, and when its length hj+1,j\textcolor{#16a34a}{h_{j+1,j}} is positive, dividing by it gives the next basis vector:

rj=Aqj−∑i=1jhijqi=hj+1,jqj+1,hj+1,j=∥rj∥.\mathbf{r}_j=\mathbf{A}\mathbf{q}_j\textcolor{#7c3aed}{-\sum_{i=1}^jh_{ij}\mathbf{q}_i}=\textcolor{#16a34a}{h_{j+1,j}\mathbf{q}_{j+1}}, \qquad \textcolor{#16a34a}{h_{j+1,j}}=\|\mathbf{r}_j\| .

Step jj of Definition 3 below is therefore the following Gram–Schmidt step.

qj→ A Aqj→ −h1jq1−⋯−hjjqj rj→ ÷hj+1,j qj+1.\mathbf{q}_j \xrightarrow{\ \mathbf{A}\ } \mathbf{A}\mathbf{q}_j \xrightarrow{\ \textcolor{#7c3aed}{-h_{1j}\mathbf{q}_1-\cdots-h_{jj}\mathbf{q}_j}\ } \mathbf{r}_j \xrightarrow{\ \textcolor{#16a34a}{\div h_{j+1,j}}\ } \textcolor{#16a34a}{\mathbf{q}_{j+1}}.

Step jj costs one product, jj inner products and jj vector updates, that is, O(dj)O(dj) operations besides the product, and every basis vector has to be kept. After mm steps, the method has used mm products, O(dm2)O(dm^2) further operations and O(dm)O(dm) storage. This is the price of nonsymmetry. It equals the cost of the Lanczos method with full reorthogonalization (Algorithm 2), which subtracts all the components anyway, to protect orthogonality in floating-point arithmetic.

Eigenvalues and eigenvectors from the coefficients. Writing the relations Aqj=∑i=1j+1hijqi\mathbf{A}\mathbf{q}_j=\sum_{i=1}^{j+1}h_{ij}\mathbf{q}_i for j=1,…,mj=1,\dots,m as the columns of Compare the columns. Column jj of AQm\mathbf{A}\mathbf{Q}_m is Aqj\mathbf{A}\mathbf{q}_j. Column jj of QmHm\mathbf{Q}_m\mathbf{H}_m is Qm\mathbf{Q}_m times column jj of Hm\mathbf{H}_m, whose nonzero entries are h1j,…,hj+1,jh_{1j},\dots,h_{j+1,j}, in rows 11 to j+1j+1. For j<mj<m, it is therefore ∑i=1j+1hijqi=Aqj\sum_{i=1}^{j+1}h_{ij}\mathbf{q}_i=\mathbf{A}\mathbf{q}_j. The last column is the exception: Hm\mathbf{H}_m has no row m+1m+1, so column mm of QmHm\mathbf{Q}_m\mathbf{H}_m stops at ∑i=1mhimqi\sum_{i=1}^{m}h_{im}\mathbf{q}_i and misses the term hm+1,mqm+1h_{m+1,m}\mathbf{q}_{m+1}. The green matrix hm+1,mqm+1em⊤h_{m+1,m}\mathbf{q}_{m+1}\mathbf{e}_m^\top adds it back: its columns are zero except the last, which is hm+1,mqm+1h_{m+1,m}\mathbf{q}_{m+1}. gives

AQm=QmHm+hm+1,mqm+1em⊤,\mathbf{A}\mathbf{Q}_m=\mathbf{Q}_m\mathbf{H}_m+\textcolor{#16a34a}{h_{m+1,m}\mathbf{q}_{m+1}\mathbf{e}_m^\top},

the analogue of the Lanczos identity, with the same leak through the last basis vector. Every eigenpair (ϑ,y)(\vartheta,\mathbf{y}) of Hm\mathbf{H}_m, with y∈Cm\mathbf{y}\in\mathbb{C}^m and ∥y∥=1\|\mathbf{y}\|=1, gives a Ritz pair (ϑ,Qmy)(\vartheta,\mathbf{Q}_m\mathbf{y}), as in Section 4.3. Multiplying the identity by y\mathbf{y} gives

AQmy=QmHmy+hm+1,mqm+1(em⊤y)=ϑ Qmy+hm+1,m ym qm+1,\mathbf{A}\mathbf{Q}_m\mathbf{y} =\mathbf{Q}_m\mathbf{H}_m\mathbf{y}+h_{m+1,m}\mathbf{q}_{m+1}(\mathbf{e}_m^\top\mathbf{y}) =\vartheta\,\mathbf{Q}_m\mathbf{y}+\textcolor{#16a34a}{h_{m+1,m}\,y_m\,\mathbf{q}_{m+1}},

so the residual of the Ritz pair is again the leak, of norm hm+1,m∣ym∣\textcolor{#16a34a}{h_{m+1,m}|y_m|}. The matrix Hm\mathbf{H}_m is real but, in general, not symmetric, so its eigenvalues can be complex, in conjugate pairs, which is how the method finds the complex eigenvalues of A\mathbf{A}.

The polynomial reading of Section 4.3 carries over, with one change. Its first two steps used no symmetry: the green term of Amq1\mathbf{A}^m\mathbf{q}_1 is now h21h32⋯hm+1,m qm+1h_{21}h_{32}\cdots h_{m+1,m}\,\mathbf{q}_{m+1}, it has the smallest norm among the vectors π(A)q1\pi(\mathbf{A})\mathbf{q}_1 with π\pi monic of degree mm, and the Ritz values at step mm are the roots of the minimizing polynomial πm\pi_m (Proposition 5). What changes is how ∥π(A)q1∥\|\pi(\mathbf{A})\mathbf{q}_1\| depends on the eigenvalues. Suppose that A=VDV−1\mathbf{A}=\mathbf{V}\mathbf{D}\mathbf{V}^{-1} as in Lemma 7 below, with the eigenvalues λ1,…,λd\lambda_1,\dots,\lambda_d on the diagonal of D\mathbf{D}, and write q1=Vc\mathbf{q}_1=\mathbf{V}\mathbf{c}. Then π(D)c=V−1Vπ(D)V−1q1=V−1π(A)q1\pi(\mathbf{D})\mathbf{c} = \mathbf{V}^{-1} \mathbf{V}\pi(\mathbf{D})\mathbf{V}^{-1} \mathbf{q}_1 = \mathbf{V}^{-1}\pi(\mathbf{A})\mathbf{q}_1, and so Vπ(D)c=π(A)q1\mathbf{V} \pi(\mathbf{D})\mathbf{c} = \pi(\mathbf{A})\mathbf{q}_1. Since ∥z∥=∥V−1Vz∥≤∥V−1∥ ∥Vz∥\|\mathbf{z}\|=\|\mathbf{V}^{-1}\mathbf{V}\mathbf{z}\|\le\|\mathbf{V}^{-1}\|\,\|\mathbf{V}\mathbf{z}\| for every z\mathbf{z},

∥π(D)c∥∥V−1∥≤∥π(A)q1∥≤∥V∥ ∥π(D)c∥,∥π(D)c∥2=∑i=1d∣π(λi)∣2 ∣ci∣2.\frac{\|\pi(\mathbf{D})\mathbf{c}\|}{\|\mathbf{V}^{-1}\|} \le\|\pi(\mathbf{A})\mathbf{q}_1\| \le\|\mathbf{V}\|\,\|\pi(\mathbf{D})\mathbf{c}\|, \qquad \|\pi(\mathbf{D})\mathbf{c}\|^2=\sum_{i=1}^d|\pi(\lambda_i)|^2\,|c_i|^2 .

For a symmetric matrix, V\mathbf{V} can be chosen orthogonal, both factors equal 11, and ∥π(A)q1∥\|\pi(\mathbf{A})\mathbf{q}_1\| is exactly the weighted sum over the eigenvalues of Section 4.3. Otherwise, the two bounds differ by the factor κ(V)=∥V∥ ∥V−1∥\kappa(\mathbf{V})=\|\mathbf{V}\|\,\|\mathbf{V}^{-1}\|, which is large when the eigenvectors are nearly parallel. The terms π(λi)civi\pi(\lambda_i)c_i\mathbf{v}_i of π(A)q1=∑i=1dπ(λi)civi\pi(\mathbf{A})\mathbf{q}_1=\sum_{i=1}^d\pi(\lambda_i)c_i\mathbf{v}_i, where vi\mathbf{v}_i is column ii of V\mathbf{V}, can then cancel, and a polynomial can make ∥π(A)q1∥\|\pi(\mathbf{A})\mathbf{q}_1\| small without being small at the eigenvalues that q1\mathbf{q}_1 contains. The Ritz values can then stay far from every eigenvalue until mm is large, and in panel (c) of Figure 13 below they leave the real axis although every eigenvalue is real.

5.3 Definition 3 [Arnoldi recurrence and exact breakdown]

Start with a unit vector q1\mathbf{q}_1. At iteration j≥1j\ge1, compute

hij=qi⊤Aqj(1≤i≤j),rj=Aqj−∑i=1jhijqi,hj+1,j=∥rj∥.\begin{aligned} h_{ij}&=\mathbf{q}_i^\top\mathbf{A}\mathbf{q}_j\qquad(1\le i\le j),\\ \mathbf{r}_j&=\mathbf{A}\mathbf{q}_j-\sum_{i=1}^jh_{ij}\mathbf{q}_i,\\ h_{j+1,j}&=\|\mathbf{r}_j\| . \end{aligned}

If hj+1,j>0h_{j+1,j}>0, define qj+1=rj/hj+1,j\mathbf{q}_{j+1}=\mathbf{r}_j/h_{j+1,j} and continue. If hj+1,j=0h_{j+1,j}=0, stop the run, an exact breakdown as in Definition 2. For m≥1m\ge1, Hm∈Rm×m\mathbf{H}_m\in\mathbb{R}^{m\times m} is the matrix with entries (Hm)ij=hij(\mathbf{H}_m)_{ij}=h_{ij} for i≤j+1i\le j+1 and (Hm)ij=0(\mathbf{H}_m)_{ij}=0 for i>j+1i>j+1:

Hm=[h11h12h13⋯h1mh21h22h23⋯h2m0h32h33⋯h3m⋮⋱⋱⋱⋮0⋯0hm,m−1hmm].\mathbf{H}_m=\begin{bmatrix} h_{11}&h_{12}&h_{13}&\cdots&h_{1m}\\ h_{21}&h_{22}&h_{23}&\cdots&h_{2m}\\ 0&h_{32}&h_{33}&\cdots&h_{3m}\\ \vdots&\ddots&\ddots&\ddots&\vdots\\ 0&\cdots&0&h_{m,m-1}&h_{mm} \end{bmatrix}. ■□\begin{array}{r} \blacksquare\Box \end{array}

The coefficients can equally be computed one at a time: starting from w=Aqj\mathbf{w}=\mathbf{A}\mathbf{q}_j, compute hij=qi⊤wh_{ij}=\mathbf{q}_i^\top\mathbf{w} and update w←w−hijqi\mathbf{w}\leftarrow\mathbf{w}-h_{ij}\mathbf{q}_i for i=1,…,ji=1,\dots,j. This is the modified Gram–Schmidt process. Each update leaves the inner products of w\mathbf{w} with the other basis vectors unchanged, since the basis vectors are orthogonal, so in exact arithmetic both orders give the same numbers. In floating-point arithmetic, the one-at-a-time order loses less orthogonality, and implementations repeat the subtraction when needed, as in Algorithm 2.

5.4 Lemma 6 [Orthogonality and Hessenberg projection]

Before and including the first exact breakdown, the Arnoldi vectors satisfy

qi⊤qj=δij,span⁡{q1,…,qm}=Km(A,q1).\mathbf{q}_i^\top\mathbf{q}_j=\delta_{ij}, \qquad \operatorname{span}\{\mathbf{q}_1,\dots,\mathbf{q}_m\}=\mathcal{K}_m(\mathbf{A},\mathbf{q}_1).

With Qm=[q1,…,qm]\mathbf{Q}_m=[\mathbf{q}_1,\dots,\mathbf{q}_m] and the upper Hessenberg matrix Hm\mathbf{H}_m of Definition 3,

AQm=QmHm+rmem⊤,Qm⊤rm=0,Hm=Qm⊤AQm.\mathbf{A}\mathbf{Q}_m=\mathbf{Q}_m\mathbf{H}_m+\mathbf{r}_m\mathbf{e}_m^\top, \qquad \mathbf{Q}_m^\top\mathbf{r}_m=0, \qquad \mathbf{H}_m=\mathbf{Q}_m^\top\mathbf{A}\mathbf{Q}_m .

If A\mathbf{A} is symmetric, then Hm\mathbf{H}_m is the symmetric tridiagonal matrix Tm\mathbf{T}_m of Lemma 3, and the Arnoldi vectors are the Lanczos vectors.

Remark 17 [Where the zeros of the projected matrix come from]

The zeros of Tm\mathbf{T}_m have two sources. Those below the first subdiagonal come from the nesting of Krylov subspaces: Aqj\mathbf{A}\mathbf{q}_j lies in Kj+1(A,q1)\mathcal{K}_{j+1}(\mathbf{A},\mathbf{q}_1), so it has no component along qj+2,qj+3,…\mathbf{q}_{j+2},\mathbf{q}_{j+3},\dots. Those above the first superdiagonal come from symmetry, which turns the component qi⊤Aqj\mathbf{q}_i^\top\mathbf{A}\mathbf{q}_j into (Aqi)⊤qj(\mathbf{A}\mathbf{q}_i)^\top\mathbf{q}_j. The Arnoldi method keeps the first source and loses the second. This is why Hm\mathbf{H}_m is upper Hessenberg, and why each step removes every previous component.

Proof

Orthogonality. We argue by induction, as for Lemma 3. The initial vector is normalized by assumption. Suppose that q1,…,qj\mathbf{q}_1,\dots,\mathbf{q}_j are orthonormal. For each i≤ji\le j, by the definition of hijh_{ij} and since qi⊤ql=δil\mathbf{q}_i^\top\mathbf{q}_l=\delta_{il}, qi⊤rj=qi⊤Aqj−∑l=1jhlj qi⊤ql=hij−hij=0\mathbf{q}_i^\top\mathbf{r}_j=\mathbf{q}_i^\top\mathbf{A}\mathbf{q}_j-\sum_{l=1}^jh_{lj}\,\mathbf{q}_i^\top\mathbf{q}_l=h_{ij}-h_{ij}=0. Thus rj\mathbf{r}_j is orthogonal to q1,…,qj\mathbf{q}_1,\dots,\mathbf{q}_j, and if hj+1,j>0h_{j+1,j}>0, normalizing it extends the orthonormal family. Unlike the proof of Lemma 3, this one needs no symmetry, because every component is removed explicitly.

Krylov subspaces. We prove span⁡{q1,…,qm}=Km(A,q1)\operatorname{span}\{\mathbf{q}_1,\dots,\mathbf{q}_m\}=\mathcal{K}_m(\mathbf{A},\mathbf{q}_1) by induction on mm. It holds at m=1m=1, since both sides equal span⁡{q1}\operatorname{span}\{\mathbf{q}_1\}. Suppose that it holds at m=jm=j and that hj+1,j>0h_{j+1,j}>0. The vector qj+1\mathbf{q}_{j+1} is a combination of Aqj\mathbf{A}\mathbf{q}_j and q1,…,qj\mathbf{q}_1,\dots,\mathbf{q}_j, all of which lie in Kj+1(A,q1)\mathcal{K}_{j+1}(\mathbf{A},\mathbf{q}_1). Indeed, q1,…,qj\mathbf{q}_1,\dots,\mathbf{q}_j belong to Kj(A,q1)⊆Kj+1(A,q1)\mathcal{K}_j(\mathbf{A},\mathbf{q}_1)\subseteq\mathcal{K}_{j+1}(\mathbf{A},\mathbf{q}_1), and Aqj\mathbf{A}\mathbf{q}_j Since qj∈Kj(A,q1)\mathbf{q}_j\in\mathcal{K}_j(\mathbf{A},\mathbf{q}_1), there are numbers c0,…,cj−1c_0,\dots,c_{j-1} with qj=∑k=0j−1ckAkq1\mathbf{q}_j=\sum_{k=0}^{j-1}c_k\mathbf{A}^k\mathbf{q}_1, so Aqj=∑k=0j−1ckAk+1q1\mathbf{A}\mathbf{q}_j=\sum_{k=0}^{j-1}c_k\mathbf{A}^{k+1}\mathbf{q}_1 is a combination of Aq1,…,Ajq1\mathbf{A}\mathbf{q}_1,\dots,\mathbf{A}^j\mathbf{q}_1, which belong to Kj+1(A,q1)\mathcal{K}_{j+1}(\mathbf{A},\mathbf{q}_1) by Definition 1.. Hence span⁡{q1,…,qj+1}⊆Kj+1(A,q1)\operatorname{span}\{\mathbf{q}_1,\dots,\mathbf{q}_{j+1}\}\subseteq\mathcal{K}_{j+1}(\mathbf{A},\mathbf{q}_1). The left-hand side has dimension j+1j+1, because its vectors are orthonormal, so j+1≤dim⁡Kj+1(A,q1)j+1\le\dim\mathcal{K}_{j+1}(\mathbf{A},\mathbf{q}_1). We also have dim⁡Kj+1(A,q1)≤j+1\dim\mathcal{K}_{j+1}(\mathbf{A},\mathbf{q}_1)\le j+1, since Kj+1(A,q1)\mathcal{K}_{j+1}(\mathbf{A},\mathbf{q}_1) is generated by the j+1j+1 vectors q1,Aq1,…,Ajq1\mathbf{q}_1,\mathbf{A}\mathbf{q}_1,\dots,\mathbf{A}^j\mathbf{q}_1. We thus have dim⁡Kj+1(A,q1)=dim⁡span⁡{q1,…,qj+1}=j+1\dim\mathcal{K}_{j+1}(\mathbf{A},\mathbf{q}_1)=\dim\operatorname{span}\{\mathbf{q}_1,\dots,\mathbf{q}_{j+1}\}=j+1. The two spaces are therefore equal, since span⁡{q1,…,qj+1}\operatorname{span}\{\mathbf{q}_1,\dots,\mathbf{q}_{j+1}\} is contained in Kj+1(A,q1)\mathcal{K}_{j+1}(\mathbf{A},\mathbf{q}_1) and both have the same finite dimension.

Matrix identity. The definition of rj\mathbf{r}_j gives Aqj=∑i=1jhijqi+rj\mathbf{A}\mathbf{q}_j=\sum_{i=1}^jh_{ij}\mathbf{q}_i+\mathbf{r}_j, where rj=hj+1,jqj+1\mathbf{r}_j=h_{j+1,j}\mathbf{q}_{j+1} for j<mj<m. These identities, for j=1,…,mj=1,\dots,m, are the columns of AQm=QmHm+rmem⊤\mathbf{A}\mathbf{Q}_m=\mathbf{Q}_m\mathbf{H}_m+\mathbf{r}_m\mathbf{e}_m^\top. Multiplying on the left by Qm⊤\mathbf{Q}_m^\top, and using Qm⊤Qm=Im\mathbf{Q}_m^\top\mathbf{Q}_m=\mathbb{I}_m and Qm⊤rm=0\mathbf{Q}_m^\top\mathbf{r}_m=0 from the orthogonality part, gives Hm=Qm⊤AQm\mathbf{H}_m=\mathbf{Q}_m^\top\mathbf{A}\mathbf{Q}_m.

The symmetric case. If A\mathbf{A} is symmetric, then so is Hm=Qm⊤AQm\mathbf{H}_m=\mathbf{Q}_m^\top\mathbf{A}\mathbf{Q}_m. Its entries below the first subdiagonal vanish, so by symmetry its entries above the first superdiagonal vanish too, and hj−1,j=hj,j−1h_{j-1,j}=h_{j,j-1}. Step jj therefore subtracts only hj,j−1qj−1h_{j,j-1}\mathbf{q}_{j-1} and hjjqjh_{jj}\mathbf{q}_j from Aqj\mathbf{A}\mathbf{q}_j, which is the Lanczos step of Definition 2 with αj=hjj\alpha_j=h_{jj} and βj−1=hj,j−1\beta_{j-1}=h_{j,j-1}. By induction on jj, both methods produce the same vectors and the same coefficients, and Hm=Tm\mathbf{H}_m=\mathbf{T}_m.

■□\begin{array}{r} \blacksquare\Box \end{array}

5.5 Proposition 5 [Ritz pairs, the minimizing polynomial, and exact termination]

Suppose that the run has reached iteration mm, that is, hj+1,j>0h_{j+1,j}>0 for 1≤j<m1\le j<m.

  1. Ritz pairs. Let Hmy=ϑy\mathbf{H}_m\mathbf{y}=\vartheta\mathbf{y} with y∈Cm\mathbf{y}\in\mathbb{C}^m and ∥y∥=1\|\mathbf{y}\|=1, and let x=Qmy\mathbf{x}=\mathbf{Q}_m\mathbf{y}. Then ∥x∥=1,x∗Ax=ϑ,Ax−ϑx=rm ym,∥Ax−ϑx∥=hm+1,m∣ym∣.\|\mathbf{x}\|=1, \qquad \mathbf{x}^*\mathbf{A}\mathbf{x}=\vartheta, \qquad \mathbf{A}\mathbf{x}-\vartheta\mathbf{x}=\mathbf{r}_m\,y_m, \qquad \|\mathbf{A}\mathbf{x}-\vartheta\mathbf{x}\|=h_{m+1,m}|y_m| .
  2. The minimizing polynomial. The characteristic polynomial πm(t)=det⁡(t Im−Hm)\pi_m(t)=\det(t\,\mathbb{I}_m-\mathbf{H}_m) satisfies πm(A)q1=h21h32⋯hm,m−1 rm\pi_m(\mathbf{A})\mathbf{q}_1=h_{21}h_{32}\cdots h_{m,m-1}\,\mathbf{r}_m. Moreover, πm\pi_m is the unique monic polynomial of degree mm that minimizes ∥π(A)q1∥\|\pi(\mathbf{A})\mathbf{q}_1\|, and the Ritz values at step mm are its roots.
  3. Exact termination. Let μ\mu be the monic polynomial of smallest degree ss such that μ(A)q1=0\mu(\mathbf{A})\mathbf{q}_1=0, called the minimal polynomial of q1\mathbf{q}_1. A run reaches iteration ss and breaks down there: hj+1,j>0h_{j+1,j}>0 for j<sj<s, and hs+1,s=0h_{s+1,s}=0. Moreover, at termination, det⁡(t Is−Hs)=μ(t),AQs=QsHs,\det(t\,\mathbb{I}_s-\mathbf{H}_s)=\mu(t), \qquad \mathbf{A}\mathbf{Q}_s=\mathbf{Q}_s\mathbf{H}_s, so the Ritz values are exactly the roots of μ\mu, and every one of them is an eigenvalue of A\mathbf{A}. If A\mathbf{A} has a basis of eigenvectors and q1=∑λ∈Λ(A)qλ\mathbf{q}_1=\sum_{\lambda\in\Lambda(\mathbf{A})}\mathbf{q}_\lambda with Aqλ=λqλ\mathbf{A}\mathbf{q}_\lambda=\lambda\mathbf{q}_\lambda, then, as in Proposition 3, μ(t)=∏λ∈Λ1(t−λ),Λ1={λ∈Λ(A):qλ≠0},s=∣Λ1∣.\mu(t)=\prod_{\lambda\in\Lambda_1}(t-\lambda), \qquad \Lambda_1=\{\lambda\in\Lambda(\mathbf{A}):\mathbf{q}_\lambda\neq0\}, \qquad s=|\Lambda_1|.

Remark 18 [Ritz values lie in the field of values]

Item 1 says that every Ritz value is the value of x∗Ax\mathbf{x}^*\mathbf{A}\mathbf{x} at a unit vector. It therefore lies in the field of values

W(A)={x∗Ax:x∈Cd, ∥x∥=1},W(\mathbf{A})=\bigl\{\mathbf{x}^*\mathbf{A}\mathbf{x}:\mathbf{x}\in\mathbb{C}^d,\ \|\mathbf{x}\|=1\bigr\},

which also contains every eigenvalue, since x∗Ax=λ\mathbf{x}^*\mathbf{A}\mathbf{x}=\lambda for a unit eigenvector x\mathbf{x}. For a symmetric matrix, W(A)W(\mathbf{A}) is the interval [λmin⁡(A),λmax⁡(A)][\lambda_{\min}(\mathbf{A}),\lambda_{\max}(\mathbf{A})], and the Ritz values stay between the extreme eigenvalues (Lemma 5). For a nonsymmetric matrix, W(A)W(\mathbf{A}) is a convex region of the complex plane that can be much larger than the smallest convex set containing the eigenvalues, and the Ritz values can lie anywhere in it. In panel (c) of Figure 13 below, every eigenvalue is real, but the field of values is an oval around them, and the Ritz values spread over it.

Proof

Ritz pairs. As in the proof of Lemma 4, the orthonormality of the columns of Qm\mathbf{Q}_m gives ∥x∥2=y∗Qm⊤Qmy=∥y∥2=1\|\mathbf{x}\|^2=\mathbf{y}^*\mathbf{Q}_m^\top\mathbf{Q}_m\mathbf{y}=\|\mathbf{y}\|^2=1, and Lemma 6 gives x∗Ax=y∗Qm⊤AQmy=y∗Hmy=ϑ\mathbf{x}^*\mathbf{A}\mathbf{x}=\mathbf{y}^*\mathbf{Q}_m^\top\mathbf{A}\mathbf{Q}_m\mathbf{y}=\mathbf{y}^*\mathbf{H}_m\mathbf{y}=\vartheta and

Ax−ϑx=QmHmy+rmem⊤y−ϑQmy=Qm(Hmy−ϑy)+rmym=rmym,\begin{aligned} \mathbf{A}\mathbf{x}-\vartheta\mathbf{x} &=\mathbf{Q}_m\mathbf{H}_m\mathbf{y}+\mathbf{r}_m\mathbf{e}_m^\top\mathbf{y}-\vartheta\mathbf{Q}_m\mathbf{y}\\ &=\mathbf{Q}_m\textcolor{#2563eb}{(\mathbf{H}_m\mathbf{y}-\vartheta\mathbf{y})}+\mathbf{r}_my_m\\ &=\mathbf{r}_my_m , \end{aligned}

where the blue factor vanishes because y\mathbf{y} is an eigenvector of Hm\mathbf{H}_m. Taking norms gives ∥Ax−ϑx∥=∥rm∥ ∣ym∣=hm+1,m∣ym∣\|\mathbf{A}\mathbf{x}-\vartheta\mathbf{x}\|=\|\mathbf{r}_m\|\,|y_m|=h_{m+1,m}|y_m|.

The minimizing polynomial. Let e1=[1,0,…,0]⊤\mathbf{e}_1=[1,0,\dots,0]^\top be the first standard basis vector of Rm\mathbb{R}^m, so that q1=Qme1\mathbf{q}_1=\mathbf{Q}_m\mathbf{e}_1. We first show that

Akq1=QmHmke1for 0≤k≤m−1,Amq1=QmHmme1+h21h32⋯hm,m−1 rm.\begin{align*} \mathbf{A}^k\mathbf{q}_1&=\mathbf{Q}_m\mathbf{H}_m^k\mathbf{e}_1\quad\text{for }0\le k\le m-1,\tag{2}\\ \mathbf{A}^m\mathbf{q}_1&=\mathbf{Q}_m\mathbf{H}_m^m\mathbf{e}_1+h_{21}h_{32}\cdots h_{m,m-1}\,\mathbf{r}_m .\tag{3} \end{align*}

Because Hm\mathbf{H}_m is upper Hessenberg, hil=0h_{il}=0 for i>l+1i>l+1, so (Hmv)i=∑l=1mhilvl=∑l=i−1mhilvl(\mathbf{H}_m\mathbf{v})_i=\sum_{l=1}^m h_{il}v_l=\sum_{l=i-1}^m h_{il}v_l for every vector v∈Cm\mathbf{v}\in\mathbb{C}^m. If the last nonzero entry of v\mathbf{v} is in position pp, that is, vp≠0v_p\neq0 and vl=0v_l=0 for all l>pl>p, this sum is zero for i>p+1i> p+1, since it then runs over l≥i−1≥p+1l\ge i-1\ge p+1 only, and for i=p+1i=p+1 it reduces to (Hmv)p+1=hp+1,p vp(\mathbf{H}_m\mathbf{v})_{p+1}=h_{p+1,p}\,v_p, which is nonzero because hp+1,p>0h_{p+1,p}>0 for p<mp<m when the run has reached iteration mm. The entries in positions 11 to pp can be any numbers and play no role. So, for p<mp<m, multiplying by Hm\mathbf{H}_m moves the last nonzero entry down by one position and multiplies it by a subdiagonal entry. Applying this twice, Hm2v=Hm(Hmv)\mathbf{H}_m^2\mathbf{v}=\mathbf{H}_m(\mathbf{H}_m\mathbf{v}) has its last nonzero entry in position p+2p+2, equal to hp+2,p+1 hp+1,p vph_{p+2,p+1}\,h_{p+1,p}\,v_p, if p+2≤mp+2\le m. By induction on kk, for p+k≤mp+k\le m, the vector Hmkv\mathbf{H}_m^k\mathbf{v} has nonzero entries only in its first p+kp+k positions, and its last nonzero entry is

(Hmkv)p+k=hp+k,p+k−1⋯hp+2,p+1 hp+1,p vp.(\mathbf{H}_m^k\mathbf{v})_{p+k}=h_{p+k,p+k-1}\cdots h_{p+2,p+1}\,h_{p+1,p}\,v_p .

Applying this to v=e1\mathbf{v}=\mathbf{e}_1, for which p=1p=1 and vp=1v_p=1, shows that for k≤m−1k\le m-1 the vector Hmke1\mathbf{H}_m^k\mathbf{e}_1 has nonzero entries only in its first k+1k+1 positions, and its entry in position k+1k+1 is the product h21h32⋯hk+1,kh_{21}h_{32}\cdots h_{k+1,k} of the subdiagonal entries met on the way.

We now prove equations (2) and (3) by induction on kk. For k=0k=0, equation (2) holds, since A0q1=q1=Qme1=QmHm0e1\mathbf{A}^0\mathbf{q}_1=\mathbf{q}_1=\mathbf{Q}_m\mathbf{e}_1=\mathbf{Q}_m\mathbf{H}_m^0\mathbf{e}_1. Suppose, as induction hypothesis, that Akq1=QmHmke1\mathbf{A}^k\mathbf{q}_1=\mathbf{Q}_m\mathbf{H}_m^k\mathbf{e}_1 for some k≤m−1k\le m-1. Multiplying by A\mathbf{A} and using the identity AQm=QmHm+rmem⊤\mathbf{A}\mathbf{Q}_m=\mathbf{Q}_m\mathbf{H}_m+\mathbf{r}_m\mathbf{e}_m^\top of Lemma 6 gives

Ak+1q1=AQmHmke1=QmHmk+1e1+rm (em⊤Hmke1)=QmHmk+1e1+(Hmke1)mrm.(4)\mathbf{A}^{k+1}\mathbf{q}_1 =\mathbf{A}\mathbf{Q}_m\mathbf{H}_m^k\mathbf{e}_1 %=\bigl(\mathbf{Q}_m\mathbf{H}_m+\mathbf{r}_m\mathbf{e}_m^\top\bigr)\mathbf{H}_m^k\mathbf{e}_1 =\mathbf{Q}_m\mathbf{H}_m^{k+1}\mathbf{e}_1+\mathbf{r}_m\,\bigl(\mathbf{e}_m^\top\mathbf{H}_m^k\mathbf{e}_1\bigr) =\mathbf{Q}_m\mathbf{H}_m^{k+1}\mathbf{e}_1+\bigl(\mathbf{H}_m^k\mathbf{e}_1\bigr)_m \mathbf{r}_m. \tag{4}

The last factor (Hmke1)m\bigl(\mathbf{H}_m^k\mathbf{e}_1\bigr)_m is given by the previous paragraph. For k≤m−2k\le m-2, i.e. m>k+1m>k+1, we have (Hmke1)m=0\bigl(\mathbf{H}_m^k\mathbf{e}_1\bigr)_m=0 since position mm lies beyond position k+1k+1, and equation (4) is equation (2) for k+1k+1. This completes the induction, so equation (2) holds for 0≤k≤m−10\le k\le m-1. For k=m−1k=m-1, i.e. m=k+1m=k+1, (Hmke1)m=h21h32⋯hm,m−1\bigl(\mathbf{H}_m^k\mathbf{e}_1\bigr)_m = h_{21}h_{32}\cdots h_{m,m-1}, and equation (4) is equation (3).

Now let π(t)=tm+∑k=0m−1cktk\pi(t)=t^m+\sum_{k=0}^{m-1}c_kt^k be a monic polynomial of degree mm. Applying equation (3) to Amq1\mathbf{A}^m\mathbf{q}_1 and equation (2) to the lower powers gives

π(A)q1=Amq1+∑k=0m−1ckAkq1=QmHmme1+h21h32⋯hm,m−1 rm+∑k=0m−1ckQmHmke1=Qm π(Hm) e1+h21h32⋯hm,m−1 rm.\begin{aligned} \pi(\mathbf{A})\mathbf{q}_1 &=\mathbf{A}^m\mathbf{q}_1+\sum_{k=0}^{m-1}c_k\mathbf{A}^k\mathbf{q}_1\\ &=\mathbf{Q}_m\mathbf{H}_m^m\mathbf{e}_1+h_{21}h_{32}\cdots h_{m,m-1}\,\mathbf{r}_m+\sum_{k=0}^{m-1}c_k\mathbf{Q}_m\mathbf{H}_m^k\mathbf{e}_1\\ &=\mathbf{Q}_m\,\pi(\mathbf{H}_m)\,\mathbf{e}_1+h_{21}h_{32}\cdots h_{m,m-1}\,\mathbf{r}_m . \end{aligned}

For π=πm=det⁡(t Im−Hm)\pi=\pi_m=\det(t\,\mathbb{I}_m-\mathbf{H}_m), the Cayley–Hamilton theorem gives πm(Hm)=0\pi_m(\mathbf{H}_m)=0, hence the identity of item 2:

πm(A)q1=h21h32⋯hm,m−1 rm.\pi_m(\mathbf{A})\mathbf{q}_1=h_{21}h_{32}\cdots h_{m,m-1}\,\mathbf{r}_m .

By Lemma 6, the vectors q1,…,qm\mathbf{q}_1,\dots,\mathbf{q}_m span Km(A,q1)\mathcal{K}_m(\mathbf{A},\mathbf{q}_1) and Qm⊤rm=0\mathbf{Q}_m^\top\mathbf{r}_m=0, so this vector πm(A)q1\pi_m(\mathbf{A})\mathbf{q}_1 is orthogonal to Km(A,q1)\mathcal{K}_m(\mathbf{A},\mathbf{q}_1). Now let π\pi be any monic polynomial of degree mm. The leading terms tmt^m cancel in π−πm\pi-\pi_m, so π−πm=∑k=0m−1bktk\pi-\pi_m=\sum_{k=0}^{m-1}b_kt^k for some numbers bkb_k, and (π−πm)(A)q1=∑k=0m−1bkAkq1(\pi-\pi_m)(\mathbf{A})\mathbf{q}_1=\sum_{k=0}^{m-1}b_k\mathbf{A}^k\mathbf{q}_1 lies in Km(A,q1)\mathcal{K}_m(\mathbf{A},\mathbf{q}_1). Hence π(A)q1=πm(A)q1+(π−πm)(A)q1\pi(\mathbf{A})\mathbf{q}_1=\pi_m(\mathbf{A})\mathbf{q}_1+(\pi-\pi_m)(\mathbf{A})\mathbf{q}_1 is a sum of two orthogonal vectors, and Pythagoras’ theorem gives

∥π(A)q1∥2=∥πm(A)q1∥2+∥(π−πm)(A)q1∥2≥∥πm(A)q1∥2.(5)\|\pi(\mathbf{A})\mathbf{q}_1\|^2=\|\pi_m(\mathbf{A})\mathbf{q}_1\|^2+\|(\pi-\pi_m)(\mathbf{A})\mathbf{q}_1\|^2\ge\|\pi_m(\mathbf{A})\mathbf{q}_1\|^2 . \tag{5}

So πm\pi_m minimizes ∥π(A)q1∥\|\pi(\mathbf{A})\mathbf{q}_1\| over all monic polynomials π\pi of degree mm. It is the only minimizer. Indeed, if ∥π(A)q1∥=∥πm(A)q1∥\|\pi(\mathbf{A})\mathbf{q}_1\|=\|\pi_m(\mathbf{A})\mathbf{q}_1\|, equation (5) gives (π−πm)(A)q1=0(\pi-\pi_m)(\mathbf{A})\mathbf{q}_1=0, that is, ∑k=0m−1bkAkq1=0\sum_{k=0}^{m-1}b_k\mathbf{A}^k\mathbf{q}_1=0. The mm vectors q1,Aq1,…,Am−1q1\mathbf{q}_1,\mathbf{A}\mathbf{q}_1,\dots,\mathbf{A}^{m-1}\mathbf{q}_1 span Km(A,q1)\mathcal{K}_m(\mathbf{A},\mathbf{q}_1), which has dimension mm, since by Lemma 6 it is spanned by the mm orthonormal vectors q1,…,qm\mathbf{q}_1,\dots,\mathbf{q}_m. They are therefore linearly independent, so b0=⋯=bm−1=0b_0=\dots=b_{m-1}=0, that is, π=πm\pi=\pi_m. Finally, the Ritz values are the eigenvalues of Hm\mathbf{H}_m, which are the roots of its characteristic polynomial πm\pi_m.

Exact termination. For j<sj<s, no monic polynomial of degree jj annihilates q1\mathbf{q}_1, by the minimality of ss, so πj(A)q1≠0\pi_j(\mathbf{A})\mathbf{q}_1\neq0. If the run has reached iteration j<sj<s, item 2 at step jj gives πj(A)q1=h21h32⋯hj,j−1 rj\pi_j(\mathbf{A})\mathbf{q}_1=h_{21}h_{32}\cdots h_{j,j-1}\,\mathbf{r}_j, where the factors h21,…,hj,j−1h_{21},\dots,h_{j,j-1} are positive and ∥rj∥=hj+1,j\|\mathbf{r}_j\|=h_{j+1,j} by Definition 3. Taking norms, 0<∥πj(A)q1∥=h21h32⋯hj,j−1 ∥rj∥=h21h32⋯hj,j−1 hj+1,j0<\|\pi_j(\mathbf{A})\mathbf{q}_1\|=h_{21}h_{32}\cdots h_{j,j-1}\,\|\mathbf{r}_j\|=h_{21}h_{32}\cdots h_{j,j-1}\,h_{j+1,j}, hence hj+1,j>0h_{j+1,j}>0, and the run reaches iteration j+1j+1. Starting from j=1j=1, this shows that the run reaches iteration ss. There, item 2 at step ss says that πs\pi_s is the unique monic polynomial of degree ss that minimizes ∥π(A)q1∥\|\pi(\mathbf{A})\mathbf{q}_1\|. The polynomial μ\mu is monic of degree ss and gives ∥μ(A)q1∥=0\|\mu(\mathbf{A})\mathbf{q}_1\|=0, the smallest value a norm can take, so μ\mu is a minimizer, and by uniqueness πs=μ\pi_s=\mu. The same computation at step ss gives h21⋯hs,s−1 hs+1,s=∥πs(A)q1∥=∥μ(A)q1∥=0h_{21}\cdots h_{s,s-1}\,h_{s+1,s}=\|\pi_s(\mathbf{A})\mathbf{q}_1\|=\|\mu(\mathbf{A})\mathbf{q}_1\|=0, which forces 0=hs+1,s=∥rs∥0=h_{s+1,s}=\|\mathbf{r}_s\|, since the other factors are positive. So rs=0\mathbf{r}_s=0, and the identity of Lemma 6 becomes AQs=QsHs\mathbf{A}\mathbf{Q}_s=\mathbf{Q}_s\mathbf{H}_s. If Hsy=ϑy\mathbf{H}_s\mathbf{y}=\vartheta\mathbf{y} with y≠0\mathbf{y}\neq0, then A(Qsy)=ϑ Qsy\mathbf{A}(\mathbf{Q}_s\mathbf{y})=\vartheta\,\mathbf{Q}_s\mathbf{y} with Qsy≠0\mathbf{Q}_s\mathbf{y}\neq0, so every Ritz value at termination is an eigenvalue of A\mathbf{A}.

The case of a basis of eigenvectors. If q1=∑λqλ\mathbf{q}_1=\sum_\lambda\mathbf{q}_\lambda with Aqλ=λqλ\mathbf{A}\mathbf{q}_\lambda=\lambda\mathbf{q}_\lambda, then p(A)q1=∑λ∈Λ1p(λ) qλp(\mathbf{A})\mathbf{q}_1=\sum_{\lambda\in\Lambda_1}p(\lambda)\,\mathbf{q}_\lambda for every polynomial pp. Nonzero eigenvectors of distinct eigenvalues are linearly independent, so p(A)q1=0p(\mathbf{A})\mathbf{q}_1=0 exactly when p(λ)=0p(\lambda)=0 for every λ∈Λ1\lambda\in\Lambda_1. The monic polynomial of smallest degree with this property is ∏λ∈Λ1(t−λ)\prod_{\lambda\in\Lambda_1}(t-\lambda), of degree ∣Λ1∣|\Lambda_1|.

■□\begin{array}{r} \blacksquare\Box \end{array}

Item 2 also proves, for the Lanczos method, the statement of Section 4.3 that the Ritz values are the roots of the minimizing polynomial, since Hm=Tm\mathbf{H}_m=\mathbf{T}_m for a symmetric matrix (Lemma 6). Without a basis of eigenvectors, μ\mu can have repeated roots, and Hs\mathbf{H}_s then has them as repeated eigenvalues.

5.6 Lemma 7 [Residual certificate without symmetry]

Suppose that A\mathbf{A} is diagonalizable, that is, Cd\mathbb{C}^d has a basis of eigenvectors of A\mathbf{A}, and write A=VDV−1\mathbf{A}=\mathbf{V}\mathbf{D}\mathbf{V}^{-1}, where the columns of the invertible matrix V∈Cd×d\mathbf{V}\in\mathbb{C}^{d\times d} are these eigenvectors and the diagonal matrix D\mathbf{D} holds the eigenvalues. Let κ(V)=∥V∥ ∥V−1∥\kappa(\mathbf{V})=\|\mathbf{V}\|\,\|\mathbf{V}^{-1}\|, where ∥M∥=max⁡∥z∥=1∥Mz∥\|\mathbf{M}\|=\max_{\|\mathbf{z}\|=1}\|\mathbf{M}\mathbf{z}\|. Then, for every unit vector x∈Cd\mathbf{x}\in\mathbb{C}^d and every z∈Cz\in\mathbb{C},

min⁡λ∈Λ(A)∣z−λ∣≤κ(V) ∥Ax−zx∥.\min_{\lambda\in\Lambda(\mathbf{A})}|z-\lambda|\le\kappa(\mathbf{V})\,\|\mathbf{A}\mathbf{x}-z\mathbf{x}\| .

Proof

If zz is an eigenvalue of A\mathbf{A}, the left-hand side is zero and there is nothing to prove. Otherwise, let δ=min⁡λ∈Λ(A)∣λ−z∣>0\delta=\min_{\lambda\in\Lambda(\mathbf{A})}|\lambda-z|>0. The diagonal entries of D−zId\mathbf{D}-z\mathbb{I}_d are the numbers λ−z\lambda-z, all nonzero, so this matrix is invertible, and so is A−zId=V(D−zId)V−1\mathbf{A}-z\mathbb{I}_d=\mathbf{V}(\mathbf{D}-z\mathbb{I}_d)\mathbf{V}^{-1}, with inverse V(D−zId)−1V−1\mathbf{V}(\mathbf{D}-z\mathbb{I}_d)^{-1}\mathbf{V}^{-1}. We have ∥(D−zId)−1∥=max⁡λ∈Λ(A)1/∣λ−z∣=1/δ\|(\mathbf{D}-z\mathbb{I}_d)^{-1}\|=\max_{\lambda\in\Lambda(\mathbf{A})}1/|\lambda-z|=1/\delta, so

1=∥x∥=∥(A−zId)−1(A−zId)x∥=∥V(D−zId)−1V−1(Ax−zx)∥≤∥V∥ ∥(D−zId)−1∥ ∥V−1∥ ∥Ax−zx∥=κ(V)δ ∥Ax−zx∥,\begin{aligned} 1=\|\mathbf{x}\| &=\bigl\|(\mathbf{A}-z\mathbb{I}_d)^{-1}(\mathbf{A}-z\mathbb{I}_d)\mathbf{x}\bigr\|\\ &=\bigl\|\mathbf{V}(\mathbf{D}-z\mathbb{I}_d)^{-1}\mathbf{V}^{-1}(\mathbf{A}\mathbf{x}-z\mathbf{x})\bigr\|\\ &\le\|\mathbf{V}\|\,\bigl\|(\mathbf{D}-z\mathbb{I}_d)^{-1}\bigr\|\,\|\mathbf{V}^{-1}\|\,\|\mathbf{A}\mathbf{x}-z\mathbf{x}\|\\ &=\frac{\kappa(\mathbf{V})}{\delta}\,\|\mathbf{A}\mathbf{x}-z\mathbf{x}\|, \end{aligned}

and multiplying by δ\delta gives the claim.

■□\begin{array}{r} \blacksquare\Box \end{array}

The theorem of Bauer and Fike (1960), stated for the norm ∥⋅∥\|\cdot\| of Lemma 7, is about perturbations of the matrix A=VDV−1\mathbf{A}=\mathbf{V}\mathbf{D}\mathbf{V}^{-1} of the lemma: for every matrix E∈Cd×d\mathbf{E}\in\mathbb{C}^{d\times d}, every eigenvalue μ\mu of the perturbed matrix A+E\mathbf{A}+\mathbf{E} satisfies min⁡λ∈Λ(A)∣μ−λ∣≤κ(V) ∥E∥\min_{\lambda\in\Lambda(\mathbf{A})}|\mu-\lambda|\le\kappa(\mathbf{V})\,\|\mathbf{E}\|. This theorem and Lemma 7 imply each other.

  • From the theorem to Lemma 7. Let x\mathbf{x} be a unit vector and zz a number, with residual r=Ax−zx∈Cd\mathbf{r}=\mathbf{A}\mathbf{x}-z\mathbf{x}\in\mathbb{C}^d. The matrix E=−rx∗∈Cd×d\mathbf{E}=-\mathbf{r}\mathbf{x}^*\in\mathbb{C}^{d\times d} makes zz an eigenvalue of A+E\mathbf{A}+\mathbf{E}, since (A+E)x=Ax−r (x∗x)=Ax−r=zx(\mathbf{A}+\mathbf{E})\mathbf{x}=\mathbf{A}\mathbf{x}-\mathbf{r}\,(\mathbf{x}^*\mathbf{x})=\mathbf{A}\mathbf{x}-\mathbf{r}=z\mathbf{x}, and it has the norm of the residual, since ∥E∥=max⁡∥w∥=1∥Ew∥=max⁡∥w∥=1∥r (x∗w)∥=∥r∥max⁡∥w∥=1∣x∗w∣=∥r∥\|\mathbf{E}\|=\max_{\|\mathbf{w}\|=1}\|\mathbf{E}\mathbf{w}\|=\max_{\|\mathbf{w}\|=1}\|\mathbf{r}\,(\mathbf{x}^*\mathbf{w})\|=\|\mathbf{r}\|\max_{\|\mathbf{w}\|=1}|\mathbf{x}^*\mathbf{w}|=\|\mathbf{r}\|, where we use the fact that For the unit vector x\mathbf{x} and every unit vector w\mathbf{w}, the Cauchy–Schwarz inequality gives ∣x∗w∣≤∥x∥ ∥w∥=1|\mathbf{x}^*\mathbf{w}|\le\|\mathbf{x}\|\,\|\mathbf{w}\|=1, and w=x\mathbf{w}=\mathbf{x} reaches this bound, since ∣x∗x∣=∥x∥2=1|\mathbf{x}^*\mathbf{x}|=\|\mathbf{x}\|^2=1. Hence max⁡∥w∥=1∣x∗w∣=1\max_{\|\mathbf{w}\|=1}|\mathbf{x}^*\mathbf{w}|=1.. The theorem, applied to the eigenvalue μ=z\mu=z of A+E\mathbf{A}+\mathbf{E}, therefore gives min⁡λ∈Λ(A)∣z−λ∣≤κ(V) ∥E∥=κ(V) ∥r∥\min_{\lambda\in\Lambda(\mathbf{A})}|z-\lambda|\le\kappa(\mathbf{V})\,\|\mathbf{E}\|=\kappa(\mathbf{V})\,\|\mathbf{r}\|, the bound of Lemma 7.
  • From Lemma 7 to the theorem. Given a matrix E\mathbf{E} and an eigenvalue μ\mu of A+E\mathbf{A}+\mathbf{E} with a unit eigenvector x\mathbf{x}, the residual of (μ,x)(\mu,\mathbf{x}) for A\mathbf{A} is Ax−μx=−Ex\mathbf{A}\mathbf{x}-\mu\mathbf{x}=-\mathbf{E}\mathbf{x}, of norm at most ∥E∥\|\mathbf{E}\|. Lemma 7 with z=μz=\mu then gives the bound of the theorem.

Remark 19 [A small residual far from the spectrum]

When A\mathbf{A} is symmetric, V\mathbf{V} can be chosen orthogonal, so κ(V)=1\kappa(\mathbf{V})=1 and the lemma is Remark 11. Otherwise κ(V)\kappa(\mathbf{V}) can be large, and it cannot be dropped. Take

A=[01δ0],x=[10],\mathbf{A}=\begin{bmatrix}0&1\\\delta&0\end{bmatrix}, \qquad \mathbf{x}=\begin{bmatrix}1\\0\end{bmatrix},

with a small δ>0\delta>0. The eigenvalues are ±δ\pm\sqrt\delta, the Rayleigh quotient is z=x⊤Ax=0z=\mathbf{x}^\top\mathbf{A}\mathbf{x}=0, and the norm of the residual r=Ax−zx=[0,δ]⊤\mathbf{r}=\mathbf{A}\mathbf{x}-z\mathbf{x}=[0,\delta]^\top is ∥r∥=δ\|\mathbf{r}\|=\delta, whereas the distance from zz to the spectrum is δ\sqrt\delta. For δ=10−6\delta=10^{-6}, the norm of the residual is 10−610^{-6} and the distance 10−310^{-3}, a thousand times larger. The eigenvectors [1,±δ]⊤[1,\pm\sqrt\delta]^\top are nearly parallel, κ(V)=1/δ=103\kappa(\mathbf{V})=1/\sqrt\delta=10^3, and the lemma holds with equality. What a small residual r=Ax−zx\mathbf{r}=\mathbf{A}\mathbf{x}-z\mathbf{x} always certifies is that (z,x)(z,\mathbf{x}) is an exact eigenpair of a nearby matrix: (A−rx∗)x=Ax−r=zx(\mathbf{A}-\mathbf{r}\mathbf{x}^*)\mathbf{x}=\mathbf{A}\mathbf{x}-\mathbf{r}=z\mathbf{x}, and the perturbation has norm ∥rx∗∥=∥r∥\|\mathbf{r}\mathbf{x}^*\|=\|\mathbf{r}\|. In the example, A−rx∗=[0100]\mathbf{A}-\mathbf{r}\mathbf{x}^*=\left[\begin{smallmatrix}0&1\\0&0\end{smallmatrix}\right], whose eigenvalue 00 is double. A perturbation of size δ\delta has moved the eigenvalues by δ\sqrt\delta, and the eigenvalues of a nonsymmetric matrix can in general move much farther than the size of a perturbation. The set of numbers zz with ∥Ax−zx∥<ε\|\mathbf{A}\mathbf{x}-z\mathbf{x}\|<\varepsilon for some unit vector x\mathbf{x} is called the ε\varepsilon-pseudospectrum of A\mathbf{A}, and for a nonsymmetric matrix it can extend far beyond the points within ε\varepsilon of an eigenvalue (Trefethen and Embree, 2005).

For the convection–diffusion matrix of Section 5.1, A=SA~S−1\mathbf{A}=\mathbf{S}\widetilde{\mathbf{A}}\mathbf{S}^{-1} and A~=UDU⊤\widetilde{\mathbf{A}}=\mathbf{U}\mathbf{D}\mathbf{U}^\top with U\mathbf{U} orthogonal, so V=SU\mathbf{V}=\mathbf{S}\mathbf{U} diagonalizes A\mathbf{A}, with κ(V)=∥S∥ ∥S−1∥=sd−1\kappa(\mathbf{V})=\|\mathbf{S}\|\,\|\mathbf{S}^{-1}\|=s^{d-1}. Panel (d) of Figure 13 tests Lemma 2 and Lemma 7 on its Ritz pairs.

Four panels on the Arnoldi method. Top left: Ritz values of a random walk at steps 5, 10 and 20 in the complex plane, converging to the eigenvalue 1 and to a complex pair, inside the field of values. Top right: distance to the eigenvalue against matrix-vector products, where power iteration decreases slowly and the Arnoldi Ritz values reach rounding level by 40 products. Bottom left: Ritz values of a convection-diffusion matrix with real eigenvalues, spread off the real axis inside an oval field of values. Bottom right: a log-log scatter of distance against the norm of the residual, blue points of the symmetric matrix all below the diagonal, orange points of the nonsymmetric one partly above it.
Figure 13. The Arnoldi method on the two nonsymmetric matrices of Section 5.1. (a) The random walk of Figure 12, through products with P⊤\mathbf P^\top: its eigenvalues (grey dots), its field of values (grey line, Remark 18), the unit circle (grey, dashed), and the Ritz values of one run, from a Gaussian starting vector, at the step mm chosen with the slider above the figure (dark purple circles) and at step m−1m-1 (light green circles), for m=1,…,20m=1,\dots,20. Without JavaScript, the panel shows the steps m=5m=5, 10 and 20 together, colored from light to dark. At m=5m=5, the Ritz values 0.750.75 and −0.23±0.51i-0.23\pm0.51i already point to the eigenvalue 1 and to the pair λ2,λˉ2\lambda_2,\bar\lambda_2. They are within 6⋅10−46\cdot10^{-4} and 3⋅10−43\cdot10^{-4} of them at m=10m=10, and within 1.1⋅10−81.1\cdot10^{-8} and 5.7⋅10−75.7\cdot10^{-7} at m=20m=20, while the other Ritz values lie among the remaining eigenvalues. (b) Distance to an eigenvalue against the number of products, as medians over 200 Gaussian starting vectors, with bands containing the middle half of the runs. The Rayleigh quotient of power iteration on P⊤\mathbf P^\top (orange) approaches 1 at the rate ∣λ2∣=0.81|\lambda_2|=0.81 per product (grey, dotted), with a median error of 1.2⋅10−31.2\cdot10^{-3} after 20 products and 1.2⋅10−51.2\cdot10^{-5} after 40, and power iteration never approaches λ2\lambda_2. After 20 products, the Ritz value nearest to 1 (green) is within 4.4⋅10−94.4\cdot10^{-9} of it, and the one nearest to λ2\lambda_2 (green, dashed) within 4.4⋅10−74.4\cdot10^{-7}. Both reach rounding level, about 10−1510^{-15}, by 40 products. (c) The convection–diffusion matrix with d=40d=40 and γ=0.2\gamma=0.2, multiplied by h2h^2. Its eigenvalues are real, between 0.046 and 3.954 (black ticks), and its field of values (grey) is an oval that reaches ±0.40 i\pm0.40\,i. The Ritz values of one run, from a Gaussian starting vector, at m=10m=10, 20 and 30 (light to dark) are all real at m=10m=10, but 14 of them at m=20m=20 and 24 at m=30m=30 are not, with imaginary parts up to 0.320.32. (d) Distance from each Ritz value to the spectrum against the norm of its residual, ∥Ax−ϑx∥\|\mathbf A\mathbf x-\vartheta\mathbf x\|, for all the Ritz pairs of steps m=1,…,30m=1,\dots,30 from 5 Gaussian starting vectors, 2,325 pairs per matrix. For the symmetric matrix of −u′′-u'' (γ=0\gamma=0, blue), every point lies below the diagonal, as Lemma 2 requires, and the largest ratio of the distance to the norm of the residual is 0.49. For convection–diffusion (orange), 311 points lie above the diagonal, with distances up to 5.2 times the norm of the residual. Lemma 7 holds, with κ(V)=sd−1=2.7⋅103\kappa(\mathbf V)=s^{d-1}=2.7\cdot10^3, but it overestimates every distance by a factor of at least 520. The inexpensive norm hm+1,m∣ym∣h_{m+1,m}|y_m| of the residual, from Proposition 5, agrees with the norm computed explicitly to a relative 2⋅10−142\cdot10^{-14}.

Remark 20 [Matrices without a basis of eigenvectors]

The hypothesis of Lemma 7 is that A\mathbf{A} has a basis of eigenvectors, not that A\mathbf{A} is invertible: D\mathbf{D} may have zeros on its diagonal. Lemma 6 and Proposition 5 hold for every real square matrix, apart from the formula for μ\mu at the end of item 3 of Proposition 5, but Lemma 7 fails without its hypothesis. Take the matrix J=[0100]\mathbf{J}=\left[\begin{smallmatrix}0&1\\0&0\end{smallmatrix}\right] of Remark 19, whose eigenvalue 00 is double but whose eigenvectors are only the multiples of [1,0]⊤[1,0]^\top. For z=ε>0z=\varepsilon>0 and the unit vector x=[1,ε]⊤/1+ε2\mathbf{x}=[1,\varepsilon]^\top/\sqrt{1+\varepsilon^2},

Jx−εx=11+ε2([ε0]−[εε2])=11+ε2[0−ε2],\mathbf{J}\mathbf{x}-\varepsilon\mathbf{x} =\frac{1}{\sqrt{1+\varepsilon^2}}\left(\begin{bmatrix}\varepsilon\\0\end{bmatrix}-\begin{bmatrix}\varepsilon\\\varepsilon^2\end{bmatrix}\right) =\frac{1}{\sqrt{1+\varepsilon^2}}\begin{bmatrix}0\\-\varepsilon^2\end{bmatrix},

so the norm of the residual is less than ε2\varepsilon^2, while the distance from zz to the spectrum {0}\{0\} is ε\varepsilon, more than 1/ε1/\varepsilon times this norm. This ratio is unbounded as ε→0\varepsilon\to0, so no constant can play the role of κ(V)\kappa(\mathbf{V}).

What remains is a bound with a root. Every square matrix has a Jordan form A=VJV−1\mathbf{A}=\mathbf{V}\mathbf{J}\mathbf{V}^{-1}, where V∈Cd×d\mathbf{V}\in\mathbb{C}^{d\times d} is invertible and J\mathbf{J} is block diagonal, each block having one eigenvalue on its diagonal, ones just above the diagonal, and zeros elsewhere. Let pp be the size of the largest block, and η=p κ(V) ∥Ax−zx∥\eta=p\,\kappa(\mathbf{V})\,\|\mathbf{A}\mathbf{x}-z\mathbf{x}\|. Then, for every unit vector x∈Cd\mathbf{x}\in\mathbb{C}^d and every z∈Cz\in\mathbb{C}, the distance from zz to the spectrum is The setting: A=VJV−1\mathbf{A}=\mathbf{V}\mathbf{J}\mathbf{V}^{-1} with V\mathbf{V} invertible and J\mathbf{J} in Jordan form, pp is the size of the largest Jordan block, ∥x∥=1\|\mathbf{x}\|=1, r=Ax−zx\mathbf{r}=\mathbf{A}\mathbf{x}-z\mathbf{x}, η=p κ(V)∥r∥\eta=p\,\kappa(\mathbf{V})\|\mathbf{r}\| and δ=min⁡λ∈Λ(A)∣z−λ∣\delta=\min_{\lambda\in\Lambda(\mathbf{A})}|z-\lambda|. If δ=0\delta=0, there is nothing to prove. Otherwise J−zId\mathbf{J}-z\mathbb{I}_d is invertible and x=V(J−zId)−1V−1r\mathbf{x}=\mathbf{V}(\mathbf{J}-z\mathbb{I}_d)^{-1}\mathbf{V}^{-1}\mathbf{r}, so 1=∥x∥≤κ(V) ∥(J−zId)−1∥ ∥r∥.1=\|\mathbf{x}\|\le\kappa(\mathbf{V})\,\|(\mathbf{J}-z\mathbb{I}_d)^{-1}\|\,\|\mathbf{r}\|. A Jordan block of size k≤pk\le p with eigenvalue λ\lambda becomes the block (λ−z)Ik+N(\lambda-z)\mathbb{I}_k+\mathbf{N} of J−zId\mathbf{J}-z\mathbb{I}_d, where N\mathbf{N} has ones just above its diagonal, so that ∥Ni∥≤1\|\mathbf{N}^i\|\le1 and Nk=0\mathbf{N}^k=0. Because Nk=0\mathbf{N}^k=0, multiplying by (λ−z)Ik+N(\lambda-z)\mathbb{I}_k+\mathbf{N} shows that its inverse is the finite geometric series below, and since ∣λ−z∣≥δ|\lambda-z|\ge\delta and k≤pk\le p, ∥((λ−z)Ik+N)−1∥=∥∑i=0k−1(−1)iNi(λ−z)i+1∥≤∑i=0k−11∣λ−z∣i+1≤∑i=1p1δi.\begin{aligned}\bigl\|\bigl((\lambda-z)\mathbb{I}_k+\mathbf{N}\bigr)^{-1}\bigr\|&=\Bigl\|\sum_{i=0}^{k-1}\frac{(-1)^i\mathbf{N}^i}{(\lambda-z)^{i+1}}\Bigr\|\\&\le\sum_{i=0}^{k-1}\frac{1}{|\lambda-z|^{i+1}}\\&\le\sum_{i=1}^{p}\frac{1}{\delta^{i}}.\end{aligned} The norm of a block diagonal matrix is the largest norm of its blocks, so 1≤κ(V) ∥r∥∑i=1p1δi.1\le\kappa(\mathbf{V})\,\|\mathbf{r}\|\displaystyle\sum_{i=1}^{p}\frac{1}{\delta^{i}}. If δ≤1\delta\le1, each of the pp terms is at most δ−p\delta^{-p}, so 1≤p κ(V)∥r∥ δ−p=η δ−p,that is,δ≤η1/p.1\le p\,\kappa(\mathbf{V})\|\mathbf{r}\|\,\delta^{-p}=\eta\,\delta^{-p},\quad\text{that is,}\quad\delta\le\eta^{1/p}. If δ>1\delta>1, each term is at most δ−1\delta^{-1}, so 1≤p κ(V)∥r∥ δ−1=η δ−1,that is,δ≤η.1\le p\,\kappa(\mathbf{V})\|\mathbf{r}\|\,\delta^{-1}=\eta\,\delta^{-1},\quad\text{that is,}\quad\delta\le\eta. In both cases, δ≤max⁡{η,η1/p}\delta\le\max\{\eta,\eta^{1/p}\}. of η\eta when η<1\eta<1:

min⁡λ∈Λ(A)∣z−λ∣≤max⁡{η, η1/p}.\min_{\lambda\in\Lambda(\mathbf{A})}|z-\lambda|\le\max\bigl\{\eta,\ \eta^{1/p}\bigr\}.

When A\mathbf{A} has a basis of eigenvectors, all the blocks have size p=1p=1, J=D\mathbf{J}=\mathbf{D}, and this is Lemma 7. For the matrix J\mathbf{J} above, p=2p=2 and V=I2\mathbf{V}=\mathbb{I}_2, so a residual of norm less than ε2\varepsilon^2 gives η<2ε2\eta<2\varepsilon^2 and the bound 2 ε\sqrt2\,\varepsilon, against the actual distance ε\varepsilon: the square root cannot be avoided. It is the square root of Remark 19, where a perturbation of size δ\delta moved the double eigenvalue 00 of J\mathbf{J} to ±δ\pm\sqrt\delta.

5.7 Algorithm 3 [Arnoldi with reorthogonalization and residual checks]

Proposition 5 recovers eigenvalues exactly, but only at an exact breakdown and in exact arithmetic. The algorithm below is its finite version. It follows Algorithm 2, with three differences.

  • Every component is removed. Step 3 subtracts the components along all the stored basis vectors, as Definition 3 requires, and repeating this subtraction once is the reorthogonalization. A step therefore costs the same as a step of Algorithm 2.
  • The small eigenvalue problem is not symmetric. The matrix Hm\mathbf{H}_m needs a dense eigensolver for nonsymmetric matrices, and its eigenpairs can be complex.
  • The residual certifies less. By Remark 19, an accepted pair is an exact eigenpair of a matrix close to A\mathbf{A}, but by Lemma 7, its distance to the spectrum of A\mathbf{A} can exceed the residual by the factor κ(V)\kappa(\mathbf{V}), which the run does not compute.

The tolerances εabs>0\varepsilon_{\mathrm{abs}}>0, εrel≥0\varepsilon_{\mathrm{rel}}\ge0 and τ>0\tau>0 play the same roles as in Algorithm 2. Step 5 accepts a candidate (λ^,x)(\widehat\lambda,\mathbf{x}) when its residual r=Ax−λ^x\mathbf{r}=\mathbf{A}\mathbf{x}-\widehat\lambda\mathbf{x} satisfies ∥r∥≤εabs+εrel∥Ax∥\|\mathbf{r}\|\le\varepsilon_{\mathrm{abs}}+\varepsilon_{\mathrm{rel}}\|\mathbf{A}\mathbf{x}\|, and step 3 treats hj+1,j≤τh_{j+1,j}\le\tau as a breakdown. Only the meaning of an accepted pair changes: (λ^,x)(\widehat\lambda,\mathbf{x}) is then an exact eigenpair of A−rx∗\mathbf{A}-\mathbf{r}\mathbf{x}^*, a matrix within ∥r∥\|\mathbf{r}\| of A\mathbf{A}, and when A=VDV−1\mathbf{A}=\mathbf{V}\mathbf{D}\mathbf{V}^{-1}, its λ^\widehat\lambda lies within κ(V) ∥r∥\kappa(\mathbf{V})\,\|\mathbf{r}\| of an eigenvalue of A\mathbf{A}.

Choose the number kk of wanted eigenpairs, a period p≥1p\ge1 for the checks of steps 4 and 5, and a maximum number of iterations, at most dd. As in Algorithm 2, steps 1 and 2 are done once, and steps 3 to 6 form iteration j=1,2,…j=1,2,\dots, which adds one vector to the basis. Figure 14 draws this execution.

Setup.

  1. Fix the operator. Provide a routine computing x↦Ax\mathbf{x}\mapsto\mathbf{A}\mathbf{x}, and keep everything that defines A\mathbf{A} fixed throughout the run.
  2. Initialize the basis. Choose a unit vector q1\mathbf{q}_1, for instance q1=g/∥g∥\mathbf{q}_1=\mathbf{g}/\|\mathbf{g}\| with g∼N(0,Id)\mathbf{g}\sim\mathcal{N}(0,\mathbb{I}_d). Set Q1=[q1]\mathbf{Q}_1=[\mathbf{q}_1] and j=1j=1.

Iteration j≥1j\ge1.

  1. Extend the basis (one product). Compute w=Aqj\mathbf{w}=\mathbf{A}\mathbf{q}_j, the coefficients h=Qj⊤w\mathbf{h}=\mathbf{Q}_j^\top\mathbf{w}, whose entries are h1j,…,hjjh_{1j},\dots,h_{jj}, and w←w−Qjh\mathbf{w}\leftarrow\mathbf{w}-\mathbf{Q}_j\mathbf{h}. Repeat the projection once, with c=Qj⊤w\mathbf{c}=\mathbf{Q}_j^\top\mathbf{w}, w←w−Qjc\mathbf{w}\leftarrow\mathbf{w}-\mathbf{Q}_j\mathbf{c} and h←h+c\mathbf{h}\leftarrow\mathbf{h}+\mathbf{c}, and store h\mathbf{h} in column jj of H\mathbf{H}. Set hj+1,j=∥w∥h_{j+1,j}=\|\mathbf{w}\|. If hj+1,j>τh_{j+1,j}>\tau, set qj+1=w/hj+1,j\mathbf{q}_{j+1}=\mathbf{w}/h_{j+1,j}. Otherwise, the run has broken down: set hj+1,j=0h_{j+1,j}=0, and step 6 draws qj+1\mathbf{q}_{j+1}.
  2. Solve the small eigenvalue problem. Do this step and step 5 only when jj is a multiple of pp or the run has just broken down, and otherwise go to step 6. With m=jm=j, compute the eigenpairs Hmyi=ϑiyi\mathbf{H}_m\mathbf{y}_i=\vartheta_i\mathbf{y}_i, with yi∈Cm\mathbf{y}_i\in\mathbb{C}^m and ∥yi∥=1\|\mathbf{y}_i\|=1, by a dense eigensolver for nonsymmetric matrices, and select the min⁡(j,k)\min(j,k) wanted ones, for instance those of largest modulus or of largest real part. Nonreal Ritz values come in conjugate pairs, and one member of each pair suffices: since Hm\mathbf{H}_m is real, Hmyˉi=ϑˉiyˉi\mathbf{H}_m\bar{\mathbf{y}}_i=\bar\vartheta_i\bar{\mathbf{y}}_i, and the conjugate pair has the same residual norm. The candidates for step 5 are the wanted pairs with a small residual estimate, hm+1,m∣(yi)m∣≤εabs+εrel∣ϑi∣h_{m+1,m}|(\mathbf{y}_i)_m|\le\varepsilon_{\mathrm{abs}}+\varepsilon_{\mathrm{rel}}|\vartheta_i|. A pair with a larger estimate is not accurate yet: it is skipped at this iteration and examined again at the next check. By Proposition 5, this estimate equals the residual norm ∥AQmyi−ϑiQmyi∥\|\mathbf{A}\mathbf{Q}_m\mathbf{y}_i-\vartheta_i\mathbf{Q}_m\mathbf{y}_i\| in exact arithmetic, and it costs no product, whereas step 5 costs one or two products per pair. After a breakdown, hm+1,m=0h_{m+1,m}=0, so every wanted pair becomes a candidate. If there are fewer than kk candidates, go to step 6, as in Algorithm 2.
  3. Check the kk candidates with the original operator. For each candidate of step 4, form xi=Qmyi/∥Qmyi∥\mathbf{x}_i=\mathbf{Q}_m\mathbf{y}_i/\|\mathbf{Q}_m\mathbf{y}_i\|, compute λ^i=xi∗Axi\widehat\lambda_i=\mathbf{x}_i^*\mathbf{A}\mathbf{x}_i and εi=∥Axi−λ^ixi∥\varepsilon_i=\|\mathbf{A}\mathbf{x}_i-\widehat\lambda_i\mathbf{x}_i\|, and accept (λ^i,xi)(\widehat\lambda_i,\mathbf{x}_i) when εi≤εabs+εrel∥Axi∥\varepsilon_i\le\varepsilon_{\mathrm{abs}}+\varepsilon_{\mathrm{rel}}\|\mathbf{A}\mathbf{x}_i\|. This costs one product for a real xi\mathbf{x}_i, and two for a complex one, since Axi=ARe⁡(xi)+i AIm⁡(xi)\mathbf{A}\mathbf{x}_i=\mathbf{A}\operatorname{Re}(\mathbf{x}_i)+i\,\mathbf{A}\operatorname{Im}(\mathbf{x}_i).
  4. Stop, restart or continue. Apply the first of the following four cases that holds.
    • Success. If step 5 has run at this iteration and accepted all kk candidates, stop and return them.
    • Failure. If jj has reached the maximum number of iterations, stop and report nonconvergence.
    • Restart. If storing Qj\mathbf{Q}_j or orthogonalizing against it has become too expensive, restart as described below.
    • Next iteration. Otherwise, obtain qj+1\mathbf{q}_{j+1}. If the run has not broken down in step 3, qj+1=w/hj+1,j\mathbf{q}_{j+1}=\mathbf{w}/h_{j+1,j} was computed there. If it has broken down, range⁡(Qj)\operatorname{range}(\mathbf{Q}_j) is invariant under A\mathbf{A} up to τ\tau, and the other eigenvalues require a new starting vector: draw qj+1\mathbf{q}_{j+1} orthogonal to q1,…,qj\mathbf{q}_1,\dots,\mathbf{q}_j as after Proposition 4, keeping hj+1,j=0h_{j+1,j}=0. Since step 3 orthogonalizes against all the stored vectors, the identity AQm=QmHm+hm+1,mqm+1em⊤\mathbf{A}\mathbf{Q}_m=\mathbf{Q}_m\mathbf{H}_m+h_{m+1,m}\mathbf{q}_{m+1}\mathbf{e}_m^\top of Lemma 6 continues to hold, with a zero subdiagonal entry in Hm\mathbf{H}_m at each breakdown. In both cases, set Qj+1=[Qj,qj+1]\mathbf{Q}_{j+1}=[\mathbf{Q}_j,\mathbf{q}_{j+1}], increase jj by one, and go to step 3.
■□\begin{array}{r} \blacksquare\Box \end{array}
Flowchart of Algorithm 3, laid out as the flowchart of Algorithm 2. Step 3 computes w = A q_j minus Q_j h with h = Q_j^T A q_j, projected twice, and h_{j+1,j} = norm of w. Step 4 computes the Ritz pairs of H_j. Step 5 checks the k candidates with A, at the cost of k to 2k products. Step 6 has a fourth decision, whether Q_j has become too costly; if so, a box restart from the wanted Ritz vectors sends a blue arrow labelled restart back to the setup box.
Figure 14. The execution of Algorithm 3, drawn as Figure 10 is for Algorithm 2. Step 3 projects Aqj\mathbf A\mathbf q_j against all the stored vectors, and step 5 costs one product for a real Ritz vector and two for a complex one. Step 6 has a fourth case: when storing Qj\mathbf Q_j or orthogonalizing against it has become too expensive, the method restarts (blue arrow on the right) from a new starting vector built from the wanted Ritz vectors, as described after the algorithm.

How the steps implement the theory

StepComputesImplements
3. Extendh1j,…,hj+1,jh_{1j},\dots,h_{j+1,j} and qj+1\mathbf{q}_{j+1}one step of the recurrence of Definition 3
3. Repeat the projectionthe correction c\mathbf{c}, added to column jj of H\mathbf{H}the orthogonality Qj⊤rj=0\mathbf{Q}_j^\top\mathbf{r}_j=0 of Lemma 6, which rounding errors would otherwise erode
3. Breakdownhj+1,j≤τh_{j+1,j}\le\tauthe exact breakdown of Definition 3 and the exact termination of Proposition 5
4. Small problemHmyi=ϑiyi\mathbf{H}_m\mathbf{y}_i=\vartheta_i\mathbf{y}_i and hm+1,m∣(yi)m∣h_{m+1,m}\lvert(\mathbf{y}_i)_m\rvertthe Ritz pairs of Proposition 5 and the norm of their residual
5. Check∥Axi−λ^ixi∥≤εabs+εrel∥Axi∥\lVert\mathbf{A}\mathbf{x}_i-\widehat\lambda_i\mathbf{x}_i\rVert\le\varepsilon_{\mathrm{abs}}+\varepsilon_{\mathrm{rel}}\lVert\mathbf{A}\mathbf{x}_i\rVertthe certificate of Remark 19 and Lemma 7
6. Continuea new unit vector orthogonal to Qj\mathbf{Q}_j, with hj+1,j=0h_{j+1,j}=0the continuation of Algorithm 2, with the identity of Lemma 6
6. Restarta new starting vector built from the wanted Ritz vectorsa polynomial filter, in the sense of Section 4.1, applied to the starting vector

The repeated projection. In exact arithmetic, the second projection of step 3 finds c=0\mathbf{c}=0, since w\mathbf{w} is already orthogonal to Qj\mathbf{Q}_j, and h\mathbf{h} is unchanged. In floating-point arithmetic, the first projection leaves in w\mathbf{w} components along the stored vectors of the order of the unit roundoff uu times ∥Aqj∥\|\mathbf{A}\mathbf{q}_j\|. Relative to ∥w∥=hj+1,j\|\mathbf{w}\|=h_{j+1,j}, this is of the order of u/fu/f with f=hj+1,j/∥Aqj∥f=h_{j+1,j}/\|\mathbf{A}\mathbf{q}_j\|, by the cancellation explained in Section 4.3, and the second projection removes these components. Adding c\mathbf{c} to h\mathbf{h} keeps the identity Aqj=Qjh+hj+1,jqj+1\mathbf{A}\mathbf{q}_j=\mathbf{Q}_j\mathbf{h}+h_{j+1,j}\mathbf{q}_{j+1} exact up to rounding, so that Hm\mathbf{H}_m is still the matrix of Lemma 6.

The residual certifies a nearby matrix. An accepted pair (λ^i,xi)(\widehat\lambda_i,\mathbf{x}_i) is an exact eigenpair of a matrix within εi\varepsilon_i of A\mathbf{A} (Remark 19). Whether λ^i\widehat\lambda_i is within εi\varepsilon_i of an eigenvalue of A\mathbf{A} depends on the sensitivity of the eigenvalues, such as the factor κ(V)\kappa(\mathbf{V}) of Lemma 7, which the run does not compute. When the eigenvalue itself must be accurate, for instance when the sign of a real part decides the stability of an equilibrium, the residual should be read together with an estimate of that sensitivity, as discussed by Saad (2011) and by Trefethen and Embree (2005).

Restarts bound the cost. Since step jj costs O(dj)O(dj) operations and every basis vector is stored, mm cannot grow indefinitely. A restart runs the method again from a new starting vector that combines the wanted Ritz vectors, so that the next Krylov subspace concentrates on them. The implicitly restarted Arnoldi method of Sorensen (1992) restarts without any new product. It applies to Hm\mathbf{H}_m a few shifted QR steps, with the unwanted Ritz values as shifts, which amounts to multiplying the starting vector by the polynomial ∏(t−ϑ)\prod(t-\vartheta) over those values, a polynomial filter in the sense of Section 4.1 that damps the unwanted eigencomponents. It then keeps a basis of k<mk<m vectors and extends it again. This is the method of the ARPACK software (Lehoucq, Sorensen and Yang, 1998), on which the sparse eigenvalue routines of several scientific computing environments are built. For a symmetric matrix, the procedure computes, in exact arithmetic, the same vectors and coefficients as the Lanczos method (Lemma 6), at the cost of Algorithm 2.

References

Cite this post

If you would like to cite this post, you can use the following BibTeX entry:

@misc{tikengnotsawo2026eigenpairsfrommatrixvectorproducts,
  author = {Pascal Jr Tikeng Notsawo},
  title = {{Eigenpairs from Matrix–Vector Products: Power Iteration, Deflation, Lanczos, and Arnoldi}},
  year = {2026},
  month = oct,
  url = {https://tikquuss.github.io/blog/eigenpairs-from-matrix-vector-products/},
  note = {Blog post}
}