Sums of two squares

Sort:
Thijs

There is a theorem that if a natural number n is a sum of two squares of rational numbers, then n is also a sum of two squares of integers. A proof could involve Fermat's theorem on sums of two squares, but the proof of that theorem in itself is quite lengthy, so that the whole proof will be quite lengthy if you don't just take Fermat's theorem for granted.

Does anyone know if a short(er) proof exists that if n is the sum of two rational squares, it's also the sum of two integral squares? Thanks.

Summum_Malum

Hmm.. would it be possible to do a geometric proof perhaps mixed with some group theory.. \sqrt{n} is the length of the hypothenuse in both the triangle with side-lengths r_1,r_2 as well as the one with side lengths m,l where m and l are integers .. then the ´integer triangle´ must be  scaling of the other .. 

Elroch

Yes, really easy. Change one of the fractions so both have the same denominator,  then rearrange and think about the factors.

Thijs

This doesn't sound very convincing yet. Concerning geometry, one could think of the example 1 = (3/5)^2 + (4/5)^2. You can't "scale" this to make it an integer solution, since the only integral solution is 1 = 1^2 + 0^2.

Elroch, can you be more precise with what you mean? Suppose n = (p/q)^2 + (r/s)^2 = (ps/qs)^2 + (qr/qs)^2, or equivalently (qs)^2 n = (ps)^2 + (qr)^2. How do you conclude that n must be a sum of two integral squares?

Elroch

Absolutely correct. Ignore my previous post, which misunderstood what you were looking for.

Summum_Malum

I meant that you should scale each side length, but I must admit I don't see a straight and easy way to show that it will be so for every set of rational numbers that yield an integer (when squared and summed).. There must be something about this in a book on Diophantine equations..

Question, can every n=>1 be represented as the sum of two rationals squared?

Thijs

No problem. At first I also thought it would be easy to prove (it can indeed be proven) but I couldn't find a proof. Also looking around on the internet didn't help much yet. I could only find a proof that if 7 is a sum of two rational squares, then it is also a sum of two integral squares (and since it isn't, it's also not a sum of two rational squares). The proof involved looking at quadratic residues in GF(7), which all works nicely because 7 is prime. But I want a general proof, for general positive numbers n.

Does anyone else have an idea?

Thijs
Summum_Malum wrote:

I meant that you should scale each side length, but I must admit I don't see a straight and easy way to show that it will be so for every set of rational numbers that yield an integer (when squared and summed).. There must be something about this in a book on Diophantine equations..

Question, can every n=>1 be represented as the sum of two rationals squared?


Since the proof the other way (if n is a sum of two integral squares, then n is also a sum of two rational squares) is totally trivial, there is an if and only if relation for being able to express a number as a sum of two rational/integral squares. And since not all positive integers are a sum of two integral squares (3, 6, 7, 11, 12, 14, 15, ...) the answer to your question is also no.

strangequark

I have an idea, but I don't know if it would work. I always like reductio proofs. Assume that n is not the sum of two squares of integers. Then n can be less than 2. Use a specific n less than 2, then try to prove that n cannot be written as the square of two rational numbers. Might that work?

Elroch

If you want a reductio proof, you need an inductive step, strangequark. This would probably be a way of creating a smaller counterexample from any counterexample. If you can see how to do this, you are on track.

Alternatively, we can apply a lemma to simplify the problem a little.

Lemma

If m and nare the sum of two squares, so is their product mn.

[Easy proof: m=x^2+y^2, n=z^2+w^2, mn= (xz+yw)^2+(xw-yz)^2]

.

Using this lemma, we only need to show that if p is a prime that is a sum of two rational squares, it is a sum of two integer squares. By "only", I don't mean to claim that this is easy.

Thijs

Ah, great. The advantage of that is that we can do some nice modular arithmetic in the field GF(p). Say if p = (a/c)^2 + (b/c)^2 then c^2 p = a^2 + b^2 so that a^2 + b^2 == 0 mod p. This implies that (a/b)^2 == -1 mod p, so that -1 is a quadratic residue mod p, which is true if and only if p == 1 mod 4. So this proves that if p is a sum of two rational squares, then p == 1 mod 4.

Now Fermat's theorem on sums of two squares states that "p == 1 mod 4 if and only if p is a sum of two integral squares" which would complete the proof. But then you need this theorem, which is not easy/short to prove. Fortunately we only need the theorem in one direction, which can be done by a much shorter proof. For example the proof of this theorem on wikipedia (http://en.wikipedia.org/wiki/Proofs_of_Fermat's_theorem_on_sums_of_two_squares) consists of five parts to prove the if and only if relation, but only the fifth part is needed for the implication we need (that if p == 1 mod 4, then p is a sum of two integral squares). I'll try and work through that part of the proof then, which would conclude the proof that "n is a sum of two rational squares => n is a sum of two integral squares".

Thanks :)

Thijs

Actually I was a bit sloppy there, since b might be 0 and then (a/b) does not exist. However, if that is the case, then p divides both a and b so that p^2 divides a^2 and b^2. So then the equation rewrites to c^2 p = p^2 (d^2 + e^2) for some d and e. Dividing by p then gives c^2 = p (d^2 + e^2). So then p also divides c^2, and since p is prime, p divides c. But now we say that of course we assumed at the beginning (without loss of generality) that a,b,c had greatest common divisor 1, which is then a contradiction.

So it's correct, but the case a^2 == -b^2 == 0 mod p also needed to be taken care of.

Elroch

Nice work, Phobetor!

Thijs

Hmm... Thinking about it again, I actually think your conclusion after the lemma was incorrect :( Even if P = "being a sum of rational squares equals being a sum of integral squares" holds for all the primes, then you still cannot easily conclude that it also holds for all natural numbers. Your lemma only says that if p,q are sums or squares then pq is a sum of squares, but not the converse.

Maybe I just have to give up and go for the long proof then :(

Elroch

Sorry to mislead.

 

I can deduce that if N is not a sum of integer squares, some prime factor of N is not a sum of integer squares. Which implies N has a prime factor of the form 4n+3 to an odd degree. Without loss of generality, N is a product of distinct primes of the form 4n+3. (you can easily get rid of the prime factors of the form 4n+1 and any square factors). Any help?

 

But you could also do with something like "if N is a sum of rational squares, so is each prime factor of N that does not appear to an even degree." Not obvious. Perhaps induction might help here, but you might still need some heavy machinery.

Math_magician

Not sure if this is helpful, but it is a fact that a natural number is a sum of 2 non-negative integer squares ( including 0) if all of its 3 mod 4 prime factors are raised to even powers.

Thijs

Math_magician, I know that is true (I also "know" that a number is a sum of two rational squares if and only if it is a sum of two integral squares), but I also want a (nice) proof why it is true.

(Some notation: Q2 = numbers that are sums of two rational squares, L2 = numbers that are sums of two integral squares)

So far I've been able to prove the equivalence of the following statements for primes p > 2:

  1. p in Q2
  2. p == 1 mod 4
  3. -1 is a QR in GF(p)
  4. p in L2

The equivalence of (2) and (4) proves Fermat's theorem on sums of two squares, so that's accounted for. Now I only need a proof that the equivalence on (1) and (4) also holds for n instead of p :)