I have the following question on my homework:
Find the rank of the subgroup of $\mathbb{Z}^3$ generated by (2,-2,0), (0,4,-4), and (5,0,-5)
I've seen the comment on this post which inspired me to find the invariant factors. My argument so far: We can view this subgroup as a $\mathbb{Z}$-module, call it $M$, and consider the canonical surjection $g:\mathbb{Z}^3\to M$ which maps the standard basis vectors of $\mathbb{Z}^3$ to the generators of $M$. This representation gives us the corresponding matrix $$A=\begin{pmatrix} 2 & -2 & 0 \\\\ 0 & 4 & -4 \\\\ 5 & 0 & -5\end{pmatrix}$$ Then I computed its (Smith) normal form using elementary transformations, and obtained $$\begin{pmatrix} 1 & 0 & 0 \\\\ 0 & 2 & 0 \\\\ 0 & 0 & 0\end{pmatrix}$$
Now, we get the invariant factor decomposition as $$M\cong (\mathbb{Z}/1\mathbb{Z})\oplus (\mathbb{Z}/2\mathbb{Z})\oplus \mathbb{Z}^1 \cong \mathbb{Z}/2\mathbb{Z}\oplus \mathbb{Z}$$ This is where I'm stuck. I can't seem to find a basis for $\mathbb{Z}/2\mathbb{Z}\oplus \mathbb{Z}$, as both $0$ and $1$ are linearly dependent in $\mathbb{Z}/2\mathbb{Z}$ over $\mathbb{Z}$.
Since this is a homework question, I'd preferably only like a hint. If I'm on the right path, just a hint as to how to proceed; if this isn't the best approach, how should I have aimed to solve it initially. Thank you.
EDIT: To clarify my process more: The $g$ I defined is the homomorphism corresponding to the presentation of $M$, that is $M\cong \mathbb{Z}^3/im(g)$, where $im(g)=im(A)$. So when finding the invariant factor decomposition, what I really concluded was $$im(g)=im(A)=1\mathbb{Z}\oplus 2\mathbb{Z}\oplus 0\mathbb{Z}$$ and so $$M\cong \mathbb{Z}^3/im(g)=\mathbb{Z}^3/(1\mathbb{Z}\oplus 2\mathbb{Z}\oplus 0\mathbb{Z})\cong (\mathbb{Z}/1\mathbb{Z})\oplus(\mathbb{Z}/2\mathbb{Z})\oplus(\mathbb{Z}/0\mathbb{Z})$$ And so $$M\cong (\mathbb{Z}/2\mathbb{Z})\oplus\mathbb{Z}$$
Amateur_Algebraist's comment has made me realize my mistake. The $g$ which I thought was a presentation of $M$ is not actually a presentation. The definition of a presentation we had in class was a very specific homomorphism from $R^m\to R^n$, where $m$ is the rank of the kernel of $g$, and $g$ is the surjective module homomorphism defined by taking the standard basis vectors of $R^n$ to the generators of $M$ (as I had defined $g$ above). The correct solution is as follows:
Let $g$ be the same as I had defined, and let $x_1=(2,-2,0), x_2=(0,4,-4), x_3=(5,0,-5)$. Using the calculations I had used to reduce $A$ to elementary form, we can determine linear dependence between the three generating vectors. We get that $$10x_1+5x_2-4x_3=0$$ Thus, we see that $$(a,b,c)\in ker(g)\iff g(a,b,c)=0$$ $$\iff ax_1+bx_2+cx_3=0\iff a=10k, b=4k, c=-5k\quad \text{some }k\in\mathbb{Z}$$ So we conclude $$ker(g)=<10,5,-4>$$ Where $<10,5,-4>$ is the $\mathbb{Z}^3-$module generated by $(10,5,-4)$. Clearly $\ker(g)$ is then a free $\mathbb{Z}$-module of rank 1, and so since $\mathbb{Z}$ is a PID we know $ker(g)\cong \mathbb{Z}^1$. So, by the 1st Isomorphism Theorem we conclude $$im(g)\cong \mathbb{Z}^3/ker(g)\implies M\cong \mathbb{Z}^3/\mathbb{Z}\cong \mathbb{Z}^2$$ since $g$ is a surjection by construction. Then if $\phi:\mathbb{Z}^2\to M$ is any such isomorphism, $\{\phi(e_1),\phi(e_2)\}$ has to be a basis of $M$, which can easily be checked (here $e_1,e_2$ are the standard basis vectors of $\mathbb{Z}^2$). So $M$ is free of rank 2.