<p>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.</p>

CC BY-SA 4.0
2022-06-27T08:04:45.627Z
Thank you, this cleared it up!!!
Loika
CC BY-SA 4.0
2022-06-27T17:59:28.060Z
Can I simply imagine that contraction means compression of gas and compression of gas means increasing temperature?
Leos Ondra
CC BY-SA 4.0
2022-06-27T20:53:15.760Z
@LeosOndra but it isn't an adiabatic compression.
ProfRob
CC BY-SA 4.0
2022-06-28T16:28:14.927Z
@ProfRob True... thanks
Leos Ondra
CC BY-SA 4.0
2022-06-26T18:19:36.867Z
2022-06-26T18:19:36.867Z
ProfRob
<p>So, for a homogeneous sphere made of ideal gas the virial theorem applies:</p>
<p><span class="math-container">$$E_{int}=-\frac{1}{2}E_{grav}$$</span></p>
<p>I have read that this implies that a star must get hotter when it contracts.</p>
<p>I don't quite understand why this is the case. The internal energy is proportional to T. During contraction, <span class="math-container">$E_{grav}$</span> increases, but since there is a minus sign, this means that the internal energy decreases - so how do we get the increasing temperature?</p>
<p>Sorry if this is a very obvious question, I appreciate any help.</p>

<stellar-evolution><hydrostatic-equilibrium>
Virial theorem, contraction, and stars getting hotter
Loika
# Virial theorem, contraction, and stars getting hotter

(Asked by: username_0 on 2022-06-26)

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

$$E\_{int}=-\frac{1}{2}E\_{grav}$$

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.

**Tags:** stellar-evolution, hydrostatic-equilibrium

---

## 1 answers

### Answer by username_1 on 2022-06-26. Score: 6 | Accepted answer

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.

> **Comments:**
> **username_0**: Thank you, this cleared it up!!!  
> **username_2**: Can I simply imagine that contraction means compression of gas and compression of gas means increasing temperature?  
> **username_1**: @LeosOndra but it isn't an adiabatic compression.  
> **username_2**: @ProfRob True... thanks  

---

