{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Statement\n\nLet $A \\in \\R^{n \\times n}$ be [[symmetric|0VR671PHE5]], and let $v$ be a unit [[eigenvector|0N6960W0BV]] of $A$ for a simple [[eigenvalue|0BQAA2BK3Q]] $\\lambda$.\n*Rayleigh quotient iteration* starts from a unit vector $x_0$.\nFor $k \\ge 0$ it sets\n$$\\mu_k = x_k^T A x_k, \\qquad x_{k+1} = \\frac{(A - \\mu_k I)^{-1} x_k}{\\norm{(A - \\mu_k I)^{-1} x_k}}.$$\nIt stops if $A - \\mu_k I$ is singular, in which case $\\mu_k$ is an eigenvalue.\nLet $\\theta_k \\in [0, \\pi/2]$ be the angle between $x_k$ and $v$.\nThen there are constants $\\delta \u003e 0$ and $C \u003e 0$ such that $\\theta_k \\le \\delta$ implies $\\theta_{k+1} \\le C \\theta_k^3$.\nIn particular, if $x_0$ is close enough to $\\pm v$, then $x_k \\to \\pm v$ in direction cubically, and $\\mu_k \\to \\lambda$.\n\n## Remarks\n\nWrite $x_k = \\cos\\theta_k \\, v + \\sin\\theta_k \\, w$ with $w$ a unit vector orthogonal to $v$.\nFor symmetric $A$ the [[Rayleigh quotient|06WHP8SE98]] is stationary at eigenvectors, so $\\abs{\\mu_k - \\lambda} \\le \\norm{A - \\lambda I} \\sin^2\\theta_k = O(\\theta_k^2)$.\nLet the gap be the distance from $\\mu_k$ to the other eigenvalues.\nOne step of [[inverse iteration|70QYCEWHVY]] with shift $\\mu_k$ multiplies the ratio of the $w$-component to the $v$-component by at most $\\abs{\\mu_k - \\lambda}/\\mathrm{gap}$.\nSo $\\tan\\theta_{k+1} \\le O(\\theta_k^2) \\tan\\theta_k$, which is cubic.\n\nExample: for $A = \\mathrm{diag}(1, 3)$ and $x_k = (\\cos\\theta, \\sin\\theta)$, one finds $\\mu_k = 1 + 2\\sin^2\\theta$ and $\\tan\\theta_{k+1} = \\tan^3\\theta_k$ exactly.\nSymmetry is needed for cubic convergence: for a general matrix with a simple eigenvalue the Rayleigh quotient error is only $O(\\theta_k)$, and the local convergence is quadratic.\nWhich eigenvector the iteration finds depends on $x_0$ in a complicated way, so the method is used to refine a good approximation rather than to locate eigenvalues from scratch.\n\n## Explanations\n\n### L1 human\n\nInverse iteration needs a guess $\\mu$ of the eigenvalue and converges faster the better the guess.\nRayleigh quotient iteration updates the guess at every step with the best estimate available from the current vector.\nFor symmetric matrices the number of correct digits roughly triples at each step once the vector is close.\n\n### L2 human\n\nEach step costs a fresh factorization of $A - \\mu_k I$, unlike inverse iteration with a fixed shift, but very few steps are needed.\nThe cubic rate comes from two facts.\nThe Rayleigh quotient is a second-order accurate eigenvalue estimate for symmetric matrices, and inverse iteration converges at a rate proportional to the shift error.\nThe shifted [[QR algorithm|B6F8YWHYZ5]] with Rayleigh quotient shifts is closely related, and this explains its fast convergence on symmetric matrices.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "about": [
      "HCJ2ETX89Z",
      "06WHP8SE98"
    ],
    "kind": "statement",
    "msc": [
      "65F15"
    ],
    "name": "Rayleigh quotient iteration",
    "role": "theorem",
    "same_as": {
      "wikidata": "Q7298489",
      "wikipedia": "Rayleigh quotient iteration"
    },
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Rayleigh_quotient_iteration"
      }
    ],
    "tag": "Y119KHA4VG",
    "uses": [
      "0VR671PHE5",
      "06WHP8SE98",
      "0BQAA2BK3Q",
      "0N6960W0BV",
      "70QYCEWHVY",
      "YWZQC5E54B"
    ]
  },
  "kind": "statement",
  "link": "https://tamnd.github.io/math2/node/Y119KHA4VG/",
  "links": [
    {
      "field": "about",
      "target": "HCJ2ETX89Z"
    },
    {
      "field": "about",
      "target": "06WHP8SE98"
    },
    {
      "field": "uses",
      "target": "0VR671PHE5"
    },
    {
      "field": "uses",
      "target": "06WHP8SE98"
    },
    {
      "field": "uses",
      "target": "0BQAA2BK3Q"
    },
    {
      "field": "uses",
      "target": "0N6960W0BV"
    },
    {
      "field": "uses",
      "target": "70QYCEWHVY"
    },
    {
      "field": "uses",
      "target": "YWZQC5E54B"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/Y119KHA4VG.md",
  "msc": [
    "65F15"
  ],
  "name": "Rayleigh quotient iteration",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/Y11/Y119KHA4VG.md",
  "status": null,
  "tag": "Y119KHA4VG",
  "uri": "m2://Y119KHA4VG",
  "url": "https://tamnd.github.io/math2/wiki/rayleigh-quotient-iteration/",
  "writing": {
    "tag": "Y119KHA4VG",
    "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
      }
    ]
  }
}
