Let S be the set of complex numbers of the form a + bi, where a and b are integers. We say that \(z \in S\) is a unit if there exists a \(w \in S\) such that

\(z w = 1 \Rightarrow |z||w| = 1 \Rightarrow |w| = \dfrac{1}{|z|}\\ \text{The only way this can occur is if $a=\pm 1,~b=0$ or $a=0, b=\pm 1$}\\ \text{If $z=\pm 1$, then $w=z$. If $z = \pm i$, then $w = -z$}\\ \text{Thus there are 4 units in $S, \{1,-1,i,-i\}$}\)