Determinant of matrix representations of endomorphisms of a finite free module $M$ Suppose $\varphi : M \rightarrow M$ is a $A$-endomorphism of a $A$-free module $M$ of finite rank $n$ that can be represented as an $n \times n$ matrix over some basis of $M$ with entries in $A$. If $im(\varphi)$ is a free module and $\text{rank}(im(\varphi)) < n$, can we deduce $\det(X) = 0$?
And can some weaker condition be put on the image such that $\det(X) = 0$? $\varphi$ being injective is not enough because $x \mapsto 2x$ as an endomorphism of $Z$ is injective but can have $\det(X) \neq 0$.
 A: Another way to see this is using exterior powers. The determinant of $\varphi$ can be described as the scalar $d$ such that $\bigwedge^n\varphi:\bigwedge^n M\to\bigwedge^n M$ is given by multiplication by $d$ (which exists since $\bigwedge^n M$ is free of rank $1$).  Now suppose the image of $\varphi$ is contained in a free submodule $N\subset M$ of rank less than $n$.  Then $\varphi$ factors through the inclusion $N\to M$ so $\bigwedge^n\varphi$ factors through $\bigwedge^n N\to\bigwedge^n M$.  But since $N$ is free of rank less than $n$, $\bigwedge^n N=0$, so this means $\bigwedge^n\varphi=0$ and hence $d=0$
A: I assume that $A$ is a commutative ring with unity.
This can be understood by means of the adjugate matrix: fix a basis on $M$ and suppose that $\varphi$ is given by the matrix $\Phi\in A^{n\times n}$. Then the adjugate matrix of $\Phi$, denoted by $\operatorname{adj}(\Phi)$ is defined by the formula
$$
\operatorname{adj}(\Phi)=((-1)^{i+j}\mu_{(j,i)}(\Phi))_{1\leq i,j\leq n}
$$
where $\mu_{(j,i)}(\Phi)$ denotes the $(j,i)$-minor of $\Phi$, i.e. the determinant of the $(n-1)\times (n-1)$-matrix obtained from $\Phi$ by deleting the $j$-th row and the $i$-th column. Then a computation shows that
$$
\Phi\cdot \operatorname{adj}(\Phi)=\operatorname{adj}(\Phi)\cdot \Phi=\det(\Phi)\cdot \operatorname{Id}_{n\times n}.
$$
Now let $\psi:M\to M$ be defined by the matrix $\operatorname{adj}(\Phi)$. Then we have $\psi\circ \varphi=\det(\Phi)\cdot \operatorname{Id}_{M}$, so in particular $\psi(\operatorname{im}(\varphi))=\det(\Phi)\cdot M$. If $I$ denotes the annihilator of $\det(\Phi)$ in $A$, then $\det(\Phi)\cdot M\cong (A/I)^{\oplus n}$, and thus $\psi$ induces a surjection $A^{\oplus(n-1)}\cong\operatorname{im}(\varphi)\twoheadrightarrow (A/I)^{\oplus n}$. This then decends to a surjection $(A/I)^{\oplus(n-1)}\twoheadrightarrow (A/I)^{\oplus n}$ which is possible only when $A/I$ is trivial (as commutative rings have the IBN property). Hence $I=A$ and thus $\det(\Phi)=0$.
Actually, this argument shows that it suffices to assume that $\operatorname{im}(\varphi)$ is contained in a free submodule of rank $n-1$.
