Ker and Img of cochain Map -subcomplex - Show that if $\psi: A^\bullet \to B^\bullet$ is a cochain map then $\ker(\psi)$ is a sub-complex of $A^\bullet$, $\operatorname{im}(\psi)$ is a sub-complex of $B^\bullet$, and the natural map $q: A^\bullet \to \operatorname{im}(\psi)$ is a cochain map.
I know that the $\ker(\psi^n)$ is a sub-group of $A^n$  (or sub vector space)
and $\operatorname{im}(\psi^n)$ also a sub-group of $B^n$ (for all $n\geq0$) but what is the map from $\ker(\psi^n)$ to the $\ker(\psi^{n+1})$?
 A: Let $d_A^\bullet$ and $d_B^\bullet$ denote the differentials from $A^\bullet$ and $B^\bullet$ respectively.
Showing that $\ker(\psi)$ is a cochain complex:
We claim that $d_A^\bullet$ restricted to $\ker(\psi)$ makes $\ker(\psi)$ into a cochain complex. Denote this restriction with $\partial_A^\bullet$. Consider the commutative diagram, which commutes since $\psi$ was assumed to be a cochain map:

Using the universal property of the kernel, we get existence of unique morphism $\ker(\psi^i)\to \ker(\psi^{i+1})$ marked with the dashed arrow which in fact is $\partial_A^\bullet$. This map satisfies the property $(\partial_A)^2=0$ since $(d_A)^2=0$. We have now argued that $\ker(\psi)$ is indeed a cochain complex. Furthermore, we can identify it as a subcomplex of $A^\bullet$ via the inclusion.
Showing that $\operatorname{im}(\psi)$ is a cochain complex:
Since $\psi$ is a cochain map, we get that $d_B^i\circ \psi^i=\psi^{i+1}\circ d_A^i$. It follows that
$$
\operatorname{im}(d_B^i\circ \psi^i)=\operatorname{im}(\psi^{i+1}\circ d_A^i)\subset \operatorname{im}(\psi^{i+1}).
$$
This inclusion says that $d_B^i$ restricted to $\operatorname{im}(\psi^i)$ has image in $\operatorname{im}(\psi^{i+1})$. Denote this restriction with $\delta_B^i$. This map satisfies the property $(\delta_B)^2=0$ since $(d_B)^2=0$. Thus we have shown that this makes $\operatorname{im}(\psi)$ into a cochain complex which is identified with a subcomplex of $B^\bullet$ via the inclusion. By our construction and the fact that $\psi$ is a chain map, we also get commutative diagram:

Commutativity of this diagram says that the natural map $q:A^\bullet \to \operatorname{im}(\psi)$ is a cochain map.
