So, for a homogeneous sphere made of ideal gas the virial theorem applies:


I have read that this implies that a star must get hotter when it contracts.

I don't quite understand why this is the case. The internal energy is proportional to T. During contraction, $E_{grav}$ increases, but since there is a minus sign, this means that the internal energy decreases - so how do we get the increasing temperature?

Sorry if this is a very obvious question, I appreciate any help.


1 Answer 1


The gravitational energy gets more negative, so the right hand side of your equation gets numerically larger. Since the left hand side is (roughly) proportional to temperature, then the temperature must increase.

  • $\begingroup$ Thank you, this cleared it up!!! $\endgroup$
    – Loika
    Commented Jun 27, 2022 at 8:04
  • $\begingroup$ Can I simply imagine that contraction means compression of gas and compression of gas means increasing temperature? $\endgroup$
    – Leos Ondra
    Commented Jun 27, 2022 at 17:59
  • $\begingroup$ @LeosOndra but it isn't an adiabatic compression. $\endgroup$
    – ProfRob
    Commented Jun 27, 2022 at 20:53
  • $\begingroup$ @ProfRob True... thanks $\endgroup$
    – Leos Ondra
    Commented Jun 28, 2022 at 16:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .