If you have ever needed to find the longest side of a right triangle, measure a diagonal, or check whether a corner is perfectly square, you have reached for one of the most useful tools in all of mathematics: the Pythagorean theorem. It connects the three sides of a right triangle with a single, elegant equation, and once you understand it, a surprising number of geometry and real-world problems suddenly become easy.
In this guide you will learn exactly what the theorem says, when you are allowed to use it, and how to apply it step by step. We will work through several fully solved examples, from a simple textbook triangle to a real ladder leaning against a wall, and we will cover shortcuts, common mistakes, and practice problems with answers. If you would rather see a worked solution for your own triangle right now, our geometry solver can walk through the steps with you.
By the end, you will be able to find any missing side of a right triangle with confidence, recognize the special number patterns that save you time, and even use the theorem to measure distances on a coordinate grid. Let us start with the idea behind the formula.
What Is the Pythagorean Theorem?
The Pythagorean theorem describes a relationship that is true for every right triangle, which is any triangle that contains one 90-degree (right) angle. The theorem states that the square of the longest side equals the sum of the squares of the other two sides.
The two shorter sides that form the right angle are called the legs, usually labeled a and b. The longest side, which sits directly across from the right angle, is the hypotenuse, labeled c. In symbols, the theorem is written as:
$$a^2 + b^2 = c^2$$Key idea
Square each leg, add the two results together, and you get the square of the hypotenuse. The hypotenuse is always the longest side and always sits opposite the right angle, never next to it.
Here is a quick reference for the vocabulary you will see throughout this article:
| Term | Symbol | What it means |
|---|---|---|
| Leg | a, b | The two sides that meet at the right angle |
| Hypotenuse | c | The longest side, opposite the right angle |
| Right angle | 90° | The square corner where the legs meet |
When Can You Use the Pythagorean Theorem?
This is the rule students forget most often, so it is worth stating clearly: the Pythagorean theorem works only for right triangles. If a triangle does not have a 90-degree angle, the equation \(a^2 + b^2 = c^2\) simply is not true for its sides.
Common mistake
Do not apply the theorem to a triangle that has no right angle. For triangles without a 90-degree angle, you need other tools, such as the Law of Cosines or trigonometry. See our guide on How to Calculate Angles in a Triangle for those situations.
You can use the theorem whenever you know two sides of a right triangle and want to find the third. That covers two main cases:
- You know both legs and want the hypotenuse.
- You know the hypotenuse and one leg and want the other leg.
The Three Forms of the Formula
The basic equation is \(a^2 + b^2 = c^2\), but you will often need to rearrange it depending on which side is missing. Memorizing all three forms is not necessary, because they all come from the same equation, but having them side by side helps.
| What you want to find | Formula to use |
|---|---|
| Hypotenuse c | \(c = \sqrt{a^2 + b^2}\) |
| Leg a | \(a = \sqrt{c^2 - b^2}\) |
| Leg b | \(b = \sqrt{c^2 - a^2}\) |
Notice the pattern: when you solve for the hypotenuse, you add the squares. When you solve for a leg, you subtract. Getting these mixed up is the single most common error, so keep it in mind.
How to Use the Pythagorean Theorem Step by Step
No matter which side you are looking for, the method is the same. Follow these steps every time and you will rarely make a mistake:
- Confirm it is a right triangle. Look for the small square symbol marking the 90-degree angle.
- Label the sides. Identify the hypotenuse (opposite the right angle) as c, and the two legs as a and b.
- Write the formula \(a^2 + b^2 = c^2\) and substitute the values you know.
- Square the known numbers.
- Solve for the unknown. Add if you are finding the hypotenuse, subtract if you are finding a leg.
- Take the square root to get the side length, and round if needed.
Now let us put this into action with real numbers.
Worked Examples
Example 1: Finding the Hypotenuse
A right triangle has legs of length 3 and 4. Find the hypotenuse c.
Step 1. Write the formula and substitute the legs:
$$a^2 + b^2 = c^2$$ $$3^2 + 4^2 = c^2$$Step 2. Square each leg:
$$9 + 16 = c^2$$Step 3. Add:
$$25 = c^2$$Step 4. Take the square root of both sides:
$$c = \sqrt{25} = 5$$This 3-4-5 triangle is the most famous right triangle of all, and you will see it constantly.
Example 2: Finding a Missing Leg
A right triangle has a hypotenuse of 13 and one leg of 5. Find the other leg a.
Step 1. Because we want a leg, we rearrange to subtract:
$$a^2 + b^2 = c^2 \quad\Rightarrow\quad a^2 = c^2 - b^2$$Step 2. Substitute \(c = 13\) and the known leg \(b = 5\):
$$a^2 = 13^2 - 5^2$$Step 3. Square the numbers:
$$a^2 = 169 - 25$$Step 4. Subtract:
$$a^2 = 144$$Step 5. Take the square root:
$$a = \sqrt{144} = 12$$Notice we subtracted because we were solving for a leg, not the hypotenuse. The hypotenuse (13) is the largest number in the problem, exactly as it should be.
Example 3: A Real-World Problem (the Ladder)
A 10-foot ladder leans against a wall. The base of the ladder is 6 feet away from the wall. How high up the wall does the ladder reach?
This is a classic right-triangle setup. The wall is vertical, the ground is horizontal, and they meet at a 90-degree angle. The ladder is the hypotenuse because it is opposite the right angle.
- Hypotenuse (ladder): \(c = 10\)
- One leg (distance from wall): \(b = 6\)
- Unknown leg (height on wall): \(a = \,?\)
Step 1. We want a leg, so we subtract:
$$a^2 = c^2 - b^2$$Step 2. Substitute the known values:
$$a^2 = 10^2 - 6^2$$Step 3. Square and subtract:
$$a^2 = 100 - 36 = 64$$Step 4. Take the square root:
$$a = \sqrt{64} = 8$$Try it yourself
Have a word problem with its own measurements? Solve it instantly with our step-by-step geometry calculator, which shows the full setup so you can check your work.
Example 4: When the Answer Is Not a Whole Number
Most real problems do not produce tidy answers. A right triangle has legs of 5 and 7. Find the hypotenuse, rounded to two decimal places.
Step 1. Write the formula and substitute:
$$c^2 = 5^2 + 7^2$$Step 2. Square and add:
$$c^2 = 25 + 49 = 74$$Step 3. Take the square root. Since 74 is not a perfect square, the answer is irrational:
$$c = \sqrt{74} \approx 8.60$$It is perfectly fine to leave the answer in exact form as \(\sqrt{74}\) when a problem asks for an exact value, or to round to a decimal when it asks for an approximation. Always read the instructions to see which is expected.
Example 5: Checking for a Right Triangle (the Converse)
The theorem also works in reverse. The converse of the Pythagorean theorem says that if the three side lengths of a triangle satisfy \(a^2 + b^2 = c^2\), then the triangle must be a right triangle. This is how builders check that a corner is truly square.
Is a triangle with sides 8, 15, and 17 a right triangle?
Step 1. Identify the longest side as the would-be hypotenuse: \(c = 17\). Test the two shorter sides as legs.
Step 2. Compute each side of the equation separately:
$$a^2 + b^2 = 8^2 + 15^2 = 64 + 225 = 289$$ $$c^2 = 17^2 = 289$$Step 3. Compare. Both sides equal 289, so the equation holds.
Pythagorean Triples: Helpful Shortcuts
A Pythagorean triple is a set of three whole numbers that perfectly satisfy \(a^2 + b^2 = c^2\). Memorizing a few of these lets you spot answers instantly without a calculator. They also reappear constantly on tests.
| Triple | Check |
|---|---|
| 3, 4, 5 | \(9 + 16 = 25\) |
| 5, 12, 13 | \(25 + 144 = 169\) |
| 8, 15, 17 | \(64 + 225 = 289\) |
| 7, 24, 25 | \(49 + 576 = 625\) |
| 9, 40, 41 | \(81 + 1600 = 1681\) |
Any multiple of a triple is also a triple. Because 3-4-5 works, so do 6-8-10, 9-12-15, and 30-40-50. If you notice the sides of a triangle are a multiple of a familiar triple, you already know the answer.
The Pythagorean Theorem and the Distance Formula
One of the theorem’s most powerful uses is measuring the straight-line distance between two points on a coordinate plane. The distance formula is really just the Pythagorean theorem in disguise:
$$d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$The horizontal change \((x_2 - x_1)\) is one leg, the vertical change \((y_2 - y_1)\) is the other leg, and the distance d is the hypotenuse. Let us find the distance between the points \((1, 2)\) and \((4, 6)\).
Step 1. Substitute the coordinates:
$$d = \sqrt{(4 - 1)^2 + (6 - 2)^2}$$Step 2. Simplify inside the parentheses:
$$d = \sqrt{3^2 + 4^2}$$Step 3. Square and add:
$$d = \sqrt{9 + 16} = \sqrt{25}$$Step 4. Take the square root:
$$d = 5$$If you can use the Pythagorean theorem, you already know the distance formula. This same idea extends into geometry topics like measuring diagonals of rectangles and boxes, which you can explore further in our overview of Surface Area and Volume Formulas Explained.
Common Mistakes to Avoid
Even strong students lose points to a few repeat offenders. Watch for these:
Mistakes that cost points
- Adding instead of subtracting when finding a leg. If the hypotenuse is known, you must subtract the squares, not add them.
- Mislabeling the hypotenuse. The hypotenuse is always the longest side and always opposite the right angle. If your “hypotenuse” is shorter than a leg, you have made an error.
- Forgetting the square root. The formula gives you \(c^2\) first; you still have to take the square root to get c.
- Squaring the sum instead of summing the squares. \(a^2 + b^2\) is not the same as \((a + b)^2\). For 3 and 4, the correct value is \(9 + 16 = 25\), not \((3+4)^2 = 49\).
Tips for Mastering the Theorem
Study tips
- Always sketch the triangle and mark the right angle before you calculate. A quick drawing prevents most labeling errors.
- Memorize 3-4-5 and 5-12-13. These two triples show up more than any others and let you check answers in seconds.
- Estimate before you finish. The hypotenuse should be a bit longer than the longest leg but shorter than the two legs added together. If your answer falls outside that range, recheck.
- Practice with units. Real problems use feet, meters, or inches, so keep track of units in your final answer.
Practice Problems
Try these on your own, then check your answers below.
- A right triangle has legs of 9 and 12. Find the hypotenuse.
- A right triangle has a hypotenuse of 25 and one leg of 7. Find the other leg.
- A square garden has sides of 6 feet. Find the length of its diagonal, rounded to two decimal places. (Hint: the diagonal splits the square into two right triangles with legs of 6 and 6.)
Answers:
- \(c = \sqrt{9^2 + 12^2} = \sqrt{81 + 144} = \sqrt{225} = 15\).
- \(a = \sqrt{25^2 - 7^2} = \sqrt{625 - 49} = \sqrt{576} = 24\).
- \(d = \sqrt{6^2 + 6^2} = \sqrt{36 + 36} = \sqrt{72} \approx 8.49\) feet.
If you want to dig deeper into measuring two-dimensional figures, our companion guide on How to Find the Area of Any Shape pairs naturally with this topic, since right triangles appear inside so many area calculations.
Conclusion
The Pythagorean theorem is one of those rare ideas that is simple to state, easy to apply, and useful for a lifetime. Once you can identify the hypotenuse, plug the known sides into \(a^2 + b^2 = c^2\), and remember to add for the hypotenuse and subtract for a leg, you can solve a huge range of geometry and real-world problems, from ladders and gardens to distances on a map.
Keep practicing with the examples above, lean on the Pythagorean triples to check your work, and sketch every triangle before you calculate. When you want a clear, worked-out solution for your own problem, try our geometry solver for instant step-by-step help, and browse the math learning blog for more friendly guides to the topics you are studying next.
