  We study the deformation theory of the Einstein-Yang-Mills system on a
principal bundle with a compact structure group over a compact manifold. We
first construct, as an application of the general slice theorem of Diez and
Rudolph, a smooth slice in the tame Fr\'echet category for the coupled action
of bundle automorphisms on metrics and connections. Using this result, together
with a careful analysis of the linearization of the Einstein-Yang-Mills system,
we realize the moduli space of Einstein-Yang-Mills pairs modulo automorphism as
an analytic set in a finite-dimensional tame Fr\'echet manifold, extending
classical results of Koiso for Einstein metrics and Yang-Mills connections to
the Einstein-Yang-Mills system. Furthermore, we introduce the notion of
\emph{essential deformation} of an Einstein-Yang-Mills pair, which we
characterize in full generality and explore in more detail in the
four-dimensional case, proving a decoupling result for trace deformations when
the underlying Einstein-Yang-Mills pair is a Ricci-flat metric coupled to an
anti-self-dual instanton. In particular, we find a novel obstruction that does
not occur in the separate Einstein or Yang-Mills moduli problems. Finally, we
prove that every essential deformation of the four-dimensional
Einstein-Yang-Mills system based on a Calabi-Yau metric coupled to an instanton
is of restricted type. Notable examples of Einstein-Yang-Mills pairs include
$\mathrm{G}_2$ or $\mathrm{Spin}(7)$ holonomy metrics coupled to $\mathrm{G}_2$
or $\mathrm{Spin}(7)$ instantons, respectively, or zero-slope polystable
holomorphic vector bundles on Calabi-Yau manifolds.

Differential Geometry