# Theorem: Let $n$ be an integer. If $n^2$ is even, then $n$ is even

I have a proof by contrapositive (must be contrapositive) for the statement above, but I have been told that there is an error in my proof. Can someone verify this proof for me, and perhaps shed some light as to where this error is?

Proof, by contrapositive.

1. Instead of the original statement, we prove the contrapositive.
2. If $$n^2$$ is odd, then $$n$$ is odd.
3. Assume that $$n^2$$ is odd.
4. Claim $$n$$ is odd.
5. By assumption, $$n^2 = n \cdot n$$ is odd.
6. If a product is odd, then each factor is odd.
7. Therefore, $$n$$ is odd.

• Consider: just knowing that $n^2$ odd $\implies n$ odd doesn't tell us anything about what $n^2$ even might imply. For example, alligator $\implies$ animal, but does not-alligator $\implies$ not-animal? – A_P Oct 10 at 22:56

The contrapositive of $$p\to q$$ is $$\lnot q \to \lnot p$$, so line 2 is incorrect.

It should read "If $$n$$ is odd, then $$n^2$$ is odd", i.e., $$\lnot(n$$ is even$$)\to\lnot(n^2$$ is even$$)$$.

suppose that $$n$$ is odd, that is to say $$n=2k+1$$, $$k \in \mathbb{Z}$$:

$$n^2=(2k+1)^2=4k^2+4k+1=2(2k^2+2k)+1$$, let $$z=(2k^2+2k)\in \mathbb{Z}$$.

Hence $$n^2$$ is odd.

• This is indeed a proof of the contrapositive, but are you sure this answer helps shed light on where specifically his error is? – A_P Oct 10 at 22:59

Alternative solution:
Note that $$n^2+n=n(n+1)$$ and $$n(n+1)$$ is a product of two consecutive integers. Hence one of them and therefore the product is even. This shows $$n^2+n$$ is even for any $$n\in\mathbb{Z}.$$
Now observe that, if these two numbers have different parities their sum is odd, hence these two must have the same parity. That is, $$n^2$$ is even if and only if $$n$$ is even.