# Polynomials/Field/Euclidean division/Introduction/Section

## Theorem

Let ${\displaystyle {}K}$ be a field and let ${\displaystyle {}K[X]}$ be the polynomial ring over ${\displaystyle {}K}$. Let ${\displaystyle {}P,T\in K[X]}$ be polynomials with ${\displaystyle {}T\neq 0}$. Then there exist unique polynomials ${\displaystyle {}Q,R\in K[X]}$ such that

${\displaystyle P=TQ+R{\text{ and with }}\operatorname {deg} \,(R)<\operatorname {deg} \,(T){\text{ or }}R=0.}$

### Proof

We prove the statement about the existence by induction over the degree of ${\displaystyle {}P}$. If the degree of ${\displaystyle {}T}$ is larger than the degree of ${\displaystyle {}P}$, then ${\displaystyle {}Q=0}$ and ${\displaystyle {}R=P}$ is a solution.

Suppose that ${\displaystyle {}\operatorname {deg} \,(P)=0}$. By the remark just made also ${\displaystyle {}\operatorname {deg} \,(T)=0}$ holds, so ${\displaystyle {}T}$ is a constant polynomial, and therefore (since ${\displaystyle {}T\neq 0}$ and ${\displaystyle {}K}$ is a field) ${\displaystyle {}Q=P/T}$ and ${\displaystyle {}R=0}$ is a solution.

So suppose now that ${\displaystyle {}\operatorname {deg} \,(P)=n}$ and that the statement for smaller degrees is already proven. We write ${\displaystyle {}P=a_{n}X^{n}+\cdots +a_{1}X+a_{0}}$ and ${\displaystyle {}T=b_{k}X^{k}+\cdots +b_{1}X+b_{0}}$ with ${\displaystyle {}a_{n},b_{k}\neq 0,\,k\leq n}$. Then setting ${\displaystyle {}H={\frac {a_{n}}{b_{k}}}X^{n-k}}$ we have the relation

{\displaystyle {}{\begin{aligned}P'&:=P-TH\\&=0X^{n}+{\left(a_{n-1}-{\frac {a_{n}}{b_{k}}}b_{k-1}\right)}X^{n-1}+\cdots +{\left(a_{n-k}-{\frac {a_{n}}{b_{k}}}b_{0}\right)}X^{n-k}+a_{n-k-1}X^{n-k-1}+\cdots +a_{0}.\end{aligned}}}

The degree of this polynomial ${\displaystyle {}P'}$ is smaller than ${\displaystyle {}n}$ and we can apply the induction hypothesis to it. That means there exist ${\displaystyle {}Q'}$ and ${\displaystyle {}R'}$ such that

${\displaystyle P'=TQ'+R'{\text{ and with }}\operatorname {deg} \,(R')<\operatorname {deg} \,(T){\text{ or }}R'=0.}$

From this we get altogether

${\displaystyle {}P=P'+TH=TQ'+TH+R'=T(Q'+H)+R'\,,}$

so that ${\displaystyle {}Q=Q'+H}$ and ${\displaystyle {}R=R'}$ is a solution.

To prove uniqueness, let ${\displaystyle {}P=TQ+R=TQ'+R'}$, both fulfilling the stated conditions. Then ${\displaystyle {}T(Q-Q')=R'-R}$. Since the degree of the difference ${\displaystyle {}R'-R}$ is smaller than ${\displaystyle {}\operatorname {deg} \,(T)}$, this implies ${\displaystyle {}R=R'}$ and so ${\displaystyle {}Q=Q'}$.

${\displaystyle \Box }$

The computation of the polynomials ${\displaystyle {}Q}$ and ${\displaystyle {}R}$ is also called long division. The polynomial ${\displaystyle {}T}$ is a factor of ${\displaystyle {}P}$ if and only if the division of ${\displaystyle {}P}$ by ${\displaystyle {}T}$ yields the remainder ${\displaystyle {}0}$. The proof of this theorem is constructive, meaning it can be used to do the computation effectively. For this, one has to be able to do the computing operations in the field ${\displaystyle {}K}$. We give an example.

## Example

We want to apply the Euclidean division (over ${\displaystyle {}\mathbb {Q} }$)

${\displaystyle P=6X^{3}+X+1{\text{ divided by }}T=3X^{2}+2X-4.}$

So we want to divide a polynomial of degree ${\displaystyle {}3}$ by a polynomial of degree ${\displaystyle {}2}$, hence the quotient and also the remainder have (at most) degree ${\displaystyle {}1}$. For the first step, we ask with which term we have to multiply ${\displaystyle {}T}$ to achieve that the product and ${\displaystyle {}P}$ have the same leading term. This is ${\displaystyle {}2X}$. The product is

${\displaystyle {}2X{\left(3X^{2}+2X-4\right)}=6X^{3}+4X^{2}-8X\,.}$

The difference between ${\displaystyle {}P}$ and this product is

${\displaystyle {}6X^{3}+X+1-{\left(6X^{3}+4X^{2}-8X\right)}=-4X^{2}+9X+1\,.}$

We continue the division by ${\displaystyle {}T}$ with this polynomial, which we call ${\displaystyle {}P'}$. In order to get coincidence with the leading coefficient we have to multiply ${\displaystyle {}T}$ with ${\displaystyle {}{\frac {-4}{3}}}$. This yields

${\displaystyle {}-{\frac {4}{3}}T=-{\frac {4}{3}}{\left(3X^{2}+2X-4\right)}=-4X^{2}-{\frac {8}{3}}X+{\frac {16}{3}}\,.}$

The difference between this and ${\displaystyle {}P'}$ is therefore

${\displaystyle {}-4X^{2}+9X+1-{\left(-4X^{2}-{\frac {8}{3}}X+{\frac {16}{3}}\right)}={\frac {35}{3}}X-{\frac {13}{3}}\,.}$

This is the remainder and altogether we get

${\displaystyle {}6X^{3}+X+1={\left(3X^{2}+2X-4\right)}{\left(2X-{\frac {4}{3}}\right)}+{\frac {35}{3}}X-{\frac {13}{3}}\,.}$

## Lemma

Let ${\displaystyle {}K}$ be a field and let ${\displaystyle {}K[X]}$ be the polynomial ring over ${\displaystyle {}K}$. Let ${\displaystyle {}P\in K[X]}$ be a polynomial and ${\displaystyle {}a\in K}$. Then ${\displaystyle {}a}$ is a zero of ${\displaystyle {}P}$ if and only if ${\displaystyle {}P}$ is a multiple of the linear polynomial ${\displaystyle {}X-a}$.

### Proof

If ${\displaystyle {}P}$ is a multiple of ${\displaystyle {}X-a}$, then we can write

${\displaystyle {}P=(X-a)Q\,}$

with another polynomial ${\displaystyle {}Q}$. Inserting ${\displaystyle {}a}$ yields

${\displaystyle {}P(a)=(a-a)Q(a)=0\,.}$

In general, there exists, due to fact, a representation

${\displaystyle {}P=(X-a)Q+R\,,}$

where either ${\displaystyle {}R=0}$ or the degree of ${\displaystyle {}R}$ is ${\displaystyle {}0}$, so in both cases ${\displaystyle {}R}$ is a constant. Inserting ${\displaystyle {}a}$ yields

${\displaystyle {}P(a)=R\,.}$

So if ${\displaystyle {}P(a)=0}$ holds, then the remainder must be ${\displaystyle {}R=0}$, and this means ${\displaystyle {}P=(X-a)Q}$.

${\displaystyle \Box }$

## Corollary

Let ${\displaystyle {}K}$ be a field and let ${\displaystyle {}K[X]}$ be the polynomial ring over ${\displaystyle {}K}$. Let ${\displaystyle {}P\in K[X]}$ be a polynomial (${\displaystyle {}\neq 0}$) of degree ${\displaystyle {}d}$. Then ${\displaystyle {}P}$ has at most ${\displaystyle {}d}$ zeroes.

### Proof

We prove the statement by induction over ${\displaystyle {}d}$. For ${\displaystyle {}d=0,1}$ the statement holds. So suppose that ${\displaystyle {}d\geq 2}$ and that the statement is already proven for smaller degrees. Let ${\displaystyle {}a}$ be a zero of ${\displaystyle {}P}$ (if ${\displaystyle {}P}$ does not have a zero at all, we are done anyway). Hence, ${\displaystyle {}P=Q(X-a)}$ by fact and the degree of ${\displaystyle {}Q}$ is ${\displaystyle {}d-1}$, so we can apply to ${\displaystyle {}Q}$ the induction hypothesis. The polynomial ${\displaystyle {}Q}$ has at most ${\displaystyle {}d-1}$ zeroes. For ${\displaystyle {}b\in K}$ we have ${\displaystyle {}P(b)=Q(b)(b-a)}$. This can be zero, due to fact, only if one factor is ${\displaystyle {}0}$, so the zeroes of ${\displaystyle {}P}$ are ${\displaystyle {}a}$ or a zero of ${\displaystyle {}Q}$. Hence, there are at most ${\displaystyle {}d}$ zeroes of ${\displaystyle {}P}$.

${\displaystyle \Box }$