Pythagorean theorem straightedge and compass. Pythagoras's theorem enables construction of incommensurable lengths because the hypotenuse of a triangle is related to the sides by the square root operation. The figure on the right shows how to construct line segments whose lengths are in the ratio of the square root of any positive integer. Each triangle has a side (labeled "1") that is the chosen unit for measurement. In each right triangle, Pythagoras's theorem establishes the length of the hypotenuse in terms of this unit. If a hypotenuse is related to the unit by the square root of a positive integer that is
Pythagorean prime representation can be interpreted geometrically: the Pythagorean primes are exactly the odd prime numbers "p" such that there exists a right triangle, with integer legs, whose hypotenuse has length . They are also exactly the prime numbers "p" such that there exists a right triangle with integer sides whose hypotenuse has length "p". For, if the triangle with legs "x" and "y" has hypotenuse length (with "x" > "y"), then the triangle with legs "x" − "y" and 2"xy" has hypotenuse length "p". Another way to understand this representation as a sum of two squares involves Gaussian integers, the complex