formofpythagoreantriples

Form of Pythagorean Triples

All the solutions of the primitive Pythagorean equation:

x**2 + y**2 = z**2

are given by:

x=2st, y=s**2 - t**2, z=s**2 + t**2

Proof:

WLOG x even, y,z odd, so

z-y=2u, z+y=2v

x**2=z**2 - y**2

=(z-y)(z+y)

(x/2)**2=((z-y)/2)((z+y)/2)=uv

hcf (y,z)=1 => hcf (u,v)=1

=> u=s**2, v=t**2, hcf (s,t)=1

z=u+v=s**2 + t**2

y=u-v=s**2 - t**2

x**2=4uv=4s**2t**2

Conversely:

x**2 + y**2 = (2st)**2 + (s**2 - t**2)**2 = (s**2 + t**2)**2 = z**2