Assume that $n^2$ is even
Therefore $n^2 = 2k$ for some integer $k$.
How do I finish this proof?
Assume that $n^2$ is even
Therefore $n^2 = 2k$ for some integer $k$.
How do I finish this proof?
Suppose instead that $n$ is odd. Then, $n = 2k+1$, so $n^2 = (2k+1)^2 = 4k^2+4k+1$. But $4k^2+4k$ must be even, so...
$2k = n^2 = \begin{cases} (2m +1)^2 = 4m^2 +4m +1 \\ (2m)^2=4m^2 \end{cases}$
Which case do you think is rather possible?
I think it's best to use a proof by cases here. .
Case 1: $n$ is even. Both $n^2$ and $n$ are even, so the statement "if n^2 is even then n is even" holds.
Case 2: $n$ is odd. $n^2$ is odd, so the statement "if n^2 is even then n is even" is inconsequential and still holds.
First note that the statement $n^2$ is even $\Rightarrow$ $n$ is even is logically equivalent to its contrapositive. Namely, $\neg$($n$ is even) $\Rightarrow$ $\neg$($n^2$ is even), or in other words $n$ is odd $\Rightarrow$ $n^2$ is odd. Hence, it will be enough to prove the conditional statement $n$ is odd $\Rightarrow$ $n^2$ is odd.
Proof: Assume n is odd. That is $n=2k+1$ for some integer $k$. Then, $$n^2 = (2k+1)^2$$ $$\Rightarrow$$ $$n^2=4k^2+4k +1=2(2(k^2+k))+1$$
Note that $2(k^2+k)=z$ for some integer $z$, because integers are closed under addition and multuplication. So, $n^2 = 2z+1$.
Therefore, by the definition of odd, $n^2$ is odd.
What constitutes an acceptable proof depends, in part, on what you are allowed to assume as already established. Here's a proof based on Euclid's Proposition VII.30, namely that that if $p$ is a prime number and $p$ divides a product $ab$, then $p$ divides either $a$ or $b$ (or both).
Note that $2$ is a prime number. If $2$ divides $n^2$, then, by Euclid's theorem, $2$ divides either $n$ or $n$ -- which is to say, $2$ divides $n$.
Suppose that $n$ is odd, then the prime decomposition of $n$ does not contain a 2, so the prime decomposition of $n^2$ does not contain a 2 too, hence must be odd.