{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Statement\n\nLet $A$ be a real symmetric [[positive definite|0KX66CZMBB]] $n \\times n$ matrix, let $b \\in \\R^n$, and let $x_0 \\in \\R^n$.\nThe *conjugate residual method* sets $r_0 = b - A x_0$ and $p_0 = r_0$, and for $k = 0, 1, \\dots$ while $r_k \\ne 0$ computes\n$$\\alpha_k = \\frac{r_k^T A r_k}{(A p_k)^T (A p_k)}, \\quad x_{k+1} = x_k + \\alpha_k p_k, \\quad r_{k+1} = r_k - \\alpha_k A p_k,$$\n$$\\beta_k = \\frac{r_{k+1}^T A r_{k+1}}{r_k^T A r_k}, \\quad p_{k+1} = r_{k+1} + \\beta_k p_k, \\quad A p_{k+1} = A r_{k+1} + \\beta_k A p_k.$$\nIn exact arithmetic the following hold.\n\n1. $r_k = b - A x_k$, and $x_k$ minimizes $\\norm{b - A x}_2$ over $x \\in x_0 + \\mathcal{K}_k(A, r_0)$, where $\\mathcal{K}_k$ is the [[Krylov subspace|QB45PCGQPV]].\n2. The residuals are $A$-conjugate, $r_i^T A r_j = 0$ for $i \\ne j$, and the vectors $A p_i$ are mutually orthogonal.\n3. Some $r_k$ with $k \\le n$ is zero.\n\n## Remarks\n\nThe method is the [[conjugate gradient method|AFXZGQB4EN]] with the inner product $\\ip{u}{v} = u^T A v$ in place of $u^T v$.\nConjugate gradients in this inner product minimize $\\norm{x - x^*}_{A^2}$, and $\\norm{x - x^*}_{A^2} = \\norm{A(x - x^*)}_2 = \\norm{b - A x}_2$, which gives clause 1.\nClause 2 is the image of the orthogonality and conjugacy relations of conjugate gradients under the change of inner product.\nThe update of $A p_{k+1}$ saves a product with $A$, so each step needs one product, $A r_{k+1}$.\nExample: if $r_0$ is an eigenvector of $A$ for $\\lambda$, then $\\alpha_0 = \\lambda r_0^T r_0 / \\lambda^2 r_0^T r_0 = 1 / \\lambda$ and $r_1 = 0$.\nFor a symmetric indefinite $A$ the same formulas can be run, but $r_k^T A r_k$ can vanish and the method then breaks down.\nThe [[MINRES|3HRHSHTG9C]] method avoids this breakdown.\n\n## Explanations\n\n### L1 human\n\nThe conjugate residual method looks like conjugate gradients, but it chooses each step to make the residual, rather than the energy error, as small as possible.\nSo the size of the residual never grows from one step to the next.\nIt costs about the same as conjugate gradients, with one extra stored vector.\n\n### L2 human\n\nFor symmetric positive definite systems, conjugate residuals and conjugate gradients minimize different norms over the same Krylov spaces.\nIn practice the residual norm of conjugate residuals is monotone, which is convenient for stopping tests.\nFor indefinite symmetric systems [[MINRES|3HRHSHTG9C]] is the robust choice, and for nonsymmetric systems the generalizations GCR and GMRES apply.\nLike all Krylov [[iterative methods|2RPE77ACER]], it is normally combined with a preconditioner.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "about": [
      "2RPE77ACER"
    ],
    "kind": "statement",
    "msc": [
      "65F10"
    ],
    "name": "Conjugate residual method",
    "role": "theorem",
    "same_as": {
      "wikidata": "Q5161159",
      "wikipedia": "Conjugate residual method"
    },
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Conjugate_residual_method"
      }
    ],
    "tag": "24YCKE2RPH",
    "uses": [
      "0KX66CZMBB",
      "QB45PCGQPV",
      "AFXZGQB4EN",
      "3HRHSHTG9C",
      "2RPE77ACER"
    ]
  },
  "kind": "statement",
  "link": "https://tamnd.github.io/math2/node/24YCKE2RPH/",
  "links": [
    {
      "field": "about",
      "target": "2RPE77ACER"
    },
    {
      "field": "uses",
      "target": "0KX66CZMBB"
    },
    {
      "field": "uses",
      "target": "QB45PCGQPV"
    },
    {
      "field": "uses",
      "target": "AFXZGQB4EN"
    },
    {
      "field": "uses",
      "target": "3HRHSHTG9C"
    },
    {
      "field": "uses",
      "target": "2RPE77ACER"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/24YCKE2RPH.md",
  "msc": [
    "65F10"
  ],
  "name": "Conjugate residual method",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/24Y/24YCKE2RPH.md",
  "status": null,
  "tag": "24YCKE2RPH",
  "uri": "m2://24YCKE2RPH",
  "url": "https://tamnd.github.io/math2/wiki/conjugate-residual-method/",
  "writing": {
    "tag": "24YCKE2RPH",
    "kind": "statement",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
