• Foundation
  • About 15 min
  • 5 practice questions

Baudhāyana triples and Fermat's Last Theorem

Recognise whole-number right-triangle triples, make new ones by scaling and from odd square numbers, tell primitive triples apart, and learn about Fermat's famous problem.

If something looks wrong, please tell us.

By the end of this lesson you can

  • Check whether three whole numbers form a Baudhāyana triple.
  • Make new triples by scaling, and identify primitive triples.
  • Generate triples from odd square numbers using (n − 1)² + (2n − 1) = n².

Most right triangles have at least one side that is not a whole number. But some are special: all three sides are whole numbers, like 3, 4 and 5. Baudhāyana listed several such sets in his Śulba-Sūtra, which made it easy to set out exact right angles with ropes. A set of positive whole numbers (a, b, c) with a² + b² = c² is called a Baudhāyana triple (also a Baudhāyana-Pythagoras triple or Pythagorean triple).

Worked example 1: is it a triple?

(a) (8, 15, 17): 8² + 15² = 64 + 225 = 289, and 17² = 289. Equal, so yes.

(b) (6, 9, 11): 6² + 9² = 36 + 81 = 117, but 11² = 121. Not equal, so no.

Always test the largest number as c, because the hypotenuse is the longest side.

Scaling a triple

(3, 4, 5) is a triple. So are (6, 8, 10), (9, 12, 15) and (30, 40, 50). In general, if (a, b, c) is a triple and k is any positive whole number, then (ka, kb, kc) is a triple too, because

(ka)² + (kb)² = k²a² + k²b² = k²(a² + b²) = k²c² = (kc)².

So there are infinitely many triples. A triple whose three numbers have no common factor greater than 1 is called primitive. (3, 4, 5) and (5, 12, 13) are primitive; (9, 12, 15) is not, because 3 divides all three, and dividing by 3 takes it back to (3, 4, 5). Every triple is either primitive or a scaled version of a primitive one.

All Baudhāyana triples with numbers up to 20
TripleCheckPrimitive?
(3, 4, 5)9 + 16 = 25Yes
(6, 8, 10)36 + 64 = 100No (2 × (3, 4, 5))
(5, 12, 13)25 + 144 = 169Yes
(9, 12, 15)81 + 144 = 225No (3 × (3, 4, 5))
(8, 15, 17)64 + 225 = 289Yes
(12, 16, 20)144 + 256 = 400No (4 × (3, 4, 5))

Baudhāyana triples

  • Primitive triples
    • (3, 4, 5)
    • (5, 12, 13)
    • (8, 15, 17)
    • (7, 24, 25)
  • Scaled versions
    • (6, 8, 10) = 2 × (3, 4, 5)
    • (15, 36, 39) = 3 × (5, 12, 13)
    • (16, 30, 34) = 2 × (8, 15, 17)
Find the primitive triples and every other triple follows by scaling.

Making triples from odd squares

Recall that the sum of the first n odd numbers is n²: 1 = 1², 1 + 3 = 2², 1 + 3 + 5 = 3², and so on. The nth odd number is 2n − 1, and the first n − 1 odd numbers add up to (n − 1)². So (n − 1)² + (2n − 1) = n². (You can also check this by expanding: n² − 2n + 1 + 2n − 1 = n².) Now, if the odd number 2n − 1 is itself a perfect square, the equation says that two squares add up to a square, which gives a triple.

(n − 1)² + (2n − 1) = n². When 2n − 1 is a perfect square, this gives a Baudhāyana triple.

Worked example 2: from the odd square 49

49 = 7² is odd. Solve 2n − 1 = 49: 2n = 50, n = 25. Then n − 1 = 24, and the equation reads 24² + 49 = 25², that is 24² + 7² = 25².

Check: 576 + 49 = 625 = 25². The triple is (7, 24, 25).

With 81 = 9²: 2n − 1 = 81 gives n = 41, so 40² + 9² = 41². Check: 1600 + 81 = 1681 = 41². The triple is (9, 40, 41).

In every triple made this way, the two larger numbers are consecutive (24 and 25, 40 and 41). Consecutive numbers have no common factor greater than 1, so these triples are always primitive. But the method does not give every primitive triple: (8, 15, 17) and (20, 21, 29) cannot be made this way, because their two larger numbers are not consecutive.

A problem that took 350 years

Since infinitely many squares are sums of two squares, the French mathematician Pierre de Fermat, in the 17th century, asked: can a cube be the sum of two cubes, or a fourth power the sum of two fourth powers? He claimed that xⁿ + yⁿ = zⁿ has no solution in positive whole numbers when n is greater than 2, and wrote in the margin of a book that he had a marvellous proof which the margin was too small to contain. No such proof was ever found. Mathematicians tried for more than three centuries, until Andrew Wiles, who had read about the problem as a ten-year-old, proved this 'Fermat's Last Theorem' in 1994.

Key takeaways: a Baudhāyana triple is three whole numbers with a² + b² = c². Multiplying a triple by any whole number gives another triple; primitive triples have no common factor. Odd squares 2n − 1 produce triples (2n − 1 as a square, n − 1, n). For powers above 2, Fermat's Last Theorem says no such whole-number solutions exist.

Check your understanding

  1. 1. Which of these is a Baudhāyana triple?

    1. (4, 5, 6)
    2. (6, 9, 11)
    3. (7, 24, 25)
    4. (5, 10, 15)
    Show answer

    Answer: C. 7² + 24² = 49 + 576 = 625 = 25². For (4, 5, 6): 16 + 25 = 41, not 36. For (6, 9, 11): 36 + 81 = 117, not 121. For (5, 10, 15): 25 + 100 = 125, not 225.

  2. 2. Which of these Baudhāyana triples is primitive?

    1. (10, 24, 26)
    2. (8, 15, 17)
    3. (9, 12, 15)
    4. (12, 16, 20)
    Show answer

    Answer: B. 8, 15 and 17 have no common factor greater than 1, so (8, 15, 17) is primitive. (10, 24, 26) shares the factor 2, (9, 12, 15) shares 3, and (12, 16, 20) shares 4.

  3. 3. Each number of (8, 15, 17) is multiplied by 4. What is the hypotenuse of the new triple?

    1. 68
    2. 289
    3. 21
    4. 64
    Show answer

    Answer: A. The new triple is (32, 60, 68), so the hypotenuse is 17 × 4 = 68. Check: 32² + 60² = 1024 + 3600 = 4624 = 68².

  4. 4. Using (n − 1)² + (2n − 1) = n² with the odd square 169 = 13², which triple do you get?

    1. (13, 85, 86)
    2. (12, 84, 85)
    3. (13, 168, 169)
    4. (13, 84, 85)
    Show answer

    Answer: D. 2n − 1 = 169 gives n = 85, so n − 1 = 84. Then 84² + 13² = 85². Check: 7056 + 169 = 7225 = 85². The triple is (13, 84, 85).

  5. 5. What does Fermat's Last Theorem say?

    1. x² + y² = z² has no solution in whole numbers
    2. Every whole number is a sum of two squares
    3. xⁿ + yⁿ = zⁿ has no solution in positive whole numbers when n is greater than 2
    4. There are only a few Baudhāyana triples
    Show answer

    Answer: C. Fermat claimed, and Andrew Wiles proved in 1994, that xⁿ + yⁿ = zⁿ has no positive whole-number solutions for n greater than 2. For n = 2 there are infinitely many solutions: the Baudhāyana triples.

Privacy · Terms · Refunds · Delivery