Euclid’s formula says that, are a Pythagorean triple, i.e., for are integers, if and only if , , for some integers .

The proof is as follows: Since , we have

i.e., the point is on the unit circle. Assume are all non-negative. Hence P is in the first quadrant. Consider the point on the unit circle, we have line QP intersect with the -axis on , which, by section formula, we have

Since and are rational numbers, so does . Now we assume for some non-negative . Obviously, point is inside the unit circle, so . Now consider the line QR, it is given by the equation

and the unit circle is given by

Solving the two equations simultaneously, it gives the solution , i.e. point , and the other solution is

Subsititute we have

Therefore, we have