In physical cosmology, structure formation refers to the formation of galaxies, galaxy clusters and larger structures from small early density fluctuations. The Universe, as is now known from observations of the cosmic microwave background radiation, began in a hot, dense, nearly uniform state approximately 13.8 billion years ago.[1] However, looking in the sky today, we see structures on all scales, from stars and planets to galaxies and, on still larger scales still, galaxy clusters and sheet-like structures of galaxies separated by enormous voids containing few galaxies. Structure formation attempts to model how these structures formed by gravitational instability of small early density ripples.[2][3][4][5]

The modern Lambda-CDM model is successful at predicting the observed large-scale distribution of galaxies, clusters and voids; but on the scale of individual galaxies there are many complications due to highly nonlinear processes involving baryonic physics, gas heating and cooling, star formation and feedback. Understanding the processes of galaxy formation is a major topic of modern cosmology research, both via observations such as the Hubble Ultra-Deep Field and via large computer simulations.

Under present models, the structure of the visible universe was formed in the following stages:

The very early Universe
In this stage, some mechanism, such as cosmic inflation, was responsible for establishing the initial conditions of the Universe: homogeneity, isotropy, and flatness.[3][6]Cosmic inflation also would have amplified minute quantum fluctuations (pre-inflation) into slight density ripples of overdensity and underdensity (post-inflation).

Growth of structure
The early universe was dominated by radiation; in this case density fluctuations larger than the cosmic horizon grow proportional to the scale factor, as the gravitational potential fluctuations remain constant. Structures smaller than the horizon remained essentially frozen due to radiation domination impeding growth. As the universe expanded, the density of radiation drops faster than matter (due to redshifting of photon energy); this led to a crossover called matter-radiation equality at ~ 50,000 years after the Big Bang. After this all dark matter ripples could grow freely, forming seeds into which the baryons could later fall. The size of the universe at this epoch forms a turnover in the matter power spectrum which can be measured in large redshift surveys.

Recombination
The Universe was dominated by radiation for most of this stage, and due to the intense heat and radiation, the primordial hydrogen and helium were fully ionized into nuclei and free electrons. In this hot and dense situation, the radiation (photons) could not travel far before Thomson scattering off an electron. The Universe was very hot and dense, but expanding rapidly and therefore cooling. Finally, at a little less than 400,000 years after the 'bang', it become cool enough (around 3000 K) for the protons to capture negatively charged electrons, forming neutral hydrogen atoms. (Helium atoms formed somewhat earlier due to their larger binding energy). Once nearly all the charged particles were bound in neutral atoms, the photons no longer interacted with them and were free to propagate for the next 13.8 billion years; we currently detect those photons redshifted by a factor 1090 down to 2.725 K as the Cosmic Microwave Background Radiation (CMB) filling today's Universe. Several remarkable space-based missions (COBE,WMAP,Planck),have detected very slight variations in the density and temperature of the CMB. These variations were subtle, and the CMB appears very nearly uniformly the same in every direction. However, the slight temperature variations of order a few parts in 100,000 are of enormous importance, for they essentially were early "seeds" from which all subsequent complex structures in the universe ultimately developed.

The theory of what happened after the universe's first 400,000 years is one of hierarchical structure formation: the smaller gravitationally bound structures such as matter peaks containing the first stars and stellar clusters formed first, and these subsequently merged together with gas and dark matter to form galaxies, followed by groups, clusters and superclusters of galaxies.

The very early Universe is still a poorly understood epoch, from the viewpoint of fundamental physics. The prevailing theory, cosmic inflation, does a good job explaining the observed flatness, homogeneity and isotropy of the Universe, as well as the absence of exotic relic particles (such as magnetic monopoles). In addition, it has made a crucial prediction that has been borne out by observation: that the primordial Universe would have tiny perturbations which seed the formation of structure in the later Universe. These fluctuations, while they form the foundation for all structure in the Universe, appear most clearly as tiny temperature fluctuations at one part in 100,000. (To put this in perspective, the same level of fluctuations on a topographic map of the United States would show no feature higher than a few centimeters high.) These fluctuations are critical, because they provide the seeds from which the largest structures within the Universe can grow and eventually collapse to form galaxies and stars. COBE (Cosmic Background Explorer) provided the first detection of the intrinsic fluctuations in the cosmic microwave background radiation in the 1990s.

These perturbations are thought to have a very specific character: they form a Gaussian random field whose covariance function is diagonal and nearly scale-invariant. The observed fluctuations appear to have exactly this form, and in addition the spectral index measured by WMAP—the spectral index measures the deviation from a scale-invariant (or Harrison-Zel'dovich) spectrum—is very nearly the value predicted by the simplest and most robust models of inflation. Another important property of the primordial perturbations, that they are adiabatic (or isentropic between the various kinds of matter that compose the Universe), is predicted by cosmic inflation and has been confirmed by observations.

The physical size of the Hubble radius (solid line) as a function of the scale factor of the Universe. The physical wavelength of a perturbation mode (dashed line) is shown as well. The plot illustrates how the perturbation mode exits the horizon during cosmic inflation in order to reenter during radiation domination. If cosmic inflation never happened, and radiation domination continued back until a gravitational singularity, then the mode would never have exited the horizon in the very early Universe.

An extremely important concept in the theory of structure formation is the notion of the Hubble radius, often called simply the horizon as it is closely related to the particle horizon. The Hubble radius, which is related to the Hubble parameter as , where is the speed of light, defines, roughly speaking, the volume of the nearby universe that has recently (in the last expansion time) been in causal contact with an observer. Since the Universe is continually expanding, its energy density is continually decreasing (in the absence of truly exotic matter such as phantom energy). The Friedmann equation relates the energy density of the Universe to the Hubble parameter, and shows that the Hubble radius is continually increasing.

The horizon problem of the big bang cosmology says that, without inflation, perturbations were never in causal contact before they entered the horizon and thus the homogeneity and isotropy of, for example, the large scale galaxy distributions cannot be explained. This is because, in an ordinary Friedmann–Lemaître–Robertson–Walker cosmology, the Hubble radius increases more rapidly than space expands, so perturbations are only ever entering the Hubble radius, and they are not being pushed out by the expansion of space. This paradox is resolved by cosmic inflation, which suggests that there was a phase of very rapid expansion in the early Universe in which the Hubble radius was very nearly constant. Thus, the large scale isotropy that we see today is due to quantum fluctuations produced during cosmic inflation being pushed outside the horizon.

The end of inflation is called reheating, when the inflation particles decay into a hot, thermal plasma of other particles. In this epoch, the energy content of the Universe is entirely radiation, with standard model particles having relativistic velocities. As the plasma cools, baryogenesis and leptogenesis are thought to occur, as the quark–gluon plasma cools, electroweak symmetry breaking occurs and the Universe becomes principally composed of ordinary protons, neutrons and electrons. As the Universe cools further, big bang nucleosynthesis occurs and small quantities of deuterium, helium and lithiumnuclei are created. As the Universe cools and expands, the energy in photons begins to redshift away, particles become non-relativistic and ordinary matter begins to dominate the Universe. Eventually, atoms begin to form as free electrons bind to nuclei. This suppresses Thomson scattering of photons. Combined with the rarefaction of the Universe (and consequent increase in the mean free path of photons), this makes the Universe transparent and the cosmic microwave background is emitted at recombination (the surface of last scattering).

The primordial plasma would have had very slight overdensities of matter, thought to have derived from the enlargement of quantum fluctuations during inflation. Whatever the source, these overdensities gravitationally attract matter. But the intense heat of the near constant photon-matter interactions of this epoch rather forcefully seeks thermal equilibrium, which creates a large amount of outward pressure. These counteracting forces of gravity and pressure create oscillations, analogous to sound waves created in air by pressure differences.

These perturbations are important, as they are responsible for the subtle physics that result in the cosmic microwave background anisotropy. In this epoch, the amplitude of perturbations that enter the horizon oscillate sinusoidally, with dense regions becoming more rarefied and then becoming dense again, with a frequency which is related to the size of the perturbation. If the perturbation oscillates an integral or half-integral number of times between coming into the horizon and recombination, it appears as an acoustic peak of the cosmic microwave background anisotropy. (A half-oscillation, in which a dense region becomes a rarefied region or vice versa, appears as a peak because the anisotropy is displayed as a power spectrum, so underdensities contribute to the power just as much as overdensities.) The physics that determines the detailed peak structure of the microwave background is complicated, but these oscillations provide the essence.[7][8][9][10][11]

Evolution of two perturbations to the ΛCDM homogeneous big bang model. Between entering the horizon and decoupling, the dark matter perturbation (dashed line) grows logarithmically, before the growth accelerates in matter domination. On the other hand, between entering the horizon and decoupling, the perturbation in the baryon-photon fluid (solid line) oscillates rapidly. After decoupling, it grows rapidly to match the dominant matter perturbation, the dark matter mode.

One of the key realizations made by cosmologists in the 1970s and 1980s was that the majority of the matter content of the Universe was composed not of atoms, but rather a mysterious form of matter known as dark matter. Dark matter interacts through the force of gravity, but it is not composed of baryons and it is known with very high accuracy that it does not emit or absorb radiation. It may be composed of particles that interact through the weak interaction, such as neutrinos, but it cannot be composed entirely of the three known kinds of neutrinos (although some have suggested it is a sterile neutrino). Recent evidence suggests that there is about five times as much dark matter as baryonic matter, and thus the dynamics of the Universe in this epoch are dominated by dark matter.

Dark matter plays a key role in structure formation because it feels only the force of gravity: the gravitational Jeans instability which allows compact structures to form is not opposed by any force, such as radiation pressure. As a result, dark matter begins to collapse into a complex network of dark matter halos well before ordinary matter, which is impeded by pressure forces. Without dark matter, the epoch of galaxy formation would occur substantially later in the Universe than is observed.

The physics of structure formation in this epoch is particularly simple, as dark matter perturbations with different wavelengths evolve independently. As the Hubble radius grows in the expanding Universe, it encompasses larger and larger perturbations. During matter domination, all causal dark matter perturbations grow through gravitational clustering. However, the shorter-wavelength perturbations that are encompassed during radiation domination have their growth retarded until matter domination. At this stage, luminous, baryonic matter is expected to simply mirror the evolution of the dark matter, and their distributions should closely trace one another.

It is a simple matter to calculate this "linear power spectrum" and, as a tool for cosmology, it is of comparable importance to the cosmic microwave background. The power spectrum has been measured by galaxy surveys, such as the Sloan Digital Sky Survey, and by surveys of the Lyman-α forest. Since these surveys observe radiation emitted from galaxies and quasars, they do not directly measure the dark matter, but the large scale distribution of galaxies (and of absorption lines in the Lyman-α forest) is expected to closely mirror the distribution of dark matter. This depends on the fact that galaxies will be larger and more numerous in denser parts of the Universe, whereas they will be comparatively scarce in rarefied regions.

When the perturbations have grown sufficiently, a small region might become substantially denser than the mean density of the Universe. At this point, the physics involved becomes substantially more complicated. When the deviations from homogeneity are small, the dark matter may be treated as a pressureless fluid and evolves by very simple equations. In regions which are significantly denser than the background, the full Newtonian theory of gravity must be included. (The Newtonian theory is appropriate because the masses involved are much less than those required to form a black hole, and the speed of gravity may be ignored as the light-crossing time for the structure is still smaller than the characteristic dynamical time.) One sign that the linear and fluid approximations become invalid is that dark matter starts to form caustics in which the trajectories of adjacent particles cross, or particles start to form orbits. These dynamics are generally best understood using N-body simulations (although a variety of semi-analytic schemes, such as the Press–Schechter formalism, can be used in some cases). While in principle these simulations are quite simple, in practice they are very difficult to implement, as they require simulating millions or even billions of particles. Moreover, despite the large number of particles, each particle typically weighs 109solar masses and discretization effects may become significant. The largest such simulation as of 2005 is the Millennium simulation.[12]

The result of N-body simulations suggests that the Universe is composed largely of voids, whose densities might be as low as one tenth the cosmological mean. The matter condenses in large filaments and haloes which have an intricate web-like structure. These form galaxygroups, clusters and superclusters. While the simulations appear to agree broadly with observations, their interpretation is complicated by the understanding of how dense accumulations of dark matter spur galaxy formation. In particular, many more small haloes form than we see in astronomical observations as dwarf galaxies and globular clusters. This is known as the galaxy bias problem, and a variety of explanations have been proposed. Most account for it as an effect in the complicated physics of galaxy formation, but some have suggested that it is a problem with our model of dark matter and that some effect, such as warm dark matter, prevents the formation of the smallest haloes.

The final stage in evolution comes when baryons condense in the centres of galaxy haloes to form galaxies, stars and quasars. A paradoxical aspect of structure formation is that while dark matter greatly accelerates the formation of dense haloes, because dark matter does not have radiation pressure, the formation of smaller structures from dark matter is impossible because dark matter cannot dissipate angular momentum, whereas ordinary baryonic matter can collapse to form dense objects by dissipating angular momentum through radiative cooling. Understanding these processes is an enormously difficult computational problem, because they can involve the physics of gravity, magnetohydrodynamics, atomic physics, nuclear reactions, turbulence and even general relativity. In most cases, it is not yet possible to perform simulations that can be compared quantitatively with observations, and the best that can be achieved are approximate simulations that illustrate the main qualitative features of a process such as star formation.

Much of the difficulty, and many of the disputes, in understanding the large-scale structure of the Universe can be resolved by better understanding the choice of gauge in general relativity. By the scalar-vector-tensor decomposition, the metric includes four scalar perturbations, two vector perturbations, and one tensor perturbation. Only the scalar perturbations are significant: the vectors are exponentially suppressed in the early Universe, and the tensor mode makes only a small (but important) contribution in the form of primordial gravitational radiation and the B-modes of the cosmic microwave background polarization. Two of the four scalar modes may be removed by a physically meaningless coordinate transformation. Which modes are eliminated determine the infinite number of possible gauge fixings. The most popular gauge is Newtonian gauge (and the closely related conformal Newtonian gauge), in which the retained scalars are the Newtonian potentials Φ and Ψ, which correspond exactly to the Newtonian potential energy from Newtonian gravity. Many other gauges are used, including synchronous gauge, which can be an efficient gauge for numerical computation (it is used by CMBFAST). Each gauge still includes some unphysical degrees of freedom. There is a so-called gauge-invariant formalism, in which only gauge invariant combinations of variables are considered.