Proof about Pythagorean triples

Show that if $(x,y,z)$ is a Pythagorean triple, then $10\mid xyz$

Proof

First, if $x$, $y$, $z$ are all odd, then so are $x^2$, $y^2$, $z^2$, so $x^2+y^2$ is even, which means that $x^2+y^2 \neq z^2$. Hence, at least one of $x$, $y$, $z$ is even, so $2\mid xyz$ (clear).

Next, for any $n \in Z$, if $5$ doesn't divide $n$, then $(n^2)^2=n^4 \equiv 1\pmod{5}$ (as you can check or quote Euler's theorem), and therefore $n^2 \equiv \pm 1\pmod{5}$. Now, if $5$ doesn't divide $xy$, then $x^2 \equiv \pm 1\pmod{5}$ and $y^2 \equiv \pm 1\pmod{5}$, so

$$x^2+y^2 \equiv -2,0,2 \pmod{5}$$

Therefore if $x^2+y^2=z^2$ and $5$ doesn't divide $xy$ then $z^2=x^2+y^2 \equiv -2,0,2\pmod{5}$, so $5\mid z^2$ (why? it looks weird to me because $z^2$ can be also congruent to $2$ and $-2$) and hence $5\mid z$ (otherwise $z^2 \equiv \pm 1\pmod{5}$). It follows that $x^2+y^2=z^2$, then either $5\mid xy$ or $5\mid z$ (how does this follow? if $5$ doesn't divide $z$ then how can $5$ divide $xy$), so in any case $5\mid xyz$

Finally, we can conclude that if $x^2+y^2=z^2$ then $2\mid xyz$ and $5\mid xyz$, so $10\mid xyz$ (intuitively it looks right but I can't prove it!)

• Please edit your question, many times you have $x^{2} \equiv \pm (mod 5)$ which I don't know what means. – Lukáš Černý Jul 20 '16 at 8:56
• – lab bhattacharjee Jul 20 '16 at 10:23
• It seems that you have an answer to your first question. You also ask how it follows that $5\mid xy$ or $5\mid z$. But you had just proved that if $5\not\mid xy$ then $5\mid z$. So either $5\mid xy$ or $5\not\mid xy$ but then $5\mid z$. In either case, $5$ divides at least one of $xy$ and $z$. (It may divide both.) – Will Orrick Jul 20 '16 at 17:12
• Finally, you ask how $2\mid xyz$ and $5\mid xyz$ implies $10\mid xyz$. A key fact in number theory is that, for prime $p$, if $p\mid ab$, then $p\mid a$ or $p\mid b$. This can be proved using the Euclidean algorithm. Now apply it to your problem: $2\mid xyz$ means $xyz=2a$ for some $a$. Since $5\mid2a$ and $5\not\mid 2$, we conclude that $5\mid a$. So $a=5b$ for some $b$. Hence $xyz=2\cdot5b=10b$. The key number theory fact is also used earlier in the proof, when $5\mid z^2$ is used to conclude that $5\mid z$. – Will Orrick Jul 20 '16 at 17:14

The general solution of the above Diophantine Equation is: $x = m^2 - n^2, y = 2mn, z = m^2+n^2$. Its better if you start at this point. Then your analysis yields the followings: $m^2 = \pm 1 \pmod 5, n^2 = \pm 1 \pmod 5$. Since $5 \nmid xy\implies 5 \nmid x, 5 \nmid y\implies m^2 = 1\pmod 5, n^2 = -1\pmod 5$ or $m^2 = -1\pmod 5, n^2 = 1\pmod 5$ for otherwise $x = m^2 - n^2 = \pm1 - \pm1 = 0\pmod 5$, contradicting the assumption that $5 \nmid x$. Thus: $m^4 + 2m^2n^2 + n^4 = 1 + 2(-1) + 1 = 0 \pmod 5\implies 5 \mid (m^2+n^2)^2 = z^2$.

• I am sorry I see it.. – Lukáš Černý Jul 20 '16 at 9:17

No problem with divisibility by $2$, good.

Suppose $5\nmid xyz$, so $5$ divides none of the numbers $x$, $y$ and $z$.

Then $x^2\equiv\pm1\pmod{5}$ and the same for $y$ and $z$. However, it can't be $x^2\equiv1$ and $y^2\equiv-1$, otherwise $z^2\equiv0\pmod{5}$. Similarly it's impossible that $x^2\equiv-1$ and $y^2\equiv1$.

Suppose $x^2\equiv1$ and $y^2\equiv1$. Then $z^2\equiv1+1\pmod{5}$, which is a contradiction. Similarly $x^2\equiv-1\equiv y^2$ can be dismissed.

Hence $5\mid xyz$.

Alternatively, which is what the book seems to be doing, suppose $5\nmid xy$. Then, since $x^2\equiv\pm1$ and $y^2\equiv\pm1$, we can conclude that \begin{align} z^2&=x^2+y^2\equiv2\pmod5 &&\text{or} \\[4px] z^2&=x^2+y^2\equiv-2\pmod5 &&\text{or} \\[4px] z^2&=x^2+y^2\equiv0\pmod5 \end{align} The first two cases are impossible, as seen above, so only the third case remains: since $5\mid z^2$, we conclude $5\mid z$.

• I didn't do that proof by the way XD. Otherwise I wouldn't be asking all this bunch of questions. – daniel Jul 20 '16 at 9:19
• Why is $z^{2} \equiv 2 (\mod 5)$ a contradiction? – Lukáš Černý Jul 20 '16 at 9:22
• @LukášČerný Because for every $a$, only $a\equiv0\pmod5$, $a\equiv 1\pmod5$ or $a\equiv-1\pmod5$ is possible. – egreg Jul 20 '16 at 9:23
• @daniel $z^2\not\equiv0\pmod5$, because by assumption $5\nmid z$. – egreg Jul 20 '16 at 9:24
• @daniel It's just a slightly different path: you know that $z^2\equiv\pm2\pmod{5}$ is impossible, so what remains is $z^2\equiv0\pmod{5}$ and therefore $5\mid z$. – egreg Jul 20 '16 at 9:27

No problem to give a "theoretical" proof. Just for fun let me work with a table in $\mathbb F_5^2$.

By the quite known parametrization of the Pythagorean triple, $xyz$ is even so we must prove in $\mathbb F_5$ that $$xyz=mn(m^2-n^2)(m^2+n^2)=0\qquad (1)$$ If $m=n$ and if $mn=0$ it is clear so we prove $(1)$ with $m\ne n$ and $mn\ne 0$ so we need to verify $(1)$ with $12$ couples $(m,n)$ $$\begin{array}{|c|c|}\hline (1,1) & (1,2) & (1,3) &(1, 4) \\\hline (2,1) & (2,2) & (2,3) &(2,4)\\\hline (3,1) &(3,2) & (3,3) &(3,4)\\\hline (4,1)&(4,2)&(4,3)&(4,4)\\\hline\end{array}$$

If $(m,n)\in \{(1,2),(1,3),(2,1),(2,4),(3,1),(3,4),(4,2),(4,3)\}$ then $m^2+n^2=0$

If $(m,n)\in\{(1,4),(2,3),(3,2),(4,1)\}$ then $m^2-n^2=0$

• Actually , by commutativity, the verification can be made just for 6 couples instead of 12. Still easier. – Piquito Jul 20 '16 at 21:02