  Most structural and evolutionary properties of galaxies strongly rely on the
stellar initial mass function (IMF), namely the distribution of the stellar
mass formed in each episode of star formation. As the IMF shapes the stellar
population in all stellar systems, it turns out to become one of the most
fundamental concepts of modern astronomy. Both constant and variable IMFs
across different environments have been claimed despite a large number of
theoretical and observational efforts. However, the measurement of the IMF in
Galactic stellar populations has been limited by the relatively small number of
photometrically observed stars, leading to high uncertainties. Here we report a
star-counting result based on ~93,000 spectroscopically observed M-dwarf stars,
an order of magnitude more than previous studies, in the 100--300 parsec (pc)
Solar neighbourhood. We find unambiguous evidence of a variable IMF that
depends on both metallicity and stellar age. Specifically, the stellar
population formed at the early time contains fewer low-mass stars compared to
the canonical IMF, independent of stellar metallicities. In present days, on
the other hand, the proportion of low-mass stars increases with stellar
metallicity. The variable abundance of low-mass stars in our Milky Way
establishes a powerful benchmark for models of star formation and can heavily
impact results in Galactic chemical enrichment modelling, mass estimation of
galaxies, and planet formation efficiency.

Astrophysics of Galaxies;Earth and Planetary Astrophysics;Solar and Stellar Astrophysics