Pythagorean triples: the integer right triangles

By MathSolver Editorial Team · Published October 8, 2026 · Updated October 8, 2026

Published October 2026.

A Pythagorean triple is three positive integers (a, b, c) that satisfy a² + b² = c², the side lengths of a right triangle with no decimals anywhere. The most famous is (3, 4, 5): 9 + 16 = 25. Triples turn messy root-filled triangle problems into clean integer arithmetic, which is why contest writers and textbook authors love them.

The triples worth memorizing

Five families cover the vast majority of problems you will ever meet:

(3, 4, 5), the workhorse. Multiples like (6, 8, 10) and (9, 12, 15) appear constantly.
(5, 12, 13), the second most common.
(8, 15, 17), shows up in harder problems.
(7, 24, 25), a favorite for “find the missing side” with big numbers.
(20, 21, 29), rarer, but unmistakable when it appears.

Verify any of these instantly with our Pythagorean theorem calculator, enter the two legs and confirm the hypotenuse comes out whole.

Primitive vs non-primitive

A triple is primitive if a, b, c share no common factor, (3, 4, 5) is primitive. Multiply every term by k and you get a non-primitive triple: (6, 8, 10) is just (3, 4, 5) scaled by 2. Every triple is a scaled copy of exactly one primitive triple, so the primitives are the “atoms”, learn to spot the scaling factor and problems collapse.

Euclid’s formula: generating triples

Pick any integers m > n > 0, with m and n coprime and not both odd. Then:

a = m² − n²,   b = 2mn,   c = m² + n²

is always a primitive Pythagorean triple. Check: (m²−n²)² + (2mn)² = m⁴ − 2m²n² + n⁴ + 4m²n² = m⁴ + 2m²n² + n⁴ = (m²+n²)². ✓

Example: m = 2, n = 1 → a = 3, b = 4, c = 5. m = 3, n = 2 → a = 5, b = 12, c = 13. The two most famous triples are the two smallest outputs of the formula, not a coincidence.

Spotting triples in problems

When a right-triangle problem hands you two “ugly” numbers, test for a triple before reaching for the calculator. Seeing legs 9 and 12? That is 3×(3, 4, 5), so the hypotenuse is 15, no square roots needed. Hypotenuse 65 with one leg 16? Try 16-63-65 (a scaled 16? no, check: 16² + 63² = 256 + 3969 = 4225 = 65² ✓). The habit of testing small multiples saves minutes on timed tests.

Triples beyond geometry

Triples are not just triangle trivia. In trigonometry, a 3-4-5 triangle gives sin θ = 3/5 and cos θ = 4/5 exactly, no calculator needed, which is why so many trig problems quietly use triple angles. In number theory, triples connect to sums of two squares and Fermat’s Last Theorem (no triple exists for cubes: that is the n=3 case). In construction, the 3-4-5 rule lays out perfect right angles: measure 3 ft along one wall, 4 ft along the other, and adjust until the diagonal is exactly 5 ft, carpenters have done this for millennia.

Spotting triples mentally: the difference-of-squares trick

Notice that in Euclid’s formula, a = m² − n² = (m−n)(m+n). For consecutive integers (n = m−1), a = 2m − 1, always odd, and you get the family (3,4,5), (5,12,13), (7,24,25), (9,40,41)…: odd a, even b, hypotenuse exactly one more than b. So any odd number 2k+1 can start a triple: a = 2k+1, b = 2k(k+1), c = 2k(k+1)+1. For 11: k = 5, b = 60, c = 61 → (11, 60, 61). Check: 121 + 3600 = 3721 = 61² ✓. This generates infinitely many triples with zero memorization.

Cheat sheet

Memorize: (3,4,5), (5,12,13), (8,15,17), (7,24,25), (20,21,29) and multiples. Generate: a = m2-n2, b = 2mn, c = m2+n2. Odd shortcut: for odd a = 2k+1, b = 2k(k+1), c = b+1. In timed tests, checking the hypotenuse first (5, 13, 17, 25, 65?) identifies the family fastest. And remember: spotting that a problem hides a triple is often the entire battle, the arithmetic after that is trivial. Whether you memorize the five families or generate them with Euclid, triples turn radical-filled triangle problems into clean integer work. Start with (3,4,5); the rest follows naturally from there onward always.

Keep learning

Triples connect to several other topics on this site. The Pythagorean theorem beyond triangles shows where a² + b² = c² hides outside geometry class. For hands-on practice, the Pythagorean theorem calculator solves for any side with steps, and the practice quizzes drill the recognition reflex with fresh questions every round.

Practice: test yourself

1. Is (9, 40, 41) a triple? (81 + 1600 = 1681 = 41² ✓, yes.)
2. Use Euclid’s formula with m = 4, n = 1. (a = 15, b = 8, c = 17 → (8, 15, 17).)
3. A right triangle has hypotenuse 25 and one leg 7. Find the other leg without a calculator. (Test 7-24-25: 49 + 576 = 625 ✓ → 24.)

Frequently asked questions

Three positive integers (a, b, c) with a² + b² = c², integer sides of a right triangle. (3, 4, 5) is the smallest: 9 + 16 = 25.

3-4-5, 5-12-13, 8-15-17, 7-24-25, and 20-21-29, plus any scaled multiples like 6-8-10. Memorizing these five handles most contest and homework problems.

Euclid’s formula: for integers m > n, set a = m²−n², b = 2mn, c = m²+n². With m=2, n=1 you get (3,4,5); m=3, n=2 gives (5,12,13).

One whose three numbers share no common divisor, like (3, 4, 5). Every non-primitive triple (e.g. 6-8-10) is a primitive triple multiplied by a single scale factor.