proof of Pythagorean triples

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 a2+b2=c2 then
k2⁢a2+k2⁢b2=k2⁢c2. That is, for a positive integer k, if
(a,b,c) is a Pythagorean triple then so is (k⁢a,k⁢b,k⁢c).
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 a2+b2=c2. Set

Case 2.m and n both odd, i.e., m≡±n⁢(m⁢o⁢d⁢ 2). So 2 divides m2-n2. Then by the same process
as in the first case we have

a=m2-n22,b=m⁢n,a⁢n⁢dc=m2+n22.

(5)

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

u=m+n2⁢ and ⁢v=m-n2.

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

a=2⁢u⁢v,b=u2-v2,andc=u2+v2

(6)

where u>v, g⁢c⁢d⁢(u,v)=1, and u and v are of opposite
parity. Therefore (6), with a and b
interchanged, is identical to (4). Thus since
(m2-n2,2⁢m⁢n,m2+n2), 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=m2-n2,b=2⁢m⁢n, and ⁢c=m2+n2 .