Submodule of a free module with the same rank is a direct summand

Let $M$ and $N$ be finite rank free modules over a ring with invariant basis number such that $N \subseteq M$ is a submodule of $M$. Suppose $M$ and $N$ have the same rank $n$. Is it possible for $$M=N \oplus P$$ for some nonzero module $P$? Would this contradict the assumption that the rank of $M$ is $n$?

• Did you mean torsion free module? – steven gregory Feb 2 '16 at 23:36
• @StevenGregory I specifically had free modules in mind but I guess an equivalent question could be formulated for finitely generated torsion free modules. – leibnewtz Feb 2 '16 at 23:38
• @StevenGregory Oops sorry I misunderstood your question. Yes wouldn't $P$ have to be torsion free? If any such $P$ exists its annihilator would have to be $0$, otherwise it would contradict the fact that $M$ is free. But the question is whether such a $P$ exists in the first place – leibnewtz Feb 2 '16 at 23:39
• If you are willing to allow modules of infinite rank then there are easy counterexamples. – DBS Feb 3 '16 at 2:56

A ring over which this is not possible is called a stably finite ring (to relate your definition to the one on Wikipedia, take $A$ and $B$ to be the matrices of the projection $M\to N$ and the inclusion $N\to M$, respectively). Here's an example of a ring with invariant basis number that is not stably finite. Let $k$ be a field and let $R=k\langle x,y\rangle/(xy-1)$. Then $R$ has invariant basis number, since there is a ring-homomorphism $R\to k$ (sending $x$ and $y$ to $1$, for instance) and $k$ has invariant basis number. Now take $M=R$, $N=Rx$, and $P=\{z\in R:zyx=0\}$. Then since $xy=1$, $N$ is free of rank $1$ (being isomorphic to $M$ via right-multiplication by $x$) and $M=N\oplus P$ (since right-multiplication by $yx$ splits the inclusion $N\to M$). But $P$ is nonzero since it contains $1-yx$, and $yx\neq 1$ in $R$.
• Thanks for your response! The wikipedia article says that all commutative rings are stably finite. Are you assuming that $x$ does not commute with $y$ in your example? – leibnewtz Feb 3 '16 at 1:20
• Yes, $k\langle x,y\rangle$ denotes the ring of noncommutative polynomials in $x$ and $y$ with coefficients in $k$. – Eric Wofsey Feb 3 '16 at 1:22