Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal
Welcome back to Solving for Unknown Sides! You have reached lesson four of seven, which means you are past the halfway mark in this course. In our last lesson, we rearranged the Pythagorean equation to isolate a missing leg, arriving at a2=c2−b2. We explored why subtraction replaces addition when the unknown is a leg rather than the hypotenuse. Today, we take that rearranged equation and build a complete, repeatable procedure for calculating the missing leg's actual length — from start to finish.
Knowing that a2=c2−b2 is a powerful first move, but it only tells us the value of the leg squared. That number represents an area — specifically, the area of the square built on the missing side. To recover the side length itself, we need one more operation: the square root.
Think of it this way. If someone tells you a square tile has an area of 64 square inches, you find its side length by asking, "What number times itself gives 64?" The answer is 8, because 8×8=64. The same logic applies here. Once subtraction gives us a2, taking the square root "unwraps" that area back into a length. This is the exact same finishing move we used when finding the hypotenuse in Lesson 2 — the only difference is how we arrived at the squared value (subtraction instead of addition).
Finding a missing leg follows three clear steps. The rhythm mirrors the hypotenuse procedure, but with subtraction in the middle instead of addition:
Square the hypotenuse and the known leg.
Subtract the known leg-square from the hypotenuse-square.
Square root the result to get the missing leg.
Written as a single formula:
a=c2−b2​
That one line captures all three steps. Let's put it to work.
Suppose a right triangle has hypotenuse c=15 and one leg b=9. We need to find leg a.
Step 1 — square the known sides:
c2=152=225b2=92=81
Step 2 — subtract:
a2=225−81=144
Step 3 — square root:
a=144​=12
The missing leg is 12. A quick check confirms the result: 92+122=81+144=225=152. ✓
Let's try bigger numbers to build confidence. A right triangle has hypotenuse c=25 and one leg b=7. Find leg a.
Square: 252=625 and 72=49.
Subtract: a2=625−49=576.
Square root: a=576​=24.
The missing leg is 24. Quick check: 72+242=49+576=625=252. ✓
The numbers are larger, but the process is identical. Three steps, same order, every time.
Imagine you are flying a kite on a calm day. The string is 20 feet long and pulled tight. A friend standing directly beneath the kite is 12 feet away from you along flat ground. How high is the kite?
For simplicity, we model the kite string as forming a right triangle with the ground, starting from a point on the ground directly below the person.
The taut string is the hypotenuse (c=20), the horizontal distance is one leg (b=12), and the height is the missing leg (a).
Square: 202=400 and 122=144.
Subtract: a2=400−144=256.
Square root: a=256​=16.
The kite is 16 feet above the ground. Notice how the real-world situation maps neatly onto the same three steps we have been practicing.
As you work through problems on your own, keep these pointers in mind:
Identify the missing side first. If the unknown is the hypotenuse, add the leg-squares. If the unknown is a leg, subtract. This single decision shapes everything that follows.
Subtract in the correct order. Always place the hypotenuse-square first: c2−b2, never b2−c2. Since the hypotenuse is the longest side, its square is the largest number — reversing the order would produce a negative, which makes no sense as a squared length.
Verify every answer. Plug all three sides back into a2+b2=c2. If both sides match, you can be confident the result is correct.
In this lesson, we turned the rearranged equation a2=c2−b2 into a complete three-step procedure: square, subtract, and square root. We applied it to two triangles of increasing size and to a real-world kite scenario, confirming each answer with a quick verification. Together with the hypotenuse procedure from Lesson 2, you now have the tools to find any missing side of a right triangle when the other two sides are known.
Time to put these steps into practice! The upcoming exercises will walk you through the procedure piece by piece — first with guided steps, then with independent problems, and finally with a real-world scenario of your own. Jump in and see how natural the process feels.