# derivation of Pythagorean triples

For finding all positive solutions of the Diophantine equation^{}

${x}^{2}+{y}^{2}={z}^{2}$ | (1) |

we first can determine such triples $x,y,z$ which are coprime^{}. When these are then multiplied by all positive integers, one obtains all positive solutions.

Let $(x,y,z)$ be a solution of the mentioned kind. Then the numbers are pairwise coprime, since by (1), a common divisor^{} of two of them is also a common divisor of the third. Especially, $x$ and $y$ cannot both be even. Neither can they both be odd, since because the square of any odd number^{} is $\equiv 1\phantom{\rule{veryverythickmathspace}{0ex}}(mod4)$, the equation (1) would imply an impossible congruence^{} $2\equiv {z}^{2}\phantom{\rule{veryverythickmathspace}{0ex}}(mod4)$. Accordingly, one of the numbers, e.g. $x$, is even and the other, $y$, odd.

Write (1) to the form

${x}^{2}=(z+y)(z-y).$ | (2) |

Now, both factors (http://planetmath.org/Product^{}) on the right hand side are even, whence one may denote

$z+y=:\mathrm{\hspace{0.33em}2}u,z-y=:\mathrm{\hspace{0.33em}2}v$ | (3) |

giving

$z=u+v,y=u-v,$ | (4) |

and thus (2) reads

${x}^{2}=\mathrm{\hspace{0.33em}4}uv.$ | (5) |

Because $z$ and $y$ are coprime and $z>y>0$, one can infer from (4) and (3) that also $u$ and $v$ must be coprime and $u>v>0$. Therefore, it follows from (5) that

$$u={m}^{2},v={n}^{2}$$ |

where $m$ and $n$ are coprime and $m>n>0$. Thus, (5) and (4) yield

$x=\mathrm{\hspace{0.33em}2}mn,y={m}^{2}-{n}^{2},z={m}^{2}+{n}^{2}.$ | (6) |

Here, one of $m$ and $n$ is odd and the other even, since $y$ is odd.

By substituting the expressions (6) to the equation (1), one sees that it is satisfied by arbitrary values of $m$ and
$n$. If $m$ and $n$ have all the properties stated above, then $x,y,z$ are positive integers and, as one may deduce from two first of the equations (6), the numbers $x$ and $y$ and thus all three numbers are coprime.

Thus one has proved the

Theorem^{}. All coprime positive solutions $x,y,z$, and only them, are gotten when one substitutes for $m$ and $n$ to the formulae (6) all possible coprime value pairs, from which always one is odd and the other even and $m>n$.

## References

- 1 K. Väisälä: Lukuteorian ja korkeamman algebran alkeet. Tiedekirjasto No. 17. Kustannusosakeyhtiö Otava, Helsinki (1950).

Title | derivation of Pythagorean triples |
---|---|

Canonical name | DerivationOfPythagoreanTriples |

Date of creation | 2013-03-22 18:34:40 |

Last modified on | 2013-03-22 18:34:40 |

Owner | pahio (2872) |

Last modified by | pahio (2872) |

Numerical id | 8 |

Author | pahio (2872) |

Entry type | Derivation |

Classification | msc 11D09 |

Classification | msc 11A05 |

Related topic | LinearFormulasForPythagoreanTriples |

Related topic | ContraharmonicMeansAndPythagoreanHypotenuses |