Chapter 12 · The Pythagorean theorem

Pythagorean Triples and the Right Triangle Test

Learn what a Pythagorean triple is and how to test three side lengths to decide whether they form a right triangle.

16 min read

Can three side lengths alone tell you that a triangle has a right angle? In this lesson you learn a test that answers that question. It starts from a fact you have already met, the Pythagorean theorem.

A right triangle is a triangle with one right angle (90∘90^\circ). The two sides that form the right angle are the legs, and the side opposite the right angle is the hypotenuse. Let aa and bb be the lengths of the legs and cc the length of the hypotenuse. All three are positive lengths measured in the same unit. The theorem says that in every right triangle, the squares of the two leg lengths add up to the square of the hypotenuse length. Here a2a^2 means a×aa \times a. This lesson uses the theorem as a known fact and does not prove it.

a2+b2=c2(right triangle with hypotenuse c)a^2 + b^2 = c^2 \quad \text{(right triangle with hypotenuse } c\text{)}

The theorem starts with a right triangle and ends with an equation. In this lesson you go the other way: you start with three numbers, test them in the equation, and decide what the result tells you.

Begin with whole numbers. A Pythagorean triple is a set of three positive whole numbers aa, bb and cc that make a2+b2=c2a^2 + b^2 = c^2 true. Positive whole numbers are the counting numbers 11, 22, 33 and so on. A well-known triple is 33, 44, 55. The two smaller squares are 32=93^2 = 9 and 42=164^2 = 16, and they add to 9+16=259 + 16 = 25. The largest square is 52=255^2 = 25. The two smaller squares add up exactly to the largest square, and that exact match is what makes a triple.

Before you test three numbers, you must decide which one takes the place of cc. It is always the largest, and here is why. In a2+b2=c2a^2 + b^2 = c^2 with positive numbers aa, bb and cc, the number c2c^2 equals a2a^2 plus the positive number b2b^2, so c2c^2 is greater than a2a^2. In the same way, c2c^2 is greater than b2b^2. Squaring keeps positive numbers in the same order, because a larger positive number times itself gives a larger product. So the number with the greatest square is the greatest number, and that number is cc.

The check for a triple therefore has three parts: all three numbers are positive whole numbers, the largest is cc, and a2+b2a^2 + b^2 equals c2c^2 exactly. If any part fails, the numbers are not a Pythagorean triple.

Worked example

Checking for a Pythagorean triple

Is 88, 1515, 1717 a Pythagorean triple?

  1. Check the kind of numbers. A Pythagorean triple needs three positive whole numbers, and 88, 1515 and 1717 are all positive whole numbers.

  2. Choose cc. The largest number is 1717, so it takes the place of cc. Only the largest can, because c2c^2 is the sum of two positive squares, so it is greater than each of them.

    a=8,b=15,c=17a = 8,\quad b = 15,\quad c = 17
  3. Square the two smaller numbers and add the results to get a2+b2a^2 + b^2, the left side of the equation. Here 8×8=648 \times 8 = 64 and 15×15=15×10+15×5=150+75=22515 \times 15 = 15 \times 10 + 15 \times 5 = 150 + 75 = 225.

    82+152=64+225=2898^2 + 15^2 = 64 + 225 = 289
  4. Square the largest number to get c2c^2, the right side. Split the product to make it easier: 17×17=17×10+17×7=170+119=28917 \times 17 = 17 \times 10 + 17 \times 7 = 170 + 119 = 289.

    172=28917^2 = 289
  5. Compare the two results. Both are exactly 289289, so a2+b2=c2a^2 + b^2 = c^2 is true for these numbers.

    82+152=1728^2 + 15^2 = 17^2

Answer

Yes. 88, 1515, 1717 is a Pythagorean triple, because the numbers are positive whole numbers and 82+152=1728^2 + 15^2 = 17^2, with both sides equal to 289289.

The same check works on any three positive numbers. The table tests each set with its largest number in the place of cc, wherever that number sits in the list. Look closely at the last two rows. A set is not a Pythagorean triple when the two smaller squares do not add up to the largest square. It is also not a triple when they do add up to it but the numbers are not all positive whole numbers.

Testing sets of three numbers for a Pythagorean triple
NumbersLargest numberSum of the two smaller squaresLargest squareEqual?Pythagorean triple?
33, 44, 55
55
9+16=259 + 16 = 25
52=255^2 = 25
Yes
Yes
55, 1212, 1313
1313
25+144=16925 + 144 = 169
132=16913^2 = 169
Yes
Yes
1010, 66, 88
1010
36+64=10036 + 64 = 100
102=10010^2 = 100
Yes
Yes
77, 2424, 2525
2525
49+576=62549 + 576 = 625
252=62525^2 = 625
Yes
Yes
44, 55, 66
66
16+25=4116 + 25 = 41
62=366^2 = 36
No
No, because 41≠3641 \neq 36
1.51.5, 22, 2.52.5
2.52.5
2.25+4=6.252.25 + 4 = 6.25
2.52=6.252.5^2 = 6.25
Yes
No, because 1.51.5 and 2.52.5 are not whole numbers

Now connect the numbers to triangles. The Pythagorean theorem is an if-then statement: if a triangle is a right triangle with legs aa and bb and hypotenuse cc, the side opposite the right angle, then a2+b2=c2a^2 + b^2 = c^2.

The converse of an if-then statement swaps the two parts. A converse is a new statement, and it is not automatically true. For example, if a whole number ends in the digit 0, then it is even is true. Its converse, if a whole number is even, then it ends in the digit 0, is false, because 1212 is even and does not end in 00.

The converse of the Pythagorean theorem is true: if a triangle has positive side lengths aa, bb and cc, with cc the largest, and a2+b2=c2a^2 + b^2 = c^2, then it is a right triangle, and its right angle is opposite the side of length cc. In this lesson you use the converse as a known fact. It tells you that every Pythagorean triple gives the side lengths of a right triangle. For example, a triangle with sides 33, 44 and 55 units long is a right triangle.

Key concept

The side-length test for a right triangle

Take three positive lengths in the same unit. Call the largest cc and the other two aa and bb. Compute the squares exactly, then compare a2+b2a^2 + b^2 with c2c^2.

  • Equal: the lengths form a right triangle, and the right angle is opposite the side of length cc. This is the converse of the Pythagorean theorem.
  • Not equal: the lengths cannot form a right triangle. If they did, the hypotenuse, the side opposite the right angle, would be the longest side cc, and the theorem would make the two results equal.

Lengths are never negative, so a length is the nonnegative square root of its square, and the longest side has the greatest square. If the numbers are positive whole numbers and the results are equal, they are also a Pythagorean triple.

a2+b2=c2with c the largest lengtha^2 + b^2 = c^2 \quad \text{with } c \text{ the largest length}

Worked example

A near miss

A triangle has side lengths 88 cm, 99 cm and 1212 cm. Is it a right triangle?

  1. Check the conditions and choose cc. All three lengths are positive and in centimeters. The largest is 1212, so c=12c = 12. If this triangle had a right angle, the side opposite it, the hypotenuse, would be the longest side, so the 1212 cm side is the only one that could be the hypotenuse.

    a=8,b=9,c=12a = 8,\quad b = 9,\quad c = 12
  2. Square the two shorter lengths exactly and add the results to get a2+b2a^2 + b^2. Each square is a number of square centimeters.

    82+92=64+81=1458^2 + 9^2 = 64 + 81 = 145
  3. Square the longest length to get c2c^2, also in square centimeters.

    122=14412^2 = 144
  4. Compare the two results. They differ by only 11, but the test needs exact equality, so close does not count. The Pythagorean theorem says that a right triangle with hypotenuse 1212 cm and legs 88 cm and 99 cm would make the results equal. They are not equal, so this triangle is not a right triangle.

    145≠144145 \neq 144

Answer

No. The triangle with sides 88 cm, 99 cm and 1212 cm is not a right triangle, because 82+92=1458^2 + 9^2 = 145 and 122=14412^2 = 144 are not equal.

Worked example

Decimal lengths in a mixed order

A triangle has side lengths 6.56.5 cm, 2.52.5 cm and 66 cm. Is it a right triangle? Are the numbers 6.56.5, 2.52.5, 66 a Pythagorean triple?

  1. The lengths are positive and in the same unit. The largest is 6.56.5, so it is cc, even though it comes first in the list.

    a=2.5,b=6,c=6.5a = 2.5,\quad b = 6,\quad c = 6.5
  2. Square the two shorter lengths exactly, without rounding, and add. Here 2.5×2.5=2.5×2+2.5×0.5=5+1.25=6.252.5 \times 2.5 = 2.5 \times 2 + 2.5 \times 0.5 = 5 + 1.25 = 6.25.

    2.52+62=6.25+36=42.252.5^2 + 6^2 = 6.25 + 36 = 42.25
  3. Square the longest length exactly. Here 6.5×6.5=6.5×6+6.5×0.5=39+3.25=42.256.5 \times 6.5 = 6.5 \times 6 + 6.5 \times 0.5 = 39 + 3.25 = 42.25.

    6.52=42.256.5^2 = 42.25
  4. Compare. Both results are exactly 42.2542.25, so by the converse of the Pythagorean theorem this is a right triangle. Its right angle is opposite the longest side.

    2.52+62=6.522.5^2 + 6^2 = 6.5^2
  5. Check for a triple. A Pythagorean triple needs positive whole numbers, and 6.56.5 and 2.52.5 are not whole numbers.

Answer

Yes, it is a right triangle, with the right angle opposite the 6.56.5 cm side. The numbers are not a Pythagorean triple, because 6.56.5 and 2.52.5 are not whole numbers.

Here is the idea to keep. Take three positive lengths, call the largest cc, and compare a2+b2a^2 + b^2 with c2c^2 using exact squares. If the two results are equal, the converse of the Pythagorean theorem tells you the lengths form a right triangle, with the right angle opposite the side of length cc. If they are not equal, the lengths cannot form a right triangle. When the three numbers are also positive whole numbers and the results are equal, they are a Pythagorean triple.

So far you have used the converse as a known fact. In the next lesson, you will explain a proof of it.