Prove: $\text{if }a,b,c\in\mathbb{Z} \text{ and } a^2+b^2=c^2\text{ then }3\mid ab$

101 Views Asked by At

This is for a homework assignment. I am supposed to prove, $$\text{if }a,b,c\in\mathbb{Z} \text{ and } a^2+b^2=c^2\text{ then }3\mid ab$$ I've tried using direct proofs and proofs by contrapositive, but I can't seem to get anywhere. Is there a good approach to prove this, preferably without modulus?

2

There are 2 best solutions below

1
On

As any number $n\equiv0,\pm1\pmod3,\implies n^2\equiv0,1\pmod3$

if $3\nmid ab, a,b\equiv\pm1\pmod3\implies a^2+b^2\equiv1+1\pmod3\not\equiv0,1$

0
On

If $a$ is not a multiple of $3$, then one of $a+1$, $ a-1$ is. Hence $3\mid (a+1)(a-1)=a^2-1$. Similarly, if $b$ is also not a multiple of $3$, we have $3\mid b^2-1$. Hence if neither $a$ nor $b$ is a multiple of $3$, then $3\mid a^2-1+b^2-1=c^2-2$. Then $c^2$ (and $c$) is not a multiple of $3$, so $3\mid c^2-1$. But then also $3\mid (c^2-1)-(c^2-2)=1$. Contradiction. We conclude that at least one of $a,b$ must be a multiple of $3$.