How to prove it using snake lemma [closed]

If $f: M\rightarrow N$ and $g:N\rightarrow P$ such that $g\circ f: M\rightarrow P$ and diagram is commutative

then how we can prove that \begin{equation*} 0\rightarrow \ker(f)\rightarrow \ker(g\circ f)\rightarrow \ker(g)\rightarrow \operatorname{coker}(f)\rightarrow \operatorname{coker}(g\circ f)\rightarrow \operatorname{coker}(g)\rightarrow 0 \end{equation*} is an exact sequence.

closed as off-topic by Namaste, José Carlos Santos, Arnaldo, Henrik, XamSep 27 '17 at 20:11

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Namaste, José Carlos Santos, Arnaldo, Henrik, Xam
If this question can be reworded to fit the rules in the help center, please edit the question.

• The diagram you have is commutative by definition of $\circ$. – Arthur Sep 27 '17 at 6:36
• The obvious diagram to use the snake lemma on, with rows $M\to M\to N$ and $N \to P \to P$ (you want the vertical maps to be $f, g\circ f$ and $g$ respectively) do not have exact rows (at least as long as $M\to M$ and $P\to P$ are identity maps), so you can't use the snake lemma directly on that. – Arthur Sep 27 '17 at 6:43

2 Answers

$\require{AMScd} \newcommand{\coker}{\operatorname{coker}}$ I assume we are in an abelian category (because we are working with kernels, cokernels and exact sequences). Then finite (bi)products exist. I will take the freedom to work with elements. Let $f\colon M\rightarrow N$ and $g\colon N\rightarrow P$ be morphisms; then $g\circ f\colon M\rightarrow P$ is a morphism. Consider the diagram $$\begin{CD} 0 @>>> M @>a>> M\oplus N @>b>> N @>>> 0\\ & @VfVV @VhVV @VgVV\\ 0 @>>> N @>c>> P\oplus N @>d>> P @>>> 0 \end{CD}$$ where \begin{align} a(m) &= (m,f(m)),\\ b(m,n) &= f(m) -n,\\ c(n) &= (g(n),n),\\ d(p,n) &= p -g(n),\\ h(m,n) &= ((g\circ f)(m), n) \end{align} for all $m\in M$, $n\in N$ and $p\in P$. It is clear that $\ker h \cong \ker (g\circ f)$ and $\coker h \cong \coker (g\circ f)$ canonically. It is also clear that the first and second row are exact. It remains to show that the diagram commutes. For any $m\in M$ and $n\in N$ we compute \begin{align} (h\circ a)(m) &= h(a(m)) = h(m,f(m)) = ((g\circ f)(m),f(m))\\ &= (g(f(m)),f(m)) = c(f(m)) = (c\circ f)(m),\quad\text{and}\\ (g\circ b)(m,n) &= g(b(m,n)) = g(f(m)-n)) = g(f(m)) - g(n)\\ &= (g\circ f)(m) - g(n) = d((g\circ f)(m),n) = d(h(m,n)) = (d\circ h)(m,n). \end{align} Thus, the diagram commutes and we may apply the snake lemma to obtain the desired exact sequence.

The snake lemma is not immediately applicable as described in my comment above. So instead, here is a check that it is exact at each point.

1. $\ker f$ is clearly contained in $\ker(g\circ f)$, and inclusion is an injective map.

2. The map $\ker(g\circ f)\to \ker g$ is given by $f$ restricted to the subset $\ker f\subseteq M$. Clearly an element goes to $0$ here iff it is contained in $\ker f$.

3. The map $\ker g \to \operatorname{coker} f$ is given by restriction of the canonical projection $N\to N/\operatorname{Im}f$. An element goes to $0$ in the canonical projection iff it is the image of an element in $M$, so we clearly have $\operatorname{Im}\subseteq \ker$ at this point. Reversely, say we have an element $n\in \ker g$ that goes to $0$ in the projection. That means that there is an $m\in M$ with $f(m) = n$. But $g(n) = 0$, so $g(f(m)) = 0$, and thus $m\in \ker(g\circ f)$.

4. $\operatorname{coker} f \to \operatorname{coker}(g\circ f)$ is the only map that requires real justification for its existence, because it's not simply a restriction or composition. I will name it $\bar g$. Take an element $\bar n\in \operatorname{coker} f$. It has a representative $n_1\in N$. Take $g(n_1)\in P$ and project it down to $\operatorname{coker}(f\circ g)$ to get $\bar g(\bar n)$.
However, we could've chosen a different representative $n_2$ of $\bar n$. We need to show that this doesn't change which $\bar g(\bar n)$ we end up with. Note that since $n_1$ and $n_2$ both represent $\bar n$, their difference $n_2-n_1$ goes to $0$ in the cokernel. Therefore $n_2-n_1$ is the image of some $m\in M$. That means that $g(n_2) - g(n_1) = g(f(m))$, which goes to $0$ in $\operatorname{coker}(g\circ f)$. So the difference between possible candidates for $\bar g(\bar n)$ is $0$, and they are therefore the same. This makes $\bar g$ well-defined.
Now for exactness. If an element in $\bar n \in \operatorname{coker}(g\circ f)$ is the image of some $n\in \ker g$, then $n$ is a representative of $\bar n$ as described above. Since $n\in \ker g$, we have $g(n) = 0$, and thus $\bar g(\bar n) = 0$. Reversely, let $\bar n$ be such that $\bar g(\bar n) = 0$. Pick a representative $n\in N$ of $\bar n$. $\bar g(\bar n) = 0$ means that there is some $m\in M$ such that $g(f(m)) = g(n)$. Now note that $n-f(m)$ also represents $\bar n$. However, $g(n-f(m)) = 0$, which means that $n-f(m)\in \ker g$.

5. We have $\operatorname{Im}(g\circ f)\subseteq \operatorname{Im}g$, which means that $\operatorname{coker}(g\circ f)\to \operatorname{coker}(g)$ is well-defined (it is $P/I \to P/J$ for a $J$ that contains $I$). Take an element $\bar n \operatorname{coker} f$. It has some representative $n\in N$. Clearly $g(n)$ goes to $0$ when we divide out by $\operatorname{Im}g$. Reversely, say we have an element $\bar p \in \operatorname{coker}(g\circ f)$ which goes to $0$ in $\operatorname{coker}g$. That means that a representative $p\in P$ of $\bar P$ is in the image of $g$, so there is some $n\in N$ with $g(n) = p$. Projecting $n$ down into $\operatorname{coker}f$ gives an $\bar n$ which maps to $\bar p$.

6. The map $\operatorname{coker}(g\circ f)\to \operatorname{coker}(g)$ as described in the paragraph above is clearly surjective, being (isomorphic to) the canonical projection $P/I \to P/I\Big/ J/I$ by the third isomorphism theorem.