Posted by: Alexandre Borovik | August 18, 2008

Pythagorean triples

Yet another old post moved here for convenience of working on a text I am currently writing.


My friend and colleague Hovik explained to me the right way of solving the classical Pythagorean Triples Equation

x2 + y2 = z2

in integers. Of course, after change of variables u = x/z, v = y/z we have to solve a slightly simpler equation

u2 + v2 = 1

in rational numbers u and v.

Then we observe that the line through point (0,1) and point (u,v) has rational coefficients and intersects the x-axis in a point (t,0) with rational coordinate t. Moreover, this projection establishes a one-to-one correspondence between rational points on the circle (without the north pole (0,1)) and the rational points on the real line. This observation is fairly obvious in one direction, (u, v) -> (t, 0), and very subtle in another: the straight line through points (0, 1) and (t,0) intersects the unit circle x2 + y2 = 1 in a rational point (0,1); the coordinates of the second point of intersection are second roots of quadratic equations with rational coefficients and are therefore also rational.

So we take t for a parameter. The equation of the straight line through the point (0,1) and (t,0) is, obviously, x/t + y = 1. Hence we have to solve the simultaneous system

x/t + y = 1, x2 + y2 = 1

which is fairly easy and quickly yields

x = 2t/(1+t2), y = (t2-1)/(1+t2).

After expressing a rational number t as a ratio of two integers: t = p/q, we have, as a general formula for Pythagorean triples,

(2pq)2 + (p2 – q2)2 = (p2 + q2)2.

As simple as that. Of course, all that is well-known; but no-one cared explained that to me, and the change of variable appeared to be a mystery. But this is just a birational parametrisation of the circle by stereographic projection.


Anonymous rick said…
Oh, my.

That’s beautiful. Like you, I knew the result, and had even seen proofs that the result gave all possible solutions, but this is so simple and clear and beautiful… just magnificent.

Please thank Hovik from me!

17/2/08 11:08 PM
Anonymous Todd Trimble said…
What is more, the same stereographic projection proof applies to any field in which -1 is not a square.

18/2/08 12:44 AM
OpenID topologicalmusings said…
We can further generalize this procedure. Here, we have P(x,y)= x^2 + y^2 – 1. Instead, we can use any irreducible polynomial P of degree 2 and any “rational point” (m,n) instead of (1,0) satisfying P(x,y)= 0 to yield rational solutions.

This incidentally has some connection to the yet unproven ABC conjecture in number theory. For more, one could read this the article titled, The ABC’s of Number Theory, by Noam Elkies.

20/2/08 12:00 AM
OpenID topologicalmusings said…
The link to that article, it seems isn’t working. Here is the URL

Hope this works!

20/2/08 12:03 AM
Blogger Alexandre Borovik said…
Thanks for the reference, it came very handy. With my colleague Hovik, we are writing a commentary on history of cartographic projections, and stereographic parametrisation of the unit circle features there prominently.

20/2/08 9:17 AM
Blogger Beans said…
I saw the word Pythagorean triples and remembered this post, when I came across this link: A new algorithm for generating Pythagorean triples.

(Don’t know if it is of any interest though, for I haven’t actually read it myself!)

21/2/08 12:43 AM
Blogger Celal Birader said…
Hello … A very interesting proof. I have a question : how do we know that ‘t’ must be rational ? Thank you.

24/2/08 8:30 PM
Blogger Alexandre Borovik said…
Because t is a solution of linear equation x/t + y = 1 with rational x and y.

29/2/08 11:50 PM
Anonymous Gábor said…
This is actually quite a well-known fact in algebraic geometry and number theory circles. It should also be known to all students who attended my first lecture on algebraic geometry.

17/3/08 10:55 AM
Blogger JimT said…
Sorry to bother you. I now realise if you have m,n both odd that M=(m+n)/2 and N = (m-n)/2 will be an odd-even pair and so yield a primitive PT


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


%d bloggers like this: