Irrational number $\sqrt2$ proof

Suppose that $m$ is odd, then $m=2k+1$, and thus $$m^2=(2k+1)^2=2(2k^2+k)+1$$ and thus $m^2$ is odd too. That prove that if $m^2$ is even then $m$ is even too.

You can generalize this result : If a prime number $p\mid m^s$ for $s\in\mathbb N$ then $p\mid m$. Indeed, let $m=p_1^{\alpha_1}...p_n^{\alpha_n}$ the decomposition of $m$ in prime factor. Then $$m^s=p_1^{s\alpha_1}...p_n^{s\alpha_n}$$ and thus all prime that divide $m^s$ also divide $m$.


To prove that if $m^2$ is even then $m$ is even, we proceed by contradiction. So suppose that $m$ is odd but $m^2$ is even. Then $m=2k+1$, so $m^2=4k^2 + 4k+1$. In particular, $m^2=4k(k+1)+1$ is one more than an even number, which is a contradiction.