Note that if $R$ is a ring, then $R$ is a differential graded algebra over itself (with $R = R^0$ of course). In this case a differential graded $R$-module is the same thing as a complex of $R$-modules. In particular, given two differential graded $R$-modules $M$ and $N$ we denote $M \otimes _ R N$ the differential graded $R$-module corresponding to the total complex associated to the double complex obtained by the tensor product of the complexes of $R$-modules associated to $M$ and $N$.

Definition 22.26.1. Let $R$ be a ring. A differential graded category $\mathcal{A}$ over $R$ is a category where every morphism set is given the structure of a differential graded $R$-module and where for $x, y, z \in \mathop{\mathrm{Ob}}\nolimits (\mathcal{A})$ composition is $R$-bilinear and induces a homomorphism

$\mathop{\mathrm{Hom}}\nolimits _\mathcal {A}(y, z) \otimes _ R \mathop{\mathrm{Hom}}\nolimits _\mathcal {A}(x, y) \longrightarrow \mathop{\mathrm{Hom}}\nolimits _\mathcal {A}(x, z)$

of differential graded $R$-modules.

The final condition of the definition signifies the following: if $f \in \mathop{\mathrm{Hom}}\nolimits _\mathcal {A}^ n(x, y)$ and $g \in \mathop{\mathrm{Hom}}\nolimits _\mathcal {A}^ m(y, z)$ are homogeneous of degrees $n$ and $m$, then

$\text{d}(g \circ f) = \text{d}(g) \circ f + (-1)^ mg \circ \text{d}(f)$

in $\mathop{\mathrm{Hom}}\nolimits _\mathcal {A}^{n + m + 1}(x, z)$. This follows from the sign rule for the differential on the total complex of a double complex, see Homology, Definition 12.18.3.

Definition 22.26.2. Let $R$ be a ring. A functor of differential graded categories over $R$ is a functor $F : \mathcal{A} \to \mathcal{B}$ where for all objects $x, y$ of $\mathcal{A}$ the map $F : \mathop{\mathrm{Hom}}\nolimits _\mathcal {A}(x, y) \to \mathop{\mathrm{Hom}}\nolimits _\mathcal {A}(F(x), F(y))$ is a homomorphism of differential graded $R$-modules.

Given a differential graded category we are often interested in the corresponding categories of complexes and homotopy category. Here is a formal definition.

Definition 22.26.3. Let $R$ be a ring. Let $\mathcal{A}$ be a differential graded category over $R$. Then we let

1. the category of complexes of $\mathcal{A}$1 be the category $\text{Comp}(\mathcal{A})$ whose objects are the same as the objects of $\mathcal{A}$ and with

$\mathop{\mathrm{Hom}}\nolimits _{\text{Comp}(\mathcal{A})}(x, y) = \mathop{\mathrm{Ker}}(d : \mathop{\mathrm{Hom}}\nolimits ^0_\mathcal {A}(x, y) \to \mathop{\mathrm{Hom}}\nolimits ^1_\mathcal {A}(x, y))$
2. the homotopy category of $\mathcal{A}$ be the category $K(\mathcal{A})$ whose objects are the same as the objects of $\mathcal{A}$ and with

$\mathop{\mathrm{Hom}}\nolimits _{K(\mathcal{A})}(x, y) = H^0(\mathop{\mathrm{Hom}}\nolimits _\mathcal {A}(x, y))$

Our use of the symbol $K(\mathcal{A})$ is nonstandard, but at least is compatible with the use of $K(-)$ in other chapters of the Stacks project.

Definition 22.26.4. Let $R$ be a ring. Let $\mathcal{A}$ be a differential graded category over $R$. A direct sum $(x, y, z, i, j, p, q)$ in $\mathcal{A}$ (notation as in Homology, Remark 12.3.6) is a differential graded direct sum if $i, j, p, q$ are homogeneous of degree $0$ and closed, i.e., $\text{d}(i) = 0$, etc.

Lemma 22.26.5. Let $R$ be a ring. A functor $F : \mathcal{A} \to \mathcal{B}$ of differential graded categories over $R$ induces functors $\text{Comp}(\mathcal{A}) \to \text{Comp}(\mathcal{B})$ and $K(\mathcal{A}) \to K(\mathcal{B})$.

Proof. Omitted. $\square$

Example 22.26.6 (Differential graded category of complexes). Let $\mathcal{B}$ be an additive category. We will construct a differential graded category $\text{Comp}^{dg}(\mathcal{B})$ over $R = \mathbf{Z}$ whose associated category of complexes is $\text{Comp}(\mathcal{B})$ and whose associated homotopy category is $K(\mathcal{B})$. As objects of $\text{Comp}^{dg}(\mathcal{B})$ we take complexes of $\mathcal{B}$. Given complexes $A^\bullet$ and $B^\bullet$ of $\mathcal{B}$, we sometimes also denote $A^\bullet$ and $B^\bullet$ the corresponding graded objects of $\mathcal{B}$ (i.e., forget about the differential). Using this abuse of notation, we set

$\mathop{\mathrm{Hom}}\nolimits _{\text{Comp}^{dg}(\mathcal{B})}(A^\bullet , B^\bullet ) = \mathop{\mathrm{Hom}}\nolimits _{\text{Gr}^{gr}(\mathcal{B})}(A^\bullet , B^\bullet ) = \bigoplus \nolimits _{n \in \mathbf{Z}} \mathop{\mathrm{Hom}}\nolimits ^ n(A, B)$

as a graded $\mathbf{Z}$-module with notation and definitions as in Example 22.25.5. In other words, the $n$th graded piece is the abelian group of homogeneous morphism of degree $n$ of graded objects

$\mathop{\mathrm{Hom}}\nolimits ^ n(A^\bullet , B^\bullet ) = \prod \nolimits _{p + q = n} \mathop{\mathrm{Hom}}\nolimits _\mathcal {B}(A^{-q}, B^ p)$

Observe reversal of indices and observe we have a direct product and not a direct sum. For an element $f \in \mathop{\mathrm{Hom}}\nolimits ^ n(A^\bullet , B^\bullet )$ of degree $n$ we set

$\text{d}(f) = \text{d}_ B \circ f - (-1)^ n f \circ \text{d}_ A$

The sign is exactly as in More on Algebra, Section 15.72. To make sense of this we think of $\text{d}_ B$ and $\text{d}_ A$ as maps of graded objects of $\mathcal{B}$ homogeneous of degree $1$ and we use composition in the category $\text{Gr}^{gr}(\mathcal{B})$ on the right hand side. In terms of components, if $f = (f_{p, q})$ with $f_{p, q} : A^{-q} \to B^ p$ we have

22.26.6.1
\begin{equation} \label{dga-equation-differential-hom-complex} \text{d}(f_{p, q}) = \text{d}_ B \circ f_{p, q} - (-1)^{p + q} f_{p, q} \circ \text{d}_ A \end{equation}

Note that the first term of this expression is in $\mathop{\mathrm{Hom}}\nolimits _\mathcal {B}(A^{-q}, B^{p + 1})$ and the second term is in $\mathop{\mathrm{Hom}}\nolimits _\mathcal {B}(A^{-q - 1}, B^ p)$. The reader checks that

1. $\text{d}$ has square zero,

2. an element $f$ in $\mathop{\mathrm{Hom}}\nolimits ^ n(A^\bullet , B^\bullet )$ has $\text{d}(f) = 0$ if and only if the morphism $f : A^\bullet \to B^\bullet [n]$ of graded objects of $\mathcal{B}$ is actually a map of complexes,

3. in particular, the category of complexes of $\text{Comp}^{dg}(\mathcal{B})$ is equal to $\text{Comp}(\mathcal{B})$,

4. the morphism of complexes defined by $f$ as in (2) is homotopy equivalent to zero if and only if $f = \text{d}(g)$ for some $g \in \mathop{\mathrm{Hom}}\nolimits ^{n - 1}(A^\bullet , B^\bullet )$.

5. in particular, we obtain a canonical isomorphism

$\mathop{\mathrm{Hom}}\nolimits _{K(\mathcal{B})}(A^\bullet , B^\bullet ) \longrightarrow H^0(\mathop{\mathrm{Hom}}\nolimits _{\text{Comp}^{dg}(\mathcal{B})}(A^\bullet , B^\bullet ))$

and the homotopy category of $\text{Comp}^{dg}(\mathcal{B})$ is equal to $K(\mathcal{B})$.

Given complexes $A^\bullet$, $B^\bullet$, $C^\bullet$ we define composition

$\mathop{\mathrm{Hom}}\nolimits ^ m(B^\bullet , C^\bullet ) \times \mathop{\mathrm{Hom}}\nolimits ^ n(A^\bullet , B^\bullet ) \longrightarrow \mathop{\mathrm{Hom}}\nolimits ^{n + m}(A^\bullet , C^\bullet )$

by composition $(g, f) \mapsto g \circ f$ in the graded category $\text{Gr}^{gr}(\mathcal{B})$, see Example 22.25.5. This defines a map of differential graded modules

$\mathop{\mathrm{Hom}}\nolimits _{\text{Comp}^{dg}(\mathcal{B})}(B^\bullet , C^\bullet ) \otimes _ R \mathop{\mathrm{Hom}}\nolimits _{\text{Comp}^{dg}(\mathcal{B})}(A^\bullet , B^\bullet ) \longrightarrow \mathop{\mathrm{Hom}}\nolimits _{\text{Comp}^{dg}(\mathcal{B})}(A^\bullet , C^\bullet )$

as required in Definition 22.26.1 because

\begin{align*} \text{d}(g \circ f) & = \text{d}_ C \circ g \circ f - (-1)^{n + m} g \circ f \circ \text{d}_ A \\ & = \left(\text{d}_ C \circ g - (-1)^ m g \circ \text{d}_ B\right) \circ f + (-1)^ m g \circ \left(\text{d}_ B \circ f - (-1)^ n f \circ \text{d}_ A\right) \\ & = \text{d}(g) \circ f + (-1)^ m g \circ \text{d}(f) \end{align*}

as desired.

Lemma 22.26.7. Let $F : \mathcal{B} \to \mathcal{B}'$ be an additive functor between additive categories. Then $F$ induces a functor of differential graded categories

$F : \text{Comp}^{dg}(\mathcal{B}) \to \text{Comp}^{dg}(\mathcal{B}')$

of Example 22.26.6 inducing the usual functors on the category of complexes and the homotopy categories.

Proof. Omitted. $\square$

Example 22.26.8 (Differential graded category of differential graded modules). Let $(A, \text{d})$ be a differential graded algebra over a ring $R$. We will construct a differential graded category $\text{Mod}^{dg}_{(A, \text{d})}$ over $R$ whose category of complexes is $\text{Mod}_{(A, \text{d})}$ and whose homotopy category is $K(\text{Mod}_{(A, \text{d})})$. As objects of $\text{Mod}^{dg}_{(A, \text{d})}$ we take the differential graded $A$-modules. Given differential graded $A$-modules $L$ and $M$ we set

$\mathop{\mathrm{Hom}}\nolimits _{\text{Mod}^{dg}_{(A, \text{d})}}(L, M) = \mathop{\mathrm{Hom}}\nolimits _{\text{Mod}^{gr}_ A}(L, M) = \bigoplus \mathop{\mathrm{Hom}}\nolimits ^ n(L, M)$

as a graded $R$-module where the right hand side is defined as in Example 22.25.6. In other words, the $n$th graded piece $\mathop{\mathrm{Hom}}\nolimits ^ n(L, M)$ is the $R$-module of right $A$-module maps homogeneous of degree $n$. For an element $f \in \mathop{\mathrm{Hom}}\nolimits ^ n(L, M)$ we set

$\text{d}(f) = \text{d}_ M \circ f - (-1)^ n f \circ \text{d}_ L$

To make sense of this we think of $\text{d}_ M$ and $\text{d}_ L$ as graded $R$-module maps and we use composition of graded $R$-module maps. It is clear that $\text{d}(f)$ is homogeneous of degree $n + 1$ as a graded $R$-module map, and it is $A$-linear because

\begin{align*} \text{d}(f)(xa) & = \text{d}_ M(f(x) a) - (-1)^ n f (\text{d}_ L(xa)) \\ & = \text{d}_ M(f(x)) a + (-1)^{\deg (x) + n} f(x) \text{d}(a) - (-1)^ n f(\text{d}_ L(x)) a - (-1)^{n + \deg (x)} f(x) \text{d}(a) \\ & = \text{d}(f)(x) a \end{align*}

as desired (observe that this calculation would not work without the sign in the definition of our differential on $\mathop{\mathrm{Hom}}\nolimits$). Similar formulae to those of Example 22.26.6 hold for the differential of $f$ in terms of components. The reader checks (in the same way as in Example 22.26.6) that

1. $\text{d}$ has square zero,

2. an element $f$ in $\mathop{\mathrm{Hom}}\nolimits ^ n(L, M)$ has $\text{d}(f) = 0$ if and only if $f : L \to M[n]$ is a homomorphism of differential graded $A$-modules,

3. in particular, the category of complexes of $\text{Mod}^{dg}_{(A, \text{d})}$ is $\text{Mod}_{(A, \text{d})}$,

4. the homomorphism defined by $f$ as in (2) is homotopy equivalent to zero if and only if $f = \text{d}(g)$ for some $g \in \mathop{\mathrm{Hom}}\nolimits ^{n - 1}(L, M)$.

5. in particular, we obtain a canonical isomorphism

$\mathop{\mathrm{Hom}}\nolimits _{K(\text{Mod}_{(A, \text{d})})}(L, M) \longrightarrow H^0(\mathop{\mathrm{Hom}}\nolimits _{\text{Mod}^{dg}_{(A, \text{d})}}(L, M))$

and the homotopy category of $\text{Mod}^{dg}_{(A, \text{d})}$ is $K(\text{Mod}_{(A, \text{d})})$.

Given differential graded $A$-modules $K$, $L$, $M$ we define composition

$\mathop{\mathrm{Hom}}\nolimits ^ m(L, M) \times \mathop{\mathrm{Hom}}\nolimits ^ n(K, L) \longrightarrow \mathop{\mathrm{Hom}}\nolimits ^{n + m}(K, M)$

by composition of homogeneous right $A$-module maps $(g, f) \mapsto g \circ f$. This defines a map of differential graded modules

$\mathop{\mathrm{Hom}}\nolimits _{\text{Mod}^{dg}_{(A, \text{d})}}(L, M) \otimes _ R \mathop{\mathrm{Hom}}\nolimits _{\text{Mod}^{dg}_{(A, \text{d})}}(K, L) \longrightarrow \mathop{\mathrm{Hom}}\nolimits _{\text{Mod}^{dg}_{(A, \text{d})}}(K, M)$

as required in Definition 22.26.1 because

\begin{align*} \text{d}(g \circ f) & = \text{d}_ M \circ g \circ f - (-1)^{n + m} g \circ f \circ \text{d}_ K \\ & = \left(\text{d}_ M \circ g - (-1)^ m g \circ \text{d}_ L\right) \circ f + (-1)^ m g \circ \left(\text{d}_ L \circ f - (-1)^ n f \circ \text{d}_ K\right) \\ & = \text{d}(g) \circ f + (-1)^ m g \circ \text{d}(f) \end{align*}

as desired.

Lemma 22.26.9. Let $\varphi : (A, \text{d}) \to (E, \text{d})$ be a homomorphism of differential graded algebras. Then $\varphi$ induces a functor of differential graded categories

$F : \text{Mod}^{dg}_{(E, \text{d})} \longrightarrow \text{Mod}^{dg}_{(A, \text{d})}$

of Example 22.26.8 inducing obvious restriction functors on the categories of differential graded modules and homotopy categories.

Proof. Omitted. $\square$

Lemma 22.26.10. Let $R$ be a ring. Let $\mathcal{A}$ be a differential graded category over $R$. Let $x$ be an object of $\mathcal{A}$. Let

$(E, \text{d}) = \mathop{\mathrm{Hom}}\nolimits _\mathcal {A}(x, x)$

be the differential graded $R$-algebra of endomorphisms of $x$. We obtain a functor

$\mathcal{A} \longrightarrow \text{Mod}^{dg}_{(E, \text{d})},\quad y \longmapsto \mathop{\mathrm{Hom}}\nolimits _\mathcal {A}(x, y)$

of differential graded categories by letting $E$ act on $\mathop{\mathrm{Hom}}\nolimits _\mathcal {A}(x, y)$ via composition in $\mathcal{A}$. This functor induces functors

$\text{Comp}(\mathcal{A}) \to \text{Mod}_{(A, \text{d})} \quad \text{and}\quad K(\mathcal{A}) \to K(\text{Mod}_{(A, \text{d})})$

by an application of Lemma 22.26.5.

Proof. This lemma proves itself. $\square$

 This may be nonstandard terminology.

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).