How can we motivate homotopy in homological algebra? I'm writing some notes on homological algebra for some readers which are experienced in algebra (had a course in commutative algebra using categorical notions) but who don't necessarily know algebraic topology. With this in mind, I began to wonder how could we motivate the definition of homotopy between two maps of complexes purely algebraically.
While it is true that homotopy is important because homotopic maps induce the same morphism in cohomology or because the homotopic category is useful for constructing the derived category (and is a useful approximation thereof),  it is not clear to me how someone "inventing" (without all the roots in algebraic topology) homological algebra might arrive at such a formula (the one defining homotopy).
What I have in mind is something in the lines of: "this doesn't really work but this formula (the one defining homotopy) is precisely what we need for it to work".
 A: A short exact sequence is a useful presentation when speaking about the relation of an object $B$ with a subobject $A$. Sometimes the short exact sequence
$$0\to A\xrightarrow{i} B\xrightarrow{p} C\to 0$$
splits, and $A$ is now a direct summand of $B$. This is a nice property which is preserved by any additive functor, that is, for any $F$, the sequence
$$0\to F(A)\to F(B)\to F(C)\to 0$$ is exact. On the other hand, if the short exact sequence does not split, then the above sequence is not exact anymore in general.
Split exact sequence is generally defined in term of a section $s:C\to B$. But there are other equivalent conditions. In particular, writing $p:B\to C$, we see that $p(x-sp(x))=0$ so $x-sp(x)\in A$. Thus, the map $id-sp$ factor through the inclusion $i:A\to B$, i.e. can be written $id-sp=ir$ for a so-called retraction $r:B\to A$. Put differently $id=sp+ir$.
Conversely, if $id=sp+ir$ for some maps, then applying $p$ on the left $p=psp+pir=psp+0=psp$. So $(id-ps)p=0$ and since $p$ is onto $id-ps=0$ In other words $s$ is a section of $p$. Dually $r$ is a retraction of $i$.

The concept of split exact sequence can be generalized for any long exact sequence
$$...\to A^{k-1}\xrightarrow{d^{k-1}}A^k\xrightarrow{d^k}A^k\to ...$$in several equivalent ways :

*

*every short exact sequence we get by splitting the long exact sequence is split.

*every map $d^k$ induces an isomorphism between a direct summand of $A^k$ onto $\operatorname{im}(d^k)$.

*There are maps $f^k:A^k\to A^{k-1}$ such that $id_{A^k}=f^{k+1}d^k+d^{k-1}f^k$.

Let us prove these equivalences :
$1.\Rightarrow 2.$ The short exact sequences are $0\to Z^k\xrightarrow{i^k} A^k\xrightarrow{p^k} Z^{k+1}\to 0$ with $Z^k=\ker(d^k)=\operatorname{im}(d^{k-1})$ and the differential is $d^k=i^{k+1}p^k:A^k\to Z^{k+1}\to A^{k+1}$. If this splits, then this means that $A^k=Z^k\oplus Y^k$ for a direct summand $Y^k$ and the differential $d^k$ induces an isomorphism $Y^k\simeq Z^{k+1}$.
$2.\Rightarrow 3.$ Let us write $Y^k$ for the direct summand. Its complement is necessarily $Z^k$ since by hypothesis $Y^k\hookrightarrow A^k/Z^k\simeq Z^{k+1}$ is an isomorphism. Write $f^k:A^k\to Z^k\simeq Y^{k-1}\to A^{k-1}$. Then by construction $d^{k-1}f^k$ is the projection $A^k\to Z^k\to A^k$ and $f^{k+1}d^k$ is the projection $A^k\to Y^k\to A^k$. It follows that $f^{k+1}d^k+d^{k-1}f^k=id_{A^k}$.
$3.\Rightarrow 1.$ Write $s^k=f^{k+1}i^{k+1}:Z^{k+1}\to A^{k+1}\to A^k$. We compute $$i^{k+1}p^ks^k=d^ks^k=d^kf^{k+1}i^{k+1}=(id_{A^{k+1}}-f^{k+2}d^{k+1})i^{k+1}=i^{k+1}-f^{k+2}d^{k+1}i^{k+1}=i^{k+1}$$ (the last equality follows from $d^{k+1}i^{k+1}=0$). Since $i^{k+1}$ is mono, $p^ks^k=id_{Z^{k+1}}$. Hence every short exact sequence splits.

The last condition actually implies that the long sequence is exact and is open to generalization : replace $id_{A^k}$ by any morphism $\varphi$ of complexes. If $\varphi^k=f^{k+1}d^k+d^{k-1}f^k$, then $\varphi^k$ induces the zero map in homology. (And if $\varphi^k=id_{A^k}$ then the identity is zero in homology which is only possible if the complex has no homology).
Use substraction, that is replace $id_{A^k}$ by $\varphi^k-\psi^k$ and you have a condition, stable by any additive functor, for two morphisms to induce the same map in homology.
Use composition, that is replace $id_{A^k}$ by $id_{A^k}-\varphi^k\psi^k$ and $id_{B^k}-\psi^k\varphi^k$ and you have a condition for two morphisms of complexes $\varphi, \psi$ to induce isomorphisms (inverse to each other) in homology.
