Let $M$ be a free $\mathbb{Z}$-module of rank $n$, and $f:M\to M$ be a homomorphism of $\mathbb{Z}$-modules.
$A\in \mathrm{Mat}_n(\mathbb{Z})$ is the matrix representing $f$ with respect to a fixed $\mathbb{Z}$-basis of $M$.
Show that if $\mathrm{Coker}(f):=M/\mathrm{Im}(f)$ is finite, then $|\det A|=|\mathrm{Coker}(f)|$, and for a prime $p$ with $p\nmid |\mathrm{Coker}(f)|$ the induced map $f':M/pM\to M/pM$ is an isomorphism of $\mathbb{Z}/(p)$-modules.