# Kodaira–Spencer map

In mathematics, the Kodaira–Spencer map, introduced by Kunihiko Kodaira and Donald C. Spencer, is a map associated to a deformation of a scheme or complex manifold X, taking a tangent space of a point of the deformation space to the first cohomology group of the sheaf of vector fields on X.

## Definition
### Historical motivation

The Kodaira–Spencer map was originally constructed in the setting of complex manifolds. Given a complex analytic manifold $M$ with charts $U_{i}$ and biholomorphic maps $f_{jk}$ sending $z_{k}\to z_{j}=(z_{j}^{1},\ldots ,z_{j}^{n})$ gluing the charts together, the idea of deformation theory is to replace these transition maps $f_{jk}(z_{k})$ by parametrized transition maps $f_{jk}(z_{k},t_{1},\ldots ,t_{k})$ over some base $B$ (which could be a real manifold) with coordinates $t_{1},\ldots ,t_{k}$, such that $f_{jk}(z_{k},0,\ldots ,0)=f_{jk}(z_{k})$. This means the parameters $t_{i}$ deform the complex structure of the original complex manifold $M$. Then, these functions must also satisfy a cocycle condition, which gives a 1-cocycle on $M$ with values in its tangent bundle. Since the base can be assumed to be a polydisk, this process gives a map between the tangent space of the base to $H^{1}(M,T_{M})$ called the Kodaira–Spencer map.

### Original definition

More formally, the Kodaira–Spencer map is
    $KS:T_{0}B\to H^{1}(M,T_{M})$
where
* ${\mathcal {M}}\to B$ is a smooth proper map between complex spaces (i.e., a deformation of the special fiber $M={\mathcal {M}}_{0}$.)
* $KS$ is the connecting homomorphism obtained by taking a long exact cohomology sequence of the surjection $T{\mathcal {M}}|_{M}\to T_{0}B\otimes {\mathcal {O}}_{M}$ whose kernel is the tangent bundle $T_{M}$.
If $v$ is in $T_{0}B$, then its image $KS(v)$ is called the Kodaira–Spencer class of $v$.

### Remarks

Because deformation theory has been extended to multiple other contexts, such as deformations in scheme theory, or ringed topoi, there are constructions of the Kodaira–Spencer map for these contexts.
In the scheme theory over a base field $k$ of characteristic $0$, there is a natural bijection between isomorphisms classes of ${\mathcal {X}}\to S=\operatorname {Spec} (k[t]/t^{2})$ and $H^{1}(X,TX)$.

## Constructions
### Using infinitesimals
#### Cocycle condition for deformations

Over characteristic $0$ the construction of the Kodaira–Spencer map can be done using an infinitesimal interpretation of the cocycle condition. If we have a complex manifold $X$ covered by finitely many charts ${\mathcal {U}}=\{U_{\alpha }\}_{\alpha \in I}$ with coordinates $z_{\alpha }=(z_{\alpha }^{1},\ldots ,z_{\alpha }^{n})$ and transition functions
   $f_{\beta \alpha }:U_{\beta }|_{U_{\alpha \beta }}\to U_{\alpha }|_{U_{\alpha \beta }}$ where $f_{\alpha \beta }(z_{\beta })=z_{\alpha }$
Recall that a deformation is given by a commutative diagram
   ${\begin{matrix}X&\to &{\mathfrak {X}}\\\downarrow &&\downarrow \\{\text{Spec}}(\mathbb {C} )&\to &{\text{Spec}}(\mathbb {C} [\varepsilon ])\end{matrix}}$
where $\mathbb {C} [\varepsilon ]$ is the ring of dual numbers and the vertical maps are flat, the deformation has the cohomological interpretation as cocycles ${\tilde {f}}_{\alpha \beta }(z_{\beta },\varepsilon )$ on $U_{\alpha }\times {\text{Spec}}(\mathbb {C} [\varepsilon ])$ where
   $z_{\alpha }={\tilde {f}}_{\alpha \beta }(z_{\beta },\varepsilon )=f_{\alpha \beta }(z_{\beta })+\varepsilon b_{\alpha \beta }(z_{\beta })$
If the ${\tilde {f}}_{\alpha \beta }$ satisfy the cocycle condition, then they glue to the deformation ${\mathfrak {X}}$. This can be read as
   ${\begin{aligned}{\tilde {f}}_{\alpha \gamma }(z_{\gamma },\varepsilon )=&{\tilde {f}}_{\alpha \beta }({\tilde {f}}_{\beta \gamma }(z_{\gamma },\varepsilon ),\varepsilon )\\=&f_{\alpha \beta }(f_{\beta \gamma }(z_{\gamma })+\varepsilon b_{\beta \gamma }(z_{\gamma }))\\&+\varepsilon b_{\alpha \beta }(f_{\beta \gamma }(z_{\gamma })+\varepsilon b_{\beta \gamma }(z_{\gamma }))\end{aligned}}$
Using the properties of the dual numbers, namely $g(a+b\varepsilon )=g(a)+\varepsilon g'(a)b$, we have
   ${\begin{aligned}f_{\alpha \beta }(f_{\beta \gamma }(z_{\gamma })+\varepsilon b_{\beta \gamma }(z_{\gamma }))&=f_{\alpha \beta }(f_{\beta \gamma }(z_{\gamma }))+\varepsilon {\frac {\partial f_{\alpha \beta }}{\partial z_{\beta }}}(z_{\beta })b_{\beta \gamma }(z_{\gamma })\\\end{aligned}}$
and
   ${\begin{aligned}\varepsilon b_{\alpha \beta }(f_{\beta \gamma }(z_{\gamma })+\varepsilon b_{\beta \gamma }(z_{\gamma }))=\varepsilon b_{\alpha \beta }(z_{\beta })\end{aligned}}$
hence the cocycle condition on $U_{\alpha }\times {\text{Spec}}(\mathbb {C} [\varepsilon ])$ is the following two rules
* $b_{\alpha \gamma }={\frac {\partial f_{\alpha \beta }}{\partial z_{\beta }}}b_{\beta \gamma }+b_{\alpha \beta }$
* $f_{\alpha \gamma }=f_{\alpha \beta }\circ f_{\beta \gamma }$

#### Conversion to cocycles of vector fields

The cocycle of the deformation can easily be converted to a cocycle of vector fields $\theta =\{\theta _{\alpha \beta }\}\in C^{1}({\mathcal {U}},T_{X})$ as follows: given the cocycle ${\tilde {f}}_{\alpha \beta }=f_{\alpha \beta }+\varepsilon b_{\alpha \beta }$ we can form the vector field
   $\theta _{\alpha \beta }=\sum _{i=1}^{n}b_{\alpha \beta }^{i}{\frac {\partial }{\partial z_{\alpha }^{i}}}$
which is a 1-cochain. Then the rule for the transition maps of $b_{\alpha \gamma }$ gives this 1-cochain as a 1-cocycle, hence a class $[\theta ]\in H^{1}(X,T_{X})$.

### Using vector fields

One of the original constructions of this map used vector fields in the settings of differential geometry and complex analysis. Given the notation above, the transition from a deformation to the cocycle condition is transparent over a small base of dimension one, so there is only one parameter $t$. Then, the cocycle condition can be read as
   $f_{ik}^{\alpha }(z_{k},t)=f_{ij}^{\alpha }(f_{kj}^{1}(z_{k},t),\ldots ,f_{kj}^{n}(z_{k},t),t)$
Then, the derivative of $f_{ik}^{\alpha }(z_{k},t)$ with respect to $t$ can be calculated from the previous equation as
   ${\begin{aligned}{\frac {\partial f_{ik}^{\alpha }(z_{k},t)}{\partial t}}&={\frac {\partial f_{ij}^{\alpha }(z_{j},t)}{\partial t}}+\sum _{\beta =0}^{n}{\frac {\partial f_{ij}^{\alpha }(z_{j},t)}{\partial f_{jk}^{\beta }(z_{k},t)}}\cdot {\frac {\partial f_{jk}^{\beta }(z_{k},t)}{\partial t}}\\\end{aligned}}$
Note because $z_{j}^{\beta }=f_{jk}^{\beta }(z_{k},t)$ and $z_{i}^{\alpha }=f_{ij}^{\alpha }(z_{j},t)$, then the derivative reads as
   ${\begin{aligned}{\frac {\partial f_{ik}^{\alpha }(z_{k},t)}{\partial t}}&={\frac {\partial f_{ij}^{\alpha }(z_{j},t)}{\partial t}}+\sum _{\beta =0}^{n}{\frac {\partial z_{i}^{\alpha }}{\partial z_{j}^{\beta }}}\cdot {\frac {\partial f_{jk}^{\beta }(z_{k},t)}{\partial t}}\\\end{aligned}}$
With a change of coordinates of the part of the previous holomorphic vector field having these partial derivatives as the coefficients, we can write
   ${\frac {\partial }{\partial z_{j}^{\beta }}}=\sum _{\alpha =1}^{n}{\frac {\partial z_{i}^{\alpha }}{\partial z_{j}^{\beta }}}\cdot {\frac {\partial }{\partial z_{i}^{\alpha }}}$
Hence we can write up the equation above as the following equation of vector fields
   ${\begin{aligned}\sum _{\alpha =0}^{n}{\frac {\partial f_{ik}^{\alpha }(z_{k},t)}{\partial t}}{\frac {\partial }{\partial z_{i}^{\alpha }}}=&\sum _{\alpha =0}^{n}{\frac {\partial f_{ij}^{\alpha }(z_{j},t)}{\partial t}}{\frac {\partial }{\partial z_{i}^{\alpha }}}\\&+\sum _{\beta =0}^{n}{\frac {\partial f_{jk}^{\beta }(z_{k},t)}{\partial t}}{\frac {\partial }{\partial z_{j}^{\beta }}}\\\end{aligned}}$
Rewriting this as the vector fields
   $\theta _{ik}(t)=\theta _{ij}(t)+\theta _{jk}(t)$
where
   $\theta _{ij}(t)={\frac {\partial f_{ij}^{\alpha }(z_{j},t)}{\partial t}}{\frac {\partial }{\partial z_{i}^{\alpha }}}$
gives the cocycle condition. Hence $\theta _{ij}$ has an associated class in $[\theta _{ij}]\in H^{1}(M,T_{M})$ from the original deformation ${\tilde {f}}_{ij}$ of $f_{ij}$.

### In scheme theory

Deformations of a smooth variety
   ${\begin{matrix}X&\to &{\mathfrak {X}}\\\downarrow &&\downarrow \\{\text{Spec}}(k)&\to &{\text{Spec}}(k[\varepsilon ])\end{matrix}}$
have a Kodaira-Spencer class constructed cohomologically. Associated to this deformation is the short exact sequence
   $0\to \pi ^{*}\Omega _{{\text{Spec}}(k[\varepsilon ])}^{1}\to \Omega _{\mathfrak {X}}^{1}\to \Omega _{{\mathfrak {X}}/S}^{1}\to 0$
(where $\pi :{\mathfrak {X}}\to S={\text{Spec}}(k[\varepsilon ])$) which when tensored by the ${\mathcal {O}}_{\mathfrak {X}}$-module ${\mathcal {O}}_{X}$ gives the short exact sequence
   $0\to {\mathcal {O}}_{X}\to \Omega _{\mathfrak {X}}^{1}\otimes {\mathcal {O}}_{X}\to \Omega _{X}^{1}\to 0$
Using derived categories, this defines an element in
   ${\begin{aligned}\mathbf {R} {\text{Hom}}(\Omega _{X}^{1},{\mathcal {O}}_{X}[+1])&\cong \mathbf {R} {\text{Hom}}({\mathcal {O}}_{X},T_{X}[+1])\\&\cong {\text{Ext}}^{1}({\mathcal {O}}_{X},T_{X})\\&\cong H^{1}(X,T_{X})\end{aligned}}$
generalizing the Kodaira–Spencer map. Notice this could be generalized to any smooth map $f:X\to Y$ in ${\text{Sch}}/S$ using the cotangent sequence, giving an element in $H^{1}(X,T_{X/Y}\otimes f^{*}(\Omega _{Y/Z}^{1}))$.

### Of ringed topoi

One of the most abstract constructions of the Kodaira–Spencer maps comes from the cotangent complexes associated to a composition of maps of ringed topoi
   $X\xrightarrow {f} Y\to Z$
Then, associated to this composition is a distinguished triangle
   $f^{*}\mathbf {L} _{Y/Z}\to \mathbf {L} _{X/Z}\to \mathbf {L} _{X/Y}\xrightarrow {[+1]}$
and this boundary map forms the Kodaira–Spencer map (or cohomology class, denoted $K(X/Y/Z)$). If the two maps in the composition are smooth maps of schemes, then this class coincides with the class in $H^{1}(X,T_{X/Y}\otimes f^{*}(\Omega _{Y/Z}^{1}))$.

## Examples
### With analytic germs

The Kodaira–Spencer map when considering analytic germs is easily computable using the tangent cohomology in deformation theory and its versal deformations. For example, given the germ of a polynomial $f(z_{1},\ldots ,z_{n})\in \mathbb {C} \{z_{1},\ldots ,z_{n}\}=H$, its space of deformations can be given by the module
   $T^{1}={\frac {H}{df\cdot H^{n}}}$
For example, if $f=y^{2}-x^{3}$ then its versal deformations is given by
   $T^{1}={\frac {\mathbb {C} \{x,y\}}{(y,x^{2})}}$
hence an arbitrary deformation is given by $F(x,y,a_{1},a_{2})=y^{2}-x^{3}+a_{1}+a_{2}x$. Then for a vector $v\in T_{0}(\mathbb {C} ^{2})$, which has the basis
   ${\frac {\partial }{\partial a_{1}}},{\frac {\partial }{\partial a_{2}}}$
there the map $KS:v\mapsto v(F)$ sending
   ${\begin{aligned}\phi _{1}{\frac {\partial }{\partial a_{1}}}+\phi _{2}{\frac {\partial }{\partial a_{2}}}\mapsto &\phi _{1}{\frac {\partial F}{\partial a_{1}}}+\phi _{2}{\frac {\partial F}{\partial a_{2}}}\\&=\phi _{1}+\phi _{2}\cdot x\end{aligned}}$

### On affine hypersurfaces with the cotangent complex

For an affine hypersurface $i:X_{0}\hookrightarrow \mathbb {A} ^{n}\to {\text{Spec}}(k)$ over a field $k$ defined by a polynomial $f$, there is the associated fundamental triangle
   $i^{*}\mathbf {L} _{\mathbb {A} ^{n}/{\text{Spec}}(k)}\to \mathbf {L} _{X_{0}/{\text{Spec}}(k)}\to \mathbf {L} _{X_{0}/\mathbb {A} ^{n}}\xrightarrow {[+1]}$
Then, applying $\mathbf {RHom} (-,{\mathcal {O}}_{X_{0}})$ gives the long exact sequence
   ${\begin{aligned}&{\textbf {RHom}}(i^{*}\mathbf {L} _{\mathbb {A} ^{n}/{\text{Spec}}(k)},{\mathcal {O}}_{X_{0}}[+1])\leftarrow {\textbf {RHom}}(\mathbf {L} _{X_{0}/{\text{Spec}}(k)},{\mathcal {O}}_{X_{0}}[+1])\leftarrow {\textbf {RHom}}(\mathbf {L} _{X_{0}/\mathbb {A} ^{n}},{\mathcal {O}}_{X_{0}}[+1])\\\leftarrow &{\textbf {RHom}}(i^{*}\mathbf {L} _{\mathbb {A} ^{n}/{\text{Spec}}(k)},{\mathcal {O}}_{X_{0}})\leftarrow {\textbf {RHom}}(\mathbf {L} _{X_{0}/{\text{Spec}}(k)},{\mathcal {O}}_{X_{0}})\leftarrow {\textbf {RHom}}(\mathbf {L} _{X_{0}/\mathbb {A} ^{n}},{\mathcal {O}}_{X_{0}})\end{aligned}}$
Recall that there is the isomorphism
   ${\textbf {RHom}}(\mathbf {L} _{X_{0}/{\text{Spec}}(k)},{\mathcal {O}}_{X_{0}}[+1])\cong {\text{Ext}}^{1}(\mathbf {L} _{X_{0}/{\text{Spec}}(k)},{\mathcal {O}}_{X_{0}})$
from general theory of derived categories, and the ext group classifies the first-order deformations. Then, through a series of reductions, this group can be computed. First, since $\mathbf {L} _{\mathbb {A} ^{n}/{\text{Spec}}(k)}\cong \Omega _{\mathbb {A} ^{n}/{\text{Spec}}(k)}^{1}$ is a free module, ${\textbf {RHom}}(i^{*}\mathbf {L} _{\mathbb {A} ^{n}/{\text{Spec}}(k)},{\mathcal {O}}_{X_{0}}[+1])=0$. Also, because $\mathbf {L} _{X_{0}/\mathbb {A} ^{n}}\cong {\mathcal {I}}/{\mathcal {I}}^{2}[+1]$, there are isomorphisms
   ${\begin{aligned}{\textbf {RHom}}(\mathbf {L} _{X_{0}/\mathbb {A} ^{n}},{\mathcal {O}}_{X_{0}}[+1])\cong &{\textbf {RHom}}({\mathcal {I}}/{\mathcal {I}}^{2}[+1],{\mathcal {O}}_{X_{0}}[+1])\\\cong &{\textbf {RHom}}({\mathcal {I}}/{\mathcal {I}}^{2},{\mathcal {O}}_{X_{0}})\\\cong &{\text{Ext}}^{0}({\mathcal {I}}/{\mathcal {I}}^{2},{\mathcal {O}}_{X_{0}})\\\cong &{\text{Hom}}({\mathcal {I}}/{\mathcal {I}}^{2},{\mathcal {O}}_{X_{0}})\\\cong &{\mathcal {O}}_{X_{0}}\end{aligned}}$
The last isomorphism comes from the isomorphism ${\mathcal {I}}/{\mathcal {I}}^{2}\cong {\mathcal {I}}\otimes _{{\mathcal {O}}_{\mathbb {A} ^{n}}}{\mathcal {O}}_{X_{0}}$, and a morphism in
   ${\text{Hom}}_{{\mathcal {O}}_{X_{0}}}({\mathcal {I}}\otimes _{{\mathcal {O}}_{\mathbb {A} ^{n}}}{\mathcal {O}}_{X_{0}},{\mathcal {O}}_{X_{0}})$ send $[gf]\mapsto g'g+(f)$
giving the desired isomorphism. From the cotangent sequence
   ${\frac {(f)}{(f)^{2}}}\xrightarrow {[g]\mapsto dg\otimes 1} \Omega _{\mathbb {A} ^{n}}^{1}\otimes {\mathcal {O}}_{X_{0}}\to \Omega _{X_{0}/{\text{Spec}}(k)}^{1}\to 0$
(which is a truncated version of the fundamental triangle) the connecting map of the long exact sequence is the dual of $[g]\mapsto dg\otimes 1$, giving the isomorphism
   ${\text{Ext}}^{1}(\mathbf {L} _{X_{0}/k},{\mathcal {O}}_{X_{0}})\cong {\frac {k[x_{1},\ldots ,x_{n}]}{\left(f,{\frac {\partial f}{\partial x_{1}}},\ldots ,{\frac {\partial f}{\partial x_{n}}}\right)}}$
Note this computation can be done by using the cotangent sequence and computing ${\text{Ext}}^{1}(\Omega _{X_{0}}^{1},{\mathcal {O}}_{X_{0}})$. Then, the Kodaira–Spencer map sends a deformation
   ${\frac {k[\varepsilon ][x_{1},\ldots ,x_{n}]}{f+\varepsilon g}}$
to the element $g\in {\text{Ext}}^{1}(\mathbf {L} _{X_{0}/k},{\mathcal {O}}_{X_{0}})$.