# Sum of two squares theorem using complex numbers

Show that if $$M$$ can be written as the sum of squares of two integers, so can $$2M, 5M, 8M, 10M, 13M$$ and so on..

So I have figured out this question for the most part, if $$M=a^2+b^2$$ then I can use the Diophantus identity

$$(a^2+b^2)(c^2+d^2)=(ac+bd)^2+(ad−bc)^2$$

where $$c^2+d^2$$ is the coefficient (2, 5, 8, etc).
However this is for a complex analysis course and he wants us to prove this 'by considering $$[(a+bi)(c+di)]^2$$ and I'm not sure where this comes into it.

My first thoughts were something along the lines of $$a^2+b^2=(a+bi)(a-bi)$$ or $$a^2+b^2=[(ac-bd)+i(ad+bc)]^2$$, but I haven't gotten anywhere with that.
Any help would be much appreciated, I don't need a complete solution, just a nudge in the right direction.

One of the first identities you are likely to see in a discussion of complex numbers is the multiplicativity of the norm: $$|zw| = |z||w|.$$ If you work that out in terms of real and imaginary parts of the constituents you see an interesting identity concerning sums of squares of real numbers. (That may be how you proved the multiplicativity of the norm.)
In this particular exercise the integers $$2, 6, 8, 10, 13$$ and so on happen to be just those integers that are the squares of norms of complex integers --- for example, $$13 = |3+2i|^2 = 3^2 + 2^2$$.
• That was the nudge I needed. I ended up with $(ad+bc)^2+(ac-bd)^2$ instead of $(ac+bd)^2+(ad-bc)^2$ but its the same identity (just swap c and d). Thanks for the help!! – lapy Mar 30 at 15:01
Multiply $$a+bi$$ by $$c\color{red}{-}di$$ and note the real and imaginary parts whose squares add up to $$(a^2+b^2)(c^2+d^2)$$.