Skip to content

Pythagorean Triples

A Pythagorean triple is a triple of positive integers

Right Triangles and Integer Solutions

A Pythagorean triple is a triple of positive integers

(a,b,c) (a,b,c)

satisfying the equation

a2+b2=c2. a^2+b^2=c^2.

This equation arises from the Pythagorean theorem in Euclidean geometry. If a right triangle has legs of lengths aa and bb, and hypotenuse cc, then

a2+b2=c2 a^2+b^2=c^2

A classical example is

(3,4,5), (3,4,5),

since

32+42=9+16=25=52. 3^2+4^2=9+16=25=5^2.

Other examples include

(5,12,13),(8,15,17),(7,24,25). (5,12,13),\qquad (8,15,17),\qquad (7,24,25).

The study of Pythagorean triples is one of the oldest parts of number theory and leads naturally to deeper questions about Diophantine equations.

Primitive Pythagorean Triples

A Pythagorean triple is called primitive if

gcd(a,b,c)=1. \gcd(a,b,c)=1.

For example,

(3,4,5) (3,4,5)

is primitive, while

(6,8,10) (6,8,10)

is not, since all three numbers are divisible by 22.

Every nonprimitive triple can be obtained by multiplying a primitive triple by a positive integer. Thus the main problem is to classify primitive triples.

Basic Properties

Suppose

a2+b2=c2 a^2+b^2=c^2

is a primitive Pythagorean triple.

First, aa and bb cannot both be even, since then cc would also be even. This would contradict primitiveness.

They also cannot both be odd. Indeed, if aa and bb are odd, then

a2b21(mod4), a^2\equiv b^2\equiv 1\pmod 4,

so

a2+b22(mod4). a^2+b^2\equiv 2\pmod 4.

But no square is congruent to 2(mod4)2\pmod 4. Therefore one of aa and bb must be even, and the other odd.

Without loss of generality, assume aa is odd and bb is even.

Parametrization of Primitive Triples

The complete description of primitive Pythagorean triples is given by the following theorem.

Theorem. Every primitive Pythagorean triple can be written uniquely in the form

a=m2n2, a=m^2-n^2, b=2mn, b=2mn, c=m2+n2, c=m^2+n^2,

where

m>n>0, m>n>0, gcd(m,n)=1, \gcd(m,n)=1,

and m,nm,n have opposite parity.

Conversely, every pair m,nm,n satisfying these conditions produces a primitive Pythagorean triple.

Substituting into the equation gives

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

Hence the formula always satisfies the Pythagorean equation.

Examples

Let

m=2,n=1. m=2,\qquad n=1.

Then

a=2212=3, a=2^2-1^2=3, b=2(2)(1)=4, b=2(2)(1)=4, c=22+12=5. c=2^2+1^2=5.

Thus we recover the triple

(3,4,5). (3,4,5).

Now let

m=3,n=2. m=3,\qquad n=2.

Then

a=94=5, a=9-4=5, b=12, b=12, c=13. c=13.

This gives

(5,12,13). (5,12,13).

If we multiply by 22, we obtain the nonprimitive triple

(10,24,26). (10,24,26).

Geometric Interpretation

The equation

x2+y2=1 x^2+y^2=1

defines the unit circle. Rational points on this circle correspond directly to Pythagorean triples.

Suppose

(ac,bc) \left(\frac{a}{c},\frac{b}{c}\right)

lies on the unit circle. Then

(ac)2+(bc)2=1, \left(\frac{a}{c}\right)^2+\left(\frac{b}{c}\right)^2=1,

which is equivalent to

a2+b2=c2. a^2+b^2=c^2.

The parametrization of primitive triples arises from describing all rational points on the unit circle by lines through the point

(1,0). (-1,0).

This connection between geometry and arithmetic is fundamental in modern number theory and arithmetic geometry.

Historical Remarks

Pythagorean triples were known long before the Greek mathematicians. Babylonian tablets contain examples dating back nearly four thousand years. The systematic study of these triples eventually led to broader investigations of polynomial equations in integers.

The equation

xn+yn=zn x^n+y^n=z^n

for powers n>2n>2 became the subject of entity[“historical_event”,“Fermat’s Last Theorem”,“proof completed by Andrew Wiles in 1994”]. Unlike the quadratic case, higher powers admit no nontrivial integer solutions. This contrast illustrates the special algebraic structure of quadratic equations.