An exact sequence of homology in abelian categories $\renewcommand{\im}{\mathop{\rm im}}\DeclareMathOperator{\coker}{coker}$Let $A\xrightarrow{f}B\xrightarrow{g}C$ be a complex in an abelian category, I.e. $gf=0$.
Let $H:=\coker(\im(f)\to \ker(g)).$
Then $H\xrightarrow{i}\coker(f)\xrightarrow{p}\im(g)$ is exact.
Could you give me a proof of it?
I can say that $i$ is a monomorphism and $p$ is epi.
I know that $\im(f)=\ker(\coker(f))=\coker(\ker(f))$ and that $\im(f)\to \ker(g)$ is monomorphic.
But I want $\im(i)=\ker(p).$ I cannot prove even that $pi=0.$
 A: Let us denote the objects by capital and corresponding arrows by small letters: ${\rm coim} f:A\to {\rm Coim} f$. Sorry, I write from left to right.
First of all, as in any Abelian category, $f={\rm coim} f\cdot {\rm im}f$, so 
$$fg=0 \iff {\rm coim}f\, {\rm im}f\cdot{\rm coim}g\,{\rm im}g=0 \iff {\rm im}f\cdot {\rm coim g}=0,$$
as ${\rm coim} f$ is epi and ${\rm im}g$ is mono, moreover, we also have ${\rm ker}g={\rm ker}({\rm coim}g)$ and ${\rm coker}f={\rm coker}({\rm im}f)$.
Hence wlog. we can assume that $f$ is mono ($f={\rm im}f$) and $g$ is epi ($g={\rm coim} g$), and this way $A={\rm Im}f$ and $C={\rm Coim}g$ is also assumed.
We can then draw a (bit simplified) diagram with
$$ A\underbrace{\overset{j}\to {\rm Ker}g \to B}_f \overbrace{\to{\rm Coker}f \underset{p}\to C}^g$$
where $H={\rm Coker}j$. As $j\cdot{\rm ker}g\cdot{\rm coker}f=f\cdot{\rm coker}f=0$, we get the $i:H\to{\rm Coker}f$. Now 
$${\rm coker}j\cdot i\, p= {\rm ker}g\cdot {\rm coker}f\cdot p= {\rm ker}g\cdot g=0$$
hence, $ip=0$, because ${\rm coker}j$ is epi.
For the exactness, it is enough to prove that $p={\rm coker}i$. For this: if $iv=0$ for any arrow $v$, we have
$0={\rm coker} j\cdot iv={\rm ker} g\cdot{\rm coker}f\cdot v$. But, as $g$ is epi, $g={\rm coim}g={\rm coker}({\rm ker}g)$, this goes through $g$: we get a $t$ such that $gt={\rm coker}f\cdot v$. Then, using that ${\rm coker}f$ is epi, we arrive to $pt=v$.
A: $\renewcommand{\im}{\mathop{\rm im}}\DeclareMathOperator{\coker}{coker}$You can use Freyd-Mitchell Embedding theorem to reduce to the case of modules. 
Note that $H = \ker(g)/\im(f)$, so you have $$\ker(g)/\im(f) \xrightarrow{i}\coker(f) = B/\im(f) \xrightarrow{p} \im(g).$$
Now, clearly $pi=0$, so then we have that $\im i \subset \ker p$. For the opposite inclusion suppose that $x \in B /\im(f)$ is in $\ker p$. Take a representative element of the coset in B, and argue that it must lie in $\ker(g)$. Argue that you always can lift a coset x in $B/\im(f)$ that lies in the kernel of p to an element of $\ker(g)/\im(f)$.
