# Find $n$ such that $\mathbb{Z}/n\mathbb{Z}$ has a $\mathbb{Z}[i]$-module structure.

We want to find all $n>0$ such that $\mathbb{Z}/n\mathbb{Z}$ has a $\mathbb{Z}[i]$-module structure.

This is what I have. First of all we have that for $k\in \mathbb{Z}$ we have that for $m\in \mathbb{Z}/n\mathbb{Z}$, $k\cdot m=[km]\in \mathbb{Z}/n\mathbb{Z}$.

Note that if we manage to answer what $i\cdot 1$ is equal to then we would be done since $(a+bi)m=am+b(im)$.

Say $i\cdot 1=x$. Then we have that $i\cdot x=i\cdot(1+...+1)=i\cdot 1+...+i\cdot 1=x+...+x=x^2$. That is, $$i\cdot (i\cdot 1)=x^2$$On the other hand, $$(i\cdot i)\cdot 1=(-1)\cdot 1=-1$$So we want $x^2=-1$. So any $n$ that satisfies $\mathbb{Z}/n\mathbb{Z}$ such that $-1$ is a square would work because we can define $i\cdot 1=x$ where $x$ is such that $x^2=-1$. Is the above correct?

Thanks.

-
You know those $n$'s are characterized in number theory, do you? – Patrick Da Silva Dec 5 '12 at 7:30
I know that for $p$ congruent to $1$ modulo $4$ we have that $-1$ is a square in $\mathbb{Z}/p\mathbb{Z}$. – Daniel Montealegre Dec 5 '12 at 7:33
But, is the above correct? – Daniel Montealegre Dec 5 '12 at 7:33
I see no problem, but I see that you have found sufficient conditions for $n$ to give you a $\Bbb Z[i]$-module, not necessary ones. Have you done the work? Maybe I am just tired and am not seeing that you have actually shown everything. – Patrick Da Silva Dec 5 '12 at 7:34
Well I think by the argument above I showed that it is necessary that $-1$ is a square because we have $-1=(-1)\cdot 1=(i\cdot i)(1)=i\cdot x =i\cdot (1+...+1)=x+..+x=x^2$. – Daniel Montealegre Dec 5 '12 at 7:42

$\mathbb Z/n\mathbb Z$ is a $\mathbb Z[i]$-module iff there exists a ring homomorphism $\mathbb Z[i]\to\operatorname{End}(\mathbb Z/n\mathbb Z)$.
Obviously $\operatorname{End}(\mathbb Z/n\mathbb Z)\simeq \mathbb Z/n\mathbb Z$, so we reduced the problem to the existence of ring homomorphisms $\mathbb Z[i]\to\mathbb Z/n\mathbb Z$. Of course, a necessary condition is that the equation $x^2=-1$ has solutions in $\mathbb Z/n\mathbb Z$, but this is also sufficient: take $x_0\in\mathbb Z/n\mathbb Z$ such that $x_0^2=-1$ and define $f:\mathbb Z[i]\to\mathbb Z/n\mathbb Z$ by $f(a+bi)=a+bx_0$ (here $a,b$ are taken modulo $n$). It's easily seen that $f$ is a ring homomorphism.
Remark. For which $n$ the equation $x^2\equiv-1\pmod n$ has solutions is a well known fact.