Pythagorean Theorem: Formula, Method, and Examples
In a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs. Identify the hypotenuse first, substitute the two known lengths, solve for the missing length and give a positive answer in linear units.
What is the Pythagorean theorem?
The Pythagorean theorem, also known as the Pythagoras theorem, is a mathematical rule that explains the relationship between the three sides of a right-angled triangle. It states that the square of the longest side is exactly equal to the sum of the squares of the two shorter sides.
The square of the longest side equals the sum of the squares of the shorter sides.
This Pythagorean relationship is commonly remembered as a squared plus b squared equals c squared. When the legs of the right triangle are labelled and , and the longest side is labelled , the formula is written as a simple equation.
Equation:

Identify the hypotenuse first
Before applying the formula, always locate the hypotenuse. The hypotenuse is the longest side of a right triangle and is permanently positioned directly opposite the right angle.
In the mathematical equation, the hypotenuse must always be substituted for the variable .
The other two shorter sides are called the legs. They are substituted for and . Because you add their squares together, it does not matter which leg acts as and which leg acts as .
Learning to correctly label the sides based on the right angle is a foundational skill when working with right triangles.
Use the theorem to find a side
You can calculate any missing right triangle side length as long as you know the measurements of the other two sides. Set up the equation systematically before performing arithmetic.
Method for finding a missing side:
- Identify the hypotenuse and assign it the variable .
- Substitute the two known side lengths into the formula .
- Square the known values.
- If solving for a leg, subtract the squared leg from the squared hypotenuse.
- Take the positive square root of the final calculated area to find the missing length.
Calculating square roots is a necessary final step because the algebraic equation isolates the area of the square built on the side, not the linear side length itself.
Derive it with square-area visuals
The theorem can be visualized by physically drawing a square outward from each side of the right triangle. The total area of the large square built on the hypotenuse is exactly equal to the combined areas of the two smaller squares built on the legs.
If a right triangle has legs measuring units and units, those attached squares have areas of and . The hypotenuse has a length of units, creating a square with an area of . Adding the smaller areas together yields exactly the largest area.

Decide when it applies
The formula applies strictly to right-angled triangles. Because it only applies to triangles with exactly one -degree angle, it is sometimes called the right triangle theorem. It cannot be used to find missing side lengths in acute or obtuse triangles.
If you already know all three side lengths of a triangle, you can test them in the equation to determine if the triangle contains a right angle. This verification process is known as the converse of the Pythagorean theorem.
When a set of three whole numbers satisfies the relationship perfectly, such as , , and , the values form special sets called Pythagorean triples.

Worked examples
These Pythagorean theorem examples show how to find a missing hypotenuse, how to calculate a missing leg, and how to verify if a triangle is a right triangle. The procedure is also the mathematical foundation for finding the distance between two points on a coordinate plane.
Example 1: Missing hypotenuse
Question: A right triangle has legs measuring and . What is the length of the hypotenuse?
Method:
- Identify the hypotenuse as the unknown value .
- Substitute the known legs into the formula.
- Square the values and add them.
- Take the positive square root to find .
Answer: The equation is . Squaring the legs gives . Adding them yields . Taking the positive square root gives .
Check: The calculated hypotenuse is , which makes sense because it is strictly longer than both legs.
Example 2: Missing leg
Question: A right triangle has a hypotenuse of and one leg measuring . Find the exact length of the other leg, and then state its decimal value rounded to two decimal places.
Method:
- Identify the hypotenuse as , which is placed into the formula as .
- Substitute for and leave as the unknown leg.
- Square the substituted values.
- Subtract the squared leg from the squared hypotenuse to isolate .
- Take the square root to find .
Answer: Substituting the values produces . Squaring gives . Subtracting yields . The exact length is . The rounded length is .
Check: Testing the rounded value gives , which is approximately .
Example 3: Non-right-triangle non-example
Question: A triangle has side lengths of , , and . Is this a right-angled triangle?
Method:
- Identify the longest given side as the potential hypotenuse.
- Substitute all three values into the formula.
- Check if both sides of the equation balance exactly.
Answer: The longest side is , so we test . The equation becomes . Squaring gives . Adding the legs gives . Because the sum of the squares of the shorter sides does not equal the square of the longest side, this is not a right-angled triangle.
Check: No reverse calculation is necessary because the direct test reliably proves the inequality.
Common mistakes
One common error is adding the side lengths directly without squaring them first. The mathematical relationship applies strictly to the squared areas, never to the linear lengths of the sides.
Another frequent mistake is placing a leg value into the position. The hypotenuse must always act as . If you substitute a leg in the position, you will mistakenly solve for a much shorter hypotenuse.
Finally, learners often forget to take the square root at the very end of the method. If your final answer is dramatically larger than the other two sides, you have likely stopped at the squared area instead of solving for the single side length.
Frequently asked questions
What is the Pythagorean theorem used for?
It is used to calculate the single unknown side length of a right-angled triangle whenever the other two lengths are known. It is heavily applied in construction, architecture, surveying, and navigation to establish exact distances and right angles.
Can the theorem be applied to any triangle?
No. The equality only holds true for a triangle containing exactly one -degree angle.
Does it matter which leg is a and which leg is b?
No. Because addition allows values to be added in any order, produces the same total as . The only strict requirement is that the longest side must always be assigned to the variable .
Practice questions

Which equation correctly represents the relationship between the sides of this right-angled triangle?
A right triangle has legs of units and units. What is the length of its hypotenuse?
units
units
units
units
units
The hypotenuse of a right triangle is and one leg is . What is the exact length of the missing leg?
A student attempts to find the missing leg when the hypotenuse and leg by writing . What is their mistake?
The student forgot to square the and the before adding them together.
The student should have divided the hypotenuse by the leg instead of adding them.
The student added the squared values instead of subtracting the squared leg from the squared hypotenuse.
The student correctly applied the theorem, and their method has no mistakes.
The student added the squared values instead of subtracting the squared leg from the squared hypotenuse.

A ladder leans against a vertical wall. The base of the ladder is away from the wall, and the ladder reaches up the wall. How long is the ladder?
