Let MM be an oriented , let GG be a with an Ad\mathrm{Ad}-invariant positive-definite inner product on its Lie algebra (as for a compact structure group), and let π ⁣:PM\pi\colon P\to M be a .

Fix a AA on PP with FAΩ2(M;ad(P))F_A\in \Omega^2(M;\operatorname{ad}(P)).

The Yang–Mills functional is

YM(A):=12MFA2volg[0,+],\mathrm{YM}(A) := \frac12\int_M |F_A|^2\,\mathrm{vol}_g\in[0,+\infty],

where the norm combines the Riemannian metric with the chosen invariant inner product; the integral may be infinite on a noncompact base.

Equivalent formula and properties

Equivalently, YM(A)=12MFAFA\mathrm{YM}(A)=\frac12\int_M \langle F_A\wedge *F_A\rangle using the Hodge star of the Riemannian metric and the chosen inner product.

It is invariant under gauge transformations of PP, so it descends to a functional on the moduli space of connections modulo gauge.

On a closed manifold, critical points of this functional are precisely , characterized by the .

Examples
  1. Flat connections. If FA=0F_A=0 then YM(A)=0\mathrm{YM}(A)=0, which is the minimum possible value.
  2. Abelian case (Maxwell energy). For G=U(1)G=U(1), the curvature is an ordinary closed 2-form, and YM(A)\mathrm{YM}(A) reduces to the classical electromagnetic energy 12F2\frac12\int |F|^2.
  3. Four dimensions and self-duality. On a closed oriented 4-manifold, connections with self-dual or anti-self-dual curvature minimize YM\mathrm{YM} within their topological class (the functional splits into a topological term plus a nonnegative remainder).