# How to show the set of all algebraic real number is countable [duplicate]

A real number $x$ is said to be algebraic if there is a nonzero polynomial $p$ with rational coefficients such that $p(x)=0$. Show the set of all algebraic real number is countable.

Let $Z$ be the set of all algebraic real number.

Things I know:

(1)The denumerable union of denumerable sets is denumerable.

(2)A polynomial of degree $n$ has at most $n$ zeros.

(3)$\mathbb{Q}$ is denumerable.

(4)A subset of a denumerable set is denumerable.

Hint, think of the sets:

$A$) set of zeros of a given rational polynomial.

$B$) set of rational polynomials of a given degree.

$C$) set of all rational polynomials.

My thought is that if I can show that $Z\subseteq A\cup B\cup C$ and that $A,B,$ and $C$ are denumerable then I have shown Z is countable.

The set $A$ is clearly finite from (1), therefore denumerable.

Is my logic for the proof sufficient and how can I say $B$ and $C$ are denumerable?

## marked as duplicate by Tim Raczkowski, Davide Giraudo real-analysis StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Sep 21 '15 at 21:20

• You seem to be taking the union of very dissimilar sets. While the roots of any one rational polynomial $A$ are a finite subset of $Z$, you don't get all roots of all rational polynomials by taking a union with $B$ or with $C$. See this previous Question, Proving the countability of algebraic numbers, for a detailed proof. – hardmath Sep 21 '15 at 17:02

It seems to me that this pivots on your (1):

The denumerable union of denumerable sets is denumerable.

You can use this to successively extend denumerability from $\mathbb Z$ to

• $\mathbb Q$
• The polynomials over $\mathbb Q$.
• The roots of the polynomials over $\mathbb Q$.

First of all, for every polynomial $P$ of degree $n$, we have at most $n$ different roots. Associate to every polynomial $P$ the set $M_P=\{1,..,m\}$ where $m$ is the number of roots ($M_P$ being empty if there is no root), and to every root $r$ the number $i$ which indicates that $r$ is the $i$-th smallest root.

Let $\mathbb{P}_n:=\mathbb{Q} \times... \times \mathbb{Q} \times I_n$, where $I_n=\{1,...,n\}$ and $\mathbb{Q}$ appears $n$ times.

Now, choose for every algebraic number $r$ a polynomial $P_r$ for which it is the root. Let $\mathcal{A}$ be the set of algebraic numbers and define:

$$f: \mathcal{A} \rightarrow \bigcup_{n \in \mathbb{N}} \mathbb{P}_n,$$

by maping $r$ to $(a_l,a_{l-1},...,a_0,i_r)$, where the $a_j$ are the coefficients of $P_r$ and $i_r$ is the number $i$ described above.

$f$ is clearly an injection, and $\bigcup_{n \in \mathbb{N}} \mathbb{P}_n$ clearly countable.

OBS: Note also that I use AC some times in this proof (for example, countable unions of countable without further analysis). For a proof that doesn't use AC, see this post.

If you know these two more results :

$1.$ Finite product of countable sets is countable .

$2.$ Countable union of countable sets is countable .

Any algebraic number is a root of a polynomial in rational coefficients with degree $n$ for some $n\in \mathbb N$

So we can find their number if we can find the number of polynomials with rational coefficients.
Now fix a natural number $\ \ n$ .

The cardinality of the set of polynomials of degree $n$ with rational coefficients is cardinality of the set $$(\prod_{i=1}^{n} \times_{i} \ \ \mathbb Q)=\mathbb Q\times \mathbb Q\times ........\times \mathbb Q(n\ \ \ fold\ \ \ product)$$ and this cardinality is countable from result $1).$

Then the cardinality of the set of all polynomial with rational coefficients of any degree is cardinality of the set $$\cup_{n=1}^{\infty}(\prod_{i=1}^{n} \times_{i} \ \ \mathbb Q)$$ which again is countable according to result $2).$ as $$(\prod_{i=1}^{n} \times_{i} \ \ \mathbb Q)$$ is countable as we already saw .

So concluded that there are

Well a polynomial $p$ of degree $n\geq1$ with rational coefficients can be thought of as a point in $\Bbb Q^{n+1}$, so say $p(x)=x^2-2\iff (1,0,-2)\in \mathbb{Q}^3$. Now if we want to count the roots would could simply consider them as points in $\Bbb Q^{n+1}\times \Bbb N_*$, where the last index will number the root, and we'll give the last number a subscript $*$, so as not to cause confusion between points. So up to some arbitrary numbering say for $p$ above we'll have two points $p_1=(1,0,-2,1_*)\iff \sqrt{2}$ and $p_2=(1,0,-2,2_*)\iff -\sqrt{2}$. Now it is also true that the cartesian product of a finite number of countable sets is countable, so each set $\Bbb Q^{n+1}\times \Bbb N_*$ is countable.

So for purely counting arguments you could consider the roots of polynomials as such a disjoint union of sets $\sqcup_{n=1}^\infty \left(\mathbb{Q}^{n+2}\times \Bbb{N}_*\right)$, and a countable union of countable sets is countable.

Of course you are over counting since the polynomials aren't all irreducible, so the same roots appear more than once, and also you have polynomials which have complex roots that are included, and also because you aren't using the entirety of the natural numbers for each degree of polynomial.

However since a subset of a countable set is countable, we're still fine as we can find an injection from our set of algebraic real numbers and the above mentioned set (the disjoint unioned one), send the algebraic number to the point associated to it's minimal polynomial, and the number assigned to that root.

Sidenote Now this is generally not the way you'd think of polynomials in algebra. Usually you'd think of the polynomial ring $\Bbb{Q}[x]$ over the field $\Bbb Q$, where the elements are written $$(1,0,2,-\frac{1}{2},0,0,\ldots)\iff 1+0\cdot x+2\cdot x^2-\frac{1}{2}\cdot x^3,$$ the dots meaning the rest are zero. But again usually the ring only contains elements whereby after some point all the entries are zero, so the same argument applies.