Homotopy equivalence of chain complexes

Definition
A chain map $$f$$ between chain complexes $$A$$ and $$B$$is termed a homotopy equivalence if there exists a chain map in the opposite direction, say $$g:B \to A$$ such that $$f \circ g$$ is chain-homotopic to the identity map on $$B$$ and $$g \circ f$$ is chain-homotopic to the identity map on $$A$$.

If a homotopy equivalence exists between two chain complexes, they are termed homotopy-equivalent chain complexes.