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?
The range $R$ of$$\begin{array}{ccc}\{x\in\Bbb Q\mid x\geqslant0\}&\longrightarrow&\Bbb R\\x&\mapsto&\sqrt x\end{array}$$is a countable set (since its domain is countable) and $A=R\cup(-R)$. Therefore, $A$ is countable.