Computing index of a subgroup of a free abelian group We looked briefly at this example in class but I'm not quite sure how to proceed, and I can't find examples of this in any textbooks I have (Dummit & Foote and Nicholson).
Suppose we have $H = \langle(1,1) , (1,-1)\rangle \le G = \mathbb{Z}^2$ for groups $H$ and $G$. Find $|G:H|$.
I think I'd have to take the standard basis for $G$ and then express the elements in $H$ as some combination of this basis. The goal (from what I understood, at least) seems to be to express $G$ and $H$ as direct products and then look at the order of the quotient (since that's equal to $|G:H|$).
Am I on the right track here? How would I go about actually showing all the work for this question? Thanks for reading.

Let's restrict to the case where we have a subgroup of $\mathbb{Z}^n$ generated by at least $n$ given vectors (if it is generated by fewer than $n$ vectors, then the index is infinite).
Write the vectors as columns of an $n\times m$ matrix, $n\leq m$. Then you can compute the Smith normal form of the matrix, which amounts to finding an automorphism of $\mathbb{Z}^n$ and a generating set for $B$ in which the generators of $B$ are scalar multiples of the standard basis vectors of $\mathbb{Z}^n$. In that situation, one can read off the index from the Smith normal form: it will be the product of the (absolute values of the) first $n$ diagonal entries if they are all nonzero, and the index will be infinite if the matrix has more than $m-n$ zeros in the entries.
If $n=m$ (so $B$ is generated by $n$ vectors from $\mathbb{Z}^n$ and the original matrix is a square), then the Smith normal form of the matrix has the same determinant as the original matrix; this determinant is just the product of the diagonal entries in the Smith normal form... which happens to be the index of $B$ in $\mathbb{Z}^n$. So computing the determinant of $B$ will do the trick: if the determinant is $0$, then the index is infinite; if the determinant is nonzero, then the (absolute value of the) determinant is the index of $B$. 
