Suppose that $w^2 + x^2 + y^2 = z^2$, where $w, x, y,$ and $z$ always denote positive integers. (Hint: It may be helpful to represent even integers as $2i$ and odd integers as $2j + 1$, where $i$ and $j$ are integers)

Prove the proposition: $z$ is even if and only if $w, x,$ and $y$ are even. Do this by considering all the cases of $w, x, y$ being odd or even.

Question taken from here.

I am posting this question in order to receive constructive criticism about my proof, and I would also like to improve it and verify it. In addition, I know that this question was already asked here, but I don't need to just better understand the question; I want to come up with a complete and elegant proof for the proposition.

So, I used @ZevChonoles answer from here to help me better understand the question and start constructing my proof.

The first problem I came across when writing this proof is that it is a proposition with if an only if, but it asks to consider all the cases. I use these notes to create my proof templates, but the problem I came across is that the proof template for if an only if propositions and the proof template for case analysis are not exactly the same. I was better able to see how to construct a proof using case analysis, so that is what I went with.

I realized that there could be a total of $4$ different cases, since the order of which numbers are even and which ones are odd does not matter. The cases could be as such:

1) Odd Odd Odd

2) Odd Odd Even

3) Odd Even Even

4) Even Even Even

Theorem: $z$ is even if and only if $w, x,$ and $y$ are even.

Proof: The proof is by case analysis.

  1. None of the numbers $w, x, y$ are odd.

  2. One of the numbers $w, x, y$ is odd.

  3. Two of the numbers $w, x, y$ are odd.

  4. Three of the numbers $w, x, y$ are odd.

Lemma: The square of an odd number is one more than a multiple of $4$:

$$(2j+1)^{ 2 }=4j^{ 2 }+4j+1=4(j^{ 2 }+j)+1$$ and the square of an even number is exactly a multiple of 4:

$$(2i)^{ 2 }=4i^{ 2 }$$

Case 1: If none of the numbers $w, x, y$ are odd, then $z^2=w^2+x^2+y^2=4a+4b+4c$, where $a,b,c\in\mathbb{Z}$, is a multiple of $4$, which implies $z$ is even.

Case 2: If exactly one of the numbers $w, x, y$ is odd, then $z^2=w^2+x^2+y^2=4a+4b+(4c+1)$, where $a,b,c\in\mathbb{Z}$, is one more than a multiple of $4$, and therefore $z$ is odd.

Case 3: If exactly two of the numbers $w, x, y$ are odd, then $z^2=w^2+x^2+y^2=4a+(4b+1)+(4c+1)$, where $a,b,c\in\mathbb{Z}$, is two more than a multiple of $4$, and therefore $z$ is even.

Case 4: If exactly three of the numbers $w, x, y$ are odd, then $z^2=w^2+x^2+y^2=(4a+1)+(4b+1)+(4c+1)$, where $a,b,c\in\mathbb{Z}$, is three more than a multiple of $4$, and therefore $z$ is odd.

Now, from what I understand it seems that $w, x,$ and $y$ being even $\Rightarrow $ $z$ is even, but when I take case $3$ into consideration, it seems that $z$ being even does not necessarily imply that $w, x,$ and $y$ are even.

Am I correct in my conclusion? If not, where did I go wrong in my proof? Please feel free to give me constructive criticism about my proof writing techniques as well.

  • 1
    $\begingroup$ Try finding a square which is 2 more than a multiple of 4. $\endgroup$ – shardulc says Reinstate Monica Apr 28 '16 at 15:00
  • $\begingroup$ @shardulc I can tell that you are referring to the mistake I made in Case 3; there is actually no number that is $4k+2$ where $k\in\mathbb{Z}$ that is a square. However, I don't quite understand how that would make $z$ odd. Would you be able to clarify? $\endgroup$ – Cherry_Developer Apr 28 '16 at 15:11
  • 1
    $\begingroup$ Have you see here ? en.wikipedia.org/wiki/Pythagorean_quadruple $\endgroup$ – Emilio Novati Apr 28 '16 at 15:12
  • $\begingroup$ @Cherry_Developer You are right in saying that there is no number whose square is 2 more than a multiple of 4 (can you prove this?). So if two of $w$, $x$, $y$ are odd, then the equation $w^2 + x^2 + y^2 = z^2$ has no solutions at all, so you are done because there is no converse to be proved. $\endgroup$ – shardulc says Reinstate Monica Apr 28 '16 at 15:46
  • $\begingroup$ @shardulc Alright, so from what I understand, in case $3$), $z^2$ would have to be even, but not a multiple of $4$, but if $z^2$ is even, then $z$ is also even. So, $z^2$ has to be a multiple of $4$, so there is a contradiction that makes the case impossible. What about case $4$? $\endgroup$ – Cherry_Developer Apr 28 '16 at 15:54

You are almost right.

In case 1, you have successfully proved that if $w$, $x$, $y$ are all even, then $z$ must also be even. If they are not all even, then $z$ is odd in case 2 and 4. But what about case 3? Here, it can be easily proved that there is no integer whose square is of the form $4k + 2$, hence it is impossible for a solution to exist for case 3.

So out of the four cases, there is only one in which $z$ exists and is even at the same time. That is case 1, and there, $w$, $x$, $y$ are all even; so $z$ being even implies $w$, $x$, $y$ are all even. This concludes your proof.

Note that even though the 'proving' may seem to occur only in case 1 and 3, the other cases are required to cover all the possibilities of $w$, $x$, $y$, otherwise your proof would be incomplete.


You are very close. Your lemma tells you what any square looks like: a multiple of 4 or a multiple of 4 plus 1. What does your lemma therefore tell you about case 3?

  • $\begingroup$ It seems that case $3$ does not fit either case in my lemma. It isn't one more than a multiple of $4$, and it isn't exactly a multiple of $4$. $\endgroup$ – Cherry_Developer Apr 28 '16 at 15:21
  • $\begingroup$ Exactly. You're almost on the right track when you say "how that would make $z$ odd" -- in fact, you already know that $z$ can't be odd, and if it's neither odd nor even then.... $\endgroup$ – Mees de Vries Apr 28 '16 at 15:25
  • 1
    $\begingroup$ If a number is neither odd nor even, then there is no such number? $\endgroup$ – Cherry_Developer Apr 28 '16 at 15:35
  • 1
    $\begingroup$ You got it! (Filler word.) $\endgroup$ – Mees de Vries Apr 28 '16 at 16:59

Yes, you are wrong.

Consider that any perfect square can be written as $3k$ or $3k+1$ where $k \in \mathbb{N}$ since $$x \equiv 0,1,2 \pmod 3 \Rightarrow x^2 \equiv 0,1 \pmod 3$$

Consider now that $3k$ is odd and $3k+1$ is even where $k$ is assumed to be odd. Now proceeding as per the cases mentioned by you, we get that

Case-$1$:$$z^2=3k+3l+3m=3(k+l+m)=3(\text{odd+odd+odd})=\text{odd}$$ Case-$2$:$$z^2=3k+3l+3m+1=3(k+l+m)+1=3(\text{odd+odd+odd})+1=\text{even}$$ Case-$3$:$$z^2=3k+3l+1+3m+1=3(k+l+m)+2=3(\text{odd+odd+odd})+\text{even}=\text{odd}$$ Case-$4$:$$z^2=3k+1+3l+1+3m+1=3(k+l+m+1)=3(\text{odd+odd+odd+odd})=\text{even}$$

But using your condition, you have already shown that Case-$2$ does not hold.

So the answer is out. Hope this helps.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.