SquareNumber Intermediate

Problem - 4189

Let $a$ and $b$ be two positive integers such that both of them can be written as a sum of two squares. Show that their product can be written as a sum of two squares in two ways.


Let $a=x^2 + y^2$ and $b=z^2 + t^2$ where $x$, $y$, $z$, and $t$ are all integers. Then we have $$\begin{align*} ab &= (x^2+y^2)(z^2 + t^2) \\ &=x^2z^2+x^2t^2 + y^2z^2 + y^2t^2\\ &=(x^2z^2 +2xyzt + y^2t^2)+(x^2t^2 -2xyzt + y^2z^2) \\ ab  &=(xz+yt)^2 + (xt-yz)^2 \\ ab&=(xz-yt)^2 + (xt+yz)^2 \end{align*}$$

report an error