The Pythagorean theorem states that in a right triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides. It was invented by the ancient Greek mathematician Pythagoras. The theorem can be used to calculate the unknown side of a right triangle if two sides are known. It works because the areas of the squares formed on the sides are related in a consistent way for any right triangle.