When does the short exact sequence of Module and submodule not split? Consider a commutative Ring $R$ and a module $M$ over $R$. Now let $N \subset M$ be a submodule. Then we have a canonical short exact sequence:
$$0 \rightarrow N \xrightarrow{i} M \xrightarrow{p}M/N \rightarrow 0$$
The $i$ is the inclusion and $p$ is the projection onto the quotient module. Up until now, I was under the impression that this sequence always splits by the splitting Lemma. The way I thought about it was, that the map
$$ r: M/N \rightarrow M\; ; \; m+N \mapsto m$$
defines a right-inverse to $p$, i.e. $p \circ r = id_{M/N}$. Since there are multiple $m$, mapping to the same element in $M/N$, I would choose a member of each class, sucht that the map becomes a homomorphism.
But I recently read that it only splits, if $N$ is a direct summand of $M$, which means that there is another submodule $N'$ such that $N \oplus N' = M$. But the existence of $N'$ somehow makes the splitting "obsolete", since this is exactly the definition of a split sequence. In other words, this is an if and only if statement. So $N$ is a direct summand iff the above SES splits. But this doesn't give me any more information on when this sequence splits... So my questions are the following:

*

*Am I allowed to define $r$ in this way, and if yes, why is the map $r$ not a right-inverse to $p$?

*Are there ways to check, if $N$ is a direct summand, without trying to split the above SES?

*Can someone provide a counterexample of $N$ and $M$ such that the sequence does indeed not split?

Edit: I guess I have to clarify my question:
In the left map, I really want the canonical inclusion of $N$ into $M$ as a submodule. For example, I won't allow the sequence $0 \rightarrow \mathbb{Z} \xrightarrow{\cdot 2} \mathbb{Z} \rightarrow \mathbb{Z}_2 \rightarrow 0$. In this case, the left map would be $id$ and the right one $0$.
 A: *

*Why is your $r$ well-defined? To make it easier for you, think about an explicit example: Is $$\mathbb{Z}/42 \mathbb{Z} \to \mathbb{Z}, \ n + 42 \mathbb{Z} \mapsto n$$ well-defined? (What are all maps $\mathbb{Z}/42 \mathbb{Z} \to \mathbb{Z}$?)

*Depending on the situation, there are many. For example, you can check whether the sequence is left-split. If you know that $N$ is an injective module or that $M/N$ is projective, then you also immediately know that the sequence splits. All of this is subsumed by the computation of $\operatorname{Ext}^1$-groups. Note however that being a direct summand is not the same thing as splitting, but you're probably interested in the splitting question for now.

*Which examples have you looked at? There are plentiful of such examples. Look back at the example I suggest in 1 and play with it.

A: *

*Your map is $r$ not well-defined. If $n\in N$, then $m+n+N=m+N$ in $M/N$, yet your 'map' $r$ maps these elements into $m+n$ and $m$ respectively.


*Even if $N$ is a direct summand your sequence may not be split. There exist non-split sequences of the form
$$0\to N\to N\oplus M\to M\to 0,$$
because the left and right maps do not have to be the inclusion and the projection respectively.


*Let $R=\mathbb{Z}.$ Then the sequence
$$0\to\mathbb{Z}\xrightarrow{\cdot 2}\mathbb{Z}\to\mathbb{Z}/2\mathbb{Z}\to 0$$is not split.
