Pythagorean Triples: Definition Formula List and Examples

#Pythagorean Triples
TL;DR
A Pythagorean triple is three positive whole numbers (a,b,c)(a, b, c) with a2+b2=c2a^2 + b^2 = c^2, such as (3, 4, 5). Euclid's formula makes as many as you want; six worked examples follow.
Kota Jaya Mounika·reviewed byMadhukar VLast updated on December 2, 202614 min read

Key Points

  • Test: square the two smaller numbers, add, and compare with the square of the largest.
  • A triple is primitive if the three numbers share no common factor; (3, 4, 5) is primitive, (6, 8, 10) is not.
  • Euclid's formula, m2−n2m^2 - n^2, 2mn2mn, m2+n2m^2 + n^2 with m>nm > n, gives a triple every time.
  • There are 16 primitive triples with hypotenuse up to 100, and infinitely many in all.

The Oldest Right-Angle Trick in the World

A tape measure and the numbers 3, 4 and 5 can mark a perfect square corner on any site.

  • Measure 3 units along one edge and 4 along the other. If the gap between the ends is exactly 5, the corner is square.
  • Those three numbers are the most famous Pythagorean triple: three whole numbers that fit a right triangle exactly.
  • Such triangles are rare. Of the 210 pairs of legs from 1 to 20, only 7 give a whole-number hypotenuse. Legs 1 and 1 give 2\sqrt{2}; legs 2 and 3 give 13\sqrt{13}.
the Pythagorean triples 3, 4, 5 and 5, 12, 13 drawn as right triangles with whole-number sides
Two right triangles drawn on dot grids: legs 3 and 4 with hypotenuse 5, and legs 5 and 12 with hypotenuse 13, every side a whole number.

The rare cases follow a formula Euclid wrote down, hide inside the unit circle, and obey patterns with no exceptions.

What Are Pythagorean Triples?

A Pythagorean triple is a set of three positive integers (a,b,c)(a, b, c) that satisfy a2+b2=c2a^2 + b^2 = c^2.

  • The two smaller numbers are the legs of a right-angled triangle; the largest, cc, is the hypotenuse.
  • The rule is the Pythagoras theorem. A triple is the special case where all three sides are whole.
  • The smallest is (3,4,5)(3, 4, 5): 9+16=25=529 + 16 = 25 = 5^2.

What makes three numbers a Pythagorean triple?

The test is one equation. Square the two smaller numbers, add them, and compare with the square of the largest.

  • For (8, 15, 17): 64+225=289=17264 + 225 = 289 = 17^2, so it is a triple.
  • By the converse of the Pythagoras theorem, any three numbers that pass really do make a right triangle. That is why the tape-measure trick works.

Primitive and Non-Primitive Triples

Triples come in two kinds, and telling them apart matters.

  • A primitive triple has no common factor bigger than 1, like (3,4,5)(3, 4, 5).
  • A non-primitive triple is a multiple of a primitive one, like (6,8,10)(6, 8, 10), where 2 divides all three.
  • Multiplying works because (ka)2+(kb)2=k2(a2+b2)=(kc)2(ka)^2 + (kb)^2 = k^2(a^2 + b^2) = (kc)^2.
  • So (3, 4, 5) seeds (6, 8, 10), (9, 12, 15), (12, 16, 20) and so on forever: the same triangle at different sizes.
multiplying the primitive triple 3, 4, 5 by 1, 2 and 3 gives a family of similar right triangles
Three nested right triangles sharing a corner: 3-4-5 in orange, 6-8-10 in blue and 9-12-15 in green, with the checks 9 + 16 = 25, 36 + 64 = 100 and 81 + 144 = 225.

Try It Yourself

Load 3-4-5, 6-8-10 and 5-12-13: the readout announces a triple whenever cc comes out whole. Then drag the handles to other legs and see how rarely that happens.

The Pythagorean Triples Formula

The most reliable way to make triples is Euclid's formula. Pick whole numbers m>n>0m > n > 0:

a=m2−n2,b=2mn,c=m2+n2a = m^2 - n^2, \qquad b = 2mn, \qquad c = m^2 + n^2
  • m=2m = 2, n=1n = 1 gives (3, 4, 5). m=3m = 3, n=2n = 2 gives (5, 12, 13).
  • It appears in Euclid's Elements, Book X, as a way of "finding two square numbers whose sum is also a square".

Why it works. Expand both sides:

(m2−n2)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
Euclid's formula gives a primitive triple when m and n share no factor and one is even
A table of Euclid's formula for m from 2 to 6 and n from 1 to 5. Primitive results such as 3, 4, 5 and 5, 12, 13 and 15, 8, 17 are shaded orange; non-primitive results such as 8, 6, 10 and 16, 30, 34 are shaded grey.
  • Primitive when: mm and nn share no factor and one of them is even. Both odd (m=3m = 3, n=1n = 1) gives (8, 6, 10), which is (3, 4, 5) doubled.
  • Every triple? Every primitive triple comes from one pair (m,n)(m, n). For the rest, add a multiplier kk. Without it, (9, 12, 15) is missed, since 15 is not m2+n2m^2 + n^2.

A second way to see it: points on the unit circle

Divide a2+b2=c2a^2 + b^2 = c^2 by c2c^2 to get (ac)2+(bc)2=1\left(\tfrac{a}{c}\right)^2 + \left(\tfrac{b}{c}\right)^2 = 1, the unit circle.

  • So every triple is a point on the circle with fraction coordinates: (3, 4, 5) is (35,45)\left(\tfrac{3}{5}, \tfrac{4}{5}\right).
  • A line from (−1,0)(-1, 0) with fraction slope tt meets the circle at (1−t21+t2,2t1+t2)\left(\tfrac{1 - t^2}{1 + t^2}, \tfrac{2t}{1 + t^2}\right).
  • Slope 12\tfrac{1}{2} lands on (35,45)\left(\tfrac{3}{5}, \tfrac{4}{5}\right). Write t=nmt = \tfrac{n}{m}, clear denominators, and Euclid's formula drops out.
Pythagorean triples are the points on the unit circle with fraction coordinates
The upper half of the unit circle with two lines from the point (−1, 0): slope 1/2 meets the circle at (3/5, 4/5) and slope 2/3 meets it at (5/13, 12/13). Clearing the denominators gives the triples 3, 4, 5 and 5, 12, 13.

Shortcuts from a single number

  • Odd leg x≥3x \geq 3: (x, x2−12, x2+12)\left(x,\ \tfrac{x^2 - 1}{2},\ \tfrac{x^2 + 1}{2}\right). For x=9x = 9: (9, 40, 41).
  • Even leg x≥4x \geq 4: (x, (x2)2−1, (x2)2+1)\left(x,\ \left(\tfrac{x}{2}\right)^2 - 1,\ \left(\tfrac{x}{2}\right)^2 + 1\right). For x=8x = 8: (8, 15, 17). For x=6x = 6 it gives (6, 8, 10), not primitive.
  • Together they show every whole number from 3 up is a leg of some triple. 1 and 2 never are.

The List of Common Pythagorean Triples

There are exactly 16 primitive triples with a hypotenuse of 100 or less:

(3, 4, 5) (5, 12, 13) (8, 15, 17) (7, 24, 25)
(20, 21, 29) (12, 35, 37) (9, 40, 41) (28, 45, 53)
(11, 60, 61) (16, 63, 65) (33, 56, 65) (48, 55, 73)
(13, 84, 85) (36, 77, 85) (39, 80, 89) (65, 72, 97)
  • The first four are worth knowing on sight: they turn up again and again.
  • With multiples included there are 52 triples with c≤100c \le 100.
  • 65 and 85 are each the hypotenuse of two primitives, and every hypotenuse is odd. The next section explains why.
every Pythagorean triple with hypotenuse up to 100 plotted as a point
A scatter plot of all 52 Pythagorean triples with hypotenuse up to 100, each drawn as a point (a, b) and its mirror (b, a): 16 primitive triples in orange and their multiples in blue, lining up along rays from the origin.

Patterns Every Primitive Triple Obeys

These hold for every primitive triple, each for a short reason.

  • One leg is even, and the hypotenuse is odd. Squares leave remainder 0 or 1 on division by 4. Two odd legs would give remainder 2, which no square has.
  • The even leg is a multiple of 4. In Euclid's formula it is 2mn2mn, and one of mm, nn is even.
  • One leg is a multiple of 3. Squares leave 0 or 1 on division by 3, so two legs that are not multiples of 3 would sum to remainder 2.
  • One number is a multiple of 5, by the same remainder argument.
  • So a×b×ca \times b \times c is always a multiple of 60. For (3, 4, 5) it is exactly 60.

Examples of Pythagorean Triples

Six examples, from a quick check up to finding every triple for a given leg.

Example 1

Is (20, 21, 29) a Pythagorean triple? Is it primitive?

  1. 202+212=400+441=84120^2 + 21^2 = 400 + 441 = 841, and 292=84129^2 = 841.
  2. No number above 1 divides 20, 21 and 29.

Final answer: yes, and it is primitive. Its legs differ by just 1.

Example 2

Is (6, 8, 11) a Pythagorean triple?

  1. The tempting path: 6 and 8 look like the start of (6, 8, 10), so 11 seems "close enough".
  2. Run the check: 62+82=1006^2 + 8^2 = 100, but 112=12111^2 = 121.
  3. 100≠121100 \neq 121, so the guess fails. Legs 6 and 8 need 100=10\sqrt{100} = 10.

Final answer: no, (6, 8, 11) is not a triple.

Example 3

Make a non-primitive triple from (3, 4, 5) using a factor of 4.

  1. (3×4, 4×4, 5×4)=(12,16,20)(3 \times 4,\ 4 \times 4,\ 5 \times 4) = (12, 16, 20).
  2. Check: 144+256=400=202144 + 256 = 400 = 20^2.

Final answer: (12, 16, 20), a non-primitive triple.

Example 4

Use Euclid's formula with m=4m = 4 and n=1n = 1.

  1. a=16−1=15a = 16 - 1 = 15, b=2×4×1=8b = 2 \times 4 \times 1 = 8, c=16+1=17c = 16 + 1 = 17.
  2. Check: 225+64=289=172225 + 64 = 289 = 17^2.
  3. 4 and 1 share no factor and 4 is even, so it is primitive.
Euclid's formula with m equals 4 and n equals 1 gives the primitive triple 8, 15, 17
A right triangle with legs 15 and 8 and hypotenuse 17, made from Euclid's formula with m = 4 and n = 1, with the check 15² + 8² = 225 + 64 = 289 = 17².

Final answer: (8, 15, 17), primitive.

Example 5

Use Euclid's formula with m=5m = 5 and n=3n = 3. Is the result primitive?

  1. a=25−9=16a = 25 - 9 = 16, b=30b = 30, c=34c = 34.
  2. Both mm and nn are odd, so every output is even.

Final answer: (16, 30, 34), which is (8, 15, 17) doubled, so not primitive.

Example 6

Find every Pythagorean triple that has 9 as a leg.

  1. If 9 is a leg, c2−b2=81c^2 - b^2 = 81, so (c−b)(c+b)=81(c - b)(c + b) = 81.
  2. The factor pairs are 1×811 \times 81 and 3×273 \times 27 (9×99 \times 9 would make b=0b = 0).
  3. c−b=1c - b = 1, c+b=81c + b = 81 give c=41c = 41, b=40b = 40.
  4. c−b=3c - b = 3, c+b=27c + b = 27 give c=15c = 15, b=12b = 12.

Final answer: (9, 40, 41) and (9, 12, 15). This factor trick finds every triple for any leg.

Why Pythagorean Triples Matter

Triples exist in practice because builders needed right angles they could trust without a protractor.

  • Setting out right angles. Carpenters square up walls with 3-4-5 or a multiple like 6-8-10. The converse guarantees the corner.
  • Surveying. Right-angle layouts on land rely on the same whole-number check.
  • Grids. On squared paper or a screen, a straight line between grid points has whole length only when its steps form a triple: 3 across and 4 up is exactly 5.
  • Clean problems. Textbook writers pick triples so answers come out whole.
  • Number theory. Triples led to Fermat's Last Theorem, below.

A 3,800-Year-Old List: Plimpton 322

A Babylonian clay tablet, Plimpton 322, dated between 1800 and 1650 BCE and held at Columbia University, lists 15 rows of right-triangle sides.

  • In every row the sides form a whole-number triple. Row 4 is (12,709, 13,500, 18,541).
  • Nobody finds a triple that size by trial and error, so the scribe had a method. Historians still debate which.
the Babylonian tablet Plimpton 322 lists large Pythagorean triples
A table of five rows from the Babylonian tablet Plimpton 322: short side and diagonal as recorded, the long side worked out, and a check. Row 1 is 119, 169 with long side 120; row 4 is 12,709, 18,541 with long side 13,500.
  • Around 1637 Pierre de Fermat wrote that an+bn=cna^n + b^n = c^n has no whole-number solutions for any power above 2.
  • Andrew Wiles completed the proof in 1994, published in 1995. Squares have infinitely many solutions; cubes and higher powers have none.

The Mistakes Students Make Most Often

Most errors come from rushing the check or mishandling Euclid's formula.

Mistake 1: Adding the numbers instead of squaring them

Where it slips in: The quick check, when a student wants a fast answer.

Don't do this: Test whether a+b=ca + b = c.

The correct way: The test is a2+b2=c2a^2 + b^2 = c^2. In a real triangle a+ba + b is always more than cc, so the sum test can never pass.

Mistake 2: Putting the largest number in the wrong place

Where it slips in: Numbers listed out of order, such as (13, 5, 12).

Don't do this: Compute 132+5213^2 + 5^2 and compare it with 12212^2.

The correct way: Sort first. The largest number is cc and sits alone on the right.

Mistake 3: Handing in a multiple when a primitive triple is asked for

Where it slips in: "Give a primitive triple with an even leg of 8."

Don't do this: Answer (6, 8, 10).

The correct way: Check for a common factor and divide it out, or use the even-leg rule: (8, 15, 17).

Mistake 4: Assuming Euclid's formula without kk gives everything

Where it slips in: "Find a triple with hypotenuse 15."

Don't do this: Search for m2+n2=15m^2 + n^2 = 15, find nothing and say there is none.

The correct way: Allow a multiplier: 15=3×515 = 3 \times 5 and 5=22+125 = 2^2 + 1^2, so (9, 12, 15). The student who knows why the formula works catches this.

Conclusion

  • A Pythagorean triple is three positive integers with a2+b2=c2a^2 + b^2 = c^2; the largest is always the hypotenuse.
  • Primitive triples share no factor; every other triple is a scaled copy of one.
  • Euclid's formula makes them on demand, and the unit circle shows where it comes from.
  • Know (3, 4, 5), (5, 12, 13), (8, 15, 17) and (7, 24, 25) on sight.

A Practical Next Step

Work through these to lock in the idea.

  1. Is (9, 12, 15) a triple? Is it primitive?
  2. Use Euclid's formula with m=6m = 6 and n=1n = 1.
  3. Find every triple that has 15 as a leg. There are four.

Answer to Question 1: yes (81+144=22581 + 144 = 225), but not primitive: it is (3, 4, 5) times 3. Answer to Question 2: (35, 12, 37). Answer to Question 3: (15, 8, 17), (15, 20, 25), (15, 36, 39) and (15, 112, 113), from 225=1×225=3×75=5×45=9×25225 = 1 \times 225 = 3 \times 75 = 5 \times 45 = 9 \times 25. If Question 3 stalls, go back to Example 6.

To explore number patterns like these with a teacher, see Bhanzu's geometry tutor or high school math tutor.

Want your child to practise this with a live Bhanzu trainer? Book a free demo class.

Read More

Research Behind This Article

  1. Euclid, Elements, Book X, Proposition 29, Lemma 1 ("to find two square numbers such that their sum is also square"), with commentary by D. E. Joyce, Clark University. mathcs.clarku.edu
  2. J. J. O'Connor and E. F. Robertson, "Pythagoras's theorem in Babylonian mathematics" (including Plimpton 322), MacTutor History of Mathematics, University of St Andrews. mathshistory.st-andrews.ac.uk
  3. J. J. O'Connor and E. F. Robertson, "Fermat's last theorem", MacTutor History of Mathematics, University of St Andrews. mathshistory.st-andrews.ac.uk
  4. A. Wiles, "Modular elliptic curves and Fermat's Last Theorem", Annals of Mathematics 141 (1995), Princeton University. annals.math.princeton.edu

Quick Quiz: Check Yourself

Three levels, questions with figures, instant feedback with the reason.

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

What are the most common Pythagorean triples?
(3, 4, 5), (5, 12, 13), (8, 15, 17) and (7, 24, 25), plus multiples such as (6, 8, 10).
How many Pythagorean triples are there?
Infinitely many. Each primitive triple has endless multiples, and Euclid's formula gives endless primitive ones.
Can Pythagorean triples include a fraction or decimal?
No. All three must be positive whole numbers. Sides of 1.5, 2 and 2.5 make a right triangle, but that is (3, 4, 5) halved, not a triple.
Can all three numbers be odd?
No. A primitive triple always has exactly one even leg, and multiples keep at least one even number.
Does every odd number belong to a Pythagorean triple?
Yes. Every odd number from 3 up is the short leg of a primitive triple, found with the odd-leg shortcut.
✍️ Written By
Kota Jaya Mounika
Kota Jaya Mounika
Subject Matter Expert
Kota Jaya Mounika is a mathematics educator and content development professional with 2 years of experience. She previously worked as a Mathematics Instructor at NIAT, teaching B.Tech students and developing educational resources. At Bhanzu, she specializes in developing and reviewing mathematics content for Grades 6–8, focusing on conceptual understanding, problem-solving, and content accuracy. She is passionate about making mathematics simple, engaging, and accessible. She holds a B.Sc. in Mathematics and Statistics and a postgraduate degree in Computer Applications.
LinkedIn
🔬 Reviewed By
Madhukar V
Math Columnist & Analyst
Book a FREE Demo ClassBook Now →