Minimal residual method

From HandWiki
Short description: Computational method
A comparison of the norm of error and residual in the CG method (blue) and the MINRES method (green). The matrix used comes from a 2D boundary-value problem.

The Minimal Residual Method or MINRES is a Krylov subspace method for the iterative solution of symmetric linear equation systems. It was proposed by mathematicians Christopher Conway Paige and Michael Alan Saunders in 1975.[1]

In contrast to the popular CG method, the MINRES method does not assume that the matrix is positive definite, only the symmetry of the matrix is mandatory.

GMRES vs. MINRES

The GMRES method is essentially a generalization of MINRES for arbitrary matrices. Both minimize the 2-norm of the residual and do the same calculations in exact arithmetic when the matrix is symmetric. MINRES is a short-recurrence method with a constant memory requirement, whereas GMRES requires storing the whole Krylov space, so its memory requirement is roughly proportional to the number of iterations. On the other hand, GMRES tends to suffer less from loss of orthogonality.[1][2]

Properties of the MINRES method

The MINRES method iteratively calculates an approximate solution of a linear system of equations of the form [math]\displaystyle{ Ax = b, }[/math] where [math]\displaystyle{ A\in\mathbb{R}^{n\times n} }[/math] is a symmetric matrix and [math]\displaystyle{ b\in\mathbb{R}^n }[/math] a vector.

For this, the norm of the residual [math]\displaystyle{ r(x) := b - Ax }[/math] in a [math]\displaystyle{ k }[/math]-dimensional Krylov subspace [math]\displaystyle{ V_k = x_0 + \operatorname{span}\{r_0, Ar_0\ldots,A^{k-1}r_0\} }[/math] is minimized. Here [math]\displaystyle{ x_0\in\mathbb{R}^n }[/math] is an initial value (often zero) and [math]\displaystyle{ r_0 := r(x_0) }[/math].

More precisely, we define the approximate solutions [math]\displaystyle{ x_k }[/math] through [math]\displaystyle{ x_k := \mathrm{argmin}_{x\in V_k} \|r(x)\|, }[/math] where [math]\displaystyle{ \|\cdot\| }[/math] is the standard Euclidean norm on [math]\displaystyle{ \mathbb{R}^n }[/math].

Because of the symmetry of [math]\displaystyle{ A }[/math], unlike in the GMRES method, it is possible to carry out this minimization process recursively, storing only two previous steps (short recurrence). This saves memory.

MINRES algorithm

Note: The MINRES method is more complicated than the algebraically equivalent Conjugate Residual method. The Conjugate Residual (CR) method was therefore produced below as a substitute. It differs from MINRES in that in MINRES, the columns of a basis of the Krylov space (denoted below by [math]\displaystyle{ p_k }[/math]) can be orthogonalized, whereas in CR their images (below labeled with [math]\displaystyle{ s_k }[/math]) can be orthogonalized via the Lanczos recursion. There are more efficient and preconditioned variants with fewer AXPYs. Compare with the article.

First you choose [math]\displaystyle{ x_0\in\mathbb{R}^n }[/math] arbitrary and compute [math]\displaystyle{ \begin{align} r_0 &= b - A x_0 \\ p_0 &= r_0 \\ s_0 &= A p_0 \end{align} }[/math]

Then we iterate for [math]\displaystyle{ k=1,2,\dots }[/math] in the following steps:

  • Compute [math]\displaystyle{ x_k,r_k }[/math] through

    [math]\displaystyle{ \alpha_{k-1} = \frac{ \langle r_{k-1}, s_{k-1} \rangle}{ \langle s_{k-1}, s_{k-1} \rangle } }[/math] [math]\displaystyle{ x_k = x_{k-1} + \alpha_{k-1} p_{k-1} }[/math] [math]\displaystyle{ r_k = r_{k-1} - \alpha_{k-1} s_{k-1} }[/math] if [math]\displaystyle{ \|r_k\| }[/math]is smaller than a specified tolerance, the algorithm is interrupted with the approximate solution [math]\displaystyle{ x_k }[/math]. Otherwise, a new descent direction [math]\displaystyle{ p_k }[/math] is calculated through [math]\displaystyle{ p_k \leftarrow s_{k-1} }[/math]

    [math]\displaystyle{ s_k \leftarrow As_{k-1} }[/math]
  • for [math]\displaystyle{ l=1,2 }[/math] (the step [math]\displaystyle{ l=2 }[/math] is not carried out in the first iteration step) calculate: [math]\displaystyle{ \beta_{k,l} = \frac{\langle s_k, s_{k-l} \rangle}{ \langle s_{k-l}, s_{k-l} \rangle} }[/math] [math]\displaystyle{ p_k \leftarrow p_k - \beta_{k,l} p_{k-l} }[/math] [math]\displaystyle{ s_k \leftarrow s_k - \beta_{k,l} s_{k-l} }[/math]

Convergence rate of the MINRES method

In the case of positive definite matrices, the convergence rate of the MINRES method can be estimated in a way similar to that of the CG method.[3] In contrast to the CG method, however, the estimation does not apply to the errors of the iterates, but to the residual. The following applies:

[math]\displaystyle{ \|r_k\| \le 2\left(\frac{\sqrt{\kappa(A)}-1}{\sqrt{\kappa(A)}+1}\right)^k\|r_{0}\|, }[/math]

where [math]\displaystyle{ \kappa(A) }[/math] is the condition number of matrix [math]\displaystyle{ A }[/math]. Because [math]\displaystyle{ A }[/math] is normal, we have [math]\displaystyle{ \kappa(A) = \frac{\left|\lambda_\text{max}(A)\right|}{\left|\lambda_\text{min}(A)\right|}, }[/math] where [math]\displaystyle{ \lambda_\text{max}(A) }[/math] and [math]\displaystyle{ \lambda_\text{min}(A) }[/math] are maximal and minimal eigenvalues of [math]\displaystyle{ A }[/math], respectively.

Implementation in GNU Octave / MATLAB

function [x, r] = minres(A, b, x0, maxit, tol)
  x = x0;
  r = b - A * x0;
  p0 = r;
  s0 = A * p0;
  p1 = p0;
  s1 = s0;
  for iter = 1:maxit
    p2 = p1; p1 = p0;
    s2 = s1; s1 = s0;
    alpha = r'*s1 / (s1'*s1);
    x = x + alpha * p1;
    r = r - alpha * s1;
    if (r'*r < tol^2)
      break
    end
    p0 = s1;
    s0 = A * s1;
    beta1 = s0'*s1 / (s1'*s1);
    p0 = p0 - beta1 * p1;
    s0 = s0 - beta1 * s1;
    if iter > 1
      beta2 = s0'*s2 / (s2'*s2);
      p0 = p0 - beta2 * p2;
      s0 = s0 - beta2 * s2;
    end
  end
end

References

  1. 1.0 1.1 Christopher C. Paige, Michael A. Saunders (1975). "Solution of sparse indefinite systems of linear equations". SIAM Journal on Numerical Analysis 12 (4): 617–629. doi:10.1137/0712047. https://doi.org/10.1137/0712047. 
  2. Nifa, M. Naoufal. "Effcient solvers for constrained optimization in parameter identification problems". pp. 51–52. https://www.theses.fr/2017SACLC066.pdf. 
  3. Sven Gross, Arnold Reusken. Numerical Methods for Two-phase Incompressible Flows. section 5.2: Springer. ISBN 978-3-642-19685-0. 

External links