Index of a sublattice in a lattice and a homomorphism between them
I am asked to show that if $\phi_A$ is the homomorphism from $\mathbb{Z}^k \rightarrow \mathbb{Z}^k$ given by $\phi_A(x)=xA$ then the index of $\phi(\mathbb{Z}^k)$ in $\mathbb{Z}^k$ is finite if and only if $A$ is nonsingular.
While this seems intuitive to me, one obstacle to proving this is that I am not quite sure of how to represent the index of a sublattice in a lattice! The way I understand it, $j\mathbb{Z}^k$ has index $j^k$ in $\mathbb{Z}^k$, for an integer $j$. I am used to indices in finite groups but not infinite groups, so is the trick to show this sort of correspondence?
Furthermore, I would like to know if this is a valid sketch of a proof:
If $A$ nonsingular, $A'$ is in Smith Normal Form ($PAQ=A'$) and $\det A'$ is nonzero, so the columns of $P^{-1}$ form a basis for $\mathbb{Z}^k$ and the columns of $AQ$ form a basis for the sublattice such that each column in the basis for the sublattice is an integral multiple of the columns in the basis for the lattice $\mathbb{Z}^k$, and since these multiples are given by the diagonal entries of SNF, we have that for every one point in the sublattice, there are $\prod a_i=\det A'=\det A$ points in the main lattice.
If $A$ singular, we have the same as (1) except now at least one of these columns is a multiple $0$ times the column for the basis in the main lattice, so there are infinitely many points in the main lattice for each point in the sublattice.
Solution 1:
Write $A$ in SNF: $D=PAQ^{-1}$ with $P,Q$ invertible and $D$ diagonal. Then the image of $\phi_A$ equals the image of $\phi_{PA}$. But $PA=DQ$, so the image of $\phi_A$ equals also the image of $\phi_{DQ}$. Now let's see how the image of $\phi_{DQ}$ looks like: it is generated by the images of the canonical vectors of $\mathbb{Z}^n$ and therefore coincides with the subgroup of $\mathbb{Z}^n$ generated by $d_1l_1(Q),\dots,d_rl_r(Q)$, where $d_1\mid\dots\mid d_r$ are the non-zero diagonal elements of $D$, and $l_1(Q),\dots,l_r(Q)$ are the first $r$ rows of $Q$. Since $Q$ is invertible, its rows provide a basis for $\mathbb{Z}^n$, so we deduce now that $\mathbb{Z}^n/\mbox{Im}(\phi_A)$ is isomorphic to $\mathbb{Z}/d_1\mathbb{Z}\oplus\cdots\oplus\mathbb{Z}/d_r\mathbb{Z}\oplus\mathbb{Z}^{n-r}$. The only case when the index of the image of $\phi_A$ is finite is $r=n$ and then the index is $|d_1\cdots d_n|$, that is, $|\det A|$.