## 22.30 Bimodules and internal hom

Let $R$ be a ring. If $A$ is an $R$-algebra (see our conventions in Section 22.2) and $M$, $M'$ are right $A$-modules, then we define

$\mathop{\mathrm{Hom}}\nolimits _ A(M, M') = \{ f : M \to M' \mid f \text{ is }A\text{-linear}\}$

as usual.

Let $R$-be a ring. Let $A$ and $B$ be $R$-algebras. Let $N$ be an $(A, B)$-bimodule. Let $N'$ be a right $B$-module. In this situation we will think of

$\mathop{\mathrm{Hom}}\nolimits _ B(N, N')$

as a right $A$-module using precomposition.

Let $R$-be a ring. Let $A$ and $B$ be $\mathbf{Z}$-graded $R$-algebras. Let $N$ be a graded $(A, B)$-bimodule. Let $N'$ be a right graded $B$-module. In this situation we will think of the graded $R$-module

$\mathop{\mathrm{Hom}}\nolimits _{\text{Mod}^{gr}_ B}(N, N')$

defined in Example 22.25.6 as a right graded $A$-module using precomposition. The construction is functorial in $N'$ and defines a functor

$\mathop{\mathrm{Hom}}\nolimits _{\text{Mod}^{gr}_ B}(N, -) : \text{Mod}^{gr}_ B \longrightarrow \text{Mod}^{gr}_ A$

of graded categories as in Example 22.25.6. Namely, if $N_1$ and $N_2$ are graded $B$-modules and $f : N_1 \to N_2$ is a $B$-module homomorphism homogeneous of degree $n$, then the induced map $\mathop{\mathrm{Hom}}\nolimits _{\text{Mod}^{gr}_ B}(N, N_1) \to \mathop{\mathrm{Hom}}\nolimits _{\text{Mod}^{gr}_ B}(N, N_2)$ is an $A$-module homomorphism homogeneous of degree $n$.

Let $R$ be a ring. Let $A$ and $B$ be differential $\mathbf{Z}$-graded $R$-algebras. Let $N$ be a differential graded $(A, B)$-bimodule. Let $N'$ be a right differential graded $B$-module. In this situation we will think of the differential graded $R$-module

$\mathop{\mathrm{Hom}}\nolimits _{\text{Mod}^{dg}_{(B, \text{d})}}(N, N')$

defined in Example 22.26.8 as a right differential graded $A$-module using precomposition as in the graded case. This is compatible with differentials because multiplication is the composition

$\mathop{\mathrm{Hom}}\nolimits _{\text{Mod}^{dg}_ B}(N, N') \otimes _ R A \to \mathop{\mathrm{Hom}}\nolimits _{\text{Mod}^{dg}_ B}(N, N') \otimes _ R \mathop{\mathrm{Hom}}\nolimits _{\text{Mod}^{dg}_ B}(N, N) \to \mathop{\mathrm{Hom}}\nolimits _{\text{Mod}^{dg}_ B}(N, N')$

The first arrow uses the map of Lemma 22.28.2 and the second arrow is the composition in the differential graded category $\text{Mod}^{dg}_{(B, \text{d})}$.

Lemma 22.30.1. Let $R$ be a ring. Let $(A, \text{d})$ and $(B, \text{d})$ be differential graded algebras over $R$. Let $N$ be a differential graded $(A, B)$-bimodule. The construction above defines a functor

$\mathop{\mathrm{Hom}}\nolimits _{\text{Mod}^{dg}_{(B, \text{d})}}(N, -) : \text{Mod}^{dg}_{(B, \text{d})} \longrightarrow \text{Mod}^{dg}_{(A, \text{d})}$

of differential graded categories. This functor induces functors

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

by an application of Lemma 22.26.5.

Proof. Above we have seen how the construction defines a functor of underlying graded categories. Thus it suffices to show that the construction is compatible with differentials. Let $N_1$ and $N_2$ be differential graded $B$-modules. Write

$H_{12} = \mathop{\mathrm{Hom}}\nolimits _{\text{Mod}^{dg}_{(B, \text{d})}}(N_1, N_2),\quad H_1 = \mathop{\mathrm{Hom}}\nolimits _{\text{Mod}^{dg}_{(B, \text{d})}}(N, N_1),\quad H_2 = \mathop{\mathrm{Hom}}\nolimits _{\text{Mod}^{dg}_{(B, \text{d})}}(N, N_2)$

Consider the composition

$c : H_{12} \otimes _ R H_1 \longrightarrow H_2$

in the differential graded category $\text{Mod}^{dg}_{(B, \text{d})}$. Let $f : N_1 \to N_2$ be a $B$-module homomorphism which is homogeneous of degree $n$, in other words, $f \in H_{12}^ n$. The functor in the lemma sends $f$ to $c_ f : H_1 \to H_2$, $g \mapsto c(f, g)$. Simlarly for $\text{d}(f)$. On the other hand, the differential on

$\mathop{\mathrm{Hom}}\nolimits _{\text{Mod}^{dg}_{(A, \text{d})}}(H_1, H_2)$

sends $c_ f$ to $\text{d}_{H_2} \circ c_ f - (-1)^ n c_ f \circ \text{d}_{H_1}$. As $c$ is a morphism of complexes of $R$-modules we have $\text{d} c(f, g) = c(\text{d}f, g) + (-1)^ n c(f, \text{d}g)$. Hence we see that

\begin{align*} (\text{d}c_ f)(g) & = \text{d}c(f,g) - (-1)^ n c(f, \text{d}g) \\ & = c(\text{d}f, g) + (-1)^ n c(f, \text{d}g) - (-1)^ n c(f, \text{d}g) \\ & = c(\text{d}f, g) = c_{\text{d}f}(g) \end{align*}

and the proof is complete. $\square$

Remark 22.30.2. Let $R$ be a ring. Let $(A, \text{d})$ and $(B, \text{d})$ be differential graded algebras over $R$. Let $N$ be a differential graded $(A, B)$-bimodule. Let $N'$ be a right differential graded $B$-module. Then for every $k \in \mathbf{Z}$ there is an isomorphism

$\mathop{\mathrm{Hom}}\nolimits _{\text{Mod}^{gr}_ B}(N, N')[k] \longrightarrow \mathop{\mathrm{Hom}}\nolimits _{\text{Mod}^{gr}_ B}(N, N'[k])$

of right differential graded $A$-modules defined without the intervention of signs, see More on Algebra, Section 15.72.

Lemma 22.30.3. Let $R$ be a ring. Let $A$ and $B$ be $R$-algebras. Let $M$ be a right $A$-module, $N$ an $(A, B)$-bimodule, and $N'$ a right $B$-module. Then we have a canonical isomorphism

$\mathop{\mathrm{Hom}}\nolimits _ B(M \otimes _ A N, N') = \mathop{\mathrm{Hom}}\nolimits _ A(M, \mathop{\mathrm{Hom}}\nolimits _ B(N, N'))$

of $R$-modules. If $A$, $B$, $M$, $N$, $N'$ are compatibly graded, then we have a canonical isomorphism

$\mathop{\mathrm{Hom}}\nolimits _{\text{Mod}_ B^{gr}}(M \otimes _ A N, N') = \mathop{\mathrm{Hom}}\nolimits _{\text{Mod}_ A^{gr}}(M, \mathop{\mathrm{Hom}}\nolimits _{\text{Mod}_ B^{gr}}(N, N'))$

of graded $R$-modules If $A$, $B$, $M$, $N$, $N'$ are compatibly differential graded, then we have a canonical isomorphism

$\mathop{\mathrm{Hom}}\nolimits _{\text{Mod}^{dg}_{(B, \text{d})}}(M \otimes _ A N, N') = \mathop{\mathrm{Hom}}\nolimits _{\text{Mod}^{dg}_{(A, \text{d})}}(M, \mathop{\mathrm{Hom}}\nolimits _{\text{Mod}^{dg}_{(B, \text{d})}}(N, N'))$

of complexes of $R$-modules.

Proof. Omitted. Hint: in the ungraded case interpret both sides as $A$-bilinear maps $\psi : M \times N \to N'$ which are $B$-linear on the right. In the (differential) graded case, use the isomorphism of More on Algebra, Lemma 15.71.1 and check it is compatible with the module structures. Alternatively, use the isomorphism of Lemma 22.13.2 and show that it is compatible with the $B$-module structures. $\square$

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