Euclid's formula for Pythagorean triples

ID: euclid-s-formula-for-pythagorean-triples

The formulas , , give a Pythagorean triple for integers , because . They give a primitive Pythagorean triple exactly when are coprime and have opposite integer parity. Every primitive Pythagorean triple arises this way after possibly exchanging the legs; scaling gives the nonprimitive triples.

New to topics? Read the docs here!