Arrow-theoretic proof that cohomology is a functor. Let $\sf{A}$ be an abelian category and $\sf{C}(\sf{A})$ be its category of complexes. I want to prove that the $i$-th cohomology is an additive functor $\sf{C}(\sf{A})\to\sf{A}$. For that, let $\varphi^\bullet:M^\bullet\to N^\bullet$ be a morphism of complexes. By the universal property of kernels, we have an induced morphism

In order for the universal property of cokernels to induce a morphism $H^i(\varphi^\bullet):H^i(M^\bullet)\to H^i(N^\bullet)$ making the diagram

commute, we have to show that the morphism $I^{i-1}_{M^\bullet}\to K^i_{M^\bullet}\to K^i_{N^\bullet} \to H^i(N^\bullet)$ is zero. That would follow from the existence of an induced map $I^{i-1}_{M^\bullet}\to I^{i-1}_{N^\bullet}$, but I can't seem to figure out why this exists.
Also, I would love to know if there's a simpler way to construct the induced morphism $H^i(\varphi^\bullet):H^i(M^\bullet)\to H^i(N^\bullet)$ since my construction seems a little tough to work with.
 A: You have a commutative square $$\require{AMScd}\begin{CD}X @>f>> Y \\ 
@VVV @VVV \\
Z@>g>> W\end{CD}$$
From this you can extract a commutative diagram $$\begin{CD}X @>>> \mathrm{im}(f) @>>> Y \\ 
@VVV @VVV @VVV \\
Z@>>> \mathrm{im}(g) @>>> W\end{CD}$$
by using the definition of the image either as the kernel of the cokernel, or as the cokernel of the kernel.
Let me do the first one  : you get an induced diagram $$\begin{CD}X @>f>> Y @>>> \mathrm{coker}(f) \\ 
@VVV @VVV @VVV\\
Z@>g>> W @>>> \mathrm{coker}(g)\end{CD}$$ by universal property of the cokernel, and now it's clear that you also get a diagram $$\begin{CD}\mathrm{im}(f) @>>> Y @>>> \mathrm{coker}(f)\\ 
@VVV @VVV @VVV \\
\mathrm{im}(g) @>>> W @>>> \mathrm{coker}(g)\end{CD}$$ by universal property of the kernel.
Moreover, by uniqueness in the universal property of the kernel, you also get a commutative diagram $$\begin{CD}X @>>> \mathrm{im}(f) \\ 
@VVV @VVV \\
Z@>>> \mathrm{im}(g)\end{CD}$$ and pasting them gives the one I claimed.
Since everything here is defined in terms of universal properties this obviously gets you all the functoriality properties you might want
A: Deepening what I said in comments, I will show that for a commutative rectangle

Where $f, f'$ are surjective (means zero cokernel, equivalent to being epimorphism) and $g, g'$ are injective (means zero kernel, equivalent to being monomorphism), there exist an arrow $h_3 : X \to X' $ making the two squares commutative. Indeed let $C, C'$ be the kernels of $f, f'$ with natural maps $i: C \to A, i': C' \to A'$. Note that they are also the kernels of $gf, g'f'$ since $g,g'$ are monomorphisms. Consider the map $h_0 : C \to C'$ induced by the commutative square and the kernel property.
The map $f' h_1 : A \to X' $ is such that $ f'h_1 i = f'i' h_0 = 0$, so that by the universal property of
$$0 \to C \to A \to X \to 0$$
being an exact sequence there exist a map $h_3 : X \to X'$ such that $ h_3 f = f' h_1 $.
To verify that the rightside square is commutative, aka $h_2 g = g' h_3$ , precompose with $f$, then use the fact that $f$ is epi to deduce that the identity must be true.
I have been deliberately pedant and formal, so that you can practice with general diagram chasing. I suggest you to verify the small things that I have left here and there: you will get a lot more confident!
