โ† Wiki Index / Computation & Algorithms / Generalized Minimal Residual Method
๐Ÿ’ป Computation & Algorithms

Generalized Minimal Residual Method

The generalized minimal residual method (GMRES) is an iterative Krylov subspace algorithm for solving large, sparse, non-symmetric systems of linear equations by minimizing the Euclidean norm of the residual vector at every step.

Generalized minimal residual method (GMRES) is an iterative Krylov subspace solver in numerical linear algebra and scientific computing, introduced by Yousef Saad and Martin H. Schultz in 1986, for approximating the solution of a large, sparse, general non-symmetric (or non-Hermitian) system of linear equations Ax = b where A โˆˆ โ„nร—n is invertible. While the conjugate gradient method solves symmetric positive-definite systems and MINRES solves symmetric indefinite systems using short three-term recurrences from the Lanczos algorithm, the Faberโ€“Manteuffel theorem (1984) proves that no universal short-recurrence optimal Krylov method exists for general non-symmetric matrices. GMRES overcomes this barrier by combining Arnoldi orthogonalization with progressive QR decomposition to find the iterate xk in the affine Krylov subspace x0 + Kk(A, r0) that minimizes the Euclidean residual norm โ€–b โˆ’ Axkโ€–2.

Because GMRES minimizes the true 2-norm of the residual over an expanding nested sequence of subspaces K1 โŠ‚ K2 โŠ‚ โ‹ฏ โŠ‚ Kk, its residual norm โ€–rkโ€–2 is guaranteed to decrease monotonically (โ€–rk+1โ€–2 โ‰ค โ€–rkโ€–2) without the erratic residual spikes or division-by-zero breakdowns that can afflict biorthogonal methods such as BiCG and CGS. Consequently, preconditioned GMRES serves as the workhorse linear solver inside computational fluid dynamics, electromagnetic scattering, reactor neutronics, and Jacobian-free Newtonโ€“Krylov implementations of Newton's method.

Arnoldi Orthogonalization and Upper Hessenberg Reduction

Given an initial guess x0 โˆˆ โ„n with initial residual r0 = b โˆ’ Ax0 and norm ฮฒ = โ€–r0โ€–2, the order-k Krylov subspace is defined as:

Kk(A, r0) = span{r0, Ar0, A2r0, โ€ฆ, Akโˆ’1r0}.

Because the monomial vectors Ajr0 rapidly align with the dominant eigenvector of A (as in power iteration), forming a basis directly from {Ajr0} would produce a nearly singular matrix. GMRES instead runs the Arnoldi iteration, which applies modified Gramโ€“Schmidt orthogonalization (or Householder reflectors) to construct an orthonormal basis Qk = [q1, q2, โ€ฆ, qk] โˆˆ โ„nร—k starting from q1 = r0 / ฮฒ. At iteration j, the vector w = Aqj is orthogonalized against all previous vectors q1, โ€ฆ, qj via hij = qiTw and w โ† w โˆ’ โˆ‘i=1j hijqi, followed by setting hj+1,j = โ€–wโ€–2 and qj+1 = w / hj+1,j.

After k steps, the Arnoldi vectors satisfy the Arnoldi relation:

AQk = Qk+1 Hฬƒk,

where Qk+1 โˆˆ โ„nร—(k+1) has orthonormal columns and Hฬƒk โˆˆ โ„(k+1)ร—k is an upper Hessenberg matrix (having non-zero entries only on and above the main diagonal plus the first subdiagonal hj+1,j).

Reduction to a Small Least-Squares Problem via Givens QR

Every candidate iterate in x0 + Kk(A, r0) can be written as xk = x0 + Qky for a low-dimensional coefficient vector y โˆˆ โ„k. Substituting the Arnoldi relation and noting that r0 = ฮฒq1 = Qk+1(ฮฒe1) yields:

โ€–b โˆ’ Axkโ€–2 = โ€–r0 โˆ’ AQkyโ€–2 = โ€–Qk+1(ฮฒe1 โˆ’ Hฬƒky)โ€–2 = โ€–ฮฒe1 โˆ’ Hฬƒkyโ€–2,

where the final equality holds because Qk+1 has orthonormal columns and therefore preserves Euclidean norms. This reduces an n-dimensional minimization problem (where n may be 106 to 109) to a tiny (k + 1) ร— k upper Hessenberg least-squares problem (where k is typically 20 to 100).

Rather than refactoring Hฬƒk from scratch at every step, GMRES updates the QR decomposition of Hฬƒk incrementally: applying the previous k โˆ’ 1 Givens plane rotations to the newly appended k-th column of Hฬƒk leaves only a single subdiagonal entry hk+1,k, which is zeroed by one new Givens rotation Gk. As a remarkable byproduct, the magnitude |gk+1| of the bottom component of the rotated right-hand side vector g = Gkโ‹ฏG1(ฮฒe1) equals the residual norm โ€–b โˆ’ Axkโ€–2 at step k. Thus GMRES monitors convergence at every step without assembling the vector xk = x0 + Qkyk until the stopping tolerance is satisfied.

Restarted GMRES(m), Convergence Bounds, and Preconditioning

Memory Growth and Restarted GMRES(m)

Because Arnoldi orthogonalization must retain all k basis vectors q1, โ€ฆ, qk, the storage cost grows as O(nk) words and the orthogonalization work grows as O(nk2) flops after k steps. To cap memory and arithmetic overhead on large problems, Saad and Schultz introduced restarted GMRES, denoted GMRES(m): after a fixed cycle length m (commonly m = 30 to 100), if convergence has not yet occurred, the algorithm computes xm, discards the basis Qm, sets x0 โ† xm, and begins a fresh m-step cycle. If A + AT is positive-definite, GMRES(m) is guaranteed to converge for every restart parameter m โ‰ฅ 1; for strongly indefinite or non-normal matrices, small restart lengths can stall unless augmented by deflated invariant subspaces (GMRES-DR) or strong preconditioning.

Krylov SolverMatrix Symmetry RequirementVectors StoredResidual Norm BehaviorMatrix-Vector Products per Step
Conjugate Gradient (CG)Symmetric positive-definite (SPD)4 vectorsMonotone in A-norm1 (Av)
MINRESSymmetric indefinite6 vectorsMonotone in 2-norm1 (Av)
Full GMRESGeneral non-symmetric invertiblek + 2 vectorsMonotone in 2-norm1 (Av)
Restarted GMRES(m)General non-symmetric invertiblem + 2 vectorsMonotone within each m-cycle1 (Av)
BiCGSTABGeneral non-symmetric invertible7 vectorsNon-monotone (smooth oscillations)2 (Av)

Spectral vs. Non-Normal Convergence Behavior and Preconditioning

If A = V ฮ› Vโˆ’1 is diagonalizable with eigenvalues {ฮป1, โ€ฆ, ฮปn}, the residual at step k satisfies the polynomial bound:

โ€–rkโ€–2 / โ€–r0โ€–2 โ‰ค ฮบ2(V) ยท minpโˆˆPk, p(0)=1 max1โ‰คiโ‰คn |p(ฮปi)|,

where Pk is the space of polynomials of degree at most k satisfying p(0) = 1. When A is close to normal (ฮบ2(V) โ‰ˆ 1) and its eigenvalues are tightly clustered away from the origin in the complex plane, a low-degree polynomial achieves tiny values across the entire spectrum, yielding rapid convergence. For highly non-normal matrices (such as convection-dominated flow operators where ฮบ2(V) โ‰ซ 1), convergence is governed by the ฮต-pseudospectrum and the field of values of A rather than eigenvalues alone.

In practice, GMRES is almost always paired with a preconditioner M โ‰ˆ Aโ€”such as incomplete LU decomposition (ILU), algebraic multigrid (AMG), or domain decompositionโ€”solving either the left-preconditioned system Mโˆ’1Ax = Mโˆ’1b or the right-preconditioned system AMโˆ’1u = b (with x = Mโˆ’1u, which preserves the unpreconditioned residual norm โ€–b โˆ’ Axkโ€–2). When the preconditioner itself varies from step to step (for example, an inner iterative solver), Saad's Flexible GMRES (FGMRES) stores the preconditioned vectors zj = Mjโˆ’1qj separately to maintain convergence.

Frequently Asked Questions

What is a "lucky breakdown" in GMRES?

If the subdiagonal entry hk+1,k = 0 at step k < n, the Krylov subspace Kk(A, r0) has become an invariant subspace of A (AKk โІ Kk). Far from being a failure, this implies that the exact solution x* = Aโˆ’1b lies inside x0 + Kk(A, r0), so GMRES terminates at step k with zero residual โ€–rkโ€–2 = 0.

Why is right preconditioning often preferred over left preconditioning in GMRES?

Left preconditioning minimizes the preconditioned residual โ€–Mโˆ’1(b โˆ’ Axk)โ€–2, which can distort stopping criteria if M is poorly conditioned. Right preconditioning solves AMโˆ’1u = b and minimizes the true physical residual โ€–b โˆ’ Axkโ€–2 directly.

References

  1. Saad, Y., & Schultz, M. H. (1986). GMRES: A generalized minimal residual algorithm for solving nonsymmetric linear systems. SIAM Journal on Scientific and Statistical Computing, 7(3), 856โ€“869. https://doi.org/10.1137/0907058
  2. Faber, V., & Manteuffel, T. (1984). Necessary and sufficient conditions for the existence of a conjugate gradient method. SIAM Journal on Numerical Analysis, 21(2), 352โ€“362. https://doi.org/10.1137/0721026
  3. Saad, Y. (1993). A flexible inner-outer preconditioned GMRES algorithm. SIAM Journal on Scientific Computing, 14(2), 461โ€“469. https://doi.org/10.1137/0914028
  4. Greenbaum, A., Ptรกk, V., & Strakoลก, Z. (1996). Any nonincreasing convergence curve is possible for GMRES. SIAM Journal on Matrix Analysis and Applications, 17(3), 465โ€“469. https://doi.org/10.1137/S0895479894275030
๐Ÿงฌ Support Open Science
Explore interactive science games on LowKey Games or browse scientific apparel & accessories in the CRV Science Shop.
๐Ÿ’ก Spot an inaccuracy or have primary literature to expand this article?
Submit a citation or revision note using your shared CRV Science / LowKey Games profile ID.
Suggest Revision