The large number of microlensing events discovered towards the Galactic bul
ge bears the promise of reconstructing the stellar mass function, especiall
y at low masses near the brown dwarf regime. However, because of the source
confusion, even if the distribution and the kinematics of the lenses are k
nown, the estimation of the mass function is extremely biased at low masses
. The blending due to source confusion biases the duration of the event, wh
ich in turns dramatically biases the estimation of the lens mass. It is pos
sible to overcome this problem by using differential photometry of the micr
olensing events. Differential photometry is free of any bias due to blendin
g, but the baseline flux is unknown. In this paper it is shown that, even w
ithout knowledge of the baseline flux, pure differential photometry allows
the estimation of the mass function without any bias. The basis of the meth
od is that taking the scalar product of the microlensing light curves with
a given function and taking its sum over all the microlensing events is equ
ivalent to projecting the mass function on to another function. This method
demonstrates that there is a direct correspondence between the space of th
e observations and the space of the mass function. The optimal functions on
to which the light curves are projected are their principal components. Th
ere is no additional information about the distribution of the scalar produ
cts of the data beyond their sum (first-order moments). Higher-order moment
s are only linear combinations of the first-order moments. Thus the sum of
the projections on the principal components contains all the information, a
nd translates into an equal number of projections of the mass function with
functions associated with the principal components. The method is illustra
ted with simulated data sets consistent with the microlensing experiments.
With 1000 such simulations, we show that for instance the exponent of the m
ass function can be reconstructed without any bias.