---
title: Kapustin–Li Formula
url: https://www.emergentmind.com/topics/kapustin-li-formula
type: topic
---

# Kapustin–Li Formula

The **Kapustin–Li formula** is a residue and supertrace expression associated with matrix factorizations of a Landau–Ginzburg potential. It evaluates morphism pairings by antisymmetrizing derivatives of a matrix-factorization differential, taking a graded trace, and applying a Grothendieck residue with respect to the Jacobian sequence. In the foam construction of rational \(\mathfrak{sl}(N)\) link homology, the formula is adapted to evaluate closed foams and to derive the local relations governing the foam category. In the matrix-factorization setting, it realizes local duality, a Calabi–Yau trace, boundary–bulk maps, and correlators of a two-dimensional topological field theory. Its use in foams and its relationship with Khovanov–Rozansky homology are developed in “Sl(N) link homology using foams and the Kapustin-Li formula” [0708.2228], while its local-duality and Calabi–Yau interpretation are developed in “The Kapustin-Li formula revisited” [1004.0687].

## 1. Landau–Ginzburg and matrix-factorization framework

Let \(k\) be a field of characteristic \(0\), let \((R,\mathfrak m)\) be a regular local augmented \(k\)-algebra of Krull dimension \(n\), and let \(x_1,\ldots,x_n\) be a regular system of parameters generating \(\mathfrak m\). The principal example is

\[
R=k[\![x_1,\ldots,x_n]\!].
\]

For \(w\in\mathfrak m\), assume that the hypersurface singularity

\[
\operatorname{Spec}(R/(w))
\]

at \(\mathfrak m\) is isolated. Equivalently, its Jacobian or Milnor algebra

\[
\Omega_w
=
R/(\partial_1w,\ldots,\partial_nw)
\]

is finite-dimensional over \(k\).

A matrix factorization \(X\) of \(w\) is a \(\mathbb Z/2\mathbb Z\)-graded finite free \(R\)-module

\[
X=X^0\oplus X^1
\]

with an odd \(R\)-linear endomorphism \(Q_X=d_X\) satisfying

\[
Q_X^2=w\,\operatorname{id}_X.
\]

Relative to the grading,

\[
Q_X=
\begin{pmatrix}
0&\varphi\\
\psi&0
\end{pmatrix},
\qquad
\varphi\psi=\psi\varphi=w\,\operatorname{id}.
\]

For matrix factorizations \(X\) and \(Y\), the morphism complex is

\[
T(X,Y)=\operatorname{Hom}_R(X,Y),
\]

with differential

\[
d(F)=Q_YF-(-1)^{|F|}FQ_X.
\]

Although both matrix-factorization differentials square to multiplication by \(w\), the morphism differential satisfies \(d^2(F)=0\). The homotopy category is obtained by taking \(H^0\) of these complexes.

The Kapustin–Li construction uses the differential \(Q\) to produce a differential-form-like expression. Define

\[
dQ=\sum_{i=1}^n \partial_iQ\,dx_i.
\]

Suppressing the \(dx_i\), its top antisymmetrized product is

\[
(dQ)^{\wedge n}
=
\sum_{\sigma\in S_n}
\operatorname{sign}(\sigma)\,
\partial_{\sigma(1)}Q\,
\partial_{\sigma(2)}Q
\cdots
\partial_{\sigma(n)}Q.
\]

For a homogeneous endomorphism

\[
A=
\begin{pmatrix}
A_{00}&A_{01}\\
A_{10}&A_{11}
\end{pmatrix},
\]

the graded trace is

\[
\operatorname{tr}(A)
=
\operatorname{trace}(A_{00})
-
\operatorname{trace}(A_{11}).
\]

The antisymmetrization of the derivatives of \(Q\) is the algebraic analogue of inserting a volume form, while the supertrace supplies the graded trace over the matrix-factorization state space.

## 2. The residue pairing

The Grothendieck residue is defined using the Jacobian sequence

\[
t_i=\partial_iw.
\]

Because the singularity is isolated, the sequence \((t_1,\ldots,t_n)\) is \(\mathfrak m\)-primary. The top local cohomology module \(H^n_{\mathfrak m}(R)\) is the injective hull of \(k\), and the residue gives a canonical map

\[
\operatorname{Res}:H^n_{\mathfrak m}(\Omega^n_R)\longrightarrow k.
\]

After identifying

\[
\Omega^n_R\cong R\,dx_1\wedge\cdots\wedge dx_n,
\]

the residue is written using generalized fractions as

\[
\operatorname{Res}
\left[
\begin{array}{c}
\omega\\
t_1,\ldots,t_n
\end{array}
\right].
\]

For \(k=\mathbb C\), it has the analytic expression

\[
\operatorname{Res}
\left[
\begin{array}{c}
\omega\\
t_1,\ldots,t_n
\end{array}
\right]
=
\frac{1}{(2\pi i)^n}
\oint_{|t_i|=\varepsilon}
\frac{\omega}{t_1\cdots t_n}.
\]

The Kapustin–Li pairing between morphisms

\[
F:X\to Y,
\qquad
G:Y\to X[n]
\]

is

\[
\boxed{
(F,G)
\longmapsto
\frac{(-1)^{\binom{n+1}{2}}}{n!}
\operatorname{Res}
\left[
\begin{array}{c}
\operatorname{tr}\!\left(FG(dQ)^{\wedge n}\right)\\
\partial_1w,\partial_2w,\ldots,\partial_nw
\end{array}
\right]
}.
\]

Here \(Q\) is the twisted differential associated with \(X\) in the mathematical formulation, \(\operatorname{tr}\) is the supertrace, and the factor \(1/n!\) compensates for the summation over all permutations. The factor

\[
(-1)^{\binom{n+1}{2}}
\]

is the global sign arising from the grading and the local-duality derivation.

For \(k=\mathbb C\), the corresponding contour-integral expression is

\[
\frac{(-1)^{\binom{n+1}{2}}}
{n!(2\pi i)^n}
\oint_{\{|\partial_iw|=\varepsilon\}}
\frac{
\operatorname{tr}\!\left(FG(dQ)^{\wedge n}\right)
}{
\partial_1w\cdots\partial_nw
}.
\]

The physically standard form is often displayed without the derived global sign, with \(Q\) described as the differential of \(Y\). These forms are equivalent after accounting for grading, shifts, supertrace conventions, and graded cyclicity.

For a single matrix factorization \(E\), the formula determines a trace functional

\[
\operatorname{tr}_{KL}:T(E,E)\longrightarrow k
\]

given by

\[
\boxed{
\operatorname{tr}_{KL}(F)
=
\frac{(-1)^{\binom{n+1}{2}}}{n!}
\operatorname{Res}
\left[
\begin{array}{c}
\operatorname{tr}\!\left(F(dQ)^{\wedge n}\right)\\
\partial_1w,\ldots,\partial_nw
\end{array}
\right]
}.
\]

The induced pairing is

\[
\langle F,G\rangle
=
\operatorname{tr}_{KL}(FG).
\]

## 3. Local duality and non-degeneracy

The residue expression arises from local duality applied to the morphism complex rather than being introduced as an independent ansatz. The graded trace identifies

\[
\operatorname{Hom}_R(T(X,Y),R)
\cong T(Y,X).
\]

Local duality then gives, after the dimension shift,

\[
R_{\mathfrak m}T(X,Y)
\simeq
\operatorname{Hom}_R
\bigl(
T(Y,X[n]),H^n_{\mathfrak m}(R)
\bigr).
\]

Applying the residue identification yields

\[
T(X,Y)
\simeq
\operatorname{Hom}_k
\bigl(
T(Y,X[n]),k
\bigr),
\]

provided that \(T(X,Y)\) is supported at \(\mathfrak m\). This support condition follows because the morphism complexes become contractible away from the singular point.

The derivation proceeds through a stable Koszul model. With

\[
t_i=\partial_iw,
\]

one considers

\[
T(X,Y)\otimes_RK^\infty(t_1,\ldots,t_n;R).
\]

In the folded \(\mathbb Z\)-graded presentation, this is written

\[
Z\otimes_RK,
\qquad
Z=\operatorname{Hom}_R(X,Y),
\]

where \(K\) is generated by odd symbols \(\theta_i\) and has differential

\[
\delta=\sum_i\theta_i.
\]

The multiplication action of each \(\partial_iw\) on the morphism complex is null-homotopic. Differentiating

\[
Q^2=w\,\operatorname{id}
\]

gives

\[
(\partial_iQ)Q+Q(\partial_iQ)
=
(\partial_iw)\operatorname{id}.
\]

Thus postcomposition with \(\partial_iQ\) supplies a homotopy for multiplication by \(\partial_iw\). After localization at \(\partial_iw\), the complex becomes contractible.

The basic perturbation lemma is then applied to the Koszul differential. If

\[
(A,d)\underset{p}{\overset{\iota}{\rightleftarrows}}(B,d)
\]

is a deformation retract with homotopy \(h\), and \(\delta\) perturbs the differential on \(B\), the perturbed inclusion is

\[
\iota_\infty
=
\sum_{j\geq0}(-h\delta)^j\iota.
\]

Only the top-form component contributes after application of the residue. Its relevant term is

\[
(-1)^n(h\delta)^n\iota.
\]

Modulo terms annihilated by the residue, this produces the antisymmetrized product

\[
\frac{1}{n!}
\sum_{\sigma\in S_n}
\operatorname{sign}(\sigma)
\frac{
\partial_{\sigma(1)}Q\cdots
\partial_{\sigma(n)}Q
}{
\partial_1w\cdots\partial_nw
}.
\]

The resulting residue and graded-trace expression is precisely the Kapustin–Li pairing.

The cohomology of \(T(X,Y)\) is finite length. Each \(\partial_iw\) acts trivially on cohomology because it is null-homotopic, so the cohomology is naturally a module over the finite-dimensional algebra

\[
\Omega_w
=
R/(\partial_1w,\ldots,\partial_nw).
\]

Consequently, the Kapustin–Li pairing induces a perfect pairing

\[
H^\ast T(X,Y)
\otimes_k
H^\ast T(Y,X[n])
\longrightarrow k.
\]

The non-degeneracy is therefore a consequence of local duality and the residue identification.

## 4. Calabi–Yau structure and topological field theory

The supertrace is graded-cyclic:

\[
\operatorname{tr}(AB)
=
(-1)^{|A||B|}
\operatorname{tr}(BA).
\]

Together with the residue construction, this cyclicity makes the Kapustin–Li trace compatible with composition. The resulting structure is stronger than a collection of perfect pairings on individual Hom-spaces: it defines a Calabi–Yau structure on the differential graded category of matrix factorizations.

The boundary–bulk map for a matrix factorization \(E\),

\[
\beta_E:\operatorname{Hom}(E,E)\longrightarrow HH(T),
\]

is identified with a map to the Jacobian algebra \(\Omega_w[n]\). Its explicit representative is

\[
\boxed{
\beta_E(F)
=
\frac{(-1)^{\binom{n+1}{2}}}{n!}
\operatorname{tr}\!\left(F(dQ)^{\wedge n}\right)
}.
\]

The Hochschild complex of \(MF(R,w)\) is quasi-isomorphic to \(\Omega_w\), concentrated in parity \(n\). The cyclic complex is correspondingly quasi-isomorphic to

\[
\Omega_w[u^{-1}].
\]

Defining

\[
\operatorname{tr}^{\infty}(\omega)
=
\operatorname{Res}
\left[
\begin{array}{c}
\omega\\
\partial_1w,\ldots,\partial_nw
\end{array}
\right],
\]

and extending it \(k[u^{-1}]\)-linearly gives

\[
\operatorname{tr}_{KL}
=
\operatorname{tr}^{\infty}\circ\beta_E.
\]

This supplies a lift of the Kapustin–Li trace to cyclic chains. After passage to a minimal \(A_\infty\)-model, the structure can be strictified to a cyclic \(A_\infty\)-algebra.

Matrix factorizations are interpreted as boundary conditions for the Landau–Ginzburg \(B\)-model with superpotential \(w\). The Kapustin–Li pairing represents the algebraic amplitude for a disk or strip with two boundary insertions, while the boundary–bulk map sends an open-string state to a closed-string state in the bulk Jacobian algebra.

The associated topological field-theoretic structure yields the Riemann–Roch identity

\[
\chi\operatorname{Hom}(E,F)
=
\langle \operatorname{ch}(E),\operatorname{ch}(F)\rangle,
\]

where

\[
\operatorname{ch}(E)=\beta_E(\operatorname{id}_E)
\]

and

\[
\chi\operatorname{Hom}(E,F)
=
\dim H^0\operatorname{Hom}(E,F)
-
\dim H^1\operatorname{Hom}(E,F).
\]

Thus the same residue expression realizes local duality, the Calabi–Yau trace, the boundary–bulk operation, and the correlators required by the associated two-dimensional topological field theory.

## 5. Foam adaptation and Grassmannian Frobenius algebras

The Kapustin–Li formula was adapted by Khovanov and Rozansky to world-sheet foams. In the foam construction of rational \(\mathfrak{sl}(N)\) link homology, facets of color \(i\in\{1,2,3\}\) receive \(i\) variables, a potential, a Jacobi algebra, matrix factorizations along singular edges, and vertex elements at singular vertices.

For a simple facet, one variable \(x\) and the potential

\[
W_F=x^{N+1}
\]

are used.

For a double facet, variables \(s,t\) are used, with potential characterized by

\[
W(x+y,xy)=x^{N+1}+y^{N+1}.
\]

For a triple facet, variables \(p,q,r\) are used, with

\[
W(a+b+c,ab+ac+bc,abc)
=
a^{N+1}+b^{N+1}+c^{N+1}.
\]

The corresponding Jacobi algebra is

\[
J_W
=
\mathbb Q[x_1,\ldots,x_i]
\bigg/
\left\langle
\frac{\partial W}{\partial x_1},
\ldots,
\frac{\partial W}{\partial x_i}
\right\rangle,
\]

and is identified with

\[
H^\ast(\operatorname{Gr}(i,N),\mathbb Q).
\]

The variables have degrees

\[
\deg x_j=2j.
\]

Thus \(x\) has degree \(2\), \(s\) has degree \(2\), \(t\) has degree \(4\), and \(p,q,r\) have degrees \(2,4,6\).

The Frobenius trace on the Grassmannian cohomology is determined in the Schur basis by

\[
\epsilon(\pi_{j_1,\ldots,j_i})
=
\begin{cases}
(-1)^{\lfloor i/2\rfloor},
&
(j_1,\ldots,j_i)=(N-i,\ldots,N-i),\\
0,
&\text{otherwise}.
\end{cases}
\]

The dual Schur basis is

\[
\widehat{\pi}_{\lambda_1,\ldots,\lambda_i}
=
(-1)^{\lfloor i/2\rfloor}
\pi_{N-i-\lambda_i,\ldots,N-i-\lambda_1}.
\]

These Frobenius structures provide the algebraic traces used in foam evaluation.

The foam construction requires simple, double, and triple facets. Along a \((1,1,2)\) singular edge, the Koszul matrix factorization is

\[
MF_1=
\left(
\begin{array}{cc}
x+y-s&A'\\
xy-t&B'
\end{array}
\right),
\]

where

\[
A'
=
\frac{W(x+y,xy)-W(s,xy)}{x+y-s},
\qquad
B'
=
\frac{W(s,xy)-W(s,t)}{xy-t}.
\]

It satisfies

\[
(x+y-s)A'+(xy-t)B'
=
x^{N+1}+y^{N+1}-W(s,t).
\]

Along a \((1,2,3)\) edge, the matrix factorization is

\[
MF_2=
\left(
\begin{array}{cc}
x+s-p&A\\
xs+t-q&B\\
xt-r&C
\end{array}
\right),
\]

with

\[
(x+s-p)A+(xs+t-q)B+(xt-r)C
=
x^{N+1}+W(s,t)-W(p,q,r).
\]

Reversing the orientation of an edge replaces the matrix factorization by its dual:

\[
(M,D,W)^*=(M^*,D^*,-W).
\]

At a singular vertex, the tensor product of the incident edge factorizations has potential zero and becomes a \(2\)-periodic complex. Its homology is an Ext-group containing a distinguished vertex class \(O_v\). Type I and type II vertices receive inverse classes, and every closed pre-foam has equally many type I and type II vertices, so the scalar ambiguity in choosing these classes cancels.

## 6. Evaluation of closed foams and local relations

Let \(u=\Sigma/s_\gamma\) be a closed, dotless pre-foam. Let \(J\) be the tensor product of all facet rings. The Kapustin–Li construction produces an element

\[
KL_u\in J.
\]

If \(f\in J\) represents the facet decorations, the evaluation is

\[
\boxed{
\langle u\rangle_{KL}
=
\epsilon\left(
\prod_F
\det\!\left(\partial_i\partial_jW_F\right)^{g(F)}
(N+1)^{g'(F)}
\;KL_u\,f
\right)
}
\]

where \(g(F)\) is the genus of \(F\), \(g'(F)=i\,g(F)\) for an \(i\)-facet, and \(\epsilon\) is the tensor product of the Frobenius traces on the Jacobi algebras.

For a boundary component of a facet \(F\), choose an edge \(e\). If \(F\) has \(k\) variables, define

\[
O_{F,e}
=
\widehat{\partial D_e}
=
\frac{1}{k!}
\sum_{\sigma\in S_k}
\operatorname{sgn}(\sigma)\,
\partial_{\sigma(1)}D_e
\cdots
\partial_{\sigma(k)}D_e.
\]

The choice of preferred edge does not affect the result. The edge factors and vertex factors are contracted by super-contraction around the boundary components to produce \(KL_u\).

For a theta foam with three facets and a common singular circle,

\[
KL_{\Theta}
=
\operatorname{Tr}^{s}
\left(
\widehat{\partial_1D}\,
\widehat{\partial_2D}\,
\widehat{\partial_3D}
\right).
\]

The raw foam evaluation is normalized by dividing by

\[
(N+1)^{2e_{112}(u)+3e_{123}(u)},
\]

where \(e_{112}(u)\) and \(e_{123}(u)\) count the corresponding cycles in the singular graph. The normalization makes the basic sphere and theta evaluations equal to \(0\) or \(\pm1\).

For the \((1,1,2)\)-theta, the Kapustin–Li element has coefficient

\[
-(N+1)^2\pi_{N-2,N-2}
\]

on the top double-facet class. Before normalization,

\[
\left\langle
KL_{\Theta_1}x^{N-2}y^{N-1}
\right\rangle
=-(N+1)^2,
\]

and

\[
\left\langle
KL_{\Theta_1}x^{N-1}y^{N-2}
\right\rangle
=(N+1)^2.
\]

After normalization, these values become \(-1\) and \(+1\).

For the \((1,2,3)\)-theta, the coefficient of the top triple-facet class \(\pi_{N-3,N-3,N-3}\) is

\[
(N+1)^3.
\]

For example,

\[
\epsilon\left(
KL_{\Theta_2}\,
\pi_{1,1}(s,t)^{N-3}\,
x^{N-1}
\right)
=-(N+1)^3,
\]

which becomes \(-1\) after normalization.

The foam category \(\foam\) is defined as the quotient of the pre-foam category by the kernel of the normalized Kapustin–Li evaluation. A linear combination \(\sum_i c_if_i\) is zero precisely when every compatible closure evaluates to zero:

\[
\sum_i c_if_i=0
\quad\Longleftrightarrow\quad
\sum_i c_i\langle g'f_ig\rangle_{KL}=0.
\]

The resulting relations include dot conversion, dot migration, neck cutting, sphere relations, theta relations, and the Matveev–Piergalini relation. The sphere relations are

\[
\text{simple sphere with \(i\) dots}
=
\begin{cases}
1,&i=N-1,\\
0,&\text{otherwise},
\end{cases}
\]

\[
\text{double sphere with }\pi_{i,j}
=
\begin{cases}
-1,&i=j=N-2,\\
0,&\text{otherwise},
\end{cases}
\]

and

\[
\text{triple sphere with }\pi_{i,j,k}
=
\begin{cases}
-1,&i=j=k=N-3,\\
0,&\text{otherwise}.
\end{cases}
\]

The displayed local relations are not proved to generate the entire kernel of the Kapustin–Li formula; their sufficiency for the full kernel is conjectured. For closed foams without singular vertices, however, the relations reduce evaluation to spheres and theta foams and are sufficient for combinatorial computation.

## 7. Link homology and relation with Khovanov–Rozansky theory

The foam construction assigns a complex to a link diagram \(D\) by resolving every crossing into two webs. The crossing complexes are

\[
\brak{\undercrossing}:
\qquad
0\longrightarrow
\brak{\orsmoothing}
\longrightarrow
\brak{\DoubleEdge}
\longrightarrow0,
\]

and

\[
\brak{\overcrossing}:
\qquad
0\longrightarrow
\brak{\DoubleEdge}
\longrightarrow
\brak{\orsmoothing}
\longrightarrow0,
\]

with differentials given by zip and unzip foams.

The resulting complex \(\brak{D}\) is invariant up to homotopy under all Reidemeister moves. Sphere and neck-cutting relations control Reidemeister I; bubble and digon removal control Reidemeister II; and square removal, digon removal, and the Matveev–Piergalinski relation control Reidemeister III.

The restriction \(N>3\), or equivalently \(N\ge4\) in the construction, is structural. Triple facets and singularities at which six facets meet are required, particularly for the Reidemeister III homotopy equivalence. They are unnecessary in the \(\mathfrak{sl}(3)\) theory.

The tautological functor is

\[
\mathcal F(\Gamma)
=
\operatorname{Hom}_{\foam}(\emptyset,\Gamma),
\]

with

\[
\mathcal F(f)(u)=f\circ u.
\]

It is a tensor functor to graded rational vector spaces. Fundamental examples are

\[
\mathcal F(\text{unknot})
\cong
H^\ast(\mathbb{CP}^{N-1})\{-N+1\},
\]

and

\[
\mathcal F(\text{double circle})
\cong
H^\ast(\operatorname{Gr}(2,N))\{-2N+4\}.
\]

If \(D\) has \(n_+\) positive crossings and \(n_-\) negative crossings, the grading and homological shifts are

\[
\mathcal F_i(L)
=
\mathcal F(\brak{L}_i)
[-n_-]
\left\{
(N-1)n_+-Nn_-+i
\right\}.
\]

The MOY decompositions are categorified by direct-sum decompositions, including

\[
\mathcal F(\text{digon})
\cong
\mathcal F(\text{double edge})\{-1\}
\oplus
\mathcal F(\text{double edge})\{1\},
\]

\[
\mathcal F(\text{double digon})
\cong
\bigoplus_{i=0}^{N-2}
\mathcal F(\text{simple edge})\{2-N+2i\},
\]

and

\[
\mathcal F(\text{square})
\cong
\mathcal F(\text{parallel resolution})
\oplus
\bigoplus_{i=0}^{N-3}
\mathcal F(\text{other resolution})\{3-N+2i\}.
\]

The graded Euler characteristic of \(H^\ast(\mathcal F(L))\) equals the \(\mathfrak{sl}(N)\) link polynomial \(P_N(L)\).

For every web \(\Gamma\), the Kapustin–Li construction gives a grading-preserving injection

\[
\mathcal F(\Gamma)\longrightarrow KR(\Gamma),
\]

where \(KR(\Gamma)\) is the Khovanov–Rozansky matrix-factorization space. The MOY decompositions imply equality of graded dimensions, so this map is an isomorphism on every web. Compatibility with the differentials follows because the foam differentials are zip and unzip foams, and the relevant Ext-space has graded dimension beginning in degree \(1\). The foam and matrix-factorization differentials may initially differ by a nonzero scalar \(\lambda\), but zip and unzip scalars are inverse and are removed by a twist-equivalence multiplying maps on zip and unzip edges by \(\lambda\) and \(\lambda^{-1}\), respectively.

Consequently, for every link \(L\), the bigraded foam complex is isomorphic to the Khovanov–Rozansky complex:

\[
\mathcal F(L)\cong KR(L).
\]

Thus the Kapustin–Li formula simultaneously provides the residue pairing underlying matrix-factorization duality and the closed-foam evaluation that produces the foam model of \(\mathfrak{sl}(N)\) link homology.

Source: https://www.emergentmind.com/topics/kapustin-li-formula