Is the set $A = \left\{ x \in \mathbb{R}\, |\, x^2 \text{ is rational}\right\}$ countable? Is the set $A = \left\{ x \in \mathbb{R} \,|\, x^2 \text{ is rational}\right\}$ countable?
I know that the set of all rational numbers is countable. But for some irrational numbers, $x^2$ is rational.
Example: $(\sqrt2)^2$  is rational.
So that the set $A$ includes all rational numbers and some irrational numbers.
Then how can we prove that the set $A$ is countable?

Yes, because these squares are all positive rational numbers and each positive rational number has exactly two square roots. This means that for every rational number $q>0$, there are two real numbers whose square is $q$. (Zero is the exception, with only one square root).
For example, the rational number 2 has two square roots $\pm \sqrt{2}$. The rational number $\frac{7}{3}$ has two square roots $\pm \sqrt{7/3}$, the rational number 16 has two square roots $\pm 4$, and so on.
If you tally up all of these square roots, you get the set $A$ of real numbers whose square is any rational number.  There are two roots for every rational number, and there are countably many rational numbers, so this set $A$ is countable.
