The Pythagorean theorem
In a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: c = sqrt(a^2 + b^2). To find a missing leg instead, rearrange: a = sqrt(c^2 - b^2).
The theorem only applies to triangles with a 90-degree angle. The hypotenuse is always the side opposite the right angle and is always the longest side.
c = sqrt(a^2 + b^2)
Hypotenuse from two legs.
a = sqrt(c^2 - b^2)
Missing leg from hypotenuse and one leg.