I just began reading Weibel’s An introduction to Homological Algebra and stuck at the first page, where the author attempts to give a historical motivation for the homology construction:
Homological algebra is a tool used in several branches of mathematics: algebraic topology, group theory, commutative ring theory, and algebraic geometry come to mind. It arose in the late 1800s in the following manner. Let $f$ and $g$ be matrices whose product is zero. If $g\cdot v=0$ for some column vector $v$, say, of length $n$, we cannot always write $v=f\cdot u$. This failure is measured by the defect $$d=n-\text{rank}(f)-\text{rank}(g).$$ In modern language, $f$ and $g$ represent linear maps $$U\xrightarrow{f} V\xrightarrow{g} W$$ with $gf=0$, and $d$ is the dimension of the homology module$$H=\ker (g)/f(U).$$
I am not seeing any motivation for studying the “defect” of the above phenomenon. Could anyone give a brief explanation for why did the mathematicians study how to write a column vector of $f$ by product of $f$ and another column vector? Much appreciated.