# Cotangent complex

In mathematics, the cotangent complex is a common generalisation of the cotangent sheaf, normal bundle and virtual tangent bundle of a map of geometric spaces such as manifolds or schemes. If $f:X\to Y$ is a morphism of geometric or algebraic objects, the corresponding cotangent complex $\mathbf {L} _{X/Y}^{\bullet }$ can be thought of as a universal "linearization" of it, which serves to control the deformation theory of $f$. It is constructed as an object in a certain derived category of sheaves on $X$ using the methods of homotopical algebra.
Restricted versions of cotangent complexes were first defined in various cases by a number of authors in the early 1960s. In the late 1960s, Michel André and Daniel Quillen independently came up with the correct definition for a morphism of commutative rings, using simplicial methods to make precise the idea of the cotangent complex as given by taking the (non-abelian) left derived functor of Kähler differentials. Luc Illusie then globalized this definition to the general situation of a morphism of ringed topoi, thereby incorporating morphisms of ringed spaces, schemes, and algebraic spaces into the theory.

## Motivation

Suppose that $X$ and $Y$ are algebraic varieties and that $f:X\to Y$ is a morphism between them. The cotangent complex of $f$ is a more universal version of the relative Kähler differentials $\Omega _{X/Y}$. The most basic motivation for such an object is the exact sequence of Kähler differentials associated to two morphisms. If $Z$ is another variety, and if $g:Y\to Z$ is another morphism, then there is an exact sequence
    $f^{*}\Omega _{Y/Z}\to \Omega _{X/Z}\to \Omega _{X/Y}\to 0.$
In some sense, therefore, relative Kähler differentials are a right exact functor. (Literally this is not true, however, because the category of algebraic varieties is not an abelian category, and therefore right-exactness is not defined.) In fact, prior to the definition of the cotangent complex, there were several definitions of functors that might extend the sequence further to the left, such as the Lichtenbaum–Schlessinger functors $T^{i}$ and imperfection modules. Most of these were motivated by deformation theory.
This sequence is exact on the left if the morphism $f$ is smooth. If Ω admitted a first derived functor, then exactness on the left would imply that the connecting homomorphism vanished, and this would certainly be true if the first derived functor of f, whatever it was, vanished. Therefore, a reasonable speculation is that the first derived functor of a smooth morphism vanishes. Furthermore, when any of the functors which extended the sequence of Kähler differentials were applied to a smooth morphism, they too vanished, which suggested that the cotangent complex of a smooth morphism might be equivalent to the Kähler differentials.
Another natural exact sequence related to Kähler differentials is the conormal exact sequence. If f is a closed immersion with ideal sheaf I, then there is an exact sequence
    $I/I^{2}\to f^{*}\Omega _{Y/Z}\to \Omega _{X/Z}\to 0.$
This is an extension of the exact sequence above: There is a new term on the left, the conormal sheaf of f, and the relative differentials Ω$_{X/Y}$ have vanished because a closed immersion is formally unramified. If f is the inclusion of a smooth subvariety, then this sequence is a short exact sequence. This suggests that the cotangent complex of the inclusion of a smooth variety is equivalent to the conormal sheaf shifted by one term.

## Early work on cotangent complexes

Cotangent complexes appeared in multiple and partially incompatible versions of increasing generality in the early 1960s. The first instance of the related homology functors in the restricted context of field extensions appeared in Cartier (1956). Alexander Grothendieck then developed an early version of cotangent complexes in 1961 for his general Riemann-Roch theorem in algebraic geometry in order to have a theory of virtual tangent bundles. This is the version described by Pierre Berthelot in SGA 6, Exposé VIII. It only applies when f is a smoothable morphism (one that factors into a closed immersion followed by a smooth morphism). In this case, the cotangent complex of f as an object in the derived category of coherent sheaves on X is given as follows:
* $L_{0}^{X/Y}=i^{*}\Omega _{V/Y}.$
* If J is the ideal of X in V, then $L_{1}^{X/Y}=J/J^{2}=i^{*}J.$
* $L_{i}^{X/Y}=0$ for all other i.
* The differential $L_{1}^{X/Y}\to L_{0}^{X/Y}$ is the pullback along i of the inclusion of J in the structure sheaf ${\mathcal {O}}_{V}$ of V followed by the universal derivation $d:{\mathcal {O}}_{V}\to \Omega _{V/Y}.$
* All other differentials are zero.
This definition is independent of the choice of V, and for a smoothable complete intersection morphism, this complex is perfect. Furthermore, if g : Y → Z is another smoothable complete intersection morphism and if an additional technical condition is satisfied, then there is an exact triangle
    $\mathbf {L} f^{*}L_{\bullet }^{Y/Z}\to L_{\bullet }^{X/Z}\to L_{\bullet }^{X/Y}\to \mathbf {L} f^{*}L_{\bullet }^{Y/Z}[1].$
In 1963 Grothendieck developed a more general construction that removes the restriction to smoothable morphisms (which also works in contexts other than algebraic geometry). However, like the theory of 1961, this produced a cotangent complex of length 2 only, corresponding to the truncation $\tau _{\leq 1}\mathbf {L} _{X/Y}^{\bullet }$ of the full complex which was not yet known at the time. This approach was published later in Grothendieck (1968). At the same time in the early 1960s, largely similar theories were independently introduced for commutative rings (corresponding to the "local" case of affine schemes in algebraic geometry) by Gerstenhaber and Lichtenbaum and Schlessinger. Their theories extended to cotangent complexes of length 3, thus capturing more information.

## The definition of the cotangent complex

The correct definition of the cotangent complex begins in the homotopical setting. Quillen and André worked with simplicial commutative rings, while Illusie worked more generally with simplicial ringed topoi, thus covering "global" theory on various types of geometric spaces. For simplicity, we will consider only the case of simplicial commutative rings. Suppose that $A$ and $B$ are simplicial rings and that $B$ is an $A$-algebra. Choose a resolution $r:P^{\bullet }\to B$ of $B$ by simplicial free $A$-algebras. Such a resolution of $B$ can be constructed by using the free commutative $A$-algebra functor which takes a set $S$ and yields the free $A$-algebra $A[S]$. For an $A$-algebra $B$, this comes with a natural augmentation map $\eta _{B}:A[B]\to B$ which maps a formal sum of elements of $B$ to an element of $B$ via the rule
   $a_{1}[b_{1}]+\cdots +a_{n}[b_{n}]\mapsto a_{1}\cdot b_{1}+\cdots a_{n}\cdot b_{n}$
Iterating this construction gives a simplicial algebra
   $\cdots \to A[A[A[B]]]\to A[A[B]]\to A[B]\to B$
where the horizontal maps come from composing the augmentation maps for the various choices. For example, there are two augmentation maps $A[A[B]]\to A[B]$ via the rules
   ${\begin{aligned}a_{i}[a_{i,1}[b_{i,1}]+\cdots +a_{i,n_{i}}[b_{i,n_{i}}]]&\mapsto a_{i}a_{i,1}[b_{i,1}]+\cdots +a_{i}a_{i,n_{i}}[b_{i,n_{i}}]\\&\mapsto a_{i,1}[a_{i}\cdot b_{i,1}]+\cdots +a_{i,n_{i}}[a_{i}\cdot b_{i,n_{i}}]\end{aligned}}$
which can be adapted to each of the free $A$-algebras $A[\cdots A[A[B]]$.
Applying the Kähler differential functor to $P^{\bullet }$ produces a simplicial $B$-module. The total complex of this simplicial object is the cotangent complex L$^{B/A}$. The morphism r induces a morphism from the cotangent complex to Ω$_{B/A}$ called the augmentation map. In the homotopy category of simplicial A-algebras (or of simplicial ringed topoi), this construction amounts to taking the left derived functor of the Kähler differential functor.
Given a commutative square as follows:
there is a morphism of cotangent complexes $L^{B/A}\otimes _{B}D\to L^{D/C}$ which respects the augmentation maps. This map is constructed by choosing a free simplicial C-algebra resolution of D, say $s:Q^{\bullet }\to D.$ Because $P^{\bullet }$ is a free object, the composite hr can be lifted to a morphism $P^{\bullet }\to Q^{\bullet }.$ Applying functoriality of Kähler differentials to this morphism gives the required morphism of cotangent complexes. In particular, given homomorphisms $A\to B\to C,$ this produces the sequence
    $L^{B/A}\otimes _{B}C\to L^{C/A}\to L^{C/B}.$
There is a connecting homomorphism,
    $L^{C/B}\to \left(L^{B/A}\otimes _{B}C\right)[1],$
which turns this sequence into an exact triangle.
The cotangent complex can also be defined in any combinatorial model category M. Suppose that $f:A\to B$ is a morphism in M. The cotangent complex $L^{f}$ (or $L^{B/A}$) is an object in the category of spectra in $M_{B//B}$. A pair of composable morphisms, $f:A\to B$ and $g:B\to C$ induces an exact triangle in the homotopy category,
    $L^{B/A}\otimes _{B}C\to L^{C/A}\to L^{C/B}\to \left(L^{B/A}\otimes _{B}C\right)[1].$

## Cotangent complexes in deformation theory
### Setup

One of the first direct applications of the cotangent complex is in deformation theory. For example, if we have a scheme $f:X\to S$ and a square-zero infinitesimal thickening $S\to S'$, that is a morphism of schemes where the kernel
   ${\mathcal {I}}={\text{ker}}\{{\mathcal {O}}_{S'}\to {\mathcal {O}}_{S}\}$
has the property its square is the zero sheaf, so
   ${\mathcal {I}}^{2}=0$
one of the fundamental questions in deformation theory is to construct the set of $X'$ fitting into cartesian squares of the form
   $\left\{{\begin{matrix}X&\to &X'\\\downarrow &&\downarrow \\S&\to &S'\end{matrix}}\right\}$
A couple examples to keep in mind is extending schemes defined over $\mathbb {Z} /p$ to $\mathbb {Z} /p^{2}$, or schemes defined over a field $k$ of characteristic $0$ to the ring $k[\varepsilon ]$ where $\varepsilon ^{2}=0$. The cotangent complex $\mathbf {L} _{X/S}^{\bullet }$ then controls the information related to this problem. We can reformulate it as considering the set of extensions of the commutative diagram
   ${\begin{matrix}0&\to &{\mathcal {G}}&\to &{\mathcal {O}}_{X'}&\to &{\mathcal {O}}_{X}&\to &0\\&&\uparrow &&\uparrow &&\uparrow \\0&\to &{\mathcal {I}}&\to &{\mathcal {O}}_{S'}&\to &{\mathcal {O}}_{S}&\to &0\end{matrix}}$
which is a homological problem. Then, the set of such diagrams whose kernel is ${\mathcal {G}}$ is isomorphic to the abelian group
   ${\text{Ext}}^{1}(\mathbf {L} _{X/S}^{\bullet },{\mathcal {G}})$
showing the cotangent complex controls the set of deformations available. Furthermore, from the other direction, if there is a short exact sequence
   ${\begin{matrix}0&\to &{\mathcal {G}}&\to &{\mathcal {O}}_{X'}&\to &{\mathcal {O}}_{X}&\to &0\end{matrix}}$
there exists a corresponding element
   $\xi \in {\text{Ext}}^{2}(\mathbf {L} _{X/S}^{\bullet },{\mathcal {G}})$
whose vanishing implies it is a solution to the deformation problem given above. Furthermore, the group
   ${\text{Ext}}^{0}(\mathbf {L} _{X/S}^{\bullet },{\mathcal {G}})$
controls the set of automorphisms for any fixed solution to the deformation problem.

### Some important implications

One of the most geometrically important properties of the cotangent complex is the fact that given a morphism of $S$-schemes
   $f:X\to Y$
we can form the relative cotangent complex $\mathbf {L} _{X/Y}^{\bullet }$ as the cone of
   $f^{*}\mathbf {L} _{Y/S}^{\bullet }\to \mathbf {L} _{X/S}^{\bullet }$
fitting into a distinguished triangle
   $f^{*}\mathbf {L} _{Y/S}^{\bullet }\to \mathbf {L} _{X/S}^{\bullet }\to \mathbf {L} _{X/Y}^{\bullet }\xrightarrow {+1}$
This is one of the pillars for cotangent complexes because it implies the deformations of the morphism $f$ of $S$-schemes is controlled by this complex. In particular, $\mathbf {L} _{X/Y}^{\bullet }$ controls deformations of $f$ as a fixed morphism in ${\text{Hom}}_{S}(X,Y)$, deformations of $X$ which can extend $f$, meaning there is a morphism $f':X'\to S$ which factors through the projection map $X'\to X$ composed with $f$, and deformations of $Y$ defined similarly. This is a powerful technique and is foundational to Gromov-Witten theory (see below), which studies morphisms from algebraic curves of a fixed genus and fixed number of punctures to a scheme $X$.

## Properties of the cotangent complex
### Flat base change

Suppose that B and C are A-algebras such that $\operatorname {Tor} _{q}^{A}(B,C)=0$ for all q > 0. Then there are quasi-isomorphisms
    ${\begin{aligned}L^{B\otimes _{A}C/C}&\cong C\otimes _{A}L^{B/A}\\L^{B\otimes _{A}C/A}&\cong \left(L^{B/A}\otimes _{A}C\right)\oplus \left(B\otimes _{A}L^{C/A}\right)\end{aligned}}$
If C is a flat A-algebra, then the condition that $\operatorname {Tor} _{q}^{A}(B,C)$ vanishes for q > 0 is automatic. The first formula then proves that the construction of the cotangent complex is local on the base in the flat topology.

### Vanishing properties

Let f : A → B. Then:
* If B is a localization of A, then $L_{B/A}\simeq 0$.
* If f is an étale morphism, then $L_{B/A}\simeq 0$.
* If f is a smooth morphism, then $L_{B/A}$ is quasi-isomorphic to $\Omega _{B/A}$. In particular, it has projective dimension zero.
* If f is a local complete intersection morphism, then $L_{B/A}$ is a perfect complex with Tor amplitude in [-1,0].
* If A is Noetherian, $B=A/I$, and $I$ is generated by a regular sequence, then $I/I^{2}$ is a projective module and $L_{B/A}$ is quasi-isomorphic to $I/I^{2}[1].$
* If f is a morphism of perfect k-algebras over a perfect field k of characteristic p > 0, then $L_{B/A}\simeq 0$.

### Characterization of local complete intersections

The theory of the cotangent complex allows one to give a homological characterization of local complete intersection (lci) morphisms, at least under noetherian assumptions. Let f : A → B be a morphism of noetherian rings such that B is a finitely generated A-algebra. As reinterpreted by Quillen, work of Lichtenbaum–Schlessinger shows that the second André–Quillen homology group D$_2$(B/A, M){\textstyle D_{2}(B/A, M)} vanishes for all B-modules M if and only if f is lci. Thus, combined with the above vanishing result we deduce:
    The morphism f : A → B is lci if and only if $L_{B/A}$ is a perfect complex with Tor amplitude in [-1,0].
Quillen further conjectured that if the cotangent complex $L_{B/A}$ has finite projective dimension and B is of finite Tor dimension as an A-module, then f is lci. This was proven by Luchezar Avramov in a 1999 Annals paper. Avramov also extended the notion of lci morphism to the non-finite type setting, assuming only that the morphism f is locally of finite flat dimension, and he proved that the same homological characterization of lci morphisms holds there (apart from $L_{B/A}$ no longer being perfect). Avramov's result was recently improved by Briggs–Iyengar, who showed that the lci property follows once one establishes that ${\textstyle D_{n}(B/A,-)}$ vanishes for any single $n\geq 2$.
In all of this, it is necessary to suppose that the rings in question are noetherian. For example, let k be a perfect field of characteristic p > 0. Then as noted above, $L_{B/A}$ vanishes for any morphism A → B of perfect k-algebras. But not every morphism of perfect k-algebras is lci.

### Flat descent

Bhargav Bhatt showed that the cotangent complex satisfies (derived) faithfully flat descent. In other words, for any faithfully flat morphism f : A → B of R-algebras, one has an equivalence
    $L_{A/R}\simeq \mathrm {Tot} (L_{\mathrm {Cech} (A\to B)/R})$
in the derived category of R, where the right-hand side denotes the homotopy limit of the cosimplicial object given by taking L$_{−/R}${\textstyle L_{-/R}} of the Čech conerve of f. (The Čech conerve is the cosimplicial object determining the Amitsur complex.) More generally, all the exterior powers of the cotangent complex satisfy faithfully flat descent.

## Examples
### Smooth schemes

Let $X\in \operatorname {Sch} /S$ be smooth. Then the cotangent complex is $\Omega _{X/S}$. In Berthelot's framework, this is clear by taking $V=X$. In general, étale locally on $S,X$ is a finite dimensional affine space and the morphism $X\to S$ is projection, so we may reduce to the situation where $S=\operatorname {Spec} (A)$ and $X=\operatorname {Spec} (A[x_{1},\ldots ,x_{n}]).$ We can take the resolution of $\operatorname {Spec} (A[x_{1},\ldots ,x_{n}])$ to be the identity map, and then it is clear that the cotangent complex is the same as the Kähler differentials.

### Closed embeddings in smooth schemes

Let $i:X\to Y$ be a closed embedding of smooth schemes in ${\text{Sch}}/S$. Using the exact triangle corresponding to the morphisms $X\to Y\to S$, we may determine the cotangent complex $\mathbf {L} _{X/Y}$. To do this, note that by the previous example, the cotangent complexes $\mathbf {L} _{X/S}$ and $\mathbf {L} _{Y/S}$ consist of the Kähler differentials $\Omega _{X/S}$ and $\Omega _{Y/S}$ in the zeroth degree, respectively, and are zero in all other degrees. The exact triangle implies that $\mathbf {L} _{X/Y}$ is nonzero only in the first degree, and in that degree, it is the kernel of the map $i^{*}\mathbf {L} _{Y/S}\to \mathbf {L} _{X/S}.$ This kernel is the conormal bundle, and the exact sequence is the conormal exact sequence, so in the first degree, $\mathbf {L} _{X/Y}$ is the conormal bundle $C_{X/Y}$.

### Local complete intersection

More generally, a local complete intersection morphism $X\to Y$ with a smooth target has a cotangent complex perfect in amplitude $[-1,0].$ This is given by the complex
   $I/I^{2}\to \Omega _{Y}|_{X}.$
For example, the cotangent complex of the twisted cubic $X$ in $\mathbb {P} ^{3}$ is given by the complex
   ${\mathcal {O}}(-2)\oplus {\mathcal {O}}(-2)\oplus {\mathcal {O}}(-2){\xrightarrow {s}}\Omega _{\mathbb {P} ^{3}}|_{X}.$

### Cotangent complexes in Gromov-Witten theory

In Gromov–Witten theory mathematicians study the enumerative geometric invariants of n-pointed curves on spaces. In general, there are algebraic stacks
   ${\overline {\mathcal {M}}}_{g,n}(X,\beta )$
which are the moduli spaces of maps
   $\pi :C\to X$
from genus $g$ curves with $n$ punctures to a fixed target. Since enumerative geometry studies the generic behavior of such maps, the deformation theory controlling these kinds of problems requires the deformation of the curve $C$, the map $\pi$, and the target space $X$. Fortunately, all of this deformation theoretic information can be tracked by the cotangent complex $\mathbf {L} _{C/X}^{\bullet }$. Using the distinguished triangle
   $\pi ^{*}\mathbf {L} _{X}^{\bullet }\to \mathbf {L} _{C}^{\bullet }\to \mathbf {L} _{C/X}^{\bullet }\to$
associated to the composition of morphisms
   $C\xrightarrow {\pi } X\rightarrow {\text{Spec}}(\mathbb {C} )$
the cotangent complex can be computed in many situations. In fact, for a complex manifold $X$, its cotangent complex is given by $\Omega _{X}^{1}$, and a smooth $n$-punctured curve $C$, this is given by $\Omega _{C}^{1}(p_{1}+\cdots +p_{n})$. From general theory of triangulated categories, the cotangent complex $\mathbf {L} _{C/X}^{\bullet }$ is quasi-isomorphic to the cone
   ${\text{Cone}}(\pi ^{*}\mathbf {L} _{X}^{\bullet }\to \mathbf {L} _{C}^{\bullet })\simeq {\text{Cone}}(\pi ^{*}\Omega _{X}^{1}\to \Omega _{C}^{1}(p_{1}+\cdots +p_{n}))$