NLA MT25, GMRES algorithm


Flashcards

What is the main idea behind the GMRES algorithm for solving linear systems $Ax = b$?

Minimise the residual in the Krylov subspace:

\[x = \text{argmin} _ {x \in \mathcal K _ k(A, b)} \vert \vert Ax - b \vert \vert _ 2\]

@exam~

@Describe the steps in the GMRES @algorithm for approximately solving linear systems $Ax = b$. State what each iteration computes, give the steps, annotate flop costs, and describe the connection to the small least-squares problem.

What GMRES computes. GMRES (Generalised Minimal RESidual) finds at each iteration $k = 1, 2, \ldots$, the element of the Krylov subspace $\mathcal K _ k(A, b)$ that minimises the residual

\[x _ k = \text{argmin} _ {x \in \mathcal K _ k(A, b)} \|Ax - b\| _ 2.\]

The iterations are: extend the Krylov subspace by one dimension, solve the (slightly larger) projected least-squares problem, get a new iterate $x _ k$. The residual is non-increasing in $k$, and convergence is determined by ∆gmres-convergence.

The algorithm, at iteration $k$:

1, Extend Arnoldi by one step to obtain $Q _ k \in \mathbb R^{n \times k}$, $Q _ {k+1} \in \mathbb R^{n \times (k+1)}$ with orthonormal columns spanning $\mathcal K _ k(A, b)$ and $\mathcal K _ {k+1}(A, b)$ respectively, and $\tilde H _ k \in \mathbb R^{(k+1) \times k}$ upper hessenberg, satisfying the Arnoldi decomposition

\[AQ _ k = Q _ {k+1} \tilde H _ k\]

Cost: one matrix-vector product with $A$, plus $O(nk)$ for orthogonalising against the existing basis. Cumulative cost over $k$ steps: $O(nk^2)$.

2, Reduce the residual minimisation to a small Hessenberg least-squares problem. Writing $x = Q _ k y$ for $y \in \mathbb R^k$, and using that $Q _ {k+1}$ has orthonormal columns:

\[\|AQ _ k y - b\| _ 2 = \|Q _ {k+1} \tilde H _ k y - b\| _ 2 = \|\tilde H _ k y - Q^\top _ {k+1} b\| _ 2.\]

Since the first column of $Q _ {k+1}$ is $q _ 1 = b/\|b\| _ 2$ (from Arnoldi), $Q^\top _ {k+1} b = \|b\| _ 2 e _ 1$ exactly, and so there is no need to ever compute $Q _ {k+1}^\top b$ as an inner product. The problem then becomes

\[\min _ y \| \tilde H _ k y - \|b\| _ 2 e _ 1 \| _ 2.\]

3, Solve the Hessenberg least-squares problem via $k$ Givens rotations to get the QR factorisation of $\tilde H _ k$, then a triangular back-substitution. Because $\tilde H _ k$ is upper Hessenberg (only one subdiagonal), this is much cheaper than a general $(k+1) \times k$ least-squares problem. Moreover, as $k$ increases, $\tilde H _ {k+1}$ only adds one new column and one new row to $\tilde H _ k$, so the previous Givens factorisation can be updated incrementally.

Cost: $O(k)$ per iteration using incremental update. Cumulative cost over $k$ steps: $O(k^2)$.

4, Calculate residual. After step $k$, the GMRES residual norm equals

\[\|Ax _ k - b\| _ 2 = \vert g _ {k+1} \vert ,\]

i.e. the absolute value of the last entry of the rotated RHS $g = G _ k \cdots G _ 1 (\|b\| _ 2 e _ 1) \in \mathbb R^{k+1}$. This is available at $O(1)$ cost per step, so there is no need to compute $y$ or $x _ k$ to check whether there is convergence.

5, Recover the iterate (only when stopping). Once you have decided to terminate at step $k$, back-solve $R _ k y = g _ {1 : k}$ (cost $O(k^2)$), and form $x _ k = Q _ k y$ (cost $O(nk)$).

Total cost over $k$ iterations:

  • $O(nk^2)$ for Arnoldi
  • $O(k^3)$ for cumulative Hessenberg least-squares solves, plus $k$ matrix-vector multiplications.

The memory cost is $O(nk)$ for storing $Q _ {k+1}$.

@exam~

The steps in the GMRES @algorithm for approximately solving linear systems $Ax = b$ are as follows:

At iteration $k$, find $x _ k = \text{argmin} _ {x \in \mathcal K _ k(A, b)} \|Ax - b\| _ 2$ via:

  1. Extend Arnoldi: obtain $Q _ k$, $Q _ {k+1}$, $\tilde H _ k$ with $AQ _ k = Q _ {k+1} \tilde H _ k$, where $\tilde H _ k \in \mathbb R^{(k+1) \times k}$ is upper Hessenberg.
  2. Solve the small Hessenberg least-squares problem
\[\min _ y \big \vert \tilde H _ k y - \|b\| e _ 1 \big \vert _ 2\]

incrementally via Givens rotations.

  1. Return $x _ k = Q _ k y$.

@Justify why this works.

We aim to minimise the residual in the Krylov subspace:

\[x = \text{argmin} _ {x \in \mathcal K _ k(A, b)} \vert \vert Ax - b \vert \vert _ 2\]

Write $x = Q _ k y$. Then

\[\begin{aligned} \min _ y \vert \vert AQ _ k y - b \vert \vert _ 2 &= \min _ y \vert \vert Q _ {k+1} \tilde H _ k y - b \vert \vert _ 2 \\ &= \min _ y \left \vert \left \vert \begin{bmatrix} \tilde H _ k \\ 0\end{bmatrix} y - \begin{bmatrix} Q _ {k+1}^\top \\ Q^\top _ {k+1} \end{bmatrix} b \right \vert \right \vert _ 2 \\ &= \min _ y \left \vert \left \vert \begin{bmatrix} \tilde H _ k \\ 0 \end{bmatrix} y\\ - \vert \vert b \vert \vert _ 2 e _ 1 \right \vert \right \vert _ 2 \end{aligned}\]

This is minimised when $ \vert \vert \tilde H _ k y - Q^\top _ {k+1}b \vert \vert _ 2$ is minimised. This a Hessenberg least-squares problem and can be solved efficiently via QR.

@exam~

In GMRES, the step-$k$ residual minimisation $\min _ {x \in \mathcal K _ k(A, b)} \|Ax - b\| _ 2$ reduces, via the Arnoldi decomposition $AQ _ k = Q _ {k+1} \tilde H _ k$ and $Q _ {k+1}^\top b = \|b\| _ 2 e _ 1$, to the small Hessenberg least-squares problem

\[\min _ {y \in \mathbb R^k} \big\| \tilde H _ k\, y - \|b\| _ 2 e _ 1 \big\| _ 2, \qquad \tilde H _ k \in \mathbb R^{(k+1) \times k} \text{ upper Hessenberg}.\]

@Describe how this is solved with Givens rotations, how the solve is updated as $k$ grows, and the per-step cost.

Triangularise $\tilde H _ k$. Being upper Hessenberg, $\tilde H _ k$ has a single nonzero subdiagonal, so one Givens rotation per column clears it: $G _ j$ acts on rows $j, j+1$ to zero the subdiagonal entry in column $j$. After $k$ rotations,

\[G _ k \cdots G _ 1\, \tilde H _ k = \begin{bmatrix} R _ k \\ 0 \end{bmatrix}, \qquad R _ k \in \mathbb R^{k \times k} \text{ upper triangular}.\]

Rotate the RHS. Apply the same rotations to the right-hand side, $g = G _ k \cdots G _ 1 (\|b\| _ 2 e _ 1) \in \mathbb R^{k+1}$, and split $g = \begin{bmatrix} g _ {1:k} \\ g _ {k+1} \end{bmatrix}$. The rotations are orthogonal, so they preserve the objective:

\[\big\| \tilde H _ k y - \|b\| _ 2 e _ 1 \big\| _ 2^2 = \| R _ k y - g _ {1:k} \| _ 2^2 + g _ {k+1}^2.\]

Solve and read off. The first term is killed by the triangular solve $R _ k y = g _ {1:k}$ (back-substitution); the second is irreducible. So the minimiser is $y = R _ k^{-1} g _ {1:k}$, and the minimal residual norm is $ \vert g _ {k+1} \vert $, the last entry of $g$, which needs no $y$ to evaluate.

Incremental update (the point). From step $k-1$ to $k$, $\tilde H _ k$ only appends one column and one subdiagonal entry to $\tilde H _ {k-1}$. So: apply the stored rotations $G _ 1, \ldots, G _ {k-1}$ to the new column, compute one new rotation $G _ k$ to zero $h _ {k+1,k}$, and apply $G _ k$ to $g$ (updating its last two entries and exposing the new $g _ {k+1}$). Nothing already computed is redone.

Cost. $O(k)$ per step (apply $\le k$ rotations to one length-$(k+1)$ column), hence $O(k^2)$ over $k$ steps, negligible beside Arnoldi’s $O(nk^2)$. The residual $ \vert g _ {k+1} \vert $ is available for free each step, so convergence is monitored without forming $y$ or $x _ k$; the back-solve $R _ k y = g _ {1:k}$ and lift $x _ k = Q _ k y$ are done once, only on stopping.

Why Givens, not Householder. The Hessenberg structure leaves a single entry per column to zero, so a local two-row Givens rotation is exactly the right tool, and it is what makes the append-one-column update cheap as $k$ grows.

Source Lecture 12, GMRES for $Ax = b$ slide and §12 of the lecture notes; the Givens/Hessenberg least-squares mechanics are standard (cf. Saad, Iterative Methods for Sparse Linear Systems, §6.5).

@algorithm~

Recall the ∆gmres-algorithm:

At iteration $k$, find $x _ k = \text{argmin} _ {x \in \mathcal K _ k(A, b)} \|Ax - b\| _ 2$ via:

  1. Extend Arnoldi: obtain $Q _ k$, $Q _ {k+1}$, $\tilde H _ k$ with $AQ _ k = Q _ {k+1} \tilde H _ k$, where $\tilde H _ k \in \mathbb R^{(k+1) \times k}$ is upper Hessenberg.
  2. Solve the small Hessenberg least-squares problem
\[\min _ y \big \vert \tilde H _ k y - \|b\| e _ 1 \big \vert _ 2\]

incrementally via Givens rotations.

  1. Return $x _ k = Q _ k y$.

@State a theorem describing the convergence of the GMRES algorithm.

Suppose:

  • $A$ is a diagonalisable matrix, so that $A = X \Lambda X^{-1}$

Then the $k$-th GMRES iterate $x _ k$ satisfies

\[ \vert \vert Ax _ k - b \vert \vert _ 2 \le \kappa _ 2(X) \min _ {p \in \mathcal P _ k, p(0) = 1} \max _ {z \in \lambda(A)} \vert p(z) \vert \, \vert \vert b \vert \vert _ 2\]

@exam~

Recall the ∆gmres-algorithm:

At iteration $k$, find $x _ k = \text{argmin} _ {x \in \mathcal K _ k(A, b)} \|Ax - b\| _ 2$ via:

  1. Extend Arnoldi: obtain $Q _ k$, $Q _ {k+1}$, $\tilde H _ k$ with $AQ _ k = Q _ {k+1} \tilde H _ k$, where $\tilde H _ k \in \mathbb R^{(k+1) \times k}$ is upper Hessenberg.
  2. Solve the small Hessenberg least-squares problem
\[\min _ y \big \vert \tilde H _ k y - \|b\| e _ 1 \big \vert _ 2\]

incrementally via Givens rotations.

  1. Return $x _ k = Q _ k y$.

@Prove that if $A$ is a diagonalisable matrix, so that $A = X \Lambda X^{-1}$, then the $k$-th GMRES iterate $x _ k$ satisfies

\[ \vert \vert Ax _ k - b \vert \vert _ 2 \le \kappa _ 2(X) \min _ {p \in \mathcal P _ k, p(0) = 1} \max _ {z \in \lambda(A)} \vert p(z) \vert \, \vert \vert b \vert \vert _ 2.\]

Recall that $x _ k \in \mathcal K _ k(A, b)$ implies $x _ k = p _ {k-1}(A)b$ where $p _ {k-1}$ is a polynomial of degree at most $k-1$. Hence the GMRES solution is

\[\begin{aligned} \min _ {x _ k \in \mathcal K _ k(A, b)} \vert \vert Ax _ k - b\| _ 2 &= \min _ {p _ {k-1} \in \mathbb C _ {k-1}[t]} \vert \vert Ap _ {k-1}(A)b - b \vert \vert _ 2 \\ &= \min _ {\tilde p \in \mathbb C _ k[t], \tilde p(0) = 0} \vert \vert (\tilde p(A) - I)b \vert \vert _ 2 \\ &= \min _ {p \in \mathcal P _ k, p(0) = 1} \vert \vert p(A)b \vert \vert _ 2 \end{aligned}\]

As $A$ is diagonalisable, we have

\[\begin{aligned} \vert \vert p(A) \vert \vert _ 2 &= \vert \vert Xp(\Lambda)X^{-1} \vert \vert _ 2 \\ &\le \vert \vert X \vert \vert _ 2 \vert \vert X^{-1} \vert \vert _ 2 \vert \vert p(\Lambda) \vert \vert _ 2 \\ &= \kappa _ 2(X) \max _ {z \in \lambda (A)} \vert p(z) \vert \end{aligned}\]

Hence overall

\[ \vert \vert Ax _ k - b \vert \vert _ 2 \le \kappa _ 2(X) \min _ {p \in \mathcal P _ k, p(0) = 1} \max _ {z \in \lambda(A)} \vert p(z) \vert \, \vert \vert b \vert \vert _ 2\]

Recall the ∆gmres-algorithm:

At iteration $k$, find $x _ k = \text{argmin} _ {x \in \mathcal K _ k(A, b)} \|Ax - b\| _ 2$ via:

  1. Extend Arnoldi: obtain $Q _ k$, $Q _ {k+1}$, $\tilde H _ k$ with $AQ _ k = Q _ {k+1} \tilde H _ k$, where $\tilde H _ k \in \mathbb R^{(k+1) \times k}$ is upper Hessenberg.
  2. Solve the small Hessenberg least-squares problem
\[\min _ y \big \vert \tilde H _ k y - \|b\| e _ 1 \big \vert _ 2\]

incrementally via Givens rotations.

  1. Return $x _ k = Q _ k y$.

We have the result (∆gmres-convergence) that

If $A$ is a diagonalisable matrix, so that $A = X \Lambda X^{-1}$, then the $k$-th GMRES iterate $x _ k$ satisfies

\[ \vert \vert Ax _ k - b \vert \vert _ 2 \le \kappa _ 2(X) \min _ {p \in \mathcal P _ k, p(0) = 1} \max _ {z \in \lambda(A)} \vert p(z) \vert \, \vert \vert b \vert \vert _ 2\]

@Describe a class of matrices $A$ for which GMRES will converge fast, and give two common situations where this happens.

GMRES converges fast on matrices $A$ for which there exists a low-degree polynomial $p$ with $p(0) = 1$ and $ \vert p \vert $ small at every eigenvalue of $A$. Two common situations where this happens might be:

  1. Eigenvalues clustered away from $0$. If $\lambda(A) \supset \overline{B(c, r)}$ for some centre $c$ with $ \vert c \vert > r$, then $p(z) = (1 - z/c)^k$ satisfies $p(0) = 1$ and $ \vert p(\lambda) \vert \le (r/ \vert c \vert )^k \to 0$ geometrically.
  2. Few distinct eigenvalues. If $A$ has $k \ll n$ distinct eigenvalues $\lambda _ 1, \ldots, \lambda _ k$, set $p(z) = \prod^k _ {i = 1} \frac{(z - \lambda _ i)}{(0 - \lambda _ i)}$, which satisfies $p(0) = 1$ and $ \vert p(\lambda _ i) \vert = 0$ at every eigenvalue of $A$. So GMRES converges exactly in $\le k$ steps.

The condition number of the eigenvector matrix also matters. For normal $A$ it equals $1$; for non-normal $A$ it can amplify the bound substantially.

@exam~

Recall we have the ∆gmres-convergence result that

If $A$ is a diagonalisable matrix, so that $A = X \Lambda X^{-1}$, then the $k$-th GMRES iterate $x _ k$ satisfies

\[ \vert \vert Ax _ k - b \vert \vert _ 2 \le \kappa _ 2(X) \min _ {p \in \mathcal P _ k, p(0) = 1} \max _ {z \in \lambda(A)} \vert p(z) \vert \, \vert \vert b \vert \vert _ 2.\]

Given this, can you @visualise the eigenvalue distribution of two matrices $A$ and the corresponding convergence rates of the GMRES algorithm?

  • In the first example, convergence is very fast because there are many eigenvalues clustered away from $0$.
  • In the second example, convergence is very slow because there are many distinct eigenvalues all around $0$.

See also ∆gmres-fast-convergence-examples.

What is the cost of GMRES for finding an approximate solution to $Ax = b$ in the order-$k$ Krylov subspace?

\[O(nk^2)\]

Preconditioning

Recall the ∆gmres-algorithm:

At iteration $k$, find $x _ k = \text{argmin} _ {x \in \mathcal K _ k(A, b)} \|Ax - b\| _ 2$ via:

  1. Extend Arnoldi: obtain $Q _ k$, $Q _ {k+1}$, $\tilde H _ k$ with $AQ _ k = Q _ {k+1} \tilde H _ k$, where $\tilde H _ k \in \mathbb R^{(k+1) \times k}$ is upper Hessenberg.
  2. Solve the small Hessenberg least-squares problem
\[\min _ y \big \vert \tilde H _ k y - \|b\| e _ 1 \big \vert _ 2\]

incrementally via Givens rotations.

  1. Return $x _ k = Q _ k y$.

We have the result (∆gmres-convergence) that

If $A$ is a diagonalisable matrix, so that $A = X \Lambda X^{-1}$ then the $k$-th GMRES iterate $x _ k$ satisfies

\[ \vert \vert Ax _ k - b \vert \vert _ 2 \le \kappa _ 2(X) \min _ {p \in \mathcal P _ k, p(0) = 1} \max _ {z \in \lambda(A)} \vert p(z) \vert \, \vert \vert b \vert \vert _ 2\]

The idea of preconditioning is to instead solve

\[MAx = Mb\]

Given the above analysis, what properties of $M$ would we like?

  • Applying $M$ to a vector should be easy, since GMRES requires matrix-vector multiplications
  • At least one of:
    1. $MA$ has clustered eigenvalues away from $0$
    2. $MA$ has a small number of distinct nonzero eigenvalues
    3. $MA$ is well-conditioned $\kappa _ 2(MA) = O(1)$

Recall the ∆gmres-algorithm:

At iteration $k$, find $x _ k = \text{argmin} _ {x \in \mathcal K _ k(A, b)} \|Ax - b\| _ 2$ via:

  1. Extend Arnoldi: obtain $Q _ k$, $Q _ {k+1}$, $\tilde H _ k$ with $AQ _ k = Q _ {k+1} \tilde H _ k$, where $\tilde H _ k \in \mathbb R^{(k+1) \times k}$ is upper Hessenberg.
  2. Solve the small Hessenberg least-squares problem
\[\min _ y \big \vert \tilde H _ k y - \|b\| e _ 1 \big \vert _ 2\]

incrementally via Givens rotations.

  1. Return $x _ k = Q _ k y$.

We have the result (∆gmres-convergence) that

If $A$ is a diagonalisable matrix, so that $A = X \Lambda X^{-1}$, then the $k$-th GMRES iterate $x _ k$ satisfies

\[ \vert \vert Ax _ k - b \vert \vert _ 2 \le \kappa _ 2(X) \min _ {p \in \mathcal P _ k, p(0) = 1} \max _ {z \in \lambda(A)} \vert p(z) \vert \, \vert \vert b \vert \vert _ 2.\]

The idea of preconditioning is to instead solve

\[MAx = Mb\]

What is the ILU preconditioner in this context, and what does “incomplete” mean?

Setup: for a sparse $A$ (e.g. from a discretised PDE) the exact LU factorisation suffers fill-in — the elimination update $a _ {ij} \leftarrow a _ {ij} - \ell _ {ik} u _ {kj}$ creates nonzeros in positions where $A _ {ij} = 0$, so the true $L, U$ are far denser than $A$ (an $O(n)$-nonzero $A$ can give $O(n^2)$-nonzero factors): too expensive to form, store, and apply.

Incomplete: constrain $L, U$ to a prescribed sparsity pattern and discard any fill-in landing outside it. The simplest choice, ILU(0), keeps exactly the sparsity pattern of $A$ — run the elimination but zero out every update that would fall in a structurally-zero position. (Richer variants allow controlled extra fill: ILU($k$) by level-of-fill, ILUT by a drop tolerance — trading accuracy for density.)

The factorisation is therefore inexact: $\hat L \hat U = A + E$, where $E$ collects the dropped fill, so $\hat L \hat U \approx A$ but $\ne A$. Set

\[M := (\hat L \hat U)^{-1} = \hat U^{-1} \hat L^{-1}\]

Then $MA = (A + E)^{-1} A \approx I$ (spectrum clustered near $1$ when $\|E\|$ is small) — the approximation comes entirely from the incomplete-factorisation step, not the inverse. Applying $M$ to a vector is two sparse triangular solves, $O(\mathrm{nnz})$ rather than $O(n^2)$, which is exactly the “easy to apply” property a preconditioner needs.

Source Lecture 12, Preconditioners: examples slide and §12.3 of the lecture notes (which state only “$L, U$ as sparse as $A$, so $MA \approx I$”). The fill-in mechanism and the ILU(0)/ILU($k$)/ILUT drop-rule taxonomy are standard NLA background, not spelled out in the course — sparse direct solvers are explicitly a non-treated topic (§17.1).

Recall the ∆gmres-algorithm:

At iteration $k$, find $x _ k = \text{argmin} _ {x \in \mathcal K _ k(A, b)} \|Ax - b\| _ 2$ via:

  1. Extend Arnoldi: obtain $Q _ k$, $Q _ {k+1}$, $\tilde H _ k$ with $AQ _ k = Q _ {k+1} \tilde H _ k$, where $\tilde H _ k \in \mathbb R^{(k+1) \times k}$ is upper Hessenberg.
  2. Solve the small Hessenberg least-squares problem
\[\min _ y \big \vert \tilde H _ k y - \|b\| e _ 1 \big \vert _ 2\]

incrementally via Givens rotations.

  1. Return $x _ k = Q _ k y$.

We have the result (∆gmres-convergence) that

If $A$ is a diagonalisable matrix, so that $A = X \Lambda X^{-1}$, then the $k$-th GMRES iterate $x _ k$ satisfies

\[ \vert \vert Ax _ k - b \vert \vert _ 2 \le \kappa _ 2(X) \min _ {p \in \mathcal P _ k, p(0) = 1} \max _ {z \in \lambda(A)} \vert p(z) \vert \, \vert \vert b \vert \vert _ 2.\]

The idea of preconditioning is to instead solve

\[M \mathcal A x = M b\]

Suppose $\mathcal A$ is the saddle-point matrix

\[\mathcal A = \begin{bmatrix} B & C \\ D & 0 \end{bmatrix}\]

What is one (very non-obvious) choice for a preconditioner of $\mathcal A$ here, and why does it work?

\[M = \begin{bmatrix} B^{-1} & 0 \\ 0 & (D B^{-1} C)^{-1} \end{bmatrix}\]

Then if $M$ is nonsingular, $M \mathcal A$ has eigenvalues $\{1, \frac 1 2 (1 \pm \sqrt 5)\}$ — only three distinct values, and so by ∆gmres-fast-convergence-examples (case 2) GMRES has three-step convergence on this preconditioned system.

Recall the ∆gmres-algorithm:

At iteration $k$, find $x _ k = \text{argmin} _ {x \in \mathcal K _ k(A, b)} \|Ax - b\| _ 2$ via:

  1. Extend Arnoldi: obtain $Q _ k$, $Q _ {k+1}$, $\tilde H _ k$ with $AQ _ k = Q _ {k+1} \tilde H _ k$, where $\tilde H _ k \in \mathbb R^{(k+1) \times k}$ is upper Hessenberg.
  2. Solve the small Hessenberg least-squares problem
\[\min _ y \big \vert \tilde H _ k y - \|b\| e _ 1 \big \vert _ 2\]

incrementally via Givens rotations.

  1. Return $x _ k = Q _ k y$.

We have the result (∆gmres-convergence) that

If $A$ is a diagonalisable matrix, so that $A = X \Lambda X^{-1}$, then the $k$-th GMRES iterate $x _ k$ satisfies

\[ \vert \vert Ax _ k - b \vert \vert _ 2 \le \kappa _ 2(X) \min _ {p \in \mathcal P _ k, p(0) = 1} \max _ {z \in \lambda(A)} \vert p(z) \vert \, \vert \vert b \vert \vert _ 2.\]

The idea of preconditioning is to instead solve

\[MAx = Mb\]

In what sense can preconditioning be viewed as approximating the inverse of $A$?

The ideal preconditioner would be $M = A^{-1}$, since then

\[MAx = Mb \implies x = A^{-1} b\]

Restarting

The ∆gmres-algorithm for solving $Ax = b$ is:

At iteration $k$, find $x _ k = \text{argmin} _ {x \in \mathcal K _ k(A, b)} \|Ax - b\| _ 2$ via:

  1. Extend Arnoldi: obtain $Q _ k$, $Q _ {k+1}$, $\tilde H _ k$ with $AQ _ k = Q _ {k+1} \tilde H _ k$, where $\tilde H _ k \in \mathbb R^{(k+1) \times k}$ is upper Hessenberg.
  2. Solve the small Hessenberg least-squares problem
\[\min _ y \big \vert \tilde H _ k y - \|b\| e _ 1 \big \vert _ 2\]

incrementally via Givens rotations.

  1. Return $x _ k = Q _ k y$.

@Describe the restarting technique for GMRES. Why is it useful, and what is the trade-off?

Algorithm:

  1. Stop GMRES after $k _ \max$ iterations to get an approximate solution $\hat x _ 1$.
  2. Solve $A\tilde x = b - A \tilde x _ 1$ via GMRES (i.e. fresh linear system with a new right-hand side, namely the current residual)
  3. Return $\hat x _ 1 + \tilde x$ as the improved solution

If one restart isn’t enough, repeat.

Why useful: GMRES costs $O(nk^2)$ over $k$ iterations and stores $O(nk)$ for the Arnoldi basis $Q _ {k+1}$. Both costs grow in $k$, so for ill-conditioned or large problems the iteration becomes expensive and infeasible in memory before convergence. Restarting caps $k$ at a fixed budget $k _ \max$.

Trade-off: This means that GMRES at iteration $k$ no longer gives the exact solution to $x = \text{argmin} _ {x \in \mathcal K _ k}\|Ax - b\| _ 2$, which can cause issues with the convergence analysis.

Bite-sized

The first Arnoldi vector is $q _ 1 = b/\ \vert b\ \vert _ 2$, so $Q _ {k+1}^\top b = $ $\ \vert b\ \vert _ 2 e _ 1$ exactly — there is no need to compute any inner products of $b$ against the Arnoldi basis in GMRES.

Source: Lecture 12, GMRES for $Ax = b$ slide and §12 of the lecture notes.

@bite~

After $k$ steps GMRES solves $\min _ y \ \vert \tilde H _ k y - \ \vert b\ \vert _ 2 e _ 1\ \vert _ 2$ by triangularising the Hessenberg $\tilde H _ k$ with $k$ Givens rotations $G _ 1, \ldots, G _ k$. Applying the same rotations to the right-hand side gives the rotated vector $g = G _ k \cdots G _ 1(\ \vert b\ \vert _ 2 e _ 1) \in \mathbb R^{k+1}$. The rotations are orthogonal so the objective is unchanged, and the triangularised system has a zero bottom row, so the last entry of $g$ cannot be cancelled by any $y$. Hence the residual norm at step $k$ is the modulus of that last entry, $\ \vert Ax _ k - b\ \vert _ 2 = $ $ \vert g _ {k+1} \vert $. Convergence is therefore monitored at $O(1)$ cost per step, without forming $y$ or $x _ k$.

Source: Lecture 12, GMRES for $Ax = b$ slide (“Solve via QR…”); also discussed in §12 of the lecture notes (Hessenberg LS solution).

@bite~

How does GMRES adapt when given a non-zero initial guess $x _ 0$?

Work in the affine space $x _ k = x _ 0 + \mathcal K _ k(A, r _ 0)$ where $r _ 0 = b - A x _ 0$ is the initial residual. Writing $x _ k = x _ 0 + z$, the minimisation becomes $\min _ {z \in \mathcal K _ k(A, r _ 0)} \|A(x _ 0 + z) - b\| _ 2 = \min _ z \|A z - r _ 0\| _ 2$ — i.e. plain GMRES applied to $A z = r _ 0$. The Arnoldi process is started from $r _ 0/\|r _ 0\| _ 2$ rather than $b/\|b\| _ 2$.

Source Lecture 12, GMRES example slide (“Initial vector…” bullet) and §12.1 of the lecture notes.

@bite~

For normal $A$, the eigenvector matrix $X$ in $A = X \Lambda X^*$ can be taken unitary, so $\kappa _ 2(X) = $ $1$ and the GMRES convergence bound simplifies to $\ \vert A x _ k - b\ \vert _ 2 \le \min _ {p \in \mathcal P _ k, p(0) = 1} \max _ {z \in \lambda(A)} \vert p(z) \vert \, \ \vert b\ \vert _ 2$ — purely a polynomial-approximation problem on the spectrum.

Source: Lecture 12, §12.1 of the lecture notes (Theorem 12.1 + post-theorem discussion).

@bite~

In exact arithmetic GMRES terminates with the exact solution after at most $n$ iterations, since $\mathcal K _ k(A, b) \subseteq \mathbb R^n$ has dimension $\le n$. The polynomial $p _ n(z) = \det(z I - A)/\det(-A)$ (a scaled characteristic polynomial) satisfies $p _ n(0) = 1$ and vanishes on $\lambda(A)$, giving zero residual.

Source: Lecture 12, §12 of the lecture notes (discussion of distinct-eigenvalue case in §12.2).

@bite~ @exam~

Why is the $\kappa _ 2(X)$ prefactor in the GMRES convergence bound potentially problematic for non-normal $A$?

For a non-normal $A$, the eigenvector matrix $X$ in $A = X \Lambda X^{-1}$ can have arbitrarily large $\kappa _ 2(X)$ — Jordan-block-like matrices have ill-conditioned eigenvectors. Even when the polynomial factor $\max _ {z \in \lambda(A)} \vert p(z) \vert $ is small, the bound $\kappa _ 2(X) \cdot \max \vert p \vert $ can be vacuous. Refined “pseudospectral” GMRES bounds (non-examinable) avoid this dependence.

Source Lecture 12, §12.1 of the lecture notes (post-Theorem-12.1 discussion).

@bite~

Strategy for proving the GMRES convergence bound (∆gmres-convergence-proof).

  • Translate the residual-minimisation into a polynomial-approximation problem. Every $x _ k \in \mathcal K _ k(A, b)$ has $x _ k = p _ {k-1}(A) b$, so $Ax _ k - b = (A p _ {k-1}(A) - I) b = -p(A)b$ where $p \in \mathcal P _ k$ with $p(0) = 1$.
  • Diagonalise $A = X \Lambda X^{-1}$, giving $p(A) = X p(\Lambda) X^{-1}$. Submultiplicativity then bounds $\|p(A)\| _ 2 \le \kappa _ 2(X) \max _ {z \in \lambda(A)} \vert p(z) \vert $.
  • Take the min over $p \in \mathcal P _ k$ with $p(0) = 1$. Because GMRES chooses the best $x _ k$ in the Krylov subspace, it also achieves this $\min _ p$ bound, giving the result.

Source Lecture 12, Theorem 12.1 in §12.1 of the lecture notes (proof outline).

@bite~ @proofsupport~