I proved by showing if $x \in \mathbb{Q}$ and $x \not\in \mathbb{Z}$, then $x^2 \not\in \mathbb{Z}$.
Because $x = \frac{m}{n}$, at least one of $m$, $n$ is odd.
$\text{odd}^2 = \text{odd}$.
Therefore $x^2 = \frac{m^2}{n^2}$ is also rational.
Therefore $x^2$ is not integer.
Proved by contrapositive.
Is my proof correct?
Thank you!