Theoretical and observational data on galaxy clustering suggest that there is a hierarchy in structure formation that starts with early, low massive objects and finishes with late, massive ones, these latter arising from the gravitational clustering of the former.

It is generally believed that the first objects, as well as their subsequent clusterings, have their origin in small amplitude density inhomogeneities which have grown by gravitational instability as the universe expanded. The evolution of density inhomogeneities passes through two distinct stages:

- linear regime: the perturbation expands while its small amplitud increases. Owing to the independence of the Fourier modes the set of equations governing the amplitud evolution can be solved analytically.
- non-linear regime: for high amplitudes the perturbation begins to collapse and finally virializes giving rise to a newborn object. In this regime the Fourier modes are coupled together and the only accurate way to follow the evolution of pertubations is by means of numerical simulations.

Structrure of dark matter halos

Cosmological N-body simulations show that the structure of relaxed dark-matter halos can be described by a universal density profile, characterized by a scale radius and a characteristic density. Once the halo mass is fixed this profile has only one free parameter, say the scale radius

This correlation, as well as other two recently found relating the
concentration to the halo formation epoch and the mass inside the
scale radius, can be explained through a model of evolution for
*r*_s taking into account that halos grow inside-out (keeping
their inner structure unaltered) between major mergers. Here we
provide a FORTRAN code that computes the
typical *r*_s value for relaxed halos in CDM cosmologies
according to our evolutive model.

Convergence studies in cosmological N-body simulations suggest that
the inner slope of the halo density profile does not tend to a
power-law for vanishing radii, but becomes increasingly
shallower. Thus, NFW-like laws do not fit well the density profile in
the halo inner region. A law with a decreasing inner slope (as the
Sersic law) do a better job in wide range fittings. We have developed
a FORTRAN code that computes
time-independent relations involving scale parameters of the NFW and
Sersic laws. These time-independent relations arise from the
inside-out growth of halos and allows the determination of the profile
parameters for halos of mass M at any time.

Global
properties and structure of the hot gas within dark halos

The baryonic gas trapped in dark matter halos reaches a hydrostatic
equilibrium state within the gravitational potential dominated by the
dark matter. In massive halos the gas temperature is high enough to
cause the emission of X-rays. Under the assumption that gravity is the
only process driving the evolution of the dark and baryonic components
in galaxy systems, some relations, known as scaling laws, arise
between the X-ray emitting properties and the mass of the systems. The
fact that real systems show deviations from these relations means that
some non-gravitational mechanisms are also at play.

We have build an analytic model for a preheated, polytropic hot gas in
hydrostatic equilibrium within an NFW dark halo potential taking into
account the inside-out growth of the halo between major mergers. We
have applied the model to study the observed X-ray properties of
galaxy groups and clusters at z=0.