Published on

Pythagorean Triples and Euclid’s Formula

Authors
  • avatar
    Name
    hwahyeon
    Twitter

The Pythagorean theorem states that

a2+b2=c2a^2 + b^2 = c^2

When a,b,ca, b, c are positive integers that satisfy this relation, the triple (a,b,c)(a, b, c) is called a Pythagorean triple.
For example, (3,4,5)(3, 4, 5) is a well-known Pythagorean triple.


Euclid’s Formula

One systematic way to generate Pythagorean triples is through Euclid’s formula.

  1. Choose two natural numbers m,nm, n with m>nm > n.
  2. Define the triple as follows:
a=m2n2,b=2mn,c=m2+n2a = m^2 - n^2, \quad b = 2mn, \quad c = m^2 + n^2
  1. Then (a,b,c)(a, b, c) will be a Pythagorean triple.

Proof

By direct calculation,

(m2n2)2+(2mn)2=m4+2m2n2+n4=(m2+n2)2(m^2 - n^2)^2 + (2mn)^2 = m^4 + 2m^2n^2 + n^4 = (m^2 + n^2)^2

which shows that (a,b,c)(a, b, c) always satisfies

a2+b2=c2a^2 + b^2 = c^2