In mathematics and computer science, Horner’s method (or Horner’s scheme) is an algorithm for polynomial evaluation. Although named after William George Horner, this method is much older, as it has been attributed to Joseph-Louis Lagrange by Horner himself, and can be traced back many hundreds of years to Chinese and Persian mathematicians.[1] After the introduction of computers, this algorithm became fundamental for computing efficiently with polynomials.
The algorithm is based on Horner’s rule:
{\displaystyle {\begin{aligned}a_{0}&+a_{1}x+a_{2}x{2}+a_{3}x{3}+\cdots +a_{n}x^{n}\&=a_{0}+x{\bigg (}a_{1}+x{\Big (}a_{2}+x{\big (}a_{3}+\cdots +x(a_{n-1}+x,a_{n})\cdots {\big )}{\Big )}{\bigg )}.\end{aligned}}}{\displaystyle {\begin{aligned}a_{0}&+a_{1}x+a_{2}x{2}+a_{3}x{3}+\cdots +a_{n}x^{n}\&=a_{0}+x{\bigg (}a_{1}+x{\Big (}a_{2}+x{\big (}a_{3}+\cdots +x(a_{n-1}+x,a_{n})\cdots {\big )}{\Big )}{\bigg )}.\end{aligned}}}
This allows the evaluation of a polynomial of degree n with only {\displaystyle n}n multiplications and {\displaystyle n}n additions. This is optimal, since there are polynomials of degree n that cannot be evaluated with fewer arithmetic operations.[2]
Alternatively, Horner’s method also refers to a method for approximating the roots of polynomials, described by Horner in 1819. It is a variant of the Newton–Raphson method made more efficient for hand calculation by the application of Horner’s rule. It was widely used until computers came into general use around 1970.
Contents
1 Polynomial evaluation and long division
1.1 Examples
1.2 Efficiency
1.2.1 Parallel evaluation
1.3 Application to floating-point multiplication and division
1.3.1 Example
1.3.2 Method
1.3.3 Derivation
1.4 Other applications
2 Polynomial root finding
2.1 Example
3 Divided difference of a polynomial
4 History
5 See also