# Product of sums of square is a sum of squares.

Given $a,b,c,d \in \mathbb{Z}$, there is $x,y$ such that

$$(a^2 + b^2)(c^2 + d^2) = x^2 + y^2$$

One can show this by considering the complex number $a + bi$ and $c+ di$, using complex properties to deduce that $x = ac - bd, y = ad + bc$ is a solution. However, given that either $a^2, b^2$ are distinct or $c^2,d^2$ are distinct, then how can one can find nonzero solutions $x,y$?

Sorry, I am assuming $a,b,c,d$ are nonzero.

-

If $a=b=0$ or $c=d=0$, obviously we cannot do it.

If one of (say) $a$ or $b$ is $0$, and one of $c$ or $d$ is $0$, there will be situations in which we cannot do it, for instance when $a=c=3$, $b=d=0$.

If one of $a$ or $b$ is $0$, but the other is not, and neither $c$ nor $d=0$, there is no difficulty.

Now examine the case all of $a$, $b$, $c$, $d$ are non-zero. Without loss of generality we may assume they are all positive.

Use the formulas $$(a^2+b^2)(c^2+d^2)=(ac+bd)^2+(ad-bc)^2=(ad+bc)^2+(ac-bd)^2.$$ We need only check that at least one of $ad-bc$ and $ac-bd$ is non-zero.

Suppose to the contrary that $ad=bc$ and $ac=bd$. Then (i) $a^2cd=b^2cd$ and (ii) $c^2ab=d^2ab$. Since none of $a$, $b$, $c$, $d$ is $0$, by cancellation we get $a^2=b^2$ and $c^2=d^2$.

-

This is not true if 2 or more of the variables are zero: for instance $(3^2 + 0^2)(3^2 + 0^2)$ can only be expressed as $9^2 + 0^2$, and $(3^2+4^2)(0^2 + 0^2)$ is just trivial.

The case where exactly one of $a,b,c,d$ is $0$ is very simple. So I'll assume without loss of generality that all variables are non-zero, and in fact positive: $a,b,c,d > 0$. Let's also assume that of the two possibilities, $a^2,b^2$ are distinct. In this case it is obvious that $y > 0$, so the only question is whether $x = 0$.

This happens only if $ac = bd$, or $a/b = d/c$. If we happen to be so unlucky, just swap the values of $a$ and $b$ to get a new $x'$ and $y'$. This has no effect on the value of $a^2+b^2$ or on the positivity of $y'$, but now $x' = 0$ iff $b/a = d/c$, which can't happen as this would mean $a/b = b/a \implies a^2 = b^2$.

-