Skip to Calculator
Pythagoras²Equation Solver
Number Theory

The Complete Guide to Pythagorean Triples: Formulas, Generation & List

Master primitive Pythagorean triples (3-4-5, 5-12-13, 8-15-17), learn Euclid's generation formula (m²-n², 2mn, m²+n²), and explore infinite families.

Pythagoras Research Team20 Ocak 20266 min read

A Pythagorean Triple consists of three positive integers (a, b, c) that satisfy the Pythagorean equation:

a² + b² = c²

When all three sides of a right triangle are whole numbers, measuring, constructing, and calculating dimensions becomes remarkably clean.


Primitive vs. Non-Primitive Triples

  • Primitive Pythagorean Triple: A triple where a, b, and c share no common factor other than 1 (gcd(a, b, c) = 1). Examples include (3, 4, 5), (5, 12, 13), and (8, 15, 17).
  • Non-Primitive Triple: Any integer multiple k × (a, b, c) of a primitive triple. For example, multiplying (3, 4, 5) by k = 2 gives (6, 8, 10), and by k = 10 gives (30, 40, 50). Both satisfy a² + b² = c², but their greatest common divisor is k > 1.

Euclid’s Formula for Generating Triples

Around 300 BC, Euclid proved in his Elements that every primitive Pythagorean triple can be generated from an arbitrary pair of positive integers m and n, provided:

  1. m > n > 0
  2. m and n are coprime (gcd(m, n) = 1)
  3. One number is even and the other is odd (m - n is odd)

The sides are given by:

a = m² - n²
b = 2mn
c = m² + n²

Verification of Euclid’s Formula:

Let us expand a² + b²:

a² = (m² - n²)² = m⁴ - 2m²n² + n⁴
b² = (2mn)² = 4m²n²

Summing both:

a² + b² = m⁴ + 2m²n² + n⁴ = (m² + n²)² = c²  ■

Table of the Top 16 Primitive Pythagorean Triples

# m n Leg a Leg b Hypotenuse c Perimeter Area
1 2 1 3 4 5 12 6
2 3 2 5 12 13 30 30
3 4 1 15 8 17 40 60
4 4 3 7 24 25 56 84
5 5 2 21 20 29 70 210
6 5 4 9 40 41 90 180
7 6 1 35 12 37 84 210
8 6 5 11 60 61 132 330
9 7 2 45 28 53 126 630
10 7 4 33 56 65 154 924
11 7 6 13 84 85 182 546
12 8 1 63 16 65 144 504
13 8 3 55 48 73 176 1320
14 8 5 39 80 89 208 1560
15 8 7 15 112 113 240 840
16 9 2 77 36 85 198 1386

Surprising Mathematical Properties of Pythagorean Triples

  1. Divisibility Rules: In every primitive triple:
    • Exactly one leg is a multiple of 3.
    • Exactly one leg is a multiple of 4.
    • Exactly one side (a, b, or c) is a multiple of 5.
    • The product a × b × c is always divisible by 60 (3 × 4 × 5).
  2. Inradius is Always an Integer: The inradius of a right triangle with integer sides is given by: r = (a + b - c) / 2 = n(m - n) Because m and n are integers, the inradius is always a whole number!
  3. Odd Hypotenuse: The hypotenuse c of any primitive Pythagorean triple is always an odd number, and every prime divisor of c is of the form 4k + 1.

Test any triple instantly with our Pythagorean Triples Explorer.