In astronomy, the interstellar medium (or ISM) is the matter that exists in the space between the star systems in a galaxy. This matter includes gas in ionic, atomic, and molecular form, dust, and cosmic rays. It fills interstellar space and blends smoothly into the surrounding intergalactic space. The energy that occupies the same volume, in the form of electromagnetic radiation, is the interstellar radiation field.
The interstellar medium is composed of multiple phases, distinguished by whether matter is ionic, atomic, or molecular, and the temperature and density of the matter. The thermal pressures of these phases are in rough equilibrium with one another. Magnetic fields and turbulent motions also provide pressure in the ISM, and are typically more important dynamically than the thermal pressure is.
In all phases, the interstellar medium is extremely dilute by terrestrial standards. In cool, dense regions of the ISM, matter is primarily in molecular form, and reaches number densities of 106 molecules per cm3. In hot, diffuse regions of the ISM, matter is primarily ionized, and the density may be as low as 10−4 ions per cm3. Compare this with a number density of roughly 1022 molecules per cm3 for liquid water. By mass, 99% of the ISM is gas in any form, and 1% is dust. Of the gas in the ISM, 89% of atoms are hydrogen and 9% are helium, with 2% of atoms being elements heavier than hydrogen or helium, which are called “metals” in astronomical parlance. The hydrogen and helium are a result of primordial nucleosynthesis, while the heavier elements in the ISM are a result of enrichment in the process of stellar evolution.
The ISM plays a crucial role in astrophysics precisely because of its intermediate role between stellar and galactic scales. Stars form within the densest regions of the ISM, molecular clouds, and replenish the ISM with matter and energy through planetary nebulae, stellar winds, and supernovae. This interplay between stars and the ISM helps determine the rate at which a galaxy depletes its gaseous content, and therefore its lifespan of active star formation.