What is the Hom-Set of two chain complexes? I am having trouble understanding the definition of the "mapping complex" of two (co)chain complexes.
Denote by $\mathbf{Ab}$ the catgeory of abelian groups and $\mathbf{Kom(Ab)}$ the category of chain complexes over $\mathbf{Ab}$. Given two chain complexes $(C,d^{C})$ and $(D,d^{C})$, over an additive category $\mathcal{C}$, the mapping complex Hom($C,D)\in\mathbf{Kom(Ab)}$ is defined by
Hom($C,D)_{n}$:=$\Pi_{m\in\mathbb{Z}}$Hom($C_{m},D_{m+n}$) with differential $\delta_{n}((f_{m})):=d_{m+n}^{D}\circ{f_{m}}-(-1)^{n}f_{m-1}\circ{d_{m}^{C}}$, $n\in\mathbb{N}$.

Could someone give an intuition behind this construction?
Why is this a chain complex? (I am not allowed to use the fact that $d^{C}$ or $d^{D}$ are linear maps.)
How is homology of this complex defined? (I have learned that the homology is the cokernel of this map Im($d_{n+1})\longrightarrow$kern($d_{n}$), but doesn't fit with this definition.)
Thanks for any help.
 A: To check that this is a chain complex, just directly compute:
$$
\newcommand\of[1]{\left({#1}\right)}
\begin{align}
\delta_{n-1}\delta_n (f_m)_m &= \delta_{n-1}\of{d_{m+n}^D f_m - (-1)^nf_{m-1}d_m^C}_m
\\
&=\of{
d_{m+n-1}^D
\of{d_{m+n}^Df_m-(-1)^nf_{m-1}d_m^C}
-(-1)^{n-1}
\of{d_{m+n-1}^Df_{m-1}-(-1)^nf_{m-2}d_{m-1}^C}
d_m^C
}_m
\\
&=\of{
d_{m+n-1}^D
d_{m+n}^Df_m-
(-1)^n
d_{m+n-1}^Df_{m-1}d_m^C
-(-1)^{n-1}
d_{m+n-1}^Df_{m-1}d_m^C
+(-1)^{n-1}(-1)^nf_{m-2}d_{m-1}^C
d_m^C
}_m
\\
&= 0 -
(-1)^n
d_{m+n-1}^Df_{m-1}d_m^C
-(-1)^{n-1}
d_{m+n-1}^Df_{m-1}d_m^C +0
=0.
\end{align}
$$
Note that composition is bilinear in any additive category, so using the distributive law is ok to go from line 2 to line 3.
As for intuition, to understand the meaning of a chain complex, it's a good idea to take the cycles, boundaries and homology and see what you get.
The kernel of $\delta_n$ is the set of maps $(f_m)_m$ such that
$d_{m+n}^Df_m-(-1)^nf_{m-1}d_m^C=0$ for all $m$, or in other words the set of maps $(f_m)_m$ such that $d_{m+n}^Df = (-1)^nf_{m-1}d_m^C$. This should remind you of the definition of a chain map. In fact, for $n=0$, this is precisely a chain map from $C$ to $D$.
For $n\ne 0$, we think of these as chain maps of degree $n$. We can define shifted chain complexes $D[k]$ with $D[k]_n = D_{k+n}$, and $d^{D[k]}_{n} = (-1)^kd^D_{k+n}$. (The sign is to make things work nicely, note that it was necessary to show $\delta_{n-1}\delta_n=0$ above. See here for more discussion). Then the condition for $(f_m)\in \newcommand\Hom{\operatorname{Hom}}\Hom(C,D)_n$ to be in the kernel of $\delta_n$ is that $f_m$ is a chain map from $C$ to $D[n]$.
Ok, what about the image of $\delta_{n+1}$? Well, this is precisely the definition of a nullhomotopic chain map any preimage is a chain nullhomotopy.
So the cycles are chain maps of degree $n$, the boundaries are nullhomotopic chain maps, and so the homology group consists of homotopy classes of chain maps from $C$ to $D$.
