Intheoretical physics,compactification means changing a theory with respect to one of itsspace-timedimensions. Instead of having a theory with this dimension being infinite, one changes the theory so that this dimension has a finite length, and may also beperiodic.
Compactification plays an important part inthermal field theory where one compactifies time, instring theory where one compactifies theextra dimensions of the theory, and in two- or one-dimensionalsolid state physics, where one considers a system which is limited in one of the three usual spatial dimensions.
At the limit where the size of the compact dimension goes to zero, no fields depend on this extra dimension, and the theory isdimensionally reduced.

In string theory, compactification is a generalization ofKaluza–Klein theory.[1] It tries to reconcile the gap between the conception of our universe based on its four observable dimensions with the ten, eleven, or twenty-six dimensions which theoretical equations lead us to suppose the universe is made with.
For this purpose it is assumed theextra dimensions are "wrapped" up on themselves, or "curled" up onCalabi–Yau spaces, or onorbifolds. Models in which the compact directions supportfluxes are known asflux compactifications. Thecoupling constant ofstring theory, which determines the probability of strings splitting and reconnecting, can be described by afield called adilaton. This in turn can be described as the size of an extra (eleventh) dimension which is compact. In this way, the ten-dimensionaltype IIA string theory can be described as the compactification ofM-theory in eleven dimensions. Furthermore,different versions of string theory are related by different compactifications in a procedure known asT-duality.
The formulation of more precise versions of the meaning of compactification in this context has been promoted by discoveries such as the mysterious duality.
Aflux compactification is a particular way to deal with additional dimensions required by string theory.
It assumes that the shape of the internalmanifold is a Calabi–Yau manifold orgeneralized Calabi–Yau manifold which is equipped with non-zero values of fluxes, i.e.differential forms, that generalize the concept of anelectromagnetic field (seep-form electrodynamics).
The hypothetical concept of theanthropic landscape in string theory follows from a large number of possibilities in which the integers that characterize the fluxes can be chosen without violating rules of string theory. The flux compactifications can be described asF-theory vacua ortype IIB string theory vacua with or withoutD-branes.