I am trying to prove the following:
Let $R$ be a commutative ring and $M$ be a free $R$-module having a finite basis of $n$ elements. Let $T:M\to M$ be a surjective $R$-module homomorphism. Then $T$ is injective.
Let $I$ be a maximal ideal of $R$. Note that $I$ annihilates $\widehat M:=M/IM$ and thus $\widehat M$ is an $\bar (R/I)$-module. Write $\bar R=R/I$.
For each $r\in R$, write $\bar r$ to denote $r+I$ and for each $m\in M$ write $\widehat m$ to denote $m+IM$.
Define $\widetilde T:\widehat M\to \widehat M$ as $$\widetilde T(\widehat m)=\widehat{Tm},\quad \forall \widehat m\in \widehat M$$ It is easy to see that $\widetilde T$ is well defined. Note that $\widetilde T$ is a surjective linear operator on a vector space and hence is also injective.
Note that if $\mathcal B=\{e_1,\ldots,e_n\}$ is a basis of $M$, then $\widehat B=\{\widehat e_1,\ldots,\widehat e_n\}$ is a basis for $\widehat M$.
Now suppose $T(r_1e_1+\cdots+r_ne_n)=0$.
Then we get $\widetilde T(\bar r_1\widehat e_1+\cdots+\bar r_n\widehat e_n)=\widehat 0$. Since $\widetilde T$ is injective, we get $\bar r_i=\bar 0$ for all $i$. But this doesn't lead to $r_i=0$.
Can anybody see how to complete the proof from here?