  We present a simple, semi-analytical model to compute the mass functions of
dark matter subhaloes. The masses of subhaloes at their time of accretion are
obtained from a standard merger tree. During the subsequent evolution, the
subhaloes experience mass loss due to the combined effect of dynamical
friction, tidal stripping, and tidal heating. Rather than integrating these
effects along individual subhalo orbits, we consider the average mass loss
rate, where the average is taken over all possible orbital configurations. This
allows us to write the average mass loss rate as a simple function that depends
only on redshift and on the instantaneous mass ratio of subhalo and parent
halo. After calibrating the model by matching the subhalo mass function (SHMF)
of cluster-sized dark matter haloes obtained from numerical simulations, we
investigate the predicted mass and redshift dependence of the SHMF.We find
that, contrary to previous claims, the subhalo mass function is not universal.
Instead, both the slope and the normalization depend on the ratio of the parent
halo mass, M, and the characteristic non-linear mass M*. This simply reflects a
halo formation time dependence; more massive parent haloes form later, thus
allowing less time for mass loss to operate. We analyze the halo-to-halo
scatter, and show that the subhalo mass fraction of individual haloes depends
most strongly on their accretion history in the last Gyr. Finally we provide a
simple fitting function for the average SHMF of a parent halo of any mass at
any redshift and for any cosmology, and briefly discuss several implications of
our findings.
