TITLE: Two abelian groups, each being direct factor of the other
QUESTION [6 upvotes]: Let $M$ and $N$ be two abelian groups. Suppose that $M$ is a direct factor of $N$ (i.e. there are homomorphisms $i:M\rightarrow N$ and $p:N\rightarrow M$ such that $p\circ i=id_M$) and $N$ is also a direct factor of $M$. Is $M$ isomorphic to $N$?

REPLY [6 votes]: Arturo Magidin's answer is absolutely correct, but there's an earlier counterexample than Corner's.
This question is Kaplansky's first "test problem" in his 1954 book on Infinite Abelian Groups, and was solved by Sąsiada in 1961:
Sąsiada, E., Negative solution of I. Kaplansky's first test problem for Abelian groups and a problem of K. Borsuk concerning cohomology groups, Bull. Acad. Pol. Sci., Ser. Sci. Math. Astron. Phys. 9, 331-334 (1961). ZBL0105.25902.