# proof of Pythagorean triples

If $a,b$, and $c$ are positive integers such that

$${a}^{2}+{b}^{2}={c}^{2}$$ | (1) |

then $(a,b,c)$ is a Pythagorean triple^{}. If $a,b$, and $c$ are
relatively prime in pairs then $(a,b,c)$ is a primitive
Pythagorean triple. Clearly, if $k$ divides any two of $a,b$,
and $c$ it divides all three. And if ${a}^{2}+{b}^{2}={c}^{2}$ then
${k}^{2}{a}^{2}+{k}^{2}{b}^{2}={k}^{2}{c}^{2}$. That is, for a positive integer $k$, if
$(a,b,c)$ is a Pythagorean triple then so is $(ka,kb,kc)$.
Hence, to find all Pythagorean triples, it’s sufficient to find
all primitive Pythagorean triples.

Let $a,b$, and $c$ be relatively prime positive integers such that ${a}^{2}+{b}^{2}={c}^{2}$. Set

$$\frac{m}{n}=\frac{a+c}{b}$$ |

reduced to lowest terms, That is, $\mathrm{gcd}(m,n)=1$. From the triangle inequality $m>n$. Then

$$\frac{m}{n}b-a=c.$$ | (2) |

Squaring both sides of (2) and multiplying through by ${n}^{2}$ we get

$${m}^{2}{b}^{2}-2mnab+{n}^{2}{a}^{2}={n}^{2}{a}^{2}+{n}^{2}{b}^{2};$$ |

which, after cancelling and rearranging terms, becomes

$$b\left({m}^{2}-{n}^{2}\right)=a(2mn).$$ | (3) |

There are two cases, either $m$ and $n$ are of opposite parity, or
they or both odd. Since $\mathrm{gcd}(m,n)=1$, they can not both be
even.

Case 1. $m$ and $n$ of opposite parity, i.e., $m\not\equiv \pm n(mod\mathrm{\hspace{0.17em}\hspace{0.17em}2})$. So 2 divides b since ${m}^{2}-{n}^{2}$ is odd. From equation (2), $n$ divides $b$. Since $\mathrm{gcd}(m,n)=1$ then $\mathrm{gcd}(m,{m}^{2}-{n}^{2})=1$, therefore $m$ also divides $b$. And since $\mathrm{gcd}(a,b)=1$, $b$ divides $2mn$. Therefore $b=2mn$. Then

$$a={m}^{2}-{n}^{2},b=2mn,\text{and from (}\text{2}\text{)},c=\frac{m}{n}\mathrm{\hspace{0.17em}2}mn-({m}^{2}-{n}^{2})={m}^{2}+{n}^{2}.$$ | (4) |

Case 2. $m$ and $n$ both odd, i.e., $m\equiv \pm n(mod\mathrm{\hspace{0.17em}\hspace{0.17em}2})$. So 2 divides ${m}^{2}-{n}^{2}$. Then by the same process as in the first case we have

$$a=\frac{{m}^{2}-{n}^{2}}{2},b=mn,and\mathit{\hspace{1em}}c=\frac{{m}^{2}+{n}^{2}}{2}.$$ | (5) |

The parametric equations in (4) and (5) appear to be different but they generate the same solutions. To show this, let

$$u=\frac{m+n}{2}\text{and}v=\frac{m-n}{2}.$$ |

Then $m=u+v$, and $n=u-v$. Substituting those values for $m$ and $n$ into (5) we get

$$a=2uv,b={u}^{2}-{v}^{2},\text{and}\mathit{\hspace{1em}}c={u}^{2}+{v}^{2}$$ | (6) |

where $u>v$, $gcd(u,v)=1$, and $u$ and $v$ are of opposite parity. Therefore (6), with a and b interchanged, is identical to (4). Thus since $({m}^{2}-{n}^{2},2mn,{m}^{2}+{n}^{2})$, as in (4), is a primitive Pythagorean triple, we can say that $(a,b,c)$ is a primitive pythagorean triple if and only if there exists relatively prime, positive integers $m$ and $n$, $m>n$, such that $a={m}^{2}-{n}^{2},b=2mn,\text{and}c={m}^{2}+{n}^{2}$ .

Title | proof of Pythagorean triples^{} |
---|---|

Canonical name | ProofOfPythagoreanTriples |

Date of creation | 2013-03-22 14:28:05 |

Last modified on | 2013-03-22 14:28:05 |

Owner | fredlb (5992) |

Last modified by | fredlb (5992) |

Numerical id | 9 |

Author | fredlb (5992) |

Entry type | Proof |

Classification | msc 11-00 |