Search the complete library

What do you want to learn or calculate?

Quick linksAll calculatorsMath subjectsPractice questionsFormula library
← Geometry formulas

Pythagorean theorem

Relate the legs and hypotenuse of a right triangle.

  • Geometry
  • Triangles
  • Middle school · High school
Geometry · Triangles
$$a^2+b^2=c^2$$

Pythagorean theorem is one of 5 triangles formulas in the geometry section of this library, and it is used at middle school · high school level.

Why pythagorean theorem works

Take four copies of the right triangle and set them inside a square whose side is the two legs end to end. The uncovered part is a tilted square built on the hypotenuse. Slide the same four triangles into a different arrangement and the uncovered part becomes two squares, one on each leg, so those two squares must together match the tilted one.

What each symbol means

$a,b$ are perpendicular legs and $c$ is the hypotenuse.

Pythagorean theorem: when it holds

The triangle must be right and $c$ must be opposite the right angle.

When it stops applying

The right angle is the entire condition. In a triangle with sides 6, 8 and 11 the largest angle is obtuse, and 36 plus 64 gives 100 while the square on the longest side is 121, so the relation fails outright and the law of cosines is needed instead.

Pythagorean theorem: a worked example

Legs $6$ and $8$ give $c=\sqrt{36+64}=10$.

The mistake to avoid

What people do: Treating the two given sides as the legs when one of them is actually the hypotenuse.

Why it goes wrong: Adding a leg and the hypotenuse squared gives a number that is far too big: with a leg of 6 and a hypotenuse of 10 it produces 136 instead of the correct 64 for the missing leg squared.

Do this instead: Locate the side opposite the right angle first. That one is always the hypotenuse, and it is always the longest of the three.

Pythagorean theorem: step by step

  1. Name the unknown, and the unit the answer has to come out in.
  2. Match the symbols to your values. $a,b$ are perpendicular legs and $c$ is the hypotenuse.
  3. Check the conditions before substituting. The triangle must be right and $c$ must be opposite the right angle.
  4. Substitute, keep exact values to the last line, then test the sign, size, and unit against a rough estimate — the check that catches most geometry slips.

Where this formula fits

Subject
Geometry formulas — 30 entries in this library
Topic
Triangles
Level
Middle school · High school

Formulas are easiest to keep when they sit inside a method rather than on a list. Use the links below to see where pythagorean theorem comes from, to check a calculation against a tool, and to practise it until you can recall it without looking.

Questions about pythagorean theorem

How can I check whether three lengths make a right triangle?

Square all three and see whether the two smaller squares add up to the largest. Sides 9, 40 and 41 pass this test, while 9, 40 and 42 do not.

Does it hold for a triangle drawn on a globe?

No. On a curved surface the angles of a triangle do not add to 180 degrees and the relation changes, because this is a statement about flat geometry only.

Which side triples are worth memorizing?

The sets 3-4-5, 5-12-13, 8-15-17 and 7-24-25, together with any whole multiple of them, such as 6-8-10 or 10-24-26.

Can the hypotenuse ever equal the two legs added together?

No. That would flatten the triangle into a straight segment, so the hypotenuse is always strictly shorter than the sum of the two legs.

Stuck on a problem?

Work a pythagorean theorem problem step by step

Type your own problem, or upload a photo of it. You get the method, the answer, and a check you can repeat yourself.