Mathematics

Understanding the Pythagorean Theorem: A Step-by-Step Guide

Understanding the Pythagorean theorem: learn a² + b² = c² with a 5-step method, an add-or-subtract table, worked examples, quick checks and common mistakes.

Understanding the Pythagorean theorem: squares built on the sides of a 3-4-5 right triangle

The Pythagorean theorem says that in any right triangle, the two shorter sides squared add up to the longest side squared: a² + b² = c². Know any two sides, and you can find the third in under a minute.

That one line shows up on almost every geometry test, and the formula itself is rarely what costs students marks. Understanding the Pythagorean theorem really comes down to two decisions: which side is c, and whether you should add or subtract. Get those right and the rest is squaring and a square root.

This guide gives you a five-step method, a table that settles the add-or-subtract question, worked examples (including a real ladder safety rule), three quick checks that catch wrong answers, and the converse that builders use to test corners. You’ll finish with the mistakes to avoid and a short look at where the theorem came from.

To see how this formula fits into bigger scientific rules, explore our guide on how math and physics describe our world.

Quick answer

The Pythagorean theorem states that in a right triangle, a² + b² = c², with a and b as the legs meeting at the 90° corner and c as the hypotenuse facing that corner. To find c, add the squares of the legs and take the square root. To find a leg, subtract instead: a = √(c² − b²).

Key takeaways

  • Right triangles only: the formula needs one 90° angle.
  • c is the hypotenuse: always the side across from the right angle, and always the longest.
  • Add for c, subtract for a leg: the one decision most mistakes come from.
  • Check your answer: c must be longer than either leg but shorter than the two legs added together.
  • It works in reverse too: if three sides fit a² + b² = c², the triangle has a right angle.

What Does the Pythagorean Theorem Actually Say?

It says the area of a square built on the hypotenuse equals the areas of the squares built on the two legs, added together. The letters are just a short way to write that.

a² + b² = c²

Picture a triangle with legs of 3 cm and 4 cm. A square on the 3 cm side holds 9 small one-centimeter tiles, and a square on the 4 cm side holds 16. Put those 25 tiles together and they exactly fill a square on the hypotenuse, which must therefore be 5 cm long. That’s why the numbers get squared: you’re comparing areas, then turning the area back into a length with a square root.

Every right triangle has three sides with fixed jobs:

Side Letter How to spot it
Leg a One of the two sides that meet at the small square corner mark
Leg b The other side touching the right angle (a and b can swap freely)
Hypotenuse c The side that does not touch the right angle; always the longest

The theorem only holds when one angle is exactly 90°. For a triangle without a right angle, teachers move you on to the law of cosines.

Add or Subtract? Choosing the Right Version of the Formula

You add when the hypotenuse is missing and subtract when a leg is missing. That single rule replaces memorizing three formulas, because the other two are just a² + b² = c² rearranged, the same way you’d balance any equation in algebra.

You know You need Write it as Operation
Both legs (a, b) Hypotenuse c c = √(a² + b²) Square, add, square root
Hypotenuse c and leg b Leg a a = √(c² − b²) Square, subtract, square root
Hypotenuse c and leg a Leg b b = √(c² − a²) Square, subtract, square root
All three sides Is it a right triangle? Compare a² + b² with c² Square, add, compare

A quick memory hook: the hypotenuse is the biggest side, so finding it means building up (add). Finding a leg means taking a piece away from the biggest square (subtract).

How to Use the Pythagorean Theorem: 5 Steps

The method is the same for every problem: label, decide, square, combine, root. Write each step on its own line and you’ll rarely slip.

  1. Find the right angle and label c. The side across from the 90° mark is c. Label the other two sides a and b.
  2. Decide: add or subtract. Missing c? You’ll add. Missing a leg? You’ll subtract the known leg’s square from c².
  3. Square the two known sides. Squaring comes first, before any adding or subtracting. Keep the units in mind (cm stays cm, but squared values are cm²).
  4. Add or subtract the squares. This gives you the missing side squared, not the side itself.
  5. Take the square root, then check. Use √ on your result. Round only at the end, and run the quick checks further down this page.

The flowchart below shows the same five steps as a decision path, so you can see where the add-or-subtract split happens.

Missing c? Add. Missing a leg? Subtract.Label a, b and cIs c themissing side?Add the squaresc² = a² + b²Subtract the squaresa² = c² − b²Square root√ of that resultCheck the answerc longest, c < a + byesno, a leg is
Every path ends with a square root and a check; the only fork is whether c is the side you’re looking for.

Worked Example: Finding the Hypotenuse Step by Step

Here’s an example scenario with an answer that isn’t a neat whole number, because most real problems aren’t. A rectangular tablet screen is 12 inches wide and 8 inches tall. How long is its diagonal?

Step 1: Label the sides

The width and height meet at a right angle, so they’re the legs: a = 12 and b = 8. The diagonal crosses the corner, so it’s c.

Step 2: Decide to add

The missing side is the hypotenuse, so the plan is c = √(a² + b²).

Step 3: Square the legs

12² = 144 and 8² = 64.

Step 4: Add

144 + 64 = 208, so c² = 208.

Step 5: Take the square root and check

√208 ≈ 14.42 inches. Before trusting it, estimate: 14² = 196 and 15² = 225, so √208 must sit between 14 and 15, a bit closer to 14. It does. The answer is also longer than 12 and shorter than 12 + 8 = 20, which passes the checks below.

Notice that √208 never ends in neat decimals. Like pi, it’s an irrational number, which our guide on why pi never ends explains. Round to the place your teacher asks for, usually tenths or hundredths. The free Scientific Calculator has a √ key if you’d like to confirm it.

Finding a Missing Leg: A Real Ladder Safety Rule

To find a leg, square both known sides, subtract the smaller square from c², then take the square root. A real workplace rule makes a good test case.

The US Occupational Safety and Health Administration (OSHA) requires leaning ladders on construction sites to stand so the foot is about one-quarter of the ladder’s working length out from the top support. That working length is measured along the ladder itself, so it’s the hypotenuse.

You can read the exact wording in OSHA’s ladder standard, 29 CFR 1926.1053.

Say the working length is 16 feet. One-quarter of 16 is 4, so the foot sits 4 feet out. How high up the wall does the ladder rest?

  • c = 16 and a = 4, so b = √(16² − 4²)
  • 16² − 4² = 256 − 16 = 240
  • b = √240 ≈ 15.49 feet

The ladder reaches about 15.5 feet up. That’s shorter than the ladder (good, a leg can’t beat the hypotenuse) and taller than the 4-foot gap at the base. If you had added instead, you’d get √272 ≈ 16.49 feet, a wall height longer than the ladder itself, which is impossible.

3 Quick Checks That Catch Wrong Answers

These take ten seconds and catch the most common slip, adding when you should have subtracted.

Check What must be true Example that fails it
Longest side c is longer than both a and b Legs 5 and 12 giving c = 7
Shortcut rule c is shorter than a + b (a straight line beats a detour) Legs 3 and 4 giving c = 8
Square-root estimate Your answer sits between the two whole numbers whose squares surround c² √208 reported as 16.4 (but 16² = 256 is already too big)

If your answer for a leg comes out longer than the hypotenuse, you almost certainly added instead of subtracted. Go back to Step 2.

Pythagorean Triples: Answers You Can Spot Instantly

A Pythagorean triple is a set of three whole numbers that fit a² + b² = c². Recognizing one lets you skip the arithmetic, and multiples of a triple work too (double 3, 4, 5 and you get 6, 8, 10).

Triple Proof it works Common multiple
3, 4, 5 9 + 16 = 25 6, 8, 10
5, 12, 13 25 + 144 = 169 10, 24, 26
8, 15, 17 64 + 225 = 289 16, 30, 34
7, 24, 25 49 + 576 = 625 14, 48, 50
20, 21, 29 400 + 441 = 841 40, 42, 58

A tip for tests: if a problem’s legs are 9 and 12, divide by 3 to get 3 and 4. The hypotenuse is 5 × 3 = 15, no square roots needed.

The Converse: How to Test If a Corner Is Square

The converse says that if a triangle’s sides fit a² + b² = c², the angle opposite c is exactly 90°. It turns the theorem into a tool for checking corners with nothing but a tape measure.

Here’s an example scenario. You build a garden bed and measure 3 feet along one edge and 4 feet along the other. If the corner is square, the diagonal between those marks should be exactly 5 feet. Yours reads 5.1 feet.

  • 3² + 4² = 25
  • 5.1² = 26.01

The diagonal squared is too big, so the corner is a little wider than 90°. Push the long side in slightly and measure again. The same comparison sorts any triangle, with c as its longest side:

Compare Triangle type Largest angle
a² + b² = c² Right Exactly 90°
a² + b² > c² Acute Less than 90°
a² + b² < c² Obtuse More than 90°

Using the Theorem on a Graph and in 3D

The distance formula is the Pythagorean theorem in disguise. To find the distance between two points on a grid, the horizontal gap and the vertical gap are the legs, and the straight line between the points is the hypotenuse.

For the points (−2, 1) and (4, 9), the horizontal gap is 4 − (−2) = 6 and the vertical gap is 9 − 1 = 8. The distance is √(6² + 8²) = √100 = 10 units, a scaled-up 3-4-5 triangle.

d = √((x₂ − x₁)² + (y₂ − y₁)²)

The same idea stretches into three dimensions. For a box 4 inches long, 3 wide and 12 tall, the diagonal across the bottom is √(16 + 9) = 5, and the diagonal from a bottom corner to the opposite top corner is √(5² + 12²) = √169 = 13 inches. You simply use the theorem twice.

Where Did the Pythagorean Theorem Come From?

The theorem carries Pythagoras’s name, but the relationship was known long before him. The oldest evidence comes from Mesopotamia, not Greece.

When Who or what What it shows
1822 to 1762 BC Plimpton 322, a clay tablet from the city of Larsa Rows of Pythagorean triples, including 119, 120 and 169
Ancient Greece Euclid’s Elements, Book I, Proposition 47 A formal geometric proof using squares on each side
1876 James A. Garfield, then a US congressman A new proof using a trapezoid, published before he became the 20th president

Researchers at UNSW Sydney note that Plimpton 322 predates Pythagoras by about 1,000 years. It now sits in Columbia University’s Rare Book and Manuscript Library.

UNSW’s write-up of the tablet’s Pythagorean triples and their purpose covers the research in plain language.

Garfield’s proof is short enough to try yourself. He calculated the area of one trapezoid two ways, once as a trapezoid and once as three right triangles, then set the two answers equal and simplified to a² + b² = c².

The Mathematical Association of America walks through it in Garfield’s proof of the Pythagorean theorem, including the original 1876 journal page.

Common Pythagorean Theorem Mistakes and Myths

Most lost marks come from a handful of habits, not from the formula itself.

Mistake or myth What’s really true
“3 + 4 = c, so c = 7.” Square first, then add: 9 + 16 = 25, so c = 5. Adding the plain lengths skips the whole point of the theorem.
“The vertical side is always c.” c is the side across from the right angle, wherever the triangle is turned. A tilted drawing doesn’t change that.
Adding when a leg is missing Finding a leg means c² minus the known leg’s square. Adding gives a leg longer than the hypotenuse, which can’t happen.
Stopping at c² 169 = c² is not the answer. Take the square root: c = 13.
Rounding too early Keep the full value until the last step. Rounding √208 to 14 before reusing it can throw later answers off.
“It works on any triangle.” It needs exactly one 90° angle. On other triangles, a² + b² and c² won’t match.

Frequently Asked Questions

Does the Pythagorean theorem work for all triangles?

No, just right triangles. A quick test shows why: for sides 5, 6 and 8, the two smaller squares give 25 + 36 = 61, while 8² = 64. The totals miss, so there’s no 90° angle (this one is obtuse). Triangles like that need the law of cosines, a more general rule you meet in trigonometry.

How do I know which side is the hypotenuse?

Look for the small square drawn in one corner; that marks the right angle. The hypotenuse is the side that doesn’t touch that corner. It’s always the longest of the three sides, so if a problem gives you three lengths and no picture, the biggest number is c.

What if my answer isn’t a whole number?

That’s normal. Most right triangles give irrational answers such as √208, whose decimals never end. Leave the answer as a square root if the question asks for an exact value, or round to the place your teacher wants (tenths or hundredths are common). Round only at the very last step.

How do you do the Pythagorean theorem on a calculator?

Use the squaring key (often labeled x²) on each side you know, combine the two results, then hit √. Say the legs are 5 and 9: 25 + 81 = 106, and √106 ≈ 10.30. On most scientific calculators you can enter √(5² + 9²) in a single line, as long as the bracket wraps the whole sum. Wait until the final number to round.

What grade do you learn the Pythagorean theorem?

In most US schools it’s an eighth-grade topic. Under the Common Core standards, eighth graders explain a proof of the theorem and its converse, use it to find unknown sides in two and three dimensions, and use it to find the distance between two points on a grid. Other countries place it at different points, so check your own syllabus.

Why do we square the sides instead of just adding them?

Because the theorem compares areas, not lengths. Squaring a side gives you the space inside a square drawn along it, and the two smaller squares together cover exactly the same space as the big one. Plain lengths don’t behave that way: 3 + 4 is 7, not 5. The square root at the end converts that area back into a side length.

The Short Version

  • In a right triangle, a² + b² = c², with c the side across from the 90° angle.
  • Add the squares to find c; subtract to find a leg; finish with a square root.
  • Check that c is the longest side and shorter than a + b.
  • Triples like 3-4-5 and 5-12-13 (and their multiples) let you skip the arithmetic.
  • If three sides fit the formula, the triangle has a right angle; builders use this to square corners.

Test yourself with the free Math Quiz, turn the formula versions and triples into a deck with the Flashcard Maker, and lock it in using the spaced practice from our guide on how to study effectively. For more topics like this, browse our mathematics articles.

To see the classic proof as it was written, Trinity College Dublin hosts an edition of Euclid’s Elements, Book I, Proposition 47.

Disclaimer

This article is for general educational purposes only. Course content and grade levels vary by country, state and school, so check your own syllabus or exam board. For help with a specific class, talk to your math teacher or a qualified tutor, and follow official safety guidance for any real ladder or building work.

Written by

Saad Qureshi

Saad Qureshi writes and edits study guides for Study Discover. He turns tricky school topics into clear, step-by-step explanations and checks every article against our editorial policy before it goes live.

How we write and fact-check