Sparse Matrices and Iterative Eigensolvers

⚡ Key Takeaways

Sparse matrices store only nonzero entries, enabling computation on systems with millions of unknowns. Iterative eigensolvers extract a few eigenpairs of such matrices using only matrix–vector products, without ever forming dense factorizations. Key result: Krylov subspace methods (Lanczos, Arnoldi) converge superlinearly to extremal eigenvalues, with error controlled by the spectral gap and Chebyshev polynomial growth. Applied throughout computational physics, structural mechanics, quantum chemistry, network science, and machine learning. Foundational contributions: Lanczos (1950), Arnoldi (1951), Saad, Sorensen, and the Davidson/LOBPCG lineage.

💡 The Core Insight

You almost never need the matrix AA itself — you only need the action v↦Avv \mapsto Av. Every iterative eigensolver is built from this single primitive. The Krylov subspace Km(A,v)=span{v,Av,…,Am−1v}\mathcal{K}_m(A,v) = \mathrm{span}\{v, Av, \dots, A^{m-1}v\} adaptively captures the directions along which AA amplifies most strongly, and the eigenvalues of the tiny projected matrix (the Rayleigh–Ritz values) converge rapidly to the extremal eigenvalues of AA. Sparsity makes the matvec cheap; Krylov projection makes few matvecs sufficient.

Formal Statement

DefinitionSparse Matrix and Storage Formats

A matrix A∈Rn×nA \in \mathbb{R}^{n\times n} (or Cn×n\mathbb{C}^{n\times n}) is called sparse if its number of nonzeros nnz(A)\mathrm{nnz}(A) satisfies nnz(A)=O(n)\mathrm{nnz}(A) = O(n), so that a matrix–vector product costs O(n)O(n) work rather than O(n2)O(n^2). Common storage schemes:

  • COO (coordinate): triples (i,j,aij)(i,j,a_{ij}).
  • CSR (compressed sparse row): a values array, a column-index array, and a row-pointer array `rowptr` of length n+1n+1.
  • CSC (compressed sparse column): the column analogue.
  • Banded / DIA: store diagonals offset from the main diagonal.

The fundamental kernel is SpMV (sparse matrix–vector multiply):

1
(Av)i=∑k=rowptr[i]rowptr[i+1]−1values[k] v(colind[k]).\quad (Av)_i = \sum_{k=\text{rowptr}[i]}^{\text{rowptr}[i+1]-1} \text{values}[k]\, v\big(\text{colind}[k]\big).

Derivation hint: Iterate over each row's stored nonzeros; the inner sum touches only stored entries, giving total work ∑i(rowptr[i+1]−rowptr[i])=nnz(A)\sum_i (\text{rowptr}[i+1]-\text{rowptr}[i]) = \mathrm{nnz}(A).

DefinitionEigenvalue Problem and Rayleigh Quotient

The standard eigenvalue problem seeks (λ,x)(\lambda, x), x≠0x\neq 0, with

2
Ax=λx,λ∈C, x∈Cn.\quad A x = \lambda x, \qquad \lambda \in \mathbb{C},\ x \in \mathbb{C}^n.

Derivation hint: λ\lambda is a root of det⁡(A−λI)=0\det(A-\lambda I)=0; eigenvectors span the null space of A−λIA-\lambda I. For Hermitian A=A∗A=A^*, all eigenvalues are real and the Rayleigh quotient

3
ρ(x)=x∗Axx∗x\quad \rho(x) = \frac{x^* A x}{x^* x}

satisfies λmin⁡≤ρ(x)≤λmax⁡\lambda_{\min} \le \rho(x) \le \lambda_{\max}, with stationary points exactly at eigenvectors. Derivation hint: Diagonalize A=QΛQ∗A=Q\Lambda Q^* and write x=Qyx=Qy; then ρ=∑λi∣yi∣2/∑∣yi∣2\rho = \sum \lambda_i |y_i|^2 / \sum |y_i|^2, a convex combination of eigenvalues. Setting ∇ρ=0\nabla\rho=0 gives Ax=ρ(x)xAx=\rho(x)x.

DefinitionKrylov Subspace

Given AA and a starting vector v1v_1 with ∥v1∥=1\|v_1\|=1, the mm-th Krylov subspace is

4
Km(A,v1)=span{v1, Av1, A2v1, …, Am−1v1}.\quad \mathcal{K}_m(A,v_1) = \mathrm{span}\{v_1,\, Av_1,\, A^2 v_1,\, \dots,\, A^{m-1}v_1\}.

Derivation hint: It is the smallest AA-invariant subspace containing v1v_1 once mm reaches the degree of the minimal polynomial of v1v_1 w.r.t. AA. Polynomial characterization: Km={p(A)v1:deg⁡p≤m−1}\mathcal{K}_m = \{ p(A)v_1 : \deg p \le m-1 \}.

TheoremArnoldi Factorization

For general AA, the Arnoldi process produces an orthonormal basis Vm=[v1,…,vm]V_m=[v_1,\dots,v_m] of Km(A,v1)\mathcal{K}_m(A,v_1) and an upper Hessenberg matrix HmH_m such that

5
AVm=VmHm+hm+1,m vm+1emT,\quad A V_m = V_m H_m + h_{m+1,m}\, v_{m+1} e_m^{\mathsf T},

with Hm=Vm∗AVmH_m = V_m^* A V_m. The Ritz values (eigenvalues of HmH_m) approximate eigenvalues of AA. Derivation hint: Apply Gram–Schmidt to {v1,Av1,… }\{v_1, Av_1, \dots\}; the orthogonalization coefficients populate HmH_m, and the new direction vm+1v_{m+1} is what remains after subtracting projections of AvmAv_m. When AA is Hermitian, HmH_m becomes tridiagonal TmT_m and Arnoldi reduces to the Lanczos process:

6
AVm=VmTm+βmvm+1emT,Tm=tridiag(βj−1,αj,βj).\quad A V_m = V_m T_m + \beta_m v_{m+1} e_m^{\mathsf T},\qquad T_m=\mathrm{tridiag}(\beta_{j-1},\alpha_j,\beta_j).

Derivation hint: Hermitian symmetry forces Hm=Hm∗H_m=H_m^*; an upper Hessenberg Hermitian matrix is tridiagonal, so each AvjAv_j orthogonalizes against only vj−1v_{j-1} and vjv_j — the three-term recurrence.

Why It Holds / Derivation

ProofLanczos Three-Term Recurrence and Ritz Convergence

Step 1 — Recurrence. Starting from v1v_1, β0=0\beta_0=0, v0=0v_0=0, for j=1,2,…j=1,2,\dots:

7
αj=vj∗Avj,wj=Avj−αjvj−βj−1vj−1,βj=∥wj∥,vj+1=wj/βj.\quad \alpha_j = v_j^* A v_j,\quad w_j = A v_j - \alpha_j v_j - \beta_{j-1} v_{j-1},\quad \beta_j = \|w_j\|,\quad v_{j+1}=w_j/\beta_j.

Derivation hint: This is Gram–Schmidt of AvjAv_j against {vj−1,vj}\{v_{j-1},v_j\}; symmetry guarantees orthogonality against all earlier viv_i in exact arithmetic.

Step 2 — Projection. Collecting the recurrences gives [6] with TmT_m symmetric tridiagonal. Eigenpairs (θi,si)(\theta_i, s_i) of TmT_m yield Ritz pairs (θi,yi)(\theta_i, y_i) with yi=Vmsiy_i = V_m s_i.

Step 3 — Residual bound. The residual of a Ritz pair is computable for free:

8
∥Ayi−θiyi∥=∣βm∣ ∣emTsi∣.\quad \|A y_i - \theta_i y_i\| = |\beta_m|\,|e_m^{\mathsf T} s_i|.

Derivation hint: Multiply [6] on the right by sis_i: AVmsi=VmTmsi+βmvm+1emTsi=θiyi+βmvm+1(emTsi)AV_m s_i = V_m T_m s_i + \beta_m v_{m+1}e_m^{\mathsf T}s_i = \theta_i y_i + \beta_m v_{m+1}(e_m^{\mathsf T}s_i); the last term has norm ∣βm∣∣emTsi∣|\beta_m||e_m^{\mathsf T}s_i| since vm+1v_{m+1} is a unit vector.

Step 4 — Convergence rate (Kaniel–Paige–Saad). For the largest eigenvalue λ1>λ2≥⋯≥λn\lambda_1 > \lambda_2 \ge \cdots \ge \lambda_n,

9
0≤λ1−θ1(m)≤(λ1−λn) tan⁡2∠(v1,x1)Cm−1(1+2γ)2,γ=λ1−λ2λ2−λn,\quad 0 \le \lambda_1 - \theta_1^{(m)} \le (\lambda_1-\lambda_n)\,\frac{\tan^2\angle(v_1,x_1)}{C_{m-1}(1+2\gamma)^2},\qquad \gamma=\frac{\lambda_1-\lambda_2}{\lambda_2-\lambda_n},

where Cm−1C_{m-1} is the degree-(m−1)(m-1) Chebyshev polynomial of the first kind. Derivation hint: The optimal Krylov polynomial that suppresses {λ2,…,λn}\{\lambda_2,\dots,\lambda_n\} while preserving λ1\lambda_1 is the shifted/scaled Chebyshev polynomial on [λn,λ2][\lambda_n,\lambda_2]; its exponential growth outside that interval, Cm−1(1+2γ)∼12e2(m−1)γC_{m-1}(1+2\gamma)\sim \tfrac12 e^{2(m-1)\sqrt\gamma}, drives geometric convergence governed by the spectral gap.

∎
mathematician · Cornelius Lanczos | 1893–1974

A Hungarian-American mathematician and physicist who worked as an assistant to Einstein, Lanczos introduced his "method of minimized iterations" in 1950 while at the National Bureau of Standards, seeking eigenvalues without forming the full characteristic polynomial. He was deeply suspicious of catastrophic cancellation — fittingly, since loss of orthogonality became the central practical difficulty of his own algorithm. His broader oeuvre spans the Lanczos tensor in general relativity, the Lanczos sigma factor in Fourier analysis, and the Tau method for differential equations. Walter Arnoldi published the nonsymmetric generalization in 1951 for vibration analysis of aircraft.

Building Intuition

🧠 Intuition

Think of AA as a transformation that stretches space anisotropically. Power iteration — repeatedly applying AA and renormalizing — converges to the dominant eigenvector because the largest ∣λ∣|\lambda| direction outgrows all others, but it throws away every intermediate vector. The Krylov subspace keeps those intermediate vectors. Within the mm-dimensional span {v,Av,…,Am−1v}\{v, Av, \dots, A^{m-1}v\}, you can form any polynomial p(A)vp(A)v of degree <m< m. The eigensolver implicitly searches for the polynomial that maximally amplifies the eigenvectors you want and damps the rest. Because polynomials can grow explosively outside a fixed interval (Chebyshev), even a modest degree separates a well-isolated extremal eigenvalue from the bulk. The spectral gap γ\gamma is the lever: a large gap means a low-degree polynomial suffices, while a tiny gap (clustered eigenvalues) forces many iterations or a preconditioning/shift-invert strategy.

Figure
Krylov convergence: Chebyshev amplification of the extremal eigenvalue
Optimal Krylov polynomial p(λ): suppress bulk, preserve λ₁ λ p(λ) bulk [λₙ , λ₂]: |p| ≤ 1 +1 λₙ λ₂ λ₁ |p(λ₁)| ≫ 1 gap γ = (λ₁−λ₂)/(λ₂−λₙ) controls growth rate

Worked Examples

ExampleLanczos on a 4×4 tridiagonal matrix

Given. The 1D discrete Laplacian (with sign convention A=−ΔhA=-\Delta_h),

A=(2−100−12−100−12−100−12),A=\begin{pmatrix} 2&-1&0&0\\ -1&2&-1&0\\ 0&-1&2&-1\\ 0&0&-1&2\end{pmatrix},

whose exact eigenvalues are λk=2−2cos⁡kπ5={0.382,1.382,2.618,3.618}\lambda_k = 2-2\cos\frac{k\pi}{5} = \{0.382, 1.382, 2.618, 3.618\}. Start vector v1=12(1,1,1,1)Tv_1=\tfrac12(1,1,1,1)^{\mathsf T}.

Steps. 1. Av1=12(1,0,0,1)TAv_1 = \tfrac12(1,0,0,1)^{\mathsf T}, so α1=v1∗Av1=14(1+0+0+1)=0.5\alpha_1 = v_1^* A v_1 = \tfrac14(1+0+0+1)=0.5. 2. w1=Av1−α1v1=12(1,0,0,1)−14(1,1,1,1)=(0.25,−0.25,−0.25,0.25)w_1 = Av_1 - \alpha_1 v_1 = \tfrac12(1,0,0,1) - \tfrac14(1,1,1,1) = (0.25,-0.25,-0.25,0.25). Then β1=∥w1∥=0.5\beta_1=\|w_1\|=0.5, v2=(0.5,−0.5,−0.5,0.5)Tv_2=(0.5,-0.5,-0.5,0.5)^{\mathsf T}. 3. Av2=(1.5,−1,−1,1.5)T⋅ ⁣Av_2 = (1.5,-1,-1,1.5)^{\mathsf T}\cdot\!... computing: Av2=(1.5,−1.0,−1.0,1.5)TAv_2=(1.5,-1.0,-1.0,1.5)^{\mathsf T}; α2=v2∗Av2=0.5(1.5)+(−0.5)(−1)+(−0.5)(−1)+0.5(1.5)=2.5\alpha_2 = v_2^*Av_2 = 0.5(1.5)+(-0.5)(-1)+(-0.5)(-1)+0.5(1.5)=2.5. 4. T2=(0.50.50.52.5)T_2=\begin{pmatrix}0.5 & 0.5\\ 0.5 & 2.5\end{pmatrix}, with Ritz values θ=3±4+12={0.382, 2.618}\theta=\tfrac{3\pm\sqrt{4+1}}{2}=\{0.382,\,2.618\}.

Result. After just 2 Lanczos steps the Ritz values θ1=0.382, θ2=2.618\boxed{\theta_1=0.382,\ \theta_2=2.618} already reproduce two exact eigenvalues of AA (the symmetric starting vector aligns with two eigenmodes). Convergence to the full spectrum requires the remaining steps.

ExampleCost comparison: dense QR vs. Lanczos for a PDE matrix

Given. A 3D Poisson problem discretized on a 200×200×200200\times200\times200 grid gives n=8×106n = 8\times10^6 unknowns; the 7-point stencil yields nnz(A)≈7n=5.6×107\mathrm{nnz}(A)\approx 7n = 5.6\times10^7. We want the 10 smallest eigenvalues (lowest vibrational/diffusion modes).

Steps. 1. Dense QR: memory =n2×8= n^2 \times 8 bytes =(8×106)2×8≈5×1014= (8\times10^6)^2 \times 8 \approx 5\times10^{14} bytes =512=512 TB. Time ∼10n3≈5×1021\sim 10 n^3 \approx 5\times10^{21} flops. Infeasible. 2. Lanczos (shift-invert for smallest): one SpMV costs ≈2 nnz=1.1×108\approx 2\,\mathrm{nnz} = 1.1\times10^8 flops. Suppose m=200m=200 iterations to resolve 10 eigenpairs. 3. Total matvec work ≈200×1.1×108=2.2×1010\approx 200 \times 1.1\times10^8 = 2.2\times10^{10} flops; orthogonalization ≈2nm2=2(8×106)(200)2=6.4×1011\approx 2nm^2 = 2(8\times10^6)(200)^2 = 6.4\times10^{11} flops. Memory: basis VmV_m is n×m×8=8×106×200×8=1.3×1010n\times m \times 8 = 8\times10^6\times200\times8 = 1.3\times10^{10} bytes =13= 13 GB.

Result. Lanczos finishes in ∼7×1011 flops, ∼13 GB\boxed{\sim 7\times10^{11}\text{ flops},\ \sim 13\text{ GB}} versus 5×10215\times10^{21} flops and 512 TB for dense QR — roughly ten orders of magnitude less work and four orders less memory, the difference between a laptop-scale and an impossible computation.

Common Misconceptions

⚠️ Loss of orthogonality is the silent killer

In exact arithmetic the Lanczos vectors {vj}\{v_j\} are orthonormal and the three-term recurrence suffices. In floating point, once a Ritz value converges, the corresponding eigencomponent is reintroduced into later vjv_j, destroying global orthogonality. The visible symptom: spurious "ghost" eigenvalues — copies of already-converged eigenvalues that appear and proliferate in TmT_m. The cure is reorthogonalization: full (expensive, O(nm2)O(nm^2)), selective (Parlett–Scott: reorthogonalize only when a Ritz pair converges), or partial (Simon). Never trust raw unreorthogonalized Lanczos multiplicities without the Cullum–Willoughby test.

CounterexamplePower iteration fails for the wrong eigenvalue distribution

Suppose you want the smallest eigenvalue of a positive-definite AA with spectrum {1,1.001,…,1000}\{1, 1.001, \dots, 1000\}. Power iteration on AA converges to λmax⁡=1000\lambda_{\max}=1000, not what you want. Worse, even targeting the smallest via power iteration on A−1A^{-1} converges at rate ∣λmin⁡/λ2∣k=(1/1.001)k|\lambda_{\min}/\lambda_2|^k = (1/1.001)^k — agonizingly slow because the two smallest eigenvalues are clustered. The fix is shift-and-invert: apply (A−σI)−1(A-\sigma I)^{-1} with σ\sigma near the target, which maps nearby eigenvalues to huge well-separated values 1/(λ−σ)1/(\lambda-\sigma), restoring rapid convergence. This requires solving sparse linear systems each iteration — trading matvecs for factorizations.

⚠️ Nonsymmetric eigenvalues can be wildly ill-conditioned

For non-normal AA (where AA∗≠A∗AA A^* \neq A^* A), eigenvalue condition numbers κ(λi)=1/∣yi∗xi∣\kappa(\lambda_i) = 1/|y_i^* x_i| (with yi,xiy_i,x_i left/right eigenvectors) can be astronomically large. The Arnoldi Ritz values may then be meaningless even with a tiny residual. Pseudospectra Λϵ(A)={z:∥(zI−A)−1∥≥ϵ−1}\Lambda_\epsilon(A) = \{z : \|(zI-A)^{-1}\| \ge \epsilon^{-1}\} are the honest diagnostic: they reveal how far eigenvalues move under perturbations of size ϵ\epsilon. A small residual bounds the backward error, not the forward eigenvalue error.

Connections

connection

Iterative eigensolvers share their entire algorithmic core with iterative linear solvers. The Conjugate Gradient Method is Lanczos applied to solving Ax=bAx=b — same three-term recurrence, same Krylov subspace, different extraction. GMRES is Arnoldi for nonsymmetric linear systems. The Power Iteration is the degenerate one-vector ancestor of all Krylov methods, and Inverse Iteration plus Rayleigh Quotient Iteration (cubically convergent for symmetric problems) provide the refinement step. The Singular Value Decomposition of sparse AA is computed by Lanczos bidiagonalization on AA (equivalent to Lanczos on A∗AA^*A). Preconditioning — central to fast linear solvers — reappears as spectral transformation in shift-invert eigensolvers and in the LOBPCG and Jacobi-Davidson Method families. The convergence theory rests entirely on Chebyshev Polynomials and the Min-Max Theorem (Courant–Fischer).

Real-World Applications

🔬 Where this appears

Historical Development

⏳ History
- 1929 — von Mises & Pollaczek-Geiringer formalize the power method for the dominant eigenvalue.
- 1950 — Cornelius Lanczos publishes the "method of minimized iterations" (NBS), introducing the symmetric three-term recurrence.
- 1951 — Walter Arnoldi generalizes to nonsymmetric matrices via the Hessenberg/Arnoldi factorization, motivated by aircraft flutter.
- 1952 — Hestenes & Stiefel introduce Conjugate Gradients, the linear-solver twin of Lanczos.
- 1966–1971 — Kaniel, Paige, and Saad establish sharp Chebyshev-based convergence bounds; Paige's 1971 thesis explains loss of orthogonality and rehabilitates Lanczos for finite-precision computation.
- 1975 — Ernest Davidson introduces the preconditioned Davidson method for quantum-chemistry Hamiltonians.
- 1979–1985 — Cullum & Willoughby develop ghost-eigenvalue identification; Parlett & Scott introduce selective reorthogonalization.
- 1992 — Sorensen develops the Implicitly Restarted Arnoldi Method (IRAM), basis of the celebrated ARPACK library (Lehoucq, Sorensen, Yang, 1998).
- 2001 — Knyazev publishes LOBPCG, an optimal preconditioned method for symmetric eigenproblems; Sleijpen & Van der Vorst's Jacobi–Davidson (1996) matures in parallel.

Subtleties & Limits

open-problem

Several challenges remain at the research frontier. (1) Clustered and interior eigenvalues: Krylov methods excel at well-separated extremal eigenvalues but struggle when many eigenvalues cluster or lie in the spectrum's interior; contour-integral / spectral-projection methods (FEAST, Sakurai–Sugiura) compute all eigenvalues in a complex region but require many sparse linear solves and robust quadrature. (2) Non-normal and pseudospectral regimes: for highly non-normal operators, no cheap a posteriori bound certifies forward eigenvalue accuracy; computing pseudospectra at scale is itself expensive. (3) Communication-avoiding Krylov methods (ss-step Lanczos/Arnoldi) reduce synchronization on exascale machines but exhibit worse numerical stability — balancing the two is open. (4) Nonlinear eigenvalue problems T(λ)x=0T(\lambda)x=0 (arising in delay equations, photonics, fluid–structure interaction) lack a fully mature, robust large-scale iterative theory. (5) Eigensolvers for tensors and matrix functions (f(A)vf(A)v, Lyapunov/Sylvester equations) are an active, only partially understood extension of the Krylov framework.

See Also

Lanczos Algorithm · Arnoldi Iteration · Conjugate Gradient Method · ARPACK · LOBPCG · Jacobi-Davidson Method · Pseudospectra · Shift-and-Invert · Spectral Clustering · Power Iteration