TITLE: If two modules are each isomorphic to direct summands of the other, must they be isomorphic?
QUESTION [6 upvotes]: Let $R$ be a ring. $M,N$ are left $R$-modules such that $M$ is isomorphic to a direct summand of $N$ and $N$ is isomorphic to a direct summand of $M$. Could we get that $M \cong N$?  (This holds if $M,N$ are finitely generated.  I think it also holds if $M,N$ are semisimple.  But I don't have a proof for the general case.)

REPLY [6 votes]: This is not always true.  Here's the simplest example I know of.  Let $R=\mathbb{Z}$, and let $M$ be the set of all bounded sequences of elements of $\mathbb{Z}[\sqrt{2}]$, which form an abelian group under pointwise addition.  It is easy to see that $M\cong M\oplus\mathbb{Z}[\sqrt{2}]\cong M\oplus\mathbb{Z}^2$.  Much less obviously, Jeremy Rickard proved on MO that $M\not\cong M\oplus \mathbb{Z}$.  Taking $N=M\oplus \mathbb{Z}$, then, $M$ is a direct summand of $N$ and $N$ is a direct summand of $M\oplus\mathbb{Z}^2\cong M$ but $M$ and $N$ are not isomorphic. 
There are many other examples of similar phenomena.  For instance, by theorem of Corner, there exists an abelian group $M$ such that $M\cong M^3$ but $M\not\cong M^2$.  Taking $N=M^2$, we then have that $M$ is a direct summand of $N$ and $N$ is a direct summand of $M^3\cong M$, but $M$ and $N$ are not isomorphic.  For references and some general discussion of results like these, see the answers to this question on MO.