This question is related to another problem I asked a question about here. In fact, it is part (b) of a problem whose part (a) was
Let $X = \{ x_{1}, x_{2}, \dots, x_{n}\}$ be a set of elements of the free abelian group $A_{n}$. Let $M$ be the $n\times n$ matrix of coordinates of elements $x_{i}$ in terms of the basis $B=\{b_{1},b_{2},\dots, b_{n}\}$ (where $x_{i}=r_{i1}b_{1}+r_{i2}b_{2}+\cdots + r_{in}b_{n}$, and the coordinates $r_{ij}$ define the matrix $M=(r_{ij})$).
Assume $M^{\prime}$ is a matrix obtained from $M$ by a sequence of elementary transformations.
Prove that $M^{\prime}=ZMY$, where $Z$, $Y$ are some matrices in $GL(n, \mathbb{Z})$.
For the part of the problem I'm asking about now, I need to show that $X$ is a basis for $A_{n}$ if and only if $\det (M) = \pm 1$.
For the direction $(\Longleftarrow)$, I was given the hint: "How is $\det(M)$ changed under transformations of $M$?" Using this hint, I was able to get to the following point:
Suppose $\det M = \pm 1$. By Part (a), if $M^{\prime}$ is a matrix obtained by a sequence of elementary transformations on $M$, then $M^{\prime}=ZMY$, where $Z$, $Y$ $\in GL(n,\mathbb{Z})$. Since $Z, Y \in GL(n, \mathbb{Z})$, $\det(Z) = \pm 1$ and $\det(Y) = \pm 1$. From linear algebra, we know that the determinant of a product of matrices is equal to the product of the determinants, so $\det(Z) \cdot \det (M) \cdot \det(Y) = (\pm 1) (\pm 1) (\pm 1) = \pm 1 = \det(M^{\prime})$.
This was as far as I was able to get though, because I am having trouble understanding how to reconcile this with $X$ being a basis for $A_{n}$.
For the $(\Longrightarrow)$ direction, I was able to get even less, primarily because of the fact that I don't understand how $X$ being a basis for $A_{n}$ has anything to do with what the determinant of $M$ is.
I started by saying that if $X$ is a basis for $A_{n}$, then $\forall a_{i} \in A_{n}$, $\exists c_{i1}, c_{i2}, \cdots , c_{in} \in \mathbb{Z}$ such that $a_{i}=c_{i1}x_{1} + c_{i2}x_{2}+\cdots + c_{in}x_{n}$, where the $c_{ij}$ are the entries in the matrix $M$. And wasn't sure where to go from there.
Could someone please tell me where to go from where I've stopped (in both directions)? I'm very much stuck and this point. (And be prepared to be patient and answer lots of follow-up questions!)
Thank you! :)