{
  "aliases": null,
  "backlinks": [
    {
      "field": "defines",
      "target": "V9R8K4JCVM"
    }
  ],
  "body": "\n## Summary\n\nNumerical methods for linear least squares are algorithms for the [[least squares|0BYTQ4X1HC]] problem.\nThey compute a vector $x$ minimizing $\\norm{Ax - b}_2$ for a given matrix $A$ and vector $b$.\nThe main methods solve the normal equations by a [[Cholesky decomposition|0WKG8CYY6A]], use a [[QR decomposition|0ERWG4NXQ9]] of $A$, or use the [[singular value decomposition|000NPTMX6J]].\nThey differ in cost and in how rounding errors are amplified, which depends on the [[condition number|AB3S6MHJ8X]] of $A$.\n\n## Explanations\n\n### L1 human\n\nFitting a straight line through many measured points gives more equations than unknowns, and usually no line passes through all points.\nLeast squares picks the line that makes the sum of squared misses smallest.\nOn paper one can solve the normal equations $A^T A x = A^T b$, but on a computer this can lose twice as many digits as needed.\nFor example, if $A$ has condition number $10^8$, then $A^T A$ has condition number $10^{16}$.\nIn double precision the normal equations may then give no correct digits, while a QR-based method still gives about eight when the data are nearly consistent.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "kind": "concept",
    "msc": [
      "65F20",
      "62J05"
    ],
    "name": "Numerical methods for linear least squares",
    "same_as": {
      "wikidata": "Q55627115",
      "wikipedia": "Numerical methods for linear least squares"
    },
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Numerical_methods_for_linear_least_squares"
      }
    ],
    "tag": "AWQA2Y30N4"
  },
  "kind": "concept",
  "link": "https://tamnd.github.io/math2/node/AWQA2Y30N4/",
  "links": null,
  "markdown": "https://tamnd.github.io/math2/node/AWQA2Y30N4.md",
  "msc": [
    "65F20",
    "62J05"
  ],
  "name": "Numerical methods for linear least squares",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/AWQ/AWQA2Y30N4.md",
  "status": null,
  "tag": "AWQA2Y30N4",
  "uri": "m2://AWQA2Y30N4",
  "url": "https://tamnd.github.io/math2/wiki/numerical-methods-for-linear-least-squares/",
  "writing": {
    "tag": "AWQA2Y30N4",
    "kind": "concept",
    "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
      }
    ]
  }
}
