# Non-free modules, with a free direct sum

I have to find the $M$ and $N$ to be non-free modules over the ring $\mathbb{Z}/6\mathbb{Z}$, such that $M\oplus N$ is free.

My idea was to take $M=2\mathbb{Z}/6\mathbb{Z}$ (That is, the even numbers in the numbers modulo 6), and then take $N=3\mathbb{Z}/6\mathbb{Z}$ (the numbers multiple of three modulo 6).

Then $N$ is not free because the only elements in it are $\{0,3\}$, and none of them is free (if we take $3$, then we could have $r\cdot 3=0$ by letting $r=2$).

Similarly I argue that $M$ is not free. Lastly, it is easy to see that $\mathbb{Z}/6\mathbb{Z}=M\oplus N$ since the only element in common for $N$ and $M$ is zero, and their sum gives the desired result.

Questions; Is the above correct? Which other(easy) examples are there

-
A free module over your ring has a number of elements divisible by $6$ as soon as it is finite. (Your explanations for non-freeness are a bit weird...) –  Mariano Suárez-Alvarez Mar 21 '12 at 0:14
I was somewhat a sketch. If $N$ were to be free, then either $0$ or $3$ would be in the basis of $N$, but they cannot be in the basis because $rn=0$ does not imply that $r=0$. –  Daniel Montealegre Mar 21 '12 at 0:17
You are saying that a free module over my ring would have to be divisible by $6$ because if $M$ is free then it is isomorphic to $R^n$ for some $n$, and the size of this is $n|R|=6n$, but how could I use this to solve the problem? –  Daniel Montealegre Mar 21 '12 at 0:19
That comment was simply a suggestion to replace your arguments for non-freeness: it follows immediately from it that $2\mathbb Z/6\mathbb Z$ and $3\mathbb Z/6\mathbb Z$ are not free, because they have $3$ and $2$ elements, respectivly, and these two numbers are not divisible by $6$. –  Mariano Suárez-Alvarez Mar 21 '12 at 0:21
Ohhh! sorry I tend to make dumb comments :P –  Daniel Montealegre Mar 21 '12 at 0:23

Your ring $R=\mathbb Z/6\mathbb Z$ is isomorphic to the direct product of $R_2=\mathbb Z/2\mathbb Z$ and $R_3=\mathbb Z/3\mathbb Z$, so that $R\cong R_2\times R_3$. A little work will show that every $R$-module is the direct sum of an $R_2$-module and an $R_3$-module, in the obvious sense.
Since $R_2$ and $R_3$ are fields, we know all of their modules: every $R_2$-module is isomorphic to $R_2^n$ for some $n\geq0$, and every $R_3$-module is isomorphic to $R_3^m$ for some $m\geq0$. It follows that every $R$-module is isomorphic to $R_2^n\oplus R_3^m$ for some $n,m\geq0$.
One can see that a module $R_2^n\oplus R_3^m$ is free exactly when $n=m$.