Polynomials


Notes on polynomials

A single variable polynomial is an expression of the form f(x)=a0x0+a1x1+a2x2+...anxnf(x) = a_0 x^0 + a_1 x^1 + a_2 x^2 + ... a_n x^n where aia_i are coefficients and nn is the degree of the polynomial. Polynomials encapsulate the full expression of addition and multiplication.

We can calculate the unique minimum nn degree polynomial that goes through a set of n+1n + 1 points {(x0,y0),(x1,y1),...,(xn+1,yn+1)}\{ (x_0, y_0), (x_1, y_1), ..., (x_{n + 1}, y_{n + 1}) \} as f(x)=i=0nyi(jixxjxixj)f(x) = \sum_{i=0}^n y_i (\prod_{j \neq i} \frac{x - x_j}{x_i - x_j}).

Roots

Given a single variable polynomial f(x)f(x), the roots of ff are the values yy such that f(y)=0f(y) = 0. Notice that its impossible for a polynomial to have more roots than its degree.

Given polynomials with real coefficients, we say that a number xx is algebraic (otherwise trascendental) if it is the root of a polynomial whose coefficients are rational numbers. Consider 2\sqrt{2} and polynomial f(x)=112x2f(x) = 1 - \frac{1}{2} x^2. Then f(2)=0f(\sqrt{2}) = 0, so 2\sqrt{2} is algebraic.

Special Polynomials

Zero Polynomial

The zero polynomial is defined as f(x)=0f(x) = 0 for any xx, and it has a degree 1-1 by convention, as otherwise it would have every degree: f(x)=0x0f(x) = 0x^0, or f(x)=0x0+0x1f(x) = 0x^0 + 0x^1, or f(x)=0x0+0x1+0x2f(x) = 0x^0 + 0x^1 + 0x^2, etc.

Given polynomials ff and gg, if fgf - g is the zero polynomial, then it means that f=gf = g.

Operations

Multiplication

Given an nn degree polynomial ff and an mm degree polynomial gg, the polynomial fgf \cdot g has a degree n+mn + m. A polynomial multiplied by the zero polynomial is the zero polynomial.

Properties

Monic

A polynomial is monic if the non-zero coefficient of highest degree (leading coefficient) is 1. For example, this polynomial is monic: f(x)=2+5x+x2f(x) = 2 + 5x + x^2, as the highest degree part of the expression is x2x^2, and it has a coefficient 1, as x2=1x2x^2 = 1x^2.