{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $R$ be a [[commutative ring|0GYGHKX834]], let $f = a_n x^n + \\dots + a_1 x + a_0 \\in R[x]$ with $n \\ge 0$, and let $c \\in R$.\nHorner's method computes the elements $b_n, b_{n-1}, \\dots, b_0$ of $R$ by\n$$b_n = a_n, \\qquad b_k = a_k + c \\, b_{k+1} \\quad (k = n - 1, \\dots, 0),$$\nand returns $b_0$.\n\n## Remarks\n\nThe output is the value: $b_0 = f(c)$, see [[polynomial evaluation|0GJ7T0NK49]].\nMoreover $f = (x - c)(b_n x^{n-1} + \\dots + b_2 x + b_1) + b_0$, so the method also gives the quotient of $f$ by $x - c$.\nExample: for $f = 2x^3 - 6x^2 + 2x - 1$ and $c = 3$, one gets $b_3 = 2$, $b_2 = 0$, $b_1 = 2$, $b_0 = 5$.\nCheck: $f(3) = 54 - 54 + 6 - 1 = 5$, and $f = (x - 3)(2x^2 + 2) + 5$.\nNon-example: computing each power $c^k$ separately and then the sum gives the same value, but it is not Horner's method and uses more multiplications.\nThe method uses $n$ multiplications and $n$ additions.\n\n## Explanations\n\n### L1 human\n\nHorner's method reads the coefficients from the top and, at each step, multiplies by $c$ and adds the next coefficient.\n",
  "commit": "547b6eddb8f2feb8d579f2d633d22a27b7e132fc",
  "front": {
    "defines": "FYBQ3Z52Z7",
    "kind": "definition",
    "msc": [
      "68W30",
      "13F20"
    ],
    "name": "Horner's method",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Horner%27s_method"
      }
    ],
    "tag": "Z2EWA10YMB",
    "uses": [
      "0GYGHKX834",
      "0Q9EZS90GY",
      "0GJ7T0NK49"
    ]
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/Z2EWA10YMB/",
  "links": [
    {
      "field": "defines",
      "target": "FYBQ3Z52Z7"
    },
    {
      "field": "uses",
      "target": "0GYGHKX834"
    },
    {
      "field": "uses",
      "target": "0Q9EZS90GY"
    },
    {
      "field": "uses",
      "target": "0GJ7T0NK49"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/Z2EWA10YMB.md",
  "msc": [
    "68W30",
    "13F20"
  ],
  "name": "Horner's method",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/Z2E/Z2EWA10YMB.md",
  "status": null,
  "tag": "Z2EWA10YMB",
  "uri": "m2://Z2EWA10YMB",
  "url": "https://math2.tamnd.com/wiki/horners-method-definition/",
  "writing": {
    "tag": "Z2EWA10YMB",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
