Here is the question I want to answer:
Let $M$ be a finite $R$-module. Show that if $f \in \operatorname {End_R(M)}$ is surjective then it is also injective.
Hint: Let $R[X] \cong R^{[1]}$ and make $M$ into an $R[X]$-module by setting $Xm = f(m)$ for $m \in M.$ Show that $XM = M$ and apply Nakayama's Lemma.
My question is:
1- I do not understand why setting $Xm = f(m)$ for $m \in M$ will make $M$ into an $R[X]$-module. Could anyone clarify this to me, please?
2- Also, I do not see how I will use surjectivity in the proof that $XM = M$. Could any one elaborate this to me please?
Saying $M$ is an $R$-module is same as giving an abelian group $M$ along with a ring homomorphism $\psi: R\rightarrow \operatorname{End}_\mathbb Z (M)$. Since $f\in End_R(M)$, by the universal property of polynomial algebra $\exists! \ \Psi :R[X]\rightarrow \operatorname{End}_\mathbb Z (M)$ which extends $\psi$ and takes $X\mapsto f$. This makes $M$ an $R[X]$ module.
Note every $m\in M$ is of the form $f(m')=X.m'$ for some $m'\in M$.