# Thread: [SOLVED] Sum of 4 squares

1. ## [SOLVED] Sum of 4 squares

Hi,

I've seen this problem somewhere, but have no idea on how to solve it ^^'
And it looks interesting, so here it is :

Let a and b be two integers that are sums of 4 squared integers (a=m²+n²+p²+q²)
Show that ab is also the sum of 4 squared integers.

(Brute force can lead you to the result, but it has no interest ~)

2. Originally Posted by Moo
Hi,

I've seen this problem somewhere, but have no idea on how to solve it ^^'
And it looks interesting, so here it is :

Let a and b be two integers that are sums of 4 squared integers (a=m²+n²+p²+q²)
Show that ab is also the sum of 4 squared integers.

(Brute force can lead you to the result, but it has no interest ~)

Hey moo,

3. Originally Posted by masters
Oh thanks, I knew nothing of it !

This proof doesn't look beautiful
So I guess I'll have to read some things about quaternions for a more beautiful proof, but it's a scary field (I can see that it has some non commutative algebra in it... lol)

4. there's an easy way to do this: consider the real quaternion algebra $\mathbb{H}=\{a+bi+cj+dk \}$ where we define $i^2=j^2=k^2=-1, \ ij=k, \ ji = -k.$ for any $x=a+bi+cj+dk \in \mathbb{H}$

define the conjugate $\overline{x}=a-bi-cj-dk.$ then $x \overline{x}=a^2+b^2+c^2+d^2$ and $\overline{xy}=\overline{y} \ \overline{x}.$ since $y \overline{y}$ is a scalar, it commutes with $\overline{x}$ and so: $(x \overline{x})(y \overline{y})=x(y \overline{y})\overline{x}=(xy)( \overline{y} \ \overline{x})=(xy) \overline{xy}. \ \ \Box$

5. Originally Posted by NonCommAlg
there's an easy way to do this: consider the real quaternion algebra $\mathbb{H}=\{a+bi+cj+dk \}$ where we define $i^2=j^2=k^2=-1, \ ij=k, \ ji = -k.$ for any $x=a+bi+cj+dk \in \mathbb{H}$

define the conjugate $\overline{x}=a-bi-cj-dk.$ then $x \overline{x}=a^2+b^2+c^2+d^2$ and $\overline{xy}=\overline{y} \ \overline{x}.$ since $y \overline{y}$ is a scalar, it commutes with $\overline{x}$ and so: $(x \overline{x})(y \overline{y})=x(y \overline{y})\overline{x}=(xy)( \overline{y} \ \overline{x})=(xy) \overline{xy}. \ \ \Box$
Oh, okay, seeing it this way, it doesn't look that scary

Thanks, that's exaclty what I've been looking for several minutes on google xD

6. Hello, Moo princess.

Here is a related idea to Hamilton's quaternions. The complex numbers $\mathbb{C}$ provide a way of getting an identity for the sum of two squares. Since $|(a+bi)(c+di)| = |a+bi||c+di|$ we get: $(a^2+b^2)(c^2+d^2) = (ac - bd)^2 + (ad+bc)^2$.

In fact, if you want to go crazy you may use the octonions to get an identity for a sum of eight squares and use the sedenions to get an identity for the sum of sixteen squares.

I say "may" because I never tried it, I have a feeling it may work.
----

Here is a historical reference to this ugly identity (it is only ugly if you not familar with quaternions). The mathematician Euler was trying to prove the four-square theorem. He never suceeded but he did develop the four-square identity (the one you have one) using nothing by brute algebraic manipulations (at the time the quaternions did not exist). In the future Lagrange took over and was able to finish up and proof the four-square theorem. Lagrange gave much credit to Euler because he said it was only because of Euler's identity that he was able to finish the proof.