The initial mass function (IMF) is an empirical distribution function (essentially an unnormalized probability density function) that describes the distribution of initial masses of stars. It is typically given as N(m)dm.
Edwin Salpeter developed an early IMF in 1955, the Salpeter function:
N(m)dm = C × (m/MSun)-2.35(dm/MSun)
C is a constant reflecting local stellar density.
The IMF can be derived from the luminosity function and the mass-luminosity relation.
Note that the phrase mass function is to indicate it deals with physical masses. The two-word phrase is used in probability (probability mass function) for an incompatible concept: a function yielding the probability of some discrete random variable taking on a given value.