There is ample evidence that galaxies reside in extended halos of dark matter. According to the current paradigm, these dark matter halos form through gravitational instability. Density perturbations grow linearly until they reach a critical density, after which they turn around from the expansion of the Universe and collapse to form virialized dark matter halos. These halos continue to grow in mass (and size), either by accreting material from their neighborhood or by merging with other halos. Some of these halos may survive as bound entities after merging into a bigger halo, thus giving rise to a population of subhalos. As time proceeds, small-scale perturbations grow and collapse to form small halos. At a later stage, these small halos merge together to form a single virialized dark matter halo with an ellipsoidal shape, which reveals some substructure in the form of dark matter subhalos.
The intergalactic medium (IGM) is the baryonic material lying between galaxies. This is and has always been the dominant baryonic component of the Universe and it is the material from which galaxies form. Detailed studies of the IGM can therefore give insight into the properties of the pregalactic matter before it condensed into galaxies. Galaxies do not evolve as closed boxes, but can affect the properties of the IGM through exchanges of mass, energy and heavy elements. The study of the IGM is thus an integral part of understanding how galaxies form and evolve. The properties of the IGM can be probed most effectively through the absorption it produces in the spectra of distant quasars (a certain class of active galaxies). Since quasars are now observed out to redshifts beyond 6, their absorption line spectra can be used to study the properties of the IGM back to a time when the Universe was only a few percent of its present age.
Galaxies are a diverse class of objects. This means that a large number of parameters is required in order to characterize any given galaxy. One of the main goals of any theory of galaxy formation is to explain the full probability distribution function of all these parameters. In particular, many of these parameters are correlated with each other, a fact which any successful theory of galaxy formation should also be able to reproduce.