# proof of Pythagorean triplet

Consider the $4AB=(A+B)^{2}-(A-B)^{2}$. Assume that $A,B$ are coprime  . (This is no : If $d$ is the greatest common divisor  of $A,B$, then one can write $A=dA^{{}^{\prime}},B=dB^{{}^{\prime}}$ to get $4d^{2}(A^{{}^{\prime}}B^{{}^{\prime}})^{2}=d^{2}\left((A^{{}^{\prime}}+B^{{}^{% \prime}})^{2}-(A^{{}^{\prime}}-B^{{}^{\prime}})^{2}\right)$ and cancel $d^{2}$.)

For $4AB,A+B,A-B$ to form a Pythagorean triple  , each of $A,B$ must be squares. So $A=m^{2},B=n^{2}$ where $m,n$ are coprime, $n. So we have

 $a=2mn,b=m^{2}-n^{2},c=m^{2}+n^{2}$ (1)

and $\{a,b,c\}$ are a Pythagorean triple. But this needn’t be primitive  : If $m,n$ are odd, then $2\mid m^{2}\pm n^{2}$, so not all of $a,b,c$ are relatively prime.

Suppose $2mn,m^{2}-n^{2},m^{2}+n^{2}$ are pairwise coprime. Then $\gcd(2mn,m^{2}+n^{2})=\gcd(2mn,(m+n)^{2})=1=\gcd(2mn,(m-n)^{2})$, and it follows that $\gcd(2mn,m+n)=1,\gcd(2mn,m-n)=1$. Thus $\gcd(2,m+n)=1$, i.e. $m\pm n$ is odd. Furthermore, $\gcd(2mn,m+n)=1$ implies $\gcd(m,n)=1$. And since the sum/difference  of two integers is odd iff one is even, and the other is odd, only one of $m,n$ is odd. Thus, $\gcd(m^{2}-n^{2},m^{2}+n^{2})=\gcd(m^{2}+n^{2},2n^{2})=1$. Conversely, if $m,n$ are coprime, and exactly one of $m,n$ is odd, then $\gcd(2,m\pm n)=1$; thus, $2mn$,$m^{2}-n^{2}$ are coprime. From the fact that $\gcd(a+b,a-b)=\gcd(a,b)$ if $a,b$ have opposite parity and $\gcd(m^{2},n^{2})=1$ it follows that $m^{2}-n^{2}$,$m^{2}+n^{2}$ are also coprime. And since $\gcd(2mn,m^{2}+n^{2})=\gcd(2mn,(m+n)^{2})$ and $\gcd(2mn,m+n)=1$ it follows that $2mn,m^{2}+n^{2}$ are coprime. So the conditions the Pythagorean triple $\{2mn,m^{2}-n^{2},m^{2}+n^{2}\}$ is primitive, $\gcd(2mn,m+n)=1$ and $m,n$ are coprime and exactly one of them is odd are equivalent     .

So if $a,b,c$ satisfy $a^{2}+b^{2}=c^{2}$ and $a,b,c$ are pairwise coprime, then $c$ is odd, and exactly one of $a,b$ are odd and the other is even.

Let $n,m$ be coprime positive integers of opposite parity, $n. Set

 $n^{{}^{\prime}}=m+n,\;m^{{}^{\prime}}=n-m$ (2)

in equation 1 gives

 $b=m^{{}^{\prime}}n^{{}^{\prime}},c=\frac{n^{2}+m^{2}}{2}=\frac{\left.m^{{}^{% \prime}}\right.^{2}+\left.n^{{}^{\prime}}\right.^{2}}{2},\;a=\frac{\left.n^{{}% ^{\prime}}\right.^{2}-\left.m^{{}^{\prime}}\right.^{2}}{2}$ (3)

since $n=\frac{m^{{}^{\prime}}+n^{{}^{\prime}}}{2}$, $m=\frac{n^{{}^{\prime}}-m^{{}^{\prime}}}{2}$. Clearly, $\gcd(m^{{}^{\prime}},n^{{}^{\prime}})=1$.

Now we prove that any primitive Pythagorean triple can be generated choosing odd coprime integers.

###### Remark 1.

Let $m,n$ be odd coprime integers, $n. Let $f_{1}=\frac{n^{2}-m^{2}}{2},f_{2}=\frac{n^{2}+m^{2}}{2}$. Then $\gcd(f_{1},f_{2})=1$.

###### Proof.

Since $\gcd(n^{2},m^{2})=1=\gcd(f_{1}+f_{2},f_{1}-f_{2})$, the statement follows from the fact that $f_{1},f_{2}$ have opposite parity since in this case $\gcd(f_{1},f_{2})=\gcd(f_{1}+f_{2},f_{1}-f_{2})$. Since $4\mid n^{2}-m^{2}$, $f_{2}$ is odd, and since $f_{1}=f_{2}+n^{2}$ and $n$ is odd, $f_{1},f_{2}$ have opposite parity. ∎

Substituting $C=n^{2}$, $B=m^{2}$ in $BC=\left(\frac{C+B}{2}\right)^{2}-\left(\frac{C-B}{2}\right)^{2}$ yields that $mn,\,\frac{n^{2}-m^{2}}{2},\,\frac{n^{2}+m^{2}}{2}$ is a primitive Pythagorean triple.

To see that any primitive Pythagorean triple is of this form:

###### Theorem 1.

Let $a,b$ be positive coprime integers satisfying $a^{2}+b^{2}=c^{2}$. Then $a,b$ have opposite parity, and $c$ is odd. Furthermore $(a,c)=(b,c)=1$.

###### Proof.

$a,b$ cannot both be even since $\gcd(a,b)=1$. If both $a,b$ were odd we had $c^{2}\equiv 2\pmod{4}$ which is impossible since the square of any number is either congruent   () 0 or 1 modulo 4. Thus, $c$ must be odd. Now for any integers $a,b$ the congruence $a^{2}+b^{2}\equiv(a+b)^{2}\pmod{2}$ holds. Together with $c^{2}\equiv 1\pmod{2}$ this gives $a+b\equiv 1\pmod{2}$, so $a,b$ have opposite parity. ∎

Suppose $a$ is odd. Since $a^{2}=(c+b)(c-b)$ is a square, and $(c+b,c-b)=(c+b,2b)$ and $(2,c+b)=1$ it follows that $c\pm b$ are coprime and consequently each of them is square. This gives $c-b=n^{2},c+b=m^{2}$ where $m,n$ are odd coprime integers, and we get

 $\displaystyle a^{2}=m^{2}n^{2}\Leftrightarrow$ (4) $\displaystyle a$ $\displaystyle=$ $\displaystyle mn,$ (5) $\displaystyle b$ $\displaystyle=(c+b-(c-b))/2$ $\displaystyle=\frac{m^{2}-n^{2}}{2},$ (6) $\displaystyle c$ $\displaystyle=\frac{n^{2}+m^{2}}{2}.$ (7)

Now let $A=\frac{ab}{2}$ be a square. Without loss of generality we can set $a=mn$, $b=\frac{n^{2}-m^{2}}{2}$ where $m,n$ are odd coprime integers. So we have $A=mn\frac{n^{2}-m^{2}}{4}$, and since $mn$ and $\frac{n^{2}-m^{2}}{4}$ are coprime, each of them must itself be a square. So we have

 $c^{2}=\left(\frac{n^{2}+m^{2}}{2}\right)^{2}=(mn)^{2}+\left(\frac{n^{2}-m^{2}}% {2}\right)^{2}$ (8)

where the right-hand side numbers are biquadratic integers. So the question if the area of a right triangle  with integer sides is square is equivalent to asking if $x^{4}+y^{4}=z^{2}$ has a solution in positive integers.

Title proof of Pythagorean triplet ProofOfPythagoreanTriplet 2013-03-22 14:06:52 2013-03-22 14:06:52 Thomas Heye (1234) Thomas Heye (1234) 12 Thomas Heye (1234) Proof msc 11D09 ContraharmonicMeansAndPythagoreanHypotenuses