TITLE: Quotient of a free $\mathbb{Z}$-module
QUESTION [5 upvotes]: I'm trying to find the quotient of a free $\mathbb{Z}$-module, but somehow I don't really find the right procedure on how to get the right quotient (nor have I found any sources). I've read What does it mean here to describe the structure of this quotient module? already, but I didn't manage to reproduce the second matrix from that specific post.
In my specific example I have $\mathbb{Z}^3$ as a left-$\mathbb{Z}$ module. Lets call the generators $e_1, e_2, e_3$. My submodule is given by
$$K:=\operatorname{span}_{\mathbb{Z}}\left<i_1:=\left(\matrix{0\\-2\\1}\right), i_2:=\left(\matrix{-2\\0\\1}\right)\right>$$
My idea to get the quotient module $\mathbb{Z}^3/K$ thus far was to use the equalities
$$i_1 = -2e_2+e_3\\
i_2 = -2e_1+e_3
$$
Which yields (for $z_1,z_2,z_3,l_1,l_2\in\mathbb{Z}$):
$$ z_1e_1+z_2e_2+z_3e_3 \equiv z_1e_1+z_2e_2+z_3e_3+l_1i_1+l_2i_2\\
 = z_1e_1+z_2e_2+z_3e_3+l_1(-2e_2+e_3)+l_2(-2e_1+e_3)\\
 = (z_1-2l_1)e_1 + (z_2-2l_2)e_2 + (z_3+l_1+l_2)e_3$$
So for $z_1$ even, the first summand should be identical to zero. For $z_1$ uneven it should be identical to one. Same goes for $z_2$ and the second summand, whereas the third summand should be identical to zero in any case (though i'm not really sure about how to deal with that one, since I've already fixed $l_1$ and $l_2$). Hence I'd say my quotient should be $\mathbb{Z}_2^2$. However, letting sage do the calculations, it claims that the result should be $\mathbb{Z}\oplus\mathbb{Z}_2$
So my question is: Is my result wrong? If so: Where's my mistake and is there a better way to do it?

REPLY [3 votes]: The computational way to calculate this kind of quotient uses the Smith normal form. However, for small modules we can easily figure out a change of basis that immediately reveals the quotient structure. Let $a,b,c$ denote the standard basis of $\mathbb Z^3$, we know that we can add/substract basis elements to/from other basis elements and obtain another basis. So $a, b-a, c-2b$ is another basis of $\mathbb Z^3$. Since your submodule is
$$
\langle c-2b, c-2a \rangle = \langle c-2b, 2(b-a)\rangle,
$$
the quotient is
$$
\frac{\langle a,b,c\rangle}{\langle c-2b, c-2a\rangle} = \frac{\langle a, b-a, c-2b\rangle}{\langle c-2b, 2(b-a)\rangle} \cong \mathbb Z \oplus \mathbb Z_2.
$$