Application

Here is an application of the ring structure on The Gaussian integers R = Z + Zi. Suppose the integers k and l can both be written as sums of two squares of integers:

k = a2 + b2 and l = c2 + d2.

Then the product kl is also a sum of squares. You may find it hard to show this from scratch. Here is how the ring R comes into play:

k = (a + bi)(a - bi) and l = (c + di)(c - di)

so

kl = [(a + bi) (c + di)] [(a - bi) (c - di)].

Evaluating the two products in square brackets leads to

kl = [(ac - bd) + (ad + bc)i] [(ac - bd) - (ad + bc)i]

and yields

kl = (ac - bd)2 + (ad + bc)2.

A similar argument, using the quaternions, can be used to show that if two integers can be written as sums of four squares of integers, then so can their product. The equality

(ae + bi + cj + dk) (ae - bi - cj - dk) = (a2 + b2 + c2 + d2)e

plays a role in the proof.