{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Statement\n\nLet $A$ be an $n \\times n$ complex matrix.\nThen there are a [[unitary matrix|0AR68JTMDT]] $Q$ and an [[upper triangular matrix|0N4XY7Z3NN]] $R$ with\n$$A = QR.$$\nIf $A$ is real, then $Q$ and $R$ can be chosen real, with $Q$ orthogonal.\nIf $A$ is invertible and the diagonal entries of $R$ are required to be positive, then $Q$ and $R$ are unique.\n\n## Remarks\n\nFor an invertible $A$, the [[Gram–Schmidt process|0VT6P0GNQR]] applied to the columns of $A$ gives the columns of $Q$.\nA rectangular $m \\times n$ matrix with $m \\ge n$ has a decomposition $A = QR$ with $Q$ unitary $m \\times m$ and $R$ upper triangular $m \\times n$.\nHouseholder reflections and Givens rotations compute it stably.\nIt is used to solve least squares problems and in the QR algorithm for eigenvalues.\n\n## Explanations\n\n### L1 human\n\nThe QR decomposition writes a matrix as a rotation, possibly with reflections, times a triangular matrix.\nThe columns of $Q$ are orthonormal, and $R$ records how to rebuild the columns of $A$ from them.\nIt is the matrix form of the Gram–Schmidt process.\n",
  "commit": "6ac761d40018146541484a9e8b9eafd6ecc303dc",
  "front": {
    "kind": "statement",
    "msc": [
      "15A23",
      "65F25"
    ],
    "name": "QR decomposition",
    "role": "theorem",
    "same_as": {
      "wikidata": "Q653242",
      "wikipedia": "QR decomposition"
    },
    "sources": [
      {
        "locator": "Square matrix",
        "url": "https://en.wikipedia.org/wiki/QR_decomposition"
      }
    ],
    "tag": "0ERWG4NXQ9",
    "uses": [
      "0D6RMJ10M9",
      "0MKABWDRNC",
      "0VT6P0GNQR"
    ]
  },
  "kind": "statement",
  "link": "https://math2.tamnd.com/node/0ERWG4NXQ9/",
  "links": [
    {
      "field": "uses",
      "target": "0D6RMJ10M9"
    },
    {
      "field": "uses",
      "target": "0MKABWDRNC"
    },
    {
      "field": "uses",
      "target": "0VT6P0GNQR"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/0ERWG4NXQ9.md",
  "msc": [
    "15A23",
    "65F25"
  ],
  "name": "QR decomposition",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/0ER/0ERWG4NXQ9.md",
  "status": null,
  "tag": "0ERWG4NXQ9",
  "uri": "m2://0ERWG4NXQ9",
  "url": "https://math2.tamnd.com/wiki/qr-decomposition/",
  "writing": {
    "tag": "0ERWG4NXQ9",
    "kind": "statement",
    "level": "W1",
    "next": [
      {
        "what": "edge about out",
        "note": "the concepts that the statement is about",
        "have": 0,
        "want": 1
      },
      {
        "what": "edge proves in",
        "note": "at least one proof node",
        "have": 0,
        "want": 1
      },
      {
        "what": "edge instance_of or illustrates in",
        "note": "one example that shows the statement at work",
        "have": 0,
        "want": 1
      },
      {
        "what": "explanation L2",
        "have": 0,
        "want": 1
      }
    ]
  }
}
