Pythagorean Triples
In this lesson, you will learn
- What a Pythagorean triple is, and how to check if three numbers form one.
- How to make new triples by multiplying a triple you know.
- What a primitive Pythagorean triple is.
- How to generate triples with Plato's formula and Euclid's formula.
What Is a Pythagorean Triple?
Pythagorean triples, also called Pythagorean triplets, are sets of three whole numbers a, b, and c bigger than zero such that a2 + b2 = c2.
The numbers a, b, and c are put inside parentheses as (a, b, c) or the triple can be written as a, b, c without parentheses.
Notice that c is listed last and that is very important!
Take a look at the figure below showing a list of nine Pythagorean triples.

The most common Pythagorean triples are (3, 4, 5), (5, 12, 13), (6, 8, 10), (7, 24, 25), and (8, 15, 17). You will often see these triples in math textbooks and exercises. No doubt, (3, 4, 5) is used more than any other Pythagorean triple!
If you carefully look at the list above and examine it, you will also notice that a Pythagorean triple either has only even numbers or only one even number and two odd numbers.
The definition comes right from the Pythagorean Theorem which states that in any right triangle with sides a, b, and c, c2 = a2 + b2
Notice that c is the longest side or the hypotenuse of a right triangle and a and b are legs of a right triangle.
- The biggest number is 29, so c = 29. The other two numbers are a = 20 and b = 21.
- Find a2 + b2: 202 + 212 = 400 + 441 = 841.
- Find c2: 292 = 841.
- Both sides are 841, so a2 + b2 = c2.
Yes, (20, 21, 29) is a Pythagorean triple.
Using the wrong number as c. To check (5, 3, 4), don't compute 52 + 32 = 34 and compare it with 42 = 16. The biggest number, 5, is always c: 32 + 42 = 25 = 52, so it is a triple.
Is (9, 40, 41) a Pythagorean triple?
Show answer
Yes. 92 + 402 = 81 + 1,600 = 1,681, and 412 = 1,681.
How to Find Pythagorean Triples
Example #1: 32 + 42 = 52
The triple (3, 4, 5) is the smallest Pythagorean triple. We can use it to find one or more triples.
Notice that 32 + 42 = 9 + 16 = 25 and 52 = 25
How would you generate another triple?
Just multiply both sides of the equation below by 22
32 + 42 = 52
22 × 32 + 22 × 42 = 22 × 52
(2 × 3)2 + (2 × 4)2 = (2 × 5)2
62 + 82 = 102 and the Pythagorean triple is (6, 8, 10)
You could have found the answer a lot faster than that by multiplying each number of the triple (3, 4, 5) by 2.
In general, once you have a triple, you can multiply this triple by any positive integer to generate another one.
Example #2: 52 + 122 = 132
The triple is (5, 12, 13)
Notice again that if 52 + 122 = 132, then 25 + 144 is indeed equal to 169
How would you generate another triple?
Just multiply both sides of the equation below by 32 this time.
52 + 122 = 132
32 × 52 + 32 × 122 = 32 × 132
(3 × 5)2 + (3 × 12)2 = (3 × 13)2
152 + 362 = 392
Again, you could have found the answer a lot faster by multiplying each number of the triple (5, 12, 13) by 3.
Here is a little exercise: Is (4, 5, 7) a triple?
Is 42 + 52 = 72?
42 + 52 = 16 + 25 = 41. However, 72 = 49.
So, (4, 5, 7) is not a triple.
Multiply each number of (7, 24, 25) by 2. Which triple do you get?
Show answer
(14, 48, 50). 2 × 7 = 14, 2 × 24 = 48 and 2 × 25 = 50. Check: 196 + 2,304 = 2,500 = 502.
Primitive Pythagorean Triples
If the greatest common factor of a, b, and c of a triple (a, b, c) is equal to 1, then the triple is a primitive Pythagorean triple.
For example, (5, 12, 13) is a primitive Pythagorean triple. However, (9, 12, 15) is a non-primitive Pythagorean triple since the greatest common factor of 9, 12, and 15 is 3.
Is (12, 16, 20) a primitive Pythagorean triple?
Show answer
No. The greatest common factor of 12, 16 and 20 is 4. It is (3, 4, 5) multiplied by 4.
Plato's Formula for Generating Pythagorean Triples
Plato, a Greek philosopher, came up with a great formula for finding Pythagorean triples.
To get a triple, just let m be any integer bigger than 1 and do the math.
Let m = 2 for instance, we get:
(2m)2 + (m2 − 1)2 = (m2 + 1)2
(2 × 2)2 + (22 − 1)2 = (22 + 1)2
(4)2 + (4 − 1)2 = (4 + 1)2
(4)2 + (3)2 = (5)2
Thus, the Pythagorean triple is (3, 4, 5)
Let m = 5 for instance, we get:
(2m)2 + (m2 − 1)2 = (m2 + 1)2
(2 × 5)2 + (52 − 1)2 = (52 + 1)2
(10)2 + (25 − 1)2 = (25 + 1)2
(10)2 + (24)2 = (26)2
Thus, the triple is (10, 24, 26)
Indeed (10)2 + (24)2 = 100 + 576 = 676 and 262 = 26 × 26 = 676
Which triple does Plato's formula give for m = 3?
Show answer
(6, 8, 10). 2m = 6, m2 − 1 = 8 and m2 + 1 = 10.
Euclid's Formula for Generating Pythagorean Triples
If m and n are arbitrary positive integers with m > n > 0, then you can use the following formula to find both primitive and non-primitive triples:
Let m = 2 and n = 1
a = 22 − 12 = 4 − 1 = 3
b = 2(2)(1) = 4
c = 22 + 12 = 4 + 1 = 5
We get the primitive Pythagorean triple (3, 4, 5)
Let m = 3 and n = 2
a = 32 − 22 = 9 − 4 = 5
b = 2(3)(2) = 12
c = 32 + 22 = 9 + 4 = 13
We get the primitive Pythagorean triple (5, 12, 13)
Let m = 6 and n = 2
a = 62 − 22 = 36 − 4 = 32
b = 2(6)(2) = 24
c = 62 + 22 = 36 + 4 = 40
We get the non-primitive Pythagorean triple (32, 24, 40)
Choosing m equal to n, or m smaller than n. Then a = m2 − n2 is 0 or negative, and a triple needs numbers bigger than zero. Always pick m > n.
Use Euclid's formula with m = 4 and n = 1. What triple do you get?
Show answer
(15, 8, 17). a = 16 − 1 = 15, b = 2(4)(1) = 8 and c = 16 + 1 = 17.
Summary
- A Pythagorean triple (a, b, c) is three whole numbers bigger than zero with a2 + b2 = c2. The biggest number, c, is listed last.
- To check a triple, compare a2 + b2 with c2, using the biggest number as c.
- Multiply every number of a triple by the same positive integer to get another triple.
- A triple is primitive when the greatest common factor of its three numbers is 1.
- Plato's formula, (2m)2 + (m2 − 1)2 = (m2 + 1)2, and Euclid's formula, a = m2 − n2, b = 2mn, c = m2 + n2, generate triples.
Test Yourself: Interactive 10-Question Quiz
Now check what you learned. Every answer is explained, and each time you play you get new questions.
Quiz Complete!