[Math] Proving $n^2$ is even whenever $n$ is even via contradiction

discrete mathematicselementary-number-theory

I'm trying to understand the basis of contradiction and I feel like I have understood the ground rules of it.

For example: Show that the square of an even number is an even number using a contradiction proof.

What I have is: Let n represent the number.

n is odd if n = 2k + 1, where k is any number

n is even if n = 2k, where k is any number

We must prove that if n^2 is even, then n is even.

How do I proceed on from here?

Best Answer

We prove the contrapositive. In this case, we want to prove

$n^2$ even implies $n$ even

which is equivalent to the contrapositive

$n$ not even implies $n^2$ not even

or in other words

$n$ odd implies $n^2$ odd.

If $n$ is odd, then $n=2k+1$ then \begin{align*} n^2 &= (2k+1)^2 & \text{substituting in } n=2k+1 \\ &= 4k^2+4k+1 & \text{expanding} \\ &= 2(2k^2+2k)+1 \end{align*} which is odd, since it has the form $2M+1$.

We can essentially turn this into a proof by contradiction by beginning with "If $n$ is odd and $n^2$ is even...", then writing "...giving a contradiction" at the end. Although this should be regarded as unnecessary.


The other direction, i.e.,

$n$ even implies $n^2$ even

can also be shown in a similar way: If $n=2k$, then $n^2=(2k)^2=4k^2=2(2k^2)$ which is even.