A polynomial in one variable \(x\) over \(\mathbb{R}\) or \(\mathbb{C}\) is a finite sum of powers of \(x\), each weighted by a coefficient:
\[ p(x)=a_nx^n+a_{n-1}x^{n-1}+\cdots+a_1x+a_0,\qquad a_n\neq0. \]
The \(a_k\) are the coefficients, \(a_nx^n\) is the leading term, and \(n=\deg p\) is the degree of \(p\) — the highest power of \(x\) with a nonzero coefficient. The zero polynomial (all coefficients zero) is conventionally given degree \(-\infty\) so that the degree rules below hold without exceptions. A degree-\(0\) polynomial is a nonzero constant, degree \(1\) is linear, degree \(2\) quadratic, degree \(3\) cubic, degree \(4\) quartic, and degree \(5\) quintic; beyond that, polynomials are usually just called "degree-\(n\)".
This chapter collects what holds for polynomials of every degree — arithmetic, division, roots, and the Fundamental Theorem of Algebra — before Solving Quadratic Equations and Solving Cubic Equations specialize to explicit root formulas for \(n=2\) and \(n=3\).
Evaluating a Polynomial
Evaluating \(p(x)=a_nx^n+\cdots+a_0\) directly, power by power, costs \(n\) multiplications for \(a_nx^n\) alone if each power is computed from scratch, plus another \(n\) for the remaining terms — roughly \(2n\) multiplications in total. Nesting the sum from the inside out,
\[ p(x)=\bigl(\cdots\bigl((a_nx+a_{n-1})x+a_{n-2}\bigr)x+\cdots+a_1\bigr)x+a_0, \]
known as Horner's method, needs only one multiplication and one addition per coefficient, \(n\) multiplications total. Beyond the constant-factor saving, this is the standard example used to introduce Landau notation: both methods run in \(O(n)\) time, but Horner's method halves the leading constant and is far less prone to floating-point cancellation.
Polynomial.js implements exactly this coefficient-array representation in JavaScript — Horner evaluation, coefficient-wise arithmetic, and division — so the operations developed in this chapter can be used directly instead of re-implementing them by hand.
Arithmetic with Polynomials
Polynomials add coefficient-wise: if \(p(x)=\sum_{k=0}^n a_kx^k\) and \(q(x)=\sum_{k=0}^m b_kx^k\) with \(n\geq m\) (padding the shorter list with zeros), then
\[ (p+q)(x)=\sum_{k=0}^n (a_k+b_k)x^k,\qquad \deg(p+q)\leq\max(\deg p,\deg q), \]
with equality unless the leading terms cancel. Multiplication distributes over every pair of monomials, \(a_ix^i\cdot b_jx^j=a_ib_jx^{i+j}\), so the coefficients of \(pq\) are given by the discrete convolution of the coefficient lists:
\[ (pq)(x)=\sum_{k=0}^{n+m}\Bigl(\sum_{i+j=k}a_ib_j\Bigr)x^k,\qquad \deg(pq)=\deg p+\deg q. \]
The degree of a product is always exactly the sum of the degrees (never less), since the leading coefficients \(a_n\) and \(b_m\) are nonzero by assumption and \(\mathbb{R}\) and \(\mathbb{C}\) have no zero divisors, so \(a_nb_m\neq0\).
Polynomial Division
For any polynomials \(p\) and \(d\neq0\), there are unique polynomials \(q\) (the quotient) and \(r\) (the remainder) with
\[ p(x)=d(x)q(x)+r(x),\qquad \deg r<\deg d \]
(or \(r=0\)). This division algorithm is carried out exactly like long division of integers, subtracting off a matching leading term at each step until the remaining degree drops below \(\deg d\). When the divisor is linear, \(d(x)=x-x_0\), the remainder is necessarily a constant, and the process simplifies to synthetic division: each new coefficient of \(q\) is the running value \(a_k+x_0\cdot(\text{previous coefficient of }q)\), which is exactly one step of Horner's method above — dividing by \(x-x_0\) and evaluating at \(x_0\) are the same computation.
Roots and the Factor Theorem
A root (or zero) of \(p\) is a value \(x_0\) with \(p(x_0)=0\).
Factor Theorem. \(p(x_0)=0\) if and only if \((x-x_0)\) divides \(p(x)\), i.e. \(p(x)=(x-x_0)q(x)\) for some polynomial \(q\) with \(\deg q=\deg p-1\).
Proof. Dividing \(p\) by \(x-x_0\) gives \(p(x)=(x-x_0)q(x)+r\) with \(r\) a constant (the remainder has degree less than \(\deg(x-x_0)=1\)). Evaluating at \(x=x_0\) leaves \(p(x_0)=r\), so \(r=0\) exactly when \(x_0\) is a root.
Applying the Factor Theorem repeatedly shows a degree-\(n\) polynomial has at most \(n\) distinct roots: each root found factors out one linear term and lowers the degree by one, and a degree-\(0\) polynomial (a nonzero constant) has none left to find.
Multiplicity of a Root
A root \(x_0\) has multiplicity \(k\) if \((x-x_0)^k\) divides \(p(x)\) but \((x-x_0)^{k+1}\) does not — equivalently, using the derivative,
\[ p(x_0)=p'(x_0)=\cdots=p^{(k-1)}(x_0)=0,\qquad p^{(k)}(x_0)\neq0. \]
Geometrically, an odd multiplicity means the graph crosses the \(x\)-axis at \(x_0\) (the sign of \(p\) flips), while an even multiplicity means the graph only touches the axis there and turns back, since \((x-x_0)^k\) keeps a constant sign around \(x_0\) exactly when \(k\) is even.
\(p(x)=x^3-3x+2=(x+2)(x-1)^2\): a simple root at \(x=-2\) (the curve crosses) and a double root at \(x=1\) (the curve touches and turns back).
Counting Roots: The Fundamental Theorem of Algebra
Over \(\mathbb{C}\), the Fundamental Theorem of Algebra guarantees every non-constant polynomial has a root, and repeatedly applying the Factor Theorem factors it completely:
\[ p(z)=a_n(z-z_1)(z-z_2)\cdots(z-z_n), \]
with the \(z_i\in\mathbb{C}\) not necessarily distinct. Counted with multiplicity, a degree-\(n\) complex polynomial has exactly \(n\) roots.
For a polynomial with real coefficients, complex roots come in conjugate pairs: if \(p(z_0)=0\) and every \(a_k\in\mathbb{R}\), then \(p(\overline{z_0})=\overline{p(z_0)}=\overline{0}=0\) (conjugation commutes with real-weighted sums and powers). Consequently a real polynomial factors into real linear factors and real irreducible quadratic factors (one for each conjugate pair \(z_0,\overline{z_0}\), combined as \((x-z_0)(x-\overline{z_0})=x^2-2\Re(z_0)x+|z_0|^2\)), never into complex linear factors alone unless every root already happens to be real.
Every odd-degree real polynomial has at least one real root, since its leading term dominates for large \(|x|\) and forces opposite signs at \(x=-R\) and \(x=R\) for \(R\) large enough — the intermediate value theorem does the rest. Even-degree real polynomials need not have any real root at all, the standard example being \(x^2+1\).
Vieta's Formulas
Expanding \(a_n(x-x_1)\cdots(x-x_n)\) and comparing coefficients with \(a_nx^n+a_{n-1}x^{n-1}+\cdots+a_0\) relates every coefficient to a symmetric function of the roots. Writing \(e_k\) for the \(k\)-th elementary symmetric polynomial in \(x_1,\ldots,x_n\) (the sum of all products of \(k\) distinct roots),
\[ \frac{a_{n-k}}{a_n}=(-1)^ke_k,\qquad k=1,\ldots,n. \]
In particular \(e_1=x_1+\cdots+x_n=-\frac{a_{n-1}}{a_n}\) (sum of roots) and \(e_n=x_1x_2\cdots x_n=(-1)^n\frac{a_0}{a_n}\) (product of roots). For \(n=2\) and \(n=3\) these are exactly the sum-and-product and Vieta relations used in Solving Quadratic Equations and Solving Cubic Equations.
Solving Polynomial Equations
Degrees \(1\) and \(2\) always admit a closed-form solution in radicals: linear equations invert directly, and the quadratic formula follows from completing the square or Vieta's formulas (see Solving Quadratic Equations). Degree \(3\) and \(4\) also admit radical formulas — Cardano's method for the cubic (see Solving Cubic Equations) and Ferrari's method, which reduces a quartic to a resolvent cubic. The Abel–Ruffini theorem shows this pattern stops at degree \(4\): there is no general formula for the roots of a degree-\(5\) (or higher) polynomial using only the field operations and radicals, no matter how the coefficients are combined. This is not a failure to find one yet — it is a proven impossibility, and it is why root-finding beyond degree \(4\) falls back on numerical methods such as Newton's method.
Common Pitfalls
- Forgetting that a real polynomial can still have complex roots — it only guarantees that any non-real roots pair up as conjugates.
- Confusing a root's multiplicity with the number of distinct roots when counting "how many roots" a polynomial has.
- Assuming every polynomial equation has a radical solution; this is only guaranteed up to degree \(4\).
- Dividing by a polynomial without checking the degree of the remainder, which silently breaks the uniqueness of the quotient.