Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Is there a way to determine the form of all rational solutions to the equation $a^2+b^2=1$?

share|improve this question
Clear denominators to reduce to the problem of finding all pythagorean triples. –  Arturo Magidin Nov 28 '11 at 17:38
Notice that this is the same as integer solutions to $a^2+b^2=c^2$. A full statement of the result and proof can be found on wikipedia: en.wikipedia.org/wiki/Pythagorean_triple#Generating_a_triple –  Eric Naslund Nov 28 '11 at 17:38

4 Answers 4

If you know some field theory, it's possible to find the form without much messy algebra. The condition that $a^2+b^2=1$ for rational $a$ and $b$ is equivalent to the fact that $N_{\mathbb{Q}(i)/\mathbb{Q}}(a+bi)=1$.

Since $\text{Gal}(\mathbb{Q}(i)/\mathbb{Q})\cong\mathbb{Z}/2\mathbb{Z}$, the classical statement of Hilbert's Theorem 90 implies that $a+bi=y/\tau(y)$ for some $y\in\mathbb{Q}(i)$, where $\tau$ is just the complex conjugation map in this case. So for some $m+ni\in\mathbb{Q}(i)$,

$$ a+bi=\frac{m+ni}{\tau(m+ni)}=\frac{m+ni}{m-ni}=\frac{(m^2-n^2)+(2mn)i}{m^2+n^2}, $$ which implies $a=\dfrac{m^2-n^2}{m^2+n^2}$ and $b=\dfrac{2mn}{m^2+n^2}$.

share|improve this answer
For many more such elegant proofs see Olga Taussky's award-winning 1971 AMM paper Sums of Squares. –  Bill Dubuque Nov 28 '11 at 19:07

These are just the Pythagorean triples in disguise; think about clearing the denominators of $a,b$.

share|improve this answer

While the pointer to Pythagorean triples is certainly appropriate, falling back to integers rises questions about odds and evens, uniqueness, and so on. The following procedure leads right away to a one-one parametrization of these pairs $(a,b)$:

You may assume $a\geq0$, $b\geq0$. When $(a,b)\in {\mathbb Q}^2$ then the line through the point $(a,b)\in S^1$ and $(-1,0)\in S^1$ has a certain rational slope $m\in [0,1]$. This means that we obtain all such points $(a,b)$ by intersecting lines through $(-1,0)$ of rational slope $m\in [0,1]$ with $S^1$. Such a line has equation

$$y=m(x+1)\ ,$$

and intersecting this with $S^1$ we get $1=x^2+y^2=x^2+m^2(x^2+2x+1)$ or

$$(m^2+1)x^2+ 2m^2 x + m^2-1 =0\ .$$

Now one solution of this equation is $x=-1$, and the other, interesting, one is the solution of

$$\bigl((m^2+1)x^2+ 2m^2 x + m^2-1\bigr):(x+1)=(m^2+1) x + m^2-1 \ =\ 0\ .$$

This gives $x={1-m^2\over 1+m^2}$ and accordingly $y={2m\over 1+m^2}$, so that we obtain the following parametric representation of the indicated set $S$ of pairs $(a,b)$:

$$S\ =\ \left\{\Bigl({1-m^2\over 1+m^2}, {2m\over m^2+1}\Bigr)\ \bigm|\ m\in {\mathbb Q}\cap[0,1]\right\}\ .$$

share|improve this answer
+1 This technique shows that the rational points on any rational quadratic curve can be similarly parameterized. –  hardmath Nov 28 '11 at 22:02

I up-voted yunone's answer, but I notice that it begins by saying "if you know some field theory", and then gets into $N_{\mathbb{Q}(i)/\mathbb{Q}}(a_bi)$, and then talks about Galois groups, and then Hilbert's Theorem 90, and tau functions (where "$\tau$ is just the complex conjugation may in this case" (emphasis mine)).


I would have no hesitation about telling a class of secondary-school pupils that all Pythagorean triples are of the form $$ (a,b,c) = (m^2-n^2,2mn,m^2+n^2) $$ and that they are primitive precisely if $m$ and $n$ are coprime and not both odd.

That means rational points on the circle are $$ (a/c,b/c) = \left( \frac{m^2-n^2}{m^2+n^2}, \frac{2mn}{m^2+n^2} \right) $$ and they're in lowest terms precisely under those circumstances.

But how much of what appears in my first paragraph above would I tell secondary-school pupils? Maybe it's better not to lose the audience before answering the question.

share|improve this answer
Dear Michael Hardy, thank you for the upvote. I don't know if the last comment is directly pointed at me, but I posted my answer after hardmath, Arturo, and Eric had already posted links to the accessible proofs with Pythagorean triples. I always figured that as soon as a satisfactory answer at the "correct" level is posted, the audience is then the whole site/internet, not just the OP. Also, I don't see any indication that Roonie is a secondary-school pupil, or any explicit indication of his/her level of mathematical maturity. –  yunone Nov 28 '11 at 19:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.