# Why does the gas in Sun's outer layer not expand?

Since in the outer part of sun it consists gases. Why don't the gases expand due to heat? This was asked by my friend. And he said that the gases are attracted by the plasma layer by a force. So the gases dont expand and the sun does not get significantly bigger. I think some details would help me out.

• It is attracted by the sun itself. The gas doesn't have enough energy to escape, but the mass is still not enough for them to fall in far enough to become a black hole. They're basically in equilibrium with the force dragging them back (the rest of the sun), and the force that makes it expand. Aug 17, 2018 at 11:24
• The force of gravity balances the pressure gradient that would otherwise make the gas expand. The technical term is hydrostatic equilibrium. Aug 17, 2018 at 11:25
• Please don't answer in comments. Write a proper answer. The OP cannot accept an answer (and hence the question will remain on the unanswered list) until someone writes an answer. Aug 17, 2018 at 11:56

The Sun's mass acts to pull the gases inward. Meanwhile, the pressure from below acts to push the gases outward. The Sun is very close to being in a state of hydrostatic equilibrium. At any point in the Sun, the weight of all of the stuff above that point is more or less equal to the pressure at that point. Mathematically, $\delta P / \delta r + \rho g = 0$ : The pressure gradient is in balance with density and gravitational acceleration. A negative feedback relation (negative feedback is a good thing in physics) keeps the balance stable. Excessive weight or underpressure at some point results in contraction, thereby increasing pressure to restore the balance. The opposite happens where the weight of the material above is less than pressure from below.
The question asks about the Sun's outer layer. If the question is asking about the Sun's corona, that arguably is not in hydrostatic equilibrium. The Sun occasionally belches large quantities of gas, sometimes incredibly large quantities of gas. Most of this falls back toward the Sun as the pressure in the outer layers is negligible. But sometimes it doesn't. The Sun currently loses about $3\times10^{-14}$ solar masses every year in the form of solar wind.