# Prove that the sum of pythagorean triples is always even

Problem: Given $a^2 + b^2 = c^2$ show $a + b + c$ is always even

My Attempt, Case by case analysis:

Case 1: a is odd, b is odd. From the first equation,

$odd^2 + odd^2 = c^2$

$odd + odd = c^2 \implies c^2 = even$

Squaring a number does not change its congruence mod 2.

Therefore c is even

$a + b + c = odd + odd + even = even$

Case 2: a is even, b is even. Similar to above

$even^2 + even^2 = c^2 \implies c$ is even

$a + b + c = even + even + even = even$

Case 3: One of a and b is odd, the other is even Without loss of generality, we label a as odd, and b as even

$odd^2 + even^2 = c^2 \implies odd + even = c^2 = odd$

Therefore c is odd

$a + b + c = odd + even + odd = even$

We have exhausted every possible case, and each shows $a + b + c$ is even. QED

Follow Up: Is there a proof that doesn't rely on case by case analysis? Can the above be written in a simpler way?

• In fact there are no Pythagorean triples where the legs ($a$ and $b$) are both odd Feb 27, 2017 at 16:47
• Even though there are shorter proofs, there is something pleasingly straightforward about your proof. Mar 1, 2017 at 13:48

Note that $x^2\equiv x\pmod 2$ and thus $a^2+b^2=c^2$ implies $$a+b+c\equiv a^2+b^2+c^2\equiv 2c^2\equiv 0\pmod 2$$

• Well that makes it easy, props for the quick answer. Feb 26, 2017 at 21:55
• You are welcome, @spyr03. Feb 26, 2017 at 21:55
• $a^2+b^2+c^2\equiv 2(a^2+b^2)\pmod 2$ Could you explain that step? Feb 26, 2017 at 21:55
• @mrnovice $c^2 = a ^2 + b^2\implies a^2+b^2+c^2 = 2(a^2+b^2)$. Feb 26, 2017 at 21:56
• @mrnovice, not at all, the way I had written the answer was missing the context, you've asked a valid question. Feb 26, 2017 at 21:59

Also, Pythagorean triples have a well defined structure: $$a=k(m^{2}-n^{2}),\ \,b=k(2mn),\ \,c=k(m^{2}+n^{2})$$ and $$a+b+c=2k(mn+m^2)$$

Hint

Write $a+b+c=k$, so

$$a^2+b^2=(a+b)^2-2ab= (k-c)^2-2ab=c^2 → k^2-2(kc+ab)=0→k^2=2(kc+ab)$$

Notice that $(a+b+c)^2=a^2+b^2+c^2+2(ab+bc+ac)=2c^2+2(ab+bc+ac)$, so the square of $a+b+c$ is even and thus $a+b+c$ is also even.

$c^2 = a^2 + b^2 = (a+b)^2 - 2ab$.

$2ab = (a+b)^2 - c^2$

$2ab = (a+b+c)(a+b-c)$

Let $n = a+b+c$, and the above becomes:

$2ab = n(n-2c)$

So the right-hand side must be even, but since $n-2c$ is odd when $n$ is odd, $n$ must be even.

• Nice explanation, I never would have thought about writing $2ab = (a + b + c)(a + b -c)$. You could have finished with $2ab = n^2 - 2cn$ and thus n^2 must be even, therefore n is even. Feb 28, 2017 at 23:29

Consider $(a+b+c)^2$

Which is $a^2 + b^2 + c^2 + 2(ab+bc+ca)$

Since $c^2 = a^2 + b^2$ (c being the hypotenuse), $(a+b+c)^2 = 2(c^2 + ab + bc + ca)$ - which is an even number.

and since squares of odd is odd and evens is even $a+b+c$ has to be even.