2.3 Let $A$ be the matrix of a homomorphism $\varphi:\mathbb Z^n\to\mathbb Z^m$ of free $\mathbb Z$-modules.
(a) Prove that $\varphi$ is injective if and only if the rank of $A$, as a real matrix, is $n$.
(b) Prove that $\varphi$ is surjective if and only if the greatest common divisor of the determinants of the $m\times m$ minors of $A$ is $1$.
This is from Chapter 12 (1st Edition) of Artin. I believe it is Ch 14 in the 2nd Edition. I saw this question here earlier, but it appears to have been deleted. After coming across it in Artin, I tried it myself and am stuck, particularly on (b). I thought to extend $\varphi$ to a $\mathbb Q$-homomorphism $\mathbb Q^n\to\mathbb Q^m$ and use Smith normal form, but I am having trouble making this work and not sure if it will. Does anyone have a direction that may be helpful?
Also, is there a generalization of this exercise? For instance, a homomorphism $\varphi:R^n\to R^m$ with $R$ a Euclidean domain?