We have the following linear transformation $\mathbb{Z}^2 \rightarrow \mathbb{Z}^2$ represented by the matrix \begin{equation*} A = \begin{pmatrix} 5 & -2 \\ -3 & 1 \end{pmatrix} \end{equation*} from example $2.38$ in Hatcher. It then says that this linear transformation is an isomorphism since its determinant is $-1$. I am not used to linear algebra over PIDs. Over fields, we are dealing with vector spaces and thus a matrix with a non-zero determinant is invertible. Hence I want to confirm my understanding.
Here are my thoughts. We have the multiplicative homomorphism $M_{n}(\mathbb{Z}) \rightarrow \mathbb{Z}$ given by $A \mapsto \text{det}(A)$. We know that a linear transformation represented by a matrix $A$ is an isomorphism iff it is invertible, i.e. there exists $A^{-1}$ such that $AA^{-1} = I_n = A^{-1}A$ and thus we must have that $det(A)$ divides $1$ in the group $(\mathbb{Z}, \times)$. Now the only units in this group are $1,-1$ so a linear transformation over $\mathbb{Z}$ is an isomorphism iff it is represented by a matrix with determinant $1,-1$. Now when can we deduce that the linear transformation is injective/ surjective simply from the determinant over $\mathbb{Z}$? I doubt for surjectivity but what about injectivity?
More generally :if $R$ is a commutative ring with $1$, then a matrix $A\in M_n(R)$ is invertible if and only if $\det(A)$ is a unit in $R$.
The first direction is what you've done for $\mathbb{Z}$: if there exists $B$ such that $AB=BA=I_n$, then $\det(A)\det(B)=1$. Since $\det(A)$ and $\det(B)$ lie in $R$, $\det(A)$ is a unit of $A$.
Conversely, if $\det(A)$ is a unit, consider the equality $com(A)^t A=Acom(A)^t=\det(A)I_n$ (where $com(A)$ is the comatrix of $A$), which is valid over any commutative ring with $1$.
Then $B=\det(A)^{-1} com(A)^t$ is an inverse of $A$ in $M_n(R)$ (note that $det(A)^{-1}$ exists and lie in $R$ by assumption.
The fact that $A$ is invertible if and only if the corresponding $R$-linear map $X\in R^n\mapsto AX\in R^n$ works as in the case of fields (composition of endomorphisms corresponds to product of representative matrices, and so on...)