injective $R$-module homomorphism vs. injective ring homomorphism The following question has been lingering in my mind for months. 
Let $R$ be a non-zero commutative ring with $1$. Consider $\phi : R^n \rightarrow R^m$,
1) as an injective $R$-module homomorphism.
2) as an injective ring homomorphism. (by definition $\phi(1)=1$.)
In which of the above cases, we can deduce that $n \leq m$? and why?
 A: Let $R = \mathbb{Z}/2\mathbb{Z} \times \mathbb{Z}/2\mathbb{Z} \times \ldots \times \mathbb{Z}/2\mathbb{Z}$ (infinitely many times). Then as a ring $R^m = R^n = R$ $\forall m, n \in \mathbb{N}$. So the answer is negative in the case 2. But in the first case the answer is YES. But proof for general commutative ring is complicated. Here I am giving an easy proof assuming $R$ is commutative noetherian ring. After localizing at a minimal prime ideal we may assume that $R$ is a zero dimensional local ring ie artinian ring and $\phi : R^n \rightarrow R^m$ is an injective $R$ module homomorphism. Now length of $R$ as a $R$ module is finite and is equal to $l$ (say). Then comparing the length of both sides we have $ln \leq lm$. This means that $n \leq m$
A: Let $S$ be your favorite non-zero commutative ring with $1$ and let $R$ be the product of countably many copies of $S$.  Then $R^n$ is the product of countably many copies of $S$ for any $n\in\mathbb{N}$, since the union of finitely many countable sets of countable.  Therefore $R^n$ and $R^m$ are isomorphic as rings for all $m,n\in\mathbb{N}$, so without further assumptions we cannot deduce $n\leq m$ in case $(2)$.
EDIT: I had originally written that this argument also applies in case $(1)$, but it does not; see the comments below.
