*When Chuck Norris solves a polynomial equation, he doesn't use the quadratic formula or synthetic division. He simply stares down the variables until they solve themselves out of fear.*
# Refresher on polynomials
## Definition and examples
:::info
**Definition:**
A polynomial is a mathematical expression consisting of variables, coefficients, and exponentiation operations. It is constructed by combining terms, where each term represents a product of a coefficient and one or more variables raised to non-negative integer exponents.
The general form of a polynomial is:
$$
P(x) = a_nx^n + a_{n-1}x^{n-1} + ... + a_2x^2 + a_1x + a_0
$$
The degree of a polynomial is the highest exponent in the polynomial expression. If the degree of a polynomial `P` is equal to `d`, we write
$$
deg(P)=d
$$
The leading coefficient of a polynomial refers to the coefficient of the term with the highest exponent in that polynomial.
:::
:::success
**Example 1:**
$$
P_1(x) = x^3 - \frac{1}{2}x^2 + \frac{1}{2}
$$
- Degree: 3
- Leading coefficient: 1
:::
:::success
**Example 2:**
$$
P_2(x) = 3x^2 - 3
$$
- Degree: 2
- Leading coefficient: 3
:::
## Graphic representation
A polynomial is a mathematical function and can be represented graphically.
$$
P_1(x) = x^3 - \frac{1}{2}x^2 + \frac{1}{2}
$$

$$
P_2(x) = 3x^2 - 3
$$

## Definition of a polynomial from samples
:::info
**Property:**
`n` points can fully define a polynomial of degree at most `n-1`.
:::
(Don't worry for the "at most" part of this property, we will get back to it in `Example 3`.)
:::success
**Example 1:**
The `2` following points:
- (-4, -5)
- (2, 7)
can fully define a polynomial of degree at most `1` (represented by a straight line).

The following polynomial
$$
P_3(x) = 2x + 3
$$
is the unique polynomial of degree at most `1` verifying `P(-4) = -5` and `P(2) = 7`.
:::
:::success
**Example 2:**
The `3` following points:
- (-1, 4)
- (2, 1)
- (3, 4)
can fully define a polynomial of degree at most `2` (represented by a parabola).

The following polynomial
$$
P_4(x) = x^2 - 2x + 1
$$
is the unique polynomial of degree at most `2` verifying `P(-1) = 4`, `P(2) = 1` and `P(3) = 4`.
:::
In some cases, `n` points defined a polynomial of degree `< n - 1`.
:::success
**Example 3:**
The `3` following points:
- (-1, -1)
- (0, 0)
- (1, 1)
can fully define a polynomial of degree `1` (represented by a straight line).
The degree of this example is `1`, and not `2`, because the `3` constraing points are aligned.

The following polynomial
$$
P_5(x) = x
$$
is the unique polynomial of degree at most `2` (and actually with a leading coefficiant equals to `0`, making it a polynomial of degree `1`), verifying `P(-1) = -1`, `P(0) = 0` and `P(1) = 1`.
:::
`n` points are not enough to fully define a polynomial of degree `n`.
:::success
**Example:**
The `2` following points:
- (-1, -1)
- (1, 1)
can be fitted by an infinite number of degree `2` polynomials.

All following polynomial, whatever the value of `A`
$$
P_6(x) = A(x^2 -1) + 1
$$
verify `P(-1) = -1` and `P(1) = 1`.
:::
## Factorised form
:::info
**Property:**
Some polynomials (not all) of degree `n` can be represented under a product of polynomial of degree `1.`
:::
:::info
**Definition:**
`a` is a root of the polynomial `P` if `P(a) = 0`.
:::
:::success
**Example:**
The polynomial
$$
P_6(x) = x^2 + 2x - 3
$$
can be written under its factorised form
$$
P_6(x) = (x + 3)(x - 1)
$$
:::
In this example, `-3` and `1` are the roots of `P₆`.
The factorised form is convenient to show that
$$
P_6(-3) = P_6(1) = 0
$$
More generally, polynomials of degree at most `n`
$$
P(x) = A(X-a_0)(X-a_1)...(X-a_n)
$$
satisfy
$$
P(a_0) = P(a_1) = ... = P(a_n) = 0
$$
(Whatever the value of A.)