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 Solver | Matrix Symmetry Requirement | Vectors Stored | Residual Norm Behavior | Matrix-Vector Products per Step |
|---|---|---|---|---|
| Conjugate Gradient (CG) | Symmetric positive-definite (SPD) | 4 vectors | Monotone in A-norm | 1 (Av) |
| MINRES | Symmetric indefinite | 6 vectors | Monotone in 2-norm | 1 (Av) |
| Full GMRES | General non-symmetric invertible | k + 2 vectors | Monotone in 2-norm | 1 (Av) |
| Restarted GMRES(m) | General non-symmetric invertible | m + 2 vectors | Monotone within each m-cycle | 1 (Av) |
| BiCGSTAB | General non-symmetric invertible | 7 vectors | Non-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
- 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
- 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
- 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
- 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