Show that following set is countable 
Show that following set is countable:
The set of all algebraic numbers. A real no. $\alpha$ is said to an algebic no. if it is a root of the polynomial $$a_nx^n+a_{n-1}x^{n-1}+\dots+a_0=0$$ where $a_n \in \mathbb Z.$

I am new to this field. Please help with more argument.
 A: There are countable many polynomials. And a polynomial does only have finite many zeroes.
Hence...
A: Hints:


*

*$\Bbb{Z}$ is countable.

*The Cartesian product of any two countable sets is countable.

*Try constructing a bijection $f\colon \Bbb Z ^{n+1} \to P_n$, where:
$$P_n = \{a_n x^n+⋯+a_1 x+a_0  \mid  a_0,a_1,…,a_n \in \Bbb Z\}$$

*The union of a countable family of countable sets is countable.

*Polynomials of degree $n$ have at most $n$ roots.

*For any polynomial $p \in P_n$, let $R_p = \{r \mid p(r)=0 \}$. Then consider the sets:
$$
S_n = \bigcup_{p \in P_n} R_p \qquad\text{and}\qquad A = \bigcup_{n=0}^\infty S_n
$$

A: A common way of proceeding is as follows :
For each polynomial, define the height as $$h = n + |a_n| + |a_{n-1}| + \dots + |a_0|.$$
Then argue that there are only finitely many polynomial of each height, $h = 0, 1, 2, \ldots$ and therefore only finitely many roots.  Height then can be used to enumerate the algebraic numbers.
A: Hint: How many (n+1)-tuples satisfy $|a_0|+\ldots+|a_n| = m$ for $m=0,1,2,\ldots$?
