TITLE: Given a commutative ring $R$ and an epimorphism of free modules $R^m \to R^n$ is then $m \geq n$?
QUESTION [15 upvotes]: If $\varphi:R^{m}\to R^{n}$ is an epimorphism of free modules over a nontrivial commutative ring, does it follow that $m \geq n$?

This is obviously true for vector spaces over a field, but how would one show this over just a commutative ring?
-----Edit
Is there any way to use the following?
If $\varphi : M \to M'$ is an epimorphism of left $S$-modules and $N$ is any right $S$-module then $id_N \otimes \varphi $ is an epimorphism.

REPLY [5 votes]: I am answering this question just because it took me a while to figure out a good proof, so it may help other people as well.
If $\varphi: R^m\rightarrow R^n $ is your epimorphism then you can construct the exact sequence
$$\text{Ker}(\varphi) \xrightarrow{\ \ \iota \ \ }R^m \xrightarrow{\ \ \varphi \ \ }R^n\longrightarrow 0.\quad (*)$$
Let $\mathfrak{m}$ a maximal ideal of $R$. Therefore $R/\mathfrak{m}$ is a field and a $R$-module. Appling right-exactness to $(*)$ (Proposition 2.18, Introduction to Commutative Algebra - Michael Atiyah), we conclude that
$$R/\mathfrak{m}\otimes_R\text{Ker}(\varphi) \xrightarrow{\ 1\otimes\iota \ }R/\mathfrak{m}\otimes_R R^m \xrightarrow{\ 1\otimes\varphi \ }R/\mathfrak{m}\otimes_R R^n\longrightarrow 0,$$
is an exact sequence. 
Therefore $1\otimes\varphi$ is surjective. Since, $R/\mathfrak{m}\otimes_R R^m$  and $R/\mathfrak{m}\otimes_R R^n$ are vector spaces over $R/\mathfrak{m}$ and $1\otimes\varphi$ is a linear map between $R/\mathfrak{m}\otimes_R R^m$  and $R/\mathfrak{m}\otimes_R R^n$ over $R/\mathfrak{m}$, we have that $m\geq n.$