$R^n \cong R^m$ iff $n=m$

How can i show that two $R$-modules of finite rank are isomorphic if and only if they have the same rank, i.e., $R^n \cong R^m$ iff $n=m$.

-
I wonder why the comm.alg. tag was added? – Mariano Suárez-Alvarez Sep 10 '15 at 5:23
It appears to be a case of "did s/he or didn't s/he intend to say 'commutative'?" There are always two ways to go from here: 1) assume an unintended omission was likely and make the statement valid by adding it or 2) respond with a counterexample to the literal statement, which may or may not thwart the original intent. Both ways have their problems... @theorem Are you still around maybe to provide closure by telling us what you originally intended? Thanks – rschwieb Sep 10 '15 at 18:36
Additionally, $R$ should be required nonzero. – darij grinberg Sep 27 '15 at 14:45

This is true of rings that have the "IBN" (invariant basis number property). Among these are commutative rings--which is probably what you meant.

Use Krull's theorem to find a maximal ideal $\mathfrak{m}$ of $R$ and use the fact that since $R^n\cong R^m$ as $R$-modules that $(R/\mathfrak{m})\otimes_R R^n\cong (R/\mathfrak{m})\otimes_R R^m$ as $R/\mathfrak{m}$-modules. But, from basic module theory this is just $(R/\mathfrak{m})^n\cong(R/\mathfrak{m})^m$ and so we've reduced the problem from general rings to fields--something you should be familiar with.

-

If localization is not your thing, there is a different elementary proof.

Just as in linear algebra, you can prove that the set of R linear transformations from $R^n\to R^m$ is isomorphic to the set of $n\times m$ matrices over R. An isomorphism would amount to an $n\times m$ matrix A and an $m\times n$ matrix B such that AB and BA are identity matrices.

Now pick a maximal ideal M of R, and apply the quotient map from R to the field R/M entry wise to the matrix. Now you have two matrices over a field which multiply to identities in either order, giving an isomorphism of vector spaces. Since we know two isomorphic vector spaces have equal dimension, m=n.

-

A simple counterexample in the general case is the following.

Let $k$ be a field, and let $R$ be the quotient of the free algebra on letters $x_1$, $x_2$, $y_1$, $y_2$ by the ideal generated by the elements $$x_1y_1+x_2y_2-1, \qquad y_1x_1-1, \qquad y_2x_1, \qquad y_1x_2, \qquad y_2x_2-1.$$ Then the free modules $R$ and $R^2$ are isomorphic. This follows at once, since the matrices $\begin{pmatrix}x_1&x_2\end{pmatrix}$ and $\begin{pmatrix}y_1\\y_2\end{pmatrix}$ are mutually inverse.

The difficulty here lies in showing that the ring $R$ is non-trivial.

-
I guess one can make the argument that the commutative-algebra tag was not on the original question, so this is relevant... – rschwieb Sep 10 '15 at 4:44
@rschwieb, even if it had been there it would still obviously be relevant – Mariano Suárez-Alvarez Sep 10 '15 at 4:46
Dear @mariano : I don't think I follow the last comment. For commutative R with $1\neq 0$, there is no counterexample to the OP claim. That's probably why the comm alg tag was added: to correct a probable omission such that the claim is true. I thought I recognized this as a noncommutative counterexample. I hope this clarifies what I meant .Regards – rschwieb Sep 10 '15 at 10:05
I cannot imagine how can putting something into context can be irrelevant. – Mariano Suárez-Alvarez Sep 10 '15 at 17:33
Dear @Mariano : If "commutative algebra" had been among the original tags, I think you would have to admit that this solution wouldn't address the original question at all. However, this is a grey area case since (it has now come to light) that the OP did not stipulate it. The content isn't without interest of course, and would make a great comment in any case. I guess I may have rubbed you the wrong way by bringing up relevancy. My point was just to say that solutions ought to be solutions to the OP in cases like this. (cont) – rschwieb Sep 10 '15 at 18:27