A star spends a brief childhood as a protostar, a star powered purely by its own gravitational contraction. In this prologue to its life on the main sequence, the star achieves hydrostatic equilibrium, where its internal pressure fully counteracts its self-gravity. The protostar begins its evolution to the main sequence at a luminosity far above its main-sequence luminosity, but with a photospheric temperature that is not much smaller than the main-sequence value. On a Hertzsprung-Russell diagram, which is a plot of a star's luminosity against the star's photospheric temperature, a protostar evolves along a line of nearly-constant temperature and falling luminosity. This track, which is nearly-vertical on the Hertzsprung-Russell diagram, is called a Hayashi track.
A protostar has a simple evolution because it has a simple internal structure. Energy is transported from the core of the protostar to the photosphere through convection. This process links the gas temperature within the protostar to the gas density. The pressure exerted by a gas depends on both the temperature and the density of the gas—for an ideal gas, which describes fully-ionized hydrogen and helium, the pressure is equal to the temperature times the number density of particles. With convection tying temperature to density, the pressure within a protostar varies only with density. Ionized hydrogen and helium exert a pressure that is proportional to the density of the gas raised to the 5/3 power. The temperature is proportional to the density to the 2/3 power. A star with such a simple relationship between pressure and density has a polytropic structure.
The density of a polytropic star peaks at the center of the star and falls to zero at a finite radius. The ratio of the density at a given fraction of a stellar radius from the star's center relative to the density at the center is independent of the star's mass or radius. For example, the ratio of the density at half a stellar radius to the density at the center of the star has a value that is the same for all protostars. Because the temperature within the protostar varies with the density, the ratio of the temperature at a given fraction of a stellar radius relative to the temperature at the center of a protostar is also independent of the star's mass and radius, so the temperature ratio is the same for all protostars.
As a protostar radiates, it shrinks in size to generate the energy that replaces the radiated energy. This shrinkage increases the self-gravity of the protostar, which is accompanied by an increase in the pressure at the protostar's core. This balance between pressure and gravitational force maintains the protostar's hydrostatic equilibrium and creates a relationship between the temperature at the protostar's center and the gravitational potential of the star: the temperature of the gas at the center of the star is proportional to the mass of the star divided by the radius of the star. As the radius of the star shrinks, the temperature at the center rises inversely, so if the radius of the star decreases by a factor of 2, the temperature at the center of the star increases by a factor of 2. The density of the star at the center also increases, since the mass of a star in confined to smaller and smaller volumes, but this increase is with the inverse of the cube of the radius. Because the structure of a protostar is independent of the protostar's radius, the temperature and the density throughout a protostar increases as a star shrinks.
The increase in temperature within a protostar does not appear at the photosphere. In fact, the photospheric temperature changes very little as a protostar shrinks in size. The reason is that the photosphere is not at a fixed fraction of a radius within a star. Its position is set by the ability of light to freely escape from the protostar, which depends on both the density and temperature of the gas. Because the gas density at a given fraction of a radius increases as the star shrinks, the ability of light to escape decreases, the protostar becomes more opaque, and the photosphere moves farther from the star's center in terms of fractional radius. The temperature drop that accompanies this shift of the photosphere outward is sufficient to counteract the rise in temperature throughout the protostar caused by the protostar's contraction. For this reason, the temperature at the photosphere changes little as a protostar shrinks.
With the temperature at the photosphere nearly constant, the rate at which a protostar cools is proportional to the photosphere's surface area. This means that a protostar is most luminous when it first achieves hydrostatic equilibrium, and it grows less luminous as it shrinks. The initial luminosity is several orders of magnitude larger than a main-sequence star of equivalent mass. As the protostar shrinks in size, the amount of thermal energy within the protostar increases inversely with radius. The decreasing luminosity and the increasing reservoir of thermal energy cause the rate of shrinkage to slow dramatically. In this way, the physics of the photosphere, which sets the position of the photosphere within the protostar by controlling a protostar's opaqueness, controls the evolution of a protostar.
The protostar therefore begins its brief life as a brilliant star that wanes in luminosity on a timescale of hundreds of years. A one solar-mass star at the beginning of the protostar stage can have 1,000 times the Sun's luminosity, 0.6 times the Sun's photosphere temperature, and 70 times the Sun's radius (0.3 AU). As a protostar shrinks, its internal temperature and density reach a point that permits the thermonuclear fusion of deuterium, which releases a slight amount of energy into the star, energy that is insufficient to halt the shrinkage of the star. As the luminosity of the star drops, parts of the star become stable against convection. For a solar-mass star, convection ceases at the core, and energy is transported out of the core through radiative diffusion. Eventually a protostar approaches the size and luminosity of a main-sequence star. By this time, the protostar changes its luminosity and size on a 10 million-year timescale. Over this time, the thermonuclear fusion of hydrogen commences, which stabilizes the star's size and raises its photospheric temperature. The star settles onto the main sequence. As a main-sequence star, it is somewhat hotter and considerably less luminous than it was as a protostar.