# Prove if $n^2$ is even, then $n$ is even.

I am just learning maths, and would like someone to verify my proof.

Suppose $n$ is an integer, and that $n^2$ is even. If we add $n$ to $n^2$, we have $n^2 + n = n(n+1)$, and it follows that $n(n+1)$ is even. Since $n^2$ is even, $n$ is even.

Is this valid?

#### Solutions Collecting From Web of "Prove if $n^2$ is even, then $n$ is even."

It could use a little more explanation, but yes, it works. I’d expand it to point out explicitly why $n(n+1)$ is even and that $n=(n^2+n)-n^2$ is then the difference of two even numbers and as such is even (assuming that you already have this fact available to use).

An alternative approach is to show that if $n$ is odd, then $n^2$ is odd; the desired result is the contrapositive and therefore follows at once.

This proof is valid.

I suggest you add the small detail that the difference of even integers is even.

If $n$ is odd say $n=2k+1$ then
$$n^2=(2k+1)^2=(2k+1)\times (2k+1)=2\times(k(2k+2))+1\quad\text{is odd}$$
hence necessary $n$ is even

Another simple proof:

$2|n^2$, but $2$ is prime then $2|n$.

Of course, you can always use the fact that if $p$ is a prime which divides a product $ab$ ,then $p | a$ or $p |b$. But, I’m not sure if you have this result, and the question suggests that you don’t. If you want to prove it, you can argue along the following lines–if you know Bezout’s identity.

Suppose that $p$ divides $ab$ ,but not $a$. Then, it folows that $gcd(a,p)=1$. Hence, we may express $1=np+ma$. Or $b=nbp+mba$. Now, since we know that $p|ab$, we have that $ab=\alpha p$, and so $a=\frac{\alpha p}{b}$. Hence, by substitution, we have that
$b=nbp+m\alpha p=p(nb+\alpha m)$. Hence, b is divisible by p.

For this particular problem, a=b=n.

Note, that if you do not know Bezout’s identity, then you will have no idea how I was able to write 1 as a linear combo of p and a. First note that 1 is the gcd of $p$ and $a$. Hence, we can obtain one by iterating the Euclidian algorithm again and again. Then, we just backwards substitute from the last equation upwards to get the gcd as a linear combo of the two numbers involved. Try it with 5 and 17, for instance. This is Bezout’s idenitity.

We know that,

1. $n^2=n\times n$, We also know that

2. even $\times$ even = even

3. odd $\times$ odd = odd
4. odd $\times$ even = even

Observation $1$: As $n^2$ is even, we also get an even result in the 2nd and 4th case .

Observation $2$: In the expression “$n \times n$” both operands are same i.e. ‘$n$’, hence we get the result even in the $2$nd and $3$rd case

Since the $2$nd case is common in both the operations we take the first case.Hence comparing even $\times$ even = even and $n^2=n\times n$,
Hence proved if $n^2$ is even, then $n$ is even.

That’s right. Here is another proof:
$\forall n\in\mathbb{Z}$ if $n$ is odd, then $n^2$ is odd .
Let $m$ be an integer such that $m^2$ is even. Then $m$ must be even, because if $m$ is odd then $m^2$ must be odd, contrary to the hypothesis.

Try a proof by contraposition (are you familiar with this method of proof? A statement and its contrapositive are logically equivalent so proving the contrapositive of the original statement actually proves the original statement).

So what you want to do is assume that $n$ is not even (i.e., it is odd) and show that $n^2$ is not even (i.e., it is odd).

$n$ is odd means that you can write $n = 2k + 1$ for some integer $k$. Then

$$n^2 = 4k^2 + 4k + 1 = 2(2k^2 + 2k) + 1$$

which is clearly odd. This completes the proof.

Yes;  simpler: $\,n\ {\rm odd}\,\Rightarrow\, 1\!+\!n\,\ {\rm even}\,\Rightarrow\, n = (1\!+\!n)n-n^2 =\rm even-even = even\,\Rightarrow\Leftarrow$

Yes, it’s valid. That said I wouldn’t say “it follows that n(n+1) is even”, because n(n+1) is just even.

So, you have n$^2$+n=n(n+1) and n(n+1) as even. So, we have that n$^2$+n equals the sum of an even integer n$^2$, and some integer n. So, n is either odd or even.

If n were odd, then we would have n$^2$+n would equal the sum of the even number n$^2$ and the odd number n. The sum of an odd number and an even number is always an odd number. So, then n(n+1) would equal an odd number. But, n(n+1) is not an odd number. Since we have a contradiction, by the rule of negation introduction, we have that n is not odd. Since every integer is either even or odd, it follows by the (often derived) rule of disjunctive syllogism, that n is even.

If $n^2$ is even, then it can be factorized as

$$n^2 = 2^{2k}C^2,$$

where $k$ and $C$ are a positive integers, and $C$ is odd. $k$ cannot be non-positive, because if it is zero or negative, n cannot be integer.

Given $n^2$, $n$ can be written as

$$n = \mp 2^k C.$$

Which implies that $n$ must also be even.

For natural numbers:
If $n$ is even: $n=2k$ for $k =…,-2,-1,0, 1, 2,…$. $n^2=n\cdot n = 2k2k = 4k^2 = 2\cdot 2k^2$. This number is an even number.
If $n$ is odd: $n=2k + 1$ for $k =…,-2,-1,0, 1, 2,…$. $n^2=n\cdot n = (2k+1)(2k+1) = 4k^2+4k+1 = 2\cdot \left(2k\left(k+1\right)\right)+1$. This number is an odd number.
Square preserves the even or odd character of the number.
By simply using the above rules, you can easily make sure that this is true for any number raised to any power.
For even $n$ the $n^a$ is even and for odd $n$ the $n^a$ is odd for $a = 2,3,4,…$.

It is valid for sure. You can simplify it just by noting that for every odd $n$ $n^2$ is odd. So the square can be even just with even $n$. But this is the proof just for the implication.

I agree, I think the contra-positive is the way to go. That just means reverse the if-then statement and make it If n is even, then n^2 is even. But, you gotta be careful because it’s possible for a statement to be true in one direction and not the other. But, here it seems pretty helpful to us. Also, since you said you were earlier in your math development you are probably pretty familiar with algebra at least… So, If n is even then there is an integer, say k, such that 2n = k. So, if we square both sides we get 4n = k^2. Now, divide by 4 and take the root of the denominator and numerator and n^2 = k / 2. So, you can see that your “claim” is valid. As to the logic itself, it seems good to me but I am pretty early on too so one of the other guys would be a better judge of that than I.

You have a true conclusion “if n$^2$ is even, then n is even” and thus you automatically have a valid argument, since every argument with a true conclusion is valid.

That said, it might come as interesting to look at something more general. Let z indicate any positive natural number, and n any integer. We’ll prove that if n$^z$ is even, then n is even.

“If n$^z$ is even, then n is even” is logically equivalent to “if n is not even, then n$^z$ is not even.” All integers either are even (equal to a number of the form 2k) or odd (equal to a number of the form (2k+1)). So, “if n is not even, then n$^z$ is not even.” is logically equivalent to “if n is odd, then n$^z$” is odd.” It follows that, “If n$^z$ is even, then n is even” is logically equivalent to “if n is odd, then n$^z$” is odd.” Consequently, if we can prove that “if n is odd, then n$^z$” is odd.”, it will follow that “if n$^z$ is even, then n is even.”

If n is odd, then it can get written in the form (2k+1). Since z is a positive natural number, we can use the binomial theorem on (2k+1)$^z$ to see if it’s odd or even. The last term of the expansion of (2k+1)$^z$ is 1$^z$ which equals 1. So, is the sum of the other terms even? The other terms of the sum go (2k)$^z$, (2k)$^z$$^-$$^1$a, …, (2k)y. Thus, for the sum of those terms, we can factor out 2 using the distributive property. Consequently, the sum of those terms equals 2x where x is some integer, and thus that sum is even. Since 1 is the last term, it follows that (2k+1)$^z$ equals (2x+1) where x is some integer. But, that means that (2k+1)$^z$ is odd. So, if n is odd, then n$^z$ is odd.

Since “if n is odd, then n$^z$ is odd.” is logically equivalent to “if n$^z$ is even, then n is even.” it logically follows that “if n$^z$ is even, then n is even” is true.

Since “if n$^z$ is even, then n is even” is true, by letting z=2, it follows that “if n$^2$ is even, then n is even.” is true also.