# A free submodule of a free module having greater rank the submodule

Let $R$ be a commutative ring, and let $N\leq M$ be $R$-modules. Then, suppose $M$ and $N$ are free over $R$, if $R$ is an integral domain, then -considering the fraction modules over the quotient field of R- $$\text{rank}_R N\leq \text{rank}_R M$$ However, I wonder what is the case when $R$ is not an integral domain, can we guarantee the above inequality? Or are there examples of how that is not accomplished in general?

Observation: Whenever $\text{rank}_RM=1$, I know tha statement is true since $$M\cong R$$ And in that case, we know that every free $R$-submodule of $R$ is zero or a principal ideal generated by a non-zero divisor element, so we obtain the desire inequality.

Note: For me, ring and unitarian ring are the same thing.

However, if you are interested in the non-commutative case, there exists the following notion: a ring $R$ is said to have the IBN (invariant basis number) property if $R_R^n\cong R_R^m$ implies $n=m$, for every positive integers $n,m$. Well, there do exist not IBN rings. Also, it is possible to find a ring $R$ and an $R$-module $M_R$ such that $M_R\cong M_R^n$ for every $n\geq 1$. This gives you examples of isomorphic modules of different "rank" (in fact, the rank is well defined only for commutative rings). I hope I have not digressed too much.