[Math] Prove if 2 divides $a^2$, then 2 divides $a$.

elementary-number-theoryproof-writing

If 2 divides $a^2$, then 2 divides a.

I know that 2 divides $a^2$ means there is some integer $n$ such that $a^2 = 2n$,
and similarly, 2 divides $a$ means there is some integer $m$ such that $a = 2m$

I thought I could rewrite $a^2 = 2n$ into this $= a = 2(n/a)$ but I don't think that helps, because I'm not sure $n/a$ is an integer.

Thank you for any help!

Best Answer

$$RTP: 2|a^2\implies 2|a$$

Or equivalently using the fact that $A\implies B$ is equivalent to $B^c\implies A^c:$

$$RTP:2\not| a\implies 2\not| a^2$$

Suppose $2\not|a$. Then we can write $a=2k+1$ for some integer $k$.

$\implies a^2=(2k+1)^2 =4k^2+4k+1=2(2k^2+2k)+1\equiv 1\bmod 2\implies2\not|a^2\quad\text{as required}$

Related Question