## 22.5 The homotopy category

Our homotopies take into account the $A$-module structure and the grading, but not the differential (of course).

Definition 22.5.1. Let $(A, \text{d})$ be a differential graded algebra. Let $f, g : M \to N$ be homomorphisms of differential graded $A$-modules. A homotopy between $f$ and $g$ is an $A$-module map $h : M \to N$ such that

1. $h(M^ n) \subset N^{n - 1}$ for all $n$, and

2. $f(x) - g(x) = \text{d}_ N(h(x)) + h(\text{d}_ M(x))$ for all $x \in M$.

If a homotopy exists, then we say $f$ and $g$ are homotopic.

Thus $h$ is compatible with the $A$-module structure and the grading but not with the differential. If $f = g$ and $h$ is a homotopy as in the definition, then $h$ defines a morphism $h : M \to N[-1]$ in $\text{Mod}_{(A, \text{d})}$.

Lemma 22.5.2. Let $(A, \text{d})$ be a differential graded algebra. Let $f, g : L \to M$ be homomorphisms of differential graded $A$-modules. Suppose given further homomorphisms $a : K \to L$, and $c : M \to N$. If $h : L \to M$ is an $A$-module map which defines a homotopy between $f$ and $g$, then $c \circ h \circ a$ defines a homotopy between $c \circ f \circ a$ and $c \circ g \circ a$.

Proof. Immediate from Homology, Lemma 12.13.7. $\square$

This lemma allows us to define the homotopy category as follows.

Definition 22.5.3. Let $(A, \text{d})$ be a differential graded algebra. The homotopy category, denoted $K(\text{Mod}_{(A, \text{d})})$, is the category whose objects are the objects of $\text{Mod}_{(A, \text{d})}$ and whose morphisms are homotopy classes of homomorphisms of differential graded $A$-modules.

The notation $K(\text{Mod}_{(A, \text{d})})$ is not standard but at least is consistent with the use of $K(-)$ in other places of the Stacks project.

Lemma 22.5.4. Let $(A, \text{d})$ be a differential graded algebra. The homotopy category $K(\text{Mod}_{(A, \text{d})})$ has direct sums and products.

Proof. Omitted. Hint: Just use the direct sums and products as in Lemma 22.4.2. This works because we saw that these functors commute with the forgetful functor to the category of graded $A$-modules and because $\prod$ is an exact functor on the category of families of abelian groups. $\square$

Comment #288 by arp on

Typo: In the paragraph following Definition 22.5.1 (TAG 09JN), I think it should say that $h$ defines a morphism $h : M \to N[-1]$ (i.e. a $-$ sign is missing). By the way, it seems a bit strange to say a homotopy is "compatible with the grading," but I know what you are saying.

Comment #1057 by Kian Abolfazlian on

In Lemma 22.5.2, the morphism h must be $h:L \to M[-1]$.

Comment #1062 by on

Thanks for pointing this out. Fixed in this commit. In Definition 22.5.1 we decided to think of a homotopy $h : L \to M$ as an $A$-module map homogeneous of degree $-1$. Of course, this also means it is a graded $A$-module map $h : L \to M[-1]$. If in Lemma 22.5.2 we want to write $h : L \to M[-1]$ we should also change the wording in the definition.

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).