  YY Gem is a short-period eclipsing binary system containing two nearly
identical, rapidly rotating, very active early-M dwarfs. This binary represents
an important benchmark system for calibrating empirical relations between
fundamental properties of low-mass stars and for testing theories of interior
structure and evolution of these objects. Both components of YY Gem exhibit
inflated radii, which has been attributed to poorly understood magnetic
activity effects. Despite a long history of magnetic activity studies of this
system no direct magnetic field measurements have been made for it. Here we
present a comprehensive characterisation of the surface magnetic field in both
components of YY Gem. We reconstructed the global field topologies with the
help of a tomographic inversion technique applied to high-resolution
spectropolarimetric data. This analysis revealed moderately complex global
fields with a typical strength of 200-300 G and anti-aligned dipolar
components. A complementary Zeeman intensification analysis of the disentangled
intensity spectra showed that the total mean field strength reaches 3.2-3.4 kG
in both components of YY Gem. We used these results together with other recent
magnetic field measurements of M dwarfs to investigate the relation between the
global and small-scale fields in these stars. We also assessed predictions of
competing magnetoconvection interior structure models developed for YY Gem,
finding that only one of them anticipated the surface field strength compatible
with our observations. Results of our star spot mapping of YY Gem do not
support the alternative family of theoretical stellar models which attempts to
explain the radii inflation by postulating a large spot filling factor.
