The Pythagorean theorem states that in a right triangle, the square of the hypotenuse is equal to the sum of the squares of the two legs. It can be used to find the missing length of any side of a right triangle when the other two sides are known. For example, if the legs of a right triangle have lengths of 12 and 16, substituting these values into the Pythagorean theorem formula a2 + b2 = c2 allows you to calculate the hypotenuse as 20 by taking the square root of the right side of the equation.