# Showing integer roots of a quadratic equation is countable?

Show that the set of real numbers that are the roots of quadratic equations $ax^2+bx+c=0$ with integer coefficients (i.e. $a, b, c\in\mathbb{Z}$) is countable.

My work so far: $ax^2 +bx + c = 0$ can be written as $(mx+p)(nx+q) = 0$, where $mn = a$ and $pq = c$ and $pn + mq = b$. Then $x_1 = -p/m$ and $x_2 = -q/n$. $x_1$ and $x_2$, which are the roots of the polynomial, are countable since they essentially rational numbers. And I think we learned in class an infinite set of all rational numbers are countable.

My question: Does this approach make any sense ? If not, how can improve/change it to answer the question ? Thanks for your time.

• This approach doesn't quite make sense because not all quadratic equations with integer coefficients, such as $x^2 - 2$, can be factored into a product like there where the coefficients are rational (some quadratic equations wit integer coefficients do not have rational roots). Instead, you could try finding an explicit bijection: can you enumerate the polynomials? Then each polynomial has at most two roots.... – user2055 Nov 19 '13 at 17:04
• Hint: How many quadratic equations with integer coefficients are thee? How mayn real solutions are there at most per equation? – Hagen von Eitzen Nov 19 '13 at 17:05
• – lab bhattacharjee Nov 19 '13 at 17:06
• @labbhattacharjee It's true, but the solution in that exercise set is IMHO awful - I would much prefer Hagen's answer, as it doesn't rely on the quadratic formula and thus generalizes effortlessly to the entirety of the algebraic numbers. – Steven Stadnicki Nov 20 '13 at 8:47

## 1 Answer

Your approach is wrong, not all the real numbers which are roots of such polynomials are rational numbers. For example $\sqrt2$ is the root of $x^2-2$, but is not a rational number.

HINT:

1. Show that the set of the polynomials of this form is countable,
2. Show that every polynomial of this form can have at most two roots,
3. Show that the countable union of finite sets [of real numbers] is countable.