{
  "aliases": null,
  "backlinks": [
    {
      "field": "about",
      "target": "MA64H1RTP1"
    },
    {
      "field": "uses",
      "target": "MA64H1RTP1"
    }
  ],
  "body": "\n## Statement\n\nLet $A$ be a real [[invertible|0EB9N0S33C]] $n \\times n$ matrix, let $b \\in \\R^n$, and let $x_0 \\in \\R^n$ with $r_0 = b - A x_0$.\nChoose a *shadow residual* $\\tilde{r}_0 \\in \\R^n$ with $\\tilde{r}_0^T r_0 \\ne 0$, and set $p_0 = r_0$ and $\\tilde{p}_0 = \\tilde{r}_0$.\nThe *biconjugate gradient method* (BiCG) computes, for $k = 0, 1, \\dots$,\n$$\\alpha_k = \\frac{\\tilde{r}_k^T r_k}{\\tilde{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, \\quad \\tilde{r}_{k+1} = \\tilde{r}_k - \\alpha_k A^T \\tilde{p}_k,$$\n$$\\beta_k = \\frac{\\tilde{r}_{k+1}^T r_{k+1}}{\\tilde{r}_k^T r_k}, \\quad p_{k+1} = r_{k+1} + \\beta_k p_k, \\quad \\tilde{p}_{k+1} = \\tilde{r}_{k+1} + \\beta_k \\tilde{p}_k,$$\nwhere $A^T$ is the [[transpose|09DXWYRD43]].\nSuppose that the denominators $\\tilde{p}_k^T A p_k$ and $\\tilde{r}_k^T r_k$ are nonzero up to step $m$.\nThen in exact arithmetic, for $i, j \\le m$:\n\n1. $r_k = b - A x_k$, and $x_k \\in x_0 + \\mathcal{K}_k(A, r_0)$, where $\\mathcal{K}_k$ is the [[Krylov subspace|QB45PCGQPV]];\n2. (biorthogonality) $\\tilde{r}_i^T r_j = 0$ for $i \\ne j$;\n3. (biconjugacy) $\\tilde{p}_i^T A p_j = 0$ for $i \\ne j$.\n\n## Remarks\n\nClauses 2 and 3 say that $r_k$ is orthogonal to $\\mathcal{K}_k(A^T, \\tilde{r}_0)$, a Petrov–Galerkin condition.\nSuppose no breakdown occurs up to step $n$.\nThen $\\tilde{r}_0, \\dots, \\tilde{r}_{n-1}$ are linearly independent, since $\\tilde{r}_i^T r_j$ is zero for $i \\ne j$ and nonzero for $i = j$.\nSo $r_n$ is orthogonal to all of $\\R^n$, and $r_n = 0$.\nExample: if $A$ is symmetric and $\\tilde{r}_0 = r_0$, then $\\tilde{r}_k = r_k$ and $\\tilde{p}_k = p_k$ for all $k$.\nThen BiCG is the [[conjugate gradient method|AFXZGQB4EN]], which never breaks down when $A$ is [[positive definite|0KX66CZMBB]].\nFor a general $A$ the method can break down when $\\tilde{r}_k^T r_k = 0$ with $r_k \\ne 0$, and its residual norms can oscillate wildly.\n\n## Explanations\n\n### L1 human\n\nConjugate gradients rely on symmetry to keep short recurrences.\nBiCG regains short recurrences for a nonsymmetric matrix by running a second, shadow iteration with the transpose alongside the first.\nEach new residual is made orthogonal to the earlier shadow residuals, instead of to its own earlier residuals as in conjugate gradients.\nThe price is two matrix-vector products per step, one with $A$ and one with $A^T$, and less robust convergence.\n\n### L2 human\n\nBiCG is the linear-system counterpart of the nonsymmetric Lanczos process.\nUnlike GMRES it has no minimization property, but its memory and work per step do not grow with $k$.\nIts weaknesses, breakdowns and erratic residuals, and the need for $A^T$, motivated the transpose-free variants CGS and BiCGSTAB and the smoother QMR method.\nIt is one of the Krylov [[iterative methods|2RPE77ACER]] for nonsymmetric systems.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "about": [
      "2RPE77ACER"
    ],
    "kind": "statement",
    "msc": [
      "65F10"
    ],
    "name": "Biconjugate gradient method",
    "role": "theorem",
    "same_as": {
      "wikidata": "Q855169",
      "wikipedia": "Biconjugate gradient method"
    },
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Biconjugate_gradient_method"
      }
    ],
    "tag": "HGF11AHX5R",
    "uses": [
      "0EB9N0S33C",
      "09DXWYRD43",
      "QB45PCGQPV",
      "AFXZGQB4EN",
      "0KX66CZMBB",
      "2RPE77ACER"
    ]
  },
  "kind": "statement",
  "link": "https://tamnd.github.io/math2/node/HGF11AHX5R/",
  "links": [
    {
      "field": "about",
      "target": "2RPE77ACER"
    },
    {
      "field": "uses",
      "target": "0EB9N0S33C"
    },
    {
      "field": "uses",
      "target": "09DXWYRD43"
    },
    {
      "field": "uses",
      "target": "QB45PCGQPV"
    },
    {
      "field": "uses",
      "target": "AFXZGQB4EN"
    },
    {
      "field": "uses",
      "target": "0KX66CZMBB"
    },
    {
      "field": "uses",
      "target": "2RPE77ACER"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/HGF11AHX5R.md",
  "msc": [
    "65F10"
  ],
  "name": "Biconjugate gradient method",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/HGF/HGF11AHX5R.md",
  "status": null,
  "tag": "HGF11AHX5R",
  "uri": "m2://HGF11AHX5R",
  "url": "https://tamnd.github.io/math2/wiki/biconjugate-gradient-method/",
  "writing": {
    "tag": "HGF11AHX5R",
    "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
      }
    ]
  }
}
