# If all the roots of a polynomial in $\mathbb{Q}[x]$ are integers, then polynomial is in $\mathbb{Z}[x]$

Prove that if all the roots of a polynomial in $$\mathbb{Q}[x]$$ are integers, then polynomial is in $$\mathbb{Z}[x]$$

Efforts:

Let $$p(x)=a_0+a_1x +\dots a_nx^n$$ be a polynomial in $$Q[x]$$

We are given that $$p(x)$$ has all roots in $$Z$$ so $$p(x)=(x-b_1)(x-b_2)(x-b_3)\dots (x-b_n).$$

Expanding it we get $$p(x)=x^n-(\sum b_i )x^{n-1}+(\sum b_ib_j)x^{n-2}+\dots (-1)^nb_1\dots b_n$$

Comparing the coefficient we have $$a_n=1$$, $$a_{n-1}=-\sum b_i, \dots, a_0=(-1)^n b_1b_2\dots b_n$$ and so on.

Since $$b_i$$ are integers so is their product. Hence we are done.

Is the proof correct?

• How about $\frac12x-\frac12$? Feb 6, 2019 at 6:51
• There is something missing when you decompose the polynomial as a function of its integer roots. Feb 6, 2019 at 6:53
• @StammeringMathematician Yes, you need the extra hypothesis that the leading coefficient is an integer. Feb 6, 2019 at 6:55
• @LordSharktheUnknown Sorry I deleted my comment. So the result is false as stated right now in question. I have to add an extra condition that polynomial is monic. Right? Feb 6, 2019 at 6:56

If the given polynomial in $$\mathbb{Q}[x]$$ is monic, or more generally if its leading coefficient is an integer, then the statement is correct. Note that, in your proof the factorization of $$p$$ should be $$p(x)=a_n(x-b_1)\dots(x-b_n).$$
Otherwise we have counterexamples: take a monic polynomial with all the roots in $$\mathbb{Z}$$ and divide it by an integer number greater than $$1$$.
• Note that, given the roots of a polynomial, then its factorization is $a_n(x-b_1)\dots(x-b_n)$. So the result is correct also when the coefficient $a_n$ is an integer. Feb 6, 2019 at 6:58