The following problem is canonical:
Suppose $A$ is a commutative unitary ring, and $M$ is a finitely generated module over $A$. If an endomorphism $f\colon M\to M$ is surjective, then it's also injective.
It appears in Eisenbud's Commutative Algebra, or another MSE post. There're two canonical ways to crack it. However, I'm considering another method, but get stuck at some point. I wonder whether my method could be completed. I want some help on this.
First, note that injectivity and surjectivity are local properties, we can assume that $(A,m)$ is a local ring and $k=A/m$ is the residue field of $m$. Now we tensor the following exact sequence $$0\to N=\ker f\to M\xrightarrow f M\to 0$$ and obtain a new exact sequence $$N\otimes_A k\to M\otimes_A k\xrightarrow{f\otimes1}M\otimes_A k\to 0$$ Since $M$ is finitely generated, $M\otimes_A k$ is finite dimensional over $k$, $f\otimes1$ is surjective therefore an isomorphism, thus the image of $N\otimes_A k$ in $M\otimes_A k$ is zero, therefore $N\subseteq mM$. However, I don't know how to proceed then. I want to take advantage of Nakayama's lemma.
Well, as user26857 said, there's no evidence that $N$ is immediately finitely-generated, so even if $N\otimes_A k=0$, $N$ needn't be $0$. I don't know whether $N\subseteq mM$ could be used to lift the inverse map of $f\otimes1$, etc. The next step is still unclear.
Note that if $f\otimes1$ is surjective, by Nakayama's lemma, $f$ is also surjective, so the reduction is somewhat safe. Note also that $M\otimes_A k$ is also fiber of the module $M$ over $m$, and the pattern is quite similar to inverse function theorem in smooth category, which lifts a linear isomorphism to a local diffeomorphism.
Any help? Thanks!
Remark: For completeness, here's the proof on Eisenbud's book:
We may regard $M$ as a module over $A[X]$, letting $X$ act by $X.m=f(m)$ for $m\in M$. If we set $I=(X)$, then since $f$ is surjective, $IM=M$ and by a version of Nakayama's lemma, there exists $g\in A[X]$ such that $(1-g(X)X)M=0$, therefore $1-g(f)f=0$, thus $g(f)$ is the inverse to $f$.
If somebody could point out a nice geometric viewpoint of the preceding proof, it could also be a good answer.