Let L, M, N, be A-modules, with A commutative, unit ring. I'm trying to prove that if $f: L \rightarrow M$ is injective and $g: M \rightarrow N$ is surjective then the short sequence is exact
$0 \rightarrow L \rightarrow M \rightarrow N \rightarrow 0$
I have problem when trying to prove $\operatorname{Im}(f) = \operatorname{Ker}(g)$.
Some texts say that it is a consequence of the facts $0 \rightarrow L \rightarrow M$ is exact $\iff$ $f$ is injective.
$M \rightarrow N \rightarrow 0 $ is exact $\iff$ $g$ is surjective.
Thank you.
Counterexample:
$\mathbb{Z}\overset{\cdot 4}{\rightarrow}\mathbb{Z}$ is injective, and $\mathbb{Z}\rightarrow\mathbb{Z}_2$ is surjective, but $$0\rightarrow\mathbb{Z}\overset{\cdot 4}{\rightarrow}\mathbb{Z}\rightarrow\mathbb{Z}_2\rightarrow 0$$ is not exact since $(4)\neq (2)\subseteq \mathbb{Z}$