Virial Theorem for Stars

Of all the relations in stellar astrophysics, the virial theorem buys the most physics for the least effort. It ties a star's gravitational binding to its internal heat in a single exact statement — without ever solving for the run of pressure, density, or temperature through the interior. Where the equations of stellar structure track the local balance of forces layer by layer, the virial theorem is what you get by integrating hydrostatic equilibrium over the whole star at once. The detailed profile integrates away; only the total energies survive. The headline result, for a star supported by an ideal monatomic gas, is 2Eint+Egrav=02E_{\mathrm{int}} + E_{\mathrm{grav}} = 0, or Eint=−12EgravE_{\mathrm{int}} = -\tfrac{1}{2}E_{\mathrm{grav}}. Because EgravE_{\mathrm{grav}} is negative for any bound configuration, the total energy Etot=12EgravE_{\mathrm{tot}} = \tfrac{1}{2}E_{\mathrm{grav}} is negative too: a star is bound by exactly half its own internal energy. That single minus sign is the root of one of the strangest facts in physics — a star has a negative heat capacity: take energy away and it gets hotter. Gravitational contraction, pre-main-sequence heating, the stellar thermostat that steadies nuclear burning, and the fragility of the most massive stars all descend from this one relation. This article derives the theorem from hydrostatic equilibrium, extracts the pressure form 3∫P dV=−Egrav3\int P\,\mathrm{d}V = -E_{\mathrm{grav}}, generalizes the factor 12\tfrac{1}{2} to an arbitrary adiabatic index γ\gamma, and puts it to work: central temperatures and pressures from mass and radius alone, the Kelvin–Helmholtz timescale, and the γ=4/3\gamma = 4/3 stability threshold that governs the fate of the heaviest stars.

Key takeaways
  • Integrating hydrostatic equilibrium over a whole star gives the exact pressure form 3∫P dV=−Egrav3\int P\,\mathrm{d}V = -E_{\mathrm{grav}}, valid for any pressure source with P(R)≈0P(R)\approx 0.
  • For a monatomic ideal gas (γ=5/3\gamma = 5/3) this collapses to 2Eint+Egrav=02E_{\mathrm{int}} + E_{\mathrm{grav}} = 0, so Eint=−12EgravE_{\mathrm{int}} = -\tfrac{1}{2}E_{\mathrm{grav}} and Etot=12Egrav<0E_{\mathrm{tot}} = \tfrac{1}{2}E_{\mathrm{grav}} < 0 — bound stars have negative total energy.
  • The immediate consequence is a negative heat capacity: a star that radiates contracts and heats up, driving pre-main-sequence contraction and self-regulating nuclear burning.
  • It gives interior conditions from MM and RR alone: ⟨P⟩∼GM2/R4\langle P\rangle \sim GM^2/R^4 and Tc∼GMμmH/(kR)∼107 KT_c \sim GM\mu m_{\mathrm{H}}/(kR) \sim 10^7\ \mathrm{K} for the Sun, without integrating the structure equations.
  • The general form Etot=3γ−43(γ−1)EgravE_{\mathrm{tot}} = \tfrac{3\gamma-4}{3(\gamma-1)}E_{\mathrm{grav}} makes γ=4/3\gamma = 4/3 a knife-edge: there Etot→0E_{\mathrm{tot}}\to 0 and equilibrium is marginally unstable — the regime of radiation-dominated and relativistically degenerate stars.
  • Key idea: Integrating hydrostatic equilibrium over a star gives 3∫P dV=−Egrav3\int P\,\mathrm{d}V = -E_{\mathrm{grav}}; for an ideal monatomic gas this becomes 2Eint+Egrav=02E_{\mathrm{int}} + E_{\mathrm{grav}} = 0, so the total energy is 12Egrav<0\tfrac{1}{2}E_{\mathrm{grav}}<0 — a bound star has negative heat capacity.

Where this lives today

The virial theorem is not a historical curiosity — it is a live diagnostic in modern astrophysics. In stellar-evolution codes such as MESA the relation 2Eint+Egrav≈02E_{\mathrm{int}} + E_{\mathrm{grav}} \approx 0 is a standard consistency check, and its negative-heat-capacity logic explains everything from pre-main-sequence contraction along the Hayashi track to the runaway helium flash in degenerate cores, where the thermostat fails because pressure is nearly temperature-independent. Its most dramatic modern face is the γ=4/3\gamma = 4/3 instability. In stars above roughly 100 solar masses, the core is hot enough that photon–photon collisions make electron–positron pairs; the energy sunk into rest mass softens the equation of state below γ=4/3\gamma = 4/3 and the threshold is crossed. The result is a pair-instability supernova — the core loses support, collapses, ignites explosively, and in extreme cases is unbound with no remnant. Candidate events such as the superluminous SN 2006gy, and the "black-hole mass gap" LIGO–Virgo–KAGRA sees in merging binaries, are read as fingerprints of this instability. JWST's hunt for the first very massive Population III stars is partly a search for where γ→4/3\gamma \to 4/3 physics — the relation Clausius wrote in 1870 — shaped the first stellar deaths.

The physical picture

A star is a self-gravitating ball of gas settled into balance. Gravity pulls every parcel inward; pressure — sustained by the gas's internal heat — pushes outward. Hydrostatic equilibrium says these cancel locally at every radius. The virial theorem says something stronger and global: in equilibrium the two are locked into a fixed energetic ratio, with exactly half the gravitational binding present at any instant as usable internal heat. Squeeze the star and both energies grow in lockstep; let it expand and both shrink — but the 2-to-1 accounting never changes.

Figure
A star in hydrostatic balance: gravity (red, inward) is opposed by pressure (blue, outward) at every radius. Globally the energies are locked in a fixed ratio — the ledger on the right shows 2E_int + E_grav = 0, so with E_grav = −2 units the internal energy is +1 and the total E_tot = ½E_grav = −1, negative and bound
Gravity pulls in, pressure pushes out — and the energies obey 2E_int + E_grav = 0 gravity −Gm/r² pressure −dP/dr E = 0 E_grav −2 E_int +1 E_tot −1 E_tot = ½E_grav, negative

The most startling consequence hides in that minus sign. If the star radiates, EtotE_{\mathrm{tot}} drops; since Etot=12EgravE_{\mathrm{tot}} = \tfrac{1}{2}E_{\mathrm{grav}} the gravitational energy falls too — the star contracts — but Eint=−EtotE_{\mathrm{int}} = -E_{\mathrm{tot}}, so the internal energy rises and the interior gets hotter. A star that loses energy warms up. This negative heat capacity is why a contracting protostar heats its core until hydrogen ignites, and why a burning star self-corrects: overproduce energy and the core expands and cools, throttling the reactions back down. The theorem is also scale-free — it knows nothing about the density profile, only integrated energies, which is why it is the astrophysicist's favorite envelope tool: feed it MM and RR and read off a central temperature good to order unity. The one number that does control everything is the adiabatic index γ\gamma. As support shifts from ordinary gas (γ=5/3\gamma = 5/3) toward radiation or relativistic degeneracy (γ=4/3\gamma = 4/3), the virial coefficient slides to zero, and at γ=4/3\gamma = 4/3 the star becomes marginally bound — the physics behind the collapse of the most massive stars and of near-Chandrasekhar cores.

Figure
The virial coefficient (3γ−4)/(3γ−3), which sets E_tot = coefficient × E_grav, plotted against the adiabatic index γ. It is positive (bound, stable) only for γ greater than 4/3, passes through zero at γ = 4/3 (marginal, radiation or relativistic degeneracy), and reaches +½ at γ = 5/3 (ordinary monatomic gas)
The punchline: stability turns on γ = 4/3, where the virial coefficient crosses zero coefficient = 0 (E_tot = 0, marginal) +0.5 0 −0.5 1.2 1.33 1.5 1.67 1.8 adiabatic index γ (3γ−4) / (3γ−3) γ = 4/3 → 0 marginal / unstable γ = 5/3 → +½ ideal gas, bound and stable γ below 4/3: unstable γ above 4/3: bound, stable

The core equations

The whole theorem is an integrated consequence of one local statement — hydrostatic equilibrium. We start there, promote it to a global energy relation, and read off the interior conditions it predicts. Every equation below is exact for a star with negligible surface pressure unless a scaling symbol (∼\sim) marks an estimate. The starting point is the balance of pressure gradient against gravity at each radius, taken here as given from the hydrostatic-equilibrium article.

dPdr=−G m(r) ρ(r)r2(1)\frac{\mathrm{d}P}{\mathrm{d}r} = -\frac{G\,m(r)\,\rho(r)}{r^{2}} \qquad (1)

where: PP — local pressure; rr — radial coordinate; m(r)m(r) — enclosed mass within rr; ρ(r)\rho(r) — local mass density; GG — Newton's constant. Reading: at every layer the outward push of the pressure drop exactly supports the weight above. Multiplying equation (1) by the interior volume and integrating over the whole star turns this local balance into a global one; the profile disappears, leaving the pressure integral and the gravitational energy.

3∫0VP dV=−Egrav(2)3\int_{0}^{V} P\,\mathrm{d}V = -E_{\mathrm{grav}} \qquad (2)

where: VV — total stellar volume; EgravE_{\mathrm{grav}} — total gravitational potential energy, negative for a bound star. Reading: three times the mean pressure times the volume equals the binding energy — the pressure form of the virial theorem, valid for any pressure source. The gravitational energy is the work to assemble the star shell by shell from infinite dispersal — always negative.

Egrav=−∫0MG mr dm(3)E_{\mathrm{grav}} = -\int_{0}^{M}\frac{G\,m}{r}\,\mathrm{d}m \qquad (3)

where: MM — total stellar mass; dm\mathrm{d}m — mass of a shell at rr. Reading: deeper shells are bound more tightly; for a uniform sphere the integral is −35GM2/R-\tfrac{3}{5}GM^2/R, larger for centrally concentrated stars. To turn the pressure integral into a statement about energy we need the equation of state. For a monatomic ideal gas the internal energy density is 32P\tfrac{3}{2}P, so it becomes twice EintE_{\mathrm{int}}.

2Eint+Egrav=0(4)2E_{\mathrm{int}} + E_{\mathrm{grav}} = 0 \qquad (4)

where: EintE_{\mathrm{int}} — total internal (thermal) energy of the gas. Reading: the internal energy is exactly minus half the gravitational energy — the form usually meant by "the virial theorem for stars". Rearranging equation (4) exposes the loaded conclusion: the total energy is negative, half the (negative) gravitational energy.

Eint=−12Egrav,Etot=Eint+Egrav=12Egrav<0(5)E_{\mathrm{int}} = -\tfrac{1}{2}E_{\mathrm{grav}}, \qquad E_{\mathrm{tot}} = E_{\mathrm{int}} + E_{\mathrm{grav}} = \tfrac{1}{2}E_{\mathrm{grav}} < 0 \qquad (5)

where: EtotE_{\mathrm{tot}} — total (internal plus gravitational) energy. Reading: a bound star sits in a well half as deep as its binding; radiating makes EtotE_{\mathrm{tot}} more negative, forcing contraction and heat. The factor 12\tfrac{1}{2} is special to γ=5/3\gamma = 5/3. For a general index it becomes a simple function of γ\gamma whose sign decides stability.

Etot=3γ−43(γ−1) Egrav(6)E_{\mathrm{tot}} = \frac{3\gamma - 4}{3(\gamma - 1)}\,E_{\mathrm{grav}} \qquad (6)

where: γ\gamma — adiabatic index of the dominant pressure source. Reading: EtotE_{\mathrm{tot}} is negative (bound, stable) only for γ>4/3\gamma > 4/3; at γ=4/3\gamma = 4/3 it vanishes and the star is marginally bound. Finally, the pressure form yields interior conditions directly. With ⟨P⟩=−Egrav/3V\langle P\rangle = -E_{\mathrm{grav}}/3V and ∣Egrav∣∼GM2/R|E_{\mathrm{grav}}|\sim GM^2/R, the pressure and — via the ideal-gas law — the temperature follow.

⟨P⟩=−Egrav3V∼GM2R4,Tc∼GMμmHk R(7)\langle P\rangle = \frac{-E_{\mathrm{grav}}}{3V} \sim \frac{GM^{2}}{R^{4}}, \qquad T_{c} \sim \frac{G M \mu m_{\mathrm{H}}}{k\,R} \qquad (7)

where: ⟨P⟩\langle P\rangle — mean interior pressure; RR — stellar radius; TcT_c — central temperature; μ\mu — mean molecular weight (in units of mHm_{\mathrm{H}}); mHm_{\mathrm{H}} — hydrogen mass; kk — Boltzmann constant. Reading: pressure climbs steeply with mass and shrinking radius, and temperature scales as M/RM/R — the reason massive, compact stars run hot.

Derivation AFrom hydrostatic equilibrium to the energy theorem

The goal is to obtain the energy statement 2Eint+Egrav=02E_{\mathrm{int}} + E_{\mathrm{grav}} = 0 from nothing but mechanical equilibrium and the monatomic ideal-gas equation of state. The strategy: weight the hydrostatic equation by the interior volume, integrate over the star, recognise the gravitational energy on one side and a pressure integral on the other after integrating by parts, then close with the equation of state relating pressure to internal energy density. Every step is exact for an isolated star with negligible surface pressure.

Step 1. Rewrite hydrostatic equilibrium in the mass coordinate. Using dm=4πr2ρ dr\mathrm{d}m = 4\pi r^2\rho\,\mathrm{d}r to eliminate ρ\rho, equation (1) becomes dPdm=−Gm4πr4\dfrac{\mathrm{d}P}{\mathrm{d}m} = -\dfrac{Gm}{4\pi r^4}. Why: the mass coordinate runs cleanly from 00 to MM and makes the gravitational-energy integral appear naturally.

Step 2. Multiply both sides by the interior volume V(r)=43πr3V(r) = \tfrac{4}{3}\pi r^3 and integrate from centre to surface: ∫0M43πr3 dPdm dm=−∫0MGm3r dm\int_0^M \tfrac{4}{3}\pi r^3\,\dfrac{\mathrm{d}P}{\mathrm{d}m}\,\mathrm{d}m = -\int_0^M \dfrac{Gm}{3r}\,\mathrm{d}m. Why: this weight turns the left side into a pressure–volume integral after parts, and the right side into one-third the gravitational energy.

Step 3. Identify the right-hand side. Since Egrav=−∫0M(Gm/r) dmE_{\mathrm{grav}} = -\int_0^M (Gm/r)\,\mathrm{d}m, the right side is exactly 13Egrav\tfrac{1}{3}E_{\mathrm{grav}}. Why: this is just the definition of gravitational potential energy, so no approximation enters.

Step 4. Integrate the left side by parts, ∫V dP=[VP]−∫P dV\int V\,\mathrm{d}P = [VP] - \int P\,\mathrm{d}V. The boundary term [VP]0R[VP]_0^R vanishes at both ends — at the surface because P(R)≈0P(R)\approx 0, at the centre because V→0V\to 0 as r3r^3. What remains is 3∫0VP dV=−Egrav3\int_0^V P\,\mathrm{d}V = -E_{\mathrm{grav}}. Why: the vanishing boundary term is the crucial physical input — it makes the theorem clean for an isolated star and fails for an externally confined cloud.

Step 5. Close with the equation of state. For a monatomic ideal gas u=P/(γ−1)=32Pu = P/(\gamma-1) = \tfrac{3}{2}P at γ=5/3\gamma = 5/3, so 3∫P dV=2∫u dV=2Eint3\int P\,\mathrm{d}V = 2\int u\,\mathrm{d}V = 2E_{\mathrm{int}}, and with Step 4, 2Eint+Egrav=02E_{\mathrm{int}} + E_{\mathrm{grav}} = 0. Why: the factor 3(γ−1)=23(\gamma-1) = 2 is where γ=5/3\gamma = 5/3 enters; change the gas and this coefficient changes — the origin of the general form next.

Go deeper · Derivation B · 1 minThe general adiabatic index and the four-thirds threshold
Derivation BThe general adiabatic index and the four-thirds threshold

The goal is to see why the innocuous factor 12\tfrac{1}{2} in Etot=12EgravE_{\mathrm{tot}} = \tfrac{1}{2}E_{\mathrm{grav}} is really a dial controlling whether a star is stable at all. We keep the exact pressure form 3∫P dV=−Egrav3\int P\,\mathrm{d}V = -E_{\mathrm{grav}} but let the gas carry an arbitrary adiabatic index γ\gamma, so its internal energy density is u=P/(γ−1)u = P/(\gamma-1). Following γ\gamma through to the total energy exposes a coefficient that changes sign at γ=4/3\gamma = 4/3 — the boundary between a bound, stable star and one poised to collapse.

Step 1. Write the internal energy for a general index. With u=P/(γ−1)u = P/(\gamma-1), integrating over the star gives Eint=1γ−1∫P dV=−Egrav3(γ−1)E_{\mathrm{int}} = \dfrac{1}{\gamma-1}\int P\,\mathrm{d}V = \dfrac{-E_{\mathrm{grav}}}{3(\gamma-1)}. Why: this generalises the 32P\tfrac{3}{2}P closure to any polytropic-like gas — radiation, non-relativistic or relativistic degeneracy — each with its own γ\gamma.

Step 2. Add the gravitational energy: Etot=(−13(γ−1)+1)Egrav=3γ−43(γ−1) EgravE_{\mathrm{tot}} = \left(\dfrac{-1}{3(\gamma-1)} + 1\right)E_{\mathrm{grav}} = \dfrac{3\gamma-4}{3(\gamma-1)}\,E_{\mathrm{grav}}. Why: a single coefficient times EgravE_{\mathrm{grav}} isolates the one number that decides whether the star is bound.

Step 3. Read off the threshold. Because Egrav<0E_{\mathrm{grav}} < 0, the total energy is negative — bound and dynamically stable — only when the coefficient is positive, i.e. γ>4/3\gamma > 4/3. At γ=4/3\gamma = 4/3 exactly, Etot=0E_{\mathrm{tot}} = 0 for any radius: the star is marginally bound, and an infinitesimal perturbation costs no energy to grow. Why: γ=4/3\gamma = 4/3 is where the gas can no longer resist compression faster than gravity encourages it — the reason radiation-dominated and relativistically degenerate stars are fragile.

Step 4. Check the endpoints. γ=5/3\gamma = 5/3 recovers (5−4)3⋅(2/3)=12\tfrac{(5-4)}{3\cdot(2/3)} = \tfrac{1}{2}, matching equation (5); γ=4/3\gamma = 4/3 gives (4−4)3⋅(1/3)=0\tfrac{(4-4)}{3\cdot(1/3)} = 0. Why: the general form must reduce to the ideal-gas result and the marginal case, and it does so cleanly. *As a quick check: (3γ−4)/(3(γ−1))(3\gamma-4)/(3(\gamma-1)) evaluates to {−0.111, 0, +0.167, +0.333, +0.5}\{-0.111,\, 0,\, +0.167,\, +0.333,\, +0.5\} at γ={1.3, 4/3, 1.4, 1.5, 5/3}\gamma = \{1.3,\, 4/3,\, 1.4,\, 1.5,\, 5/3\}, confirming the sign change at γ=4/3\gamma = 4/3 and the ideal-gas value of 12\tfrac{1}{2} at γ=5/3\gamma = 5/3.*

Go deeper · Derivation C · 1 minNegative heat capacity and the Kelvin–Helmholtz timescale
Derivation CNegative heat capacity and the Kelvin–Helmholtz timescale

The goal is to turn the virial energy budget into a prediction of how a star evolves when it can draw only on gravity. Using Etot=12EgravE_{\mathrm{tot}} = \tfrac{1}{2}E_{\mathrm{grav}} and Eint=−EtotE_{\mathrm{int}} = -E_{\mathrm{tot}}, we show that a star has a negative effective heat capacity, that only half of any released gravitational energy is free to radiate, and finally estimate the contraction time — the Kelvin–Helmholtz timescale — that historically proved the Sun cannot run on gravity alone. The argument is purely energetic and needs no detailed structure.

Step 1. Establish the negative heat capacity. If the star loses energy so dEtot<0\mathrm{d}E_{\mathrm{tot}} < 0, then dEint=−dEtot>0\mathrm{d}E_{\mathrm{int}} = -\mathrm{d}E_{\mathrm{tot}} > 0 and dEgrav=2 dEtot<0\mathrm{d}E_{\mathrm{grav}} = 2\,\mathrm{d}E_{\mathrm{tot}} < 0: the internal energy, and hence the temperature, rises even as the star radiates. Why: the effective heat capacity dEtot/dT\mathrm{d}E_{\mathrm{tot}}/\mathrm{d}T is negative, so removing heat raises the temperature — exactly opposite to a laboratory gas.

Step 2. Split the released energy. When the star contracts by ΔEgrav<0\Delta E_{\mathrm{grav}} < 0, the total changes by ΔEtot=12ΔEgrav\Delta E_{\mathrm{tot}} = \tfrac{1}{2}\Delta E_{\mathrm{grav}} and only this half is radiated; the rest heats the gas. Why: this "half in, half out" split is why contraction both powers the luminosity and drives the interior toward ignition.

Step 3. Estimate the available energy. Contracting from a diffuse state to radius RR liberates ∣Etot∣=12∣Egrav∣∼12 GM2/R|E_{\mathrm{tot}}| = \tfrac{1}{2}|E_{\mathrm{grav}}| \sim \tfrac{1}{2}\,GM^2/R. Why: the reservoir a star can spend by shrinking is its binding energy, so the time to exhaust it depends only on MM, RR and LL.

Step 4. Divide by the luminosity. The time to radiate this reservoir at luminosity LL is tKH=∣Etot∣/L∼GM2/(2RL)t_{\mathrm{KH}} = |E_{\mathrm{tot}}|/L \sim GM^2/(2RL). Why: this Kelvin–Helmholtz timescale is the natural clock of contraction; for the Sun it is around 1.6×1071.6\times 10^7 yr, far shorter than the Earth's age — the historical proof that fusion, not contraction, sustains the Sun.

Limiting cases

The virial coefficient linking total energy to gravitational energy is set entirely by the adiabatic index γ\gamma of the dominant pressure source.

CaseResultMeaning
Nonrelativistic ideal gas (γ=5/3\gamma = 5/3)Etot=12Egrav<0E_{\mathrm{tot}} = \tfrac{1}{2}E_{\mathrm{grav}} < 0Ordinary main-sequence matter; bound, stable, negative heat capacity, internal energy 32kT\tfrac{3}{2}kT per particle.
Radiation or ultrarelativistic gas (γ=4/3\gamma = 4/3)Etot→0E_{\mathrm{tot}} \to 0Radiation pressure or relativistic degeneracy dominant; marginal stability — very massive stars and near-Chandrasekhar cores sit here and are prone to collapse.
General polytrope (γ\gamma arbitrary)Etot=3γ−43(γ−1)EgravE_{\mathrm{tot}} = \tfrac{3\gamma-4}{3(\gamma-1)}E_{\mathrm{grav}}Bound and stable only when γ>4/3\gamma > 4/3; below that the coefficient turns negative and equilibrium fails.
Externally confined gas3∫P dV=−Egrav+3PsurfV3\int P\,\mathrm{d}V = -E_{\mathrm{grav}} + 3P_{\mathrm{surf}}VA surface pressure PsurfP_{\mathrm{surf}} leaves a surviving surface term — relevant for interstellar clouds and Bonnor–Ebert spheres, not isolated stars where P(R)≈0P(R)\approx 0.

Worked examples

1 · Central temperature of the Sun

Estimate the Sun's central temperature from the virial theorem, using M⊙=2.0×1030 kgM_\odot = 2.0\times10^{30}\ \mathrm{kg}, R⊙=7.0×108 mR_\odot = 7.0\times10^8\ \mathrm{m}, μ=0.6\mu = 0.6. Compare with the detailed model value.

Step 1. Equate internal energy to half the binding energy. With N=M/(μmH)N = M/(\mu m_{\mathrm{H}}) particles each carrying 32kTc\tfrac{3}{2}kT_c, the virial theorem sets 32 MμmH kTc∼12 GM2R\tfrac{3}{2}\,\dfrac{M}{\mu m_{\mathrm{H}}}\,kT_c \sim \tfrac{1}{2}\,\dfrac{GM^2}{R}.

Step 2. Solve for the temperature. Rearranging gives Tc∼13GMμmHkRT_c \sim \dfrac{1}{3}\dfrac{GM\mu m_{\mathrm{H}}}{kR}, the prefactor order unity and profile-dependent.

Step 3. Insert the numbers (G=6.67×10−11G = 6.67\times10^{-11}, mH=1.67×10−27 kgm_{\mathrm{H}} = 1.67\times10^{-27}\ \mathrm{kg}, k=1.38×10−23 J K−1k = 1.38\times10^{-23}\ \mathrm{J\,K^{-1}}):

Tc∼13 (6.67×10−11)(2.0×1030)(0.6)(1.67×10−27)(1.38×10−23)(7.0×108)T_c \sim \frac{1}{3}\,\frac{(6.67\times10^{-11})(2.0\times10^{30})(0.6)(1.67\times10^{-27})}{(1.38\times10^{-23})(7.0\times10^{8})}

Step 4. Evaluate. The bracket without the 13\tfrac{1}{3} is 1.4×107 K1.4\times10^7\ \mathrm{K}; with it, Tc∼4.6×106 KT_c \sim 4.6\times10^6\ \mathrm{K} — so one estimates a few ×106\times10^6 to 107 K10^7\ \mathrm{K}. The detailed model gives Tc≈1.5×107 KT_c \approx 1.5\times10^7\ \mathrm{K}; the virial estimate lands within a factor of a few, the shortfall reflecting the central concentration the mean ignores. Either way the theorem correctly predicts a core hot enough for hydrogen fusion from MM and RR alone.

2 · Kelvin–Helmholtz timescale of the Sun

If the Sun shone only by gravitational contraction, how long could it last? Use L⊙=3.8×1026 WL_\odot = 3.8\times10^{26}\ \mathrm{W} with the same M⊙M_\odot, R⊙R_\odot.

Step 1. Write the available energy. Only half the gravitational energy is radiated, so the reservoir is ∣Etot∣∼12 GM2/R|E_{\mathrm{tot}}| \sim \tfrac{1}{2}\,GM^2/R, and dividing by luminosity gives tKH=∣Etot∣/L∼GM22RLt_{\mathrm{KH}} = |E_{\mathrm{tot}}|/L \sim \dfrac{GM^2}{2RL}.

Step 2. Insert the numbers.

tKH∼(6.67×10−11)(2.0×1030)22 (7.0×108)(3.8×1026)≈5.0×1014 st_{\mathrm{KH}} \sim \frac{(6.67\times10^{-11})(2.0\times10^{30})^2}{2\,(7.0\times10^8)(3.8\times10^{26})} \approx 5.0\times10^{14}\ \mathrm{s}

Step 3. Convert to years. Dividing by 3.16×107 s yr−13.16\times10^7\ \mathrm{s\,yr^{-1}} gives tKH≈1.6×107 yrt_{\mathrm{KH}} \approx 1.6\times10^7\ \mathrm{yr} — only sixteen million years, hundreds of times shorter than the radiometric age of the Earth (∼4.5×109\sim4.5\times10^9 yr). That mismatch was the nineteenth-century crisis that proved gravitational contraction cannot power the Sun; a nuclear source is required. The same tKHt_{\mathrm{KH}} still sets the contraction time of pre-main-sequence stars, and the same energetics fix the interior pressure scale at ⟨P⟩∼GM2/R4∼1014 Pa\langle P\rangle \sim GM^2/R^4 \sim 10^{14}\ \mathrm{Pa}.

Physics of the portrait

The virial theorem was born in thermodynamics, not astronomy. The word "virial" — Latin vis, force — was coined by Rudolf Clausius, who also gave us entropy, and only later became a tool of astrophysics.

Origins · 1 minRudolf Clausius and how this was discovered
RC
Rudolf Clausius
1822–1888, German physicist · thermodynamics and the kinetic theory of gases

Rudolf Clausius was a founder of thermodynamics: he stated the second law in its modern form, introduced entropy in 1865, and built much of the kinetic theory of gases. In an 1870 paper on the mechanical theory of heat he introduced the virial of a system of particles — the quantity −12∑iFi⋅ri-\tfrac{1}{2}\sum_i \mathbf{F}_i\cdot\mathbf{r}_i — and proved that for a bound system in a steady state the time-averaged kinetic energy equals the virial: 2⟨T⟩=−⟨∑iFi⋅ri⟩2\langle T\rangle = -\langle\sum_i \mathbf{F}_i\cdot\mathbf{r}_i\rangle. His aim was to relate a gas's pressure and temperature to intermolecular forces, but the theorem is far more general. For an inverse-square force it reduces to 2⟨T⟩+⟨U⟩=02\langle T\rangle + \langle U\rangle = 0; applied to a self-gravitating gas it becomes the relation between internal heat and gravitational binding that governs every star. The astronomical payoff came later — Emden applied it to gaseous masses, Eddington made it central to stellar theory in the 1920s, and in 1933 Zwicky turned it on the Coma cluster to make the first case for dark matter. Clausius never worked on stars, yet the relation he wrote for molecules underpins stellar structure, cluster masses, and the stability of the most massive stars.

History
1870
— Clausius introduces the virial and proves 2⟨T⟩ + ⟨Σ Fᵢ·rᵢ⟩ = 0 for a bound system
1902
— Poincaré applies virial reasoning to self-gravitating gaseous masses and rotating figures
1907
— Emden's Gaskugeln develops polytropic gas spheres, giving E_grav for stellar models
1926
— Eddington's Internal Constitution of the Stars makes the virial energy budget central to stellar theory
1933
— Zwicky applies the virial theorem to the Coma cluster and infers missing dark mass

Going further

Texts. Carroll & Ostlie, An Introduction to Modern Astrophysics, 2nd ed., §2.4 and §10.2 · Kippenhahn, Weigert & Weiss, Stellar Structure and Evolution, 2nd ed., Ch. 3 · Prialnik, Theory of Stellar Structure and Evolution, 2nd ed., Ch. 2 · Binney & Tremaine, Galactic Dynamics, 2nd ed., §4.8 (tensor virial theorem) · Hansen, Kawaler & Trimble, Stellar Interiors, 2nd ed., §1.3. The key results to keep in mind: the integration by parts yields 3∫P dV=−Egrav3\int P\,\mathrm{d}V = -E_{\mathrm{grav}} with a vanishing surface term; the closure u=P/(γ−1)=32Pu = P/(\gamma-1) = \tfrac{3}{2}P at γ=5/3\gamma = 5/3; the general coefficient (3γ−4)/(3(γ−1))(3\gamma-4)/(3(\gamma-1)) gives 12\tfrac{1}{2} at γ=5/3\gamma = 5/3 and 00 at γ=4/3\gamma = 4/3. The solar estimates use M⊙=2.0×1030 kgM_\odot = 2.0\times10^{30}\ \mathrm{kg}, R⊙=7.0×108 mR_\odot = 7.0\times10^8\ \mathrm{m}, L⊙=3.8×1026 WL_\odot = 3.8\times10^{26}\ \mathrm{W}, μ=0.6\mu = 0.6, and yield tKH≈1.6×107 yrt_{\mathrm{KH}} \approx 1.6\times10^7\ \mathrm{yr}, Tc∼T_c \sim few ×106\times10^6–107 K10^7\ \mathrm{K}, ⟨P⟩∼1014 Pa\langle P\rangle \sim 10^{14}\ \mathrm{Pa}. All constants are CODATA/IAU values.

Prerequisites. Hydrostatic Equilibrium in Stars · Mass Continuity Equation · Equation of State for Stellar Matter. Leads to. Equations of Stellar Structure · Radiation Pressure in Stellar Interiors · The Energy Generation Equation.

Ask the tutor: Ask me to show how the same virial reasoning that heats a contracting protostar also weighs a cluster of galaxies and reveals its dark matter.

Is the virial theorem exact, or just an approximation?

The pressure form 3∫P dV=−Egrav3\int P\,\mathrm{d}V = -E_{\mathrm{grav}} is exact for any star in hydrostatic equilibrium with negligible surface pressure — a mathematical consequence of integrating the equilibrium equation. The energy statement 2Eint+Egrav=02E_{\mathrm{int}} + E_{\mathrm{grav}} = 0 is exact given one further assumption: a monatomic ideal gas, γ=5/3\gamma = 5/3. Only the order-of-magnitude estimates like Tc∼GMμmH/(kR)T_c \sim GM\mu m_{\mathrm{H}}/(kR) are approximate — there we replace ∣Egrav∣|E_{\mathrm{grav}}| by GM2/RGM^2/R and drop the profile-dependent prefactor, good to a factor of a few, which is all you want from an envelope calculation.

How can a star heat up by losing energy?

This is the negative-heat-capacity paradox, and it is real. A star has two reservoirs, gravitational and thermal, tied by the virial theorem: Etot=12EgravE_{\mathrm{tot}} = \tfrac{1}{2}E_{\mathrm{grav}} and Eint=−EtotE_{\mathrm{int}} = -E_{\mathrm{tot}}. When the surface radiates, EtotE_{\mathrm{tot}} becomes more negative; since it is half the gravitational energy the star contracts, and since the internal energy is minus the total the interior warms. Contraction releases twice the energy radiated — half lost to space, half heating the gas. The star pays for its luminosity by shrinking, and shrinking makes it hotter. A gas in a box does the opposite because it is not self-gravitating.

Why does γ = 4/3 mark the edge of stability?

Stability is a contest between how fast pressure rises under compression and how fast gravity demands more. Compress a self-gravitating sphere and the gravitational pull scales as ρ4/3\rho^{4/3}, while an adiabatic gas's pressure scales as ργ\rho^{\gamma}. If γ>4/3\gamma > 4/3 pressure wins and restores equilibrium; if γ<4/3\gamma < 4/3 gravity wins and compression runs away; at γ=4/3\gamma = 4/3 the two scale identically and there is no restoring force. The virial coefficient (3γ−4)/(3(γ−1))(3\gamma-4)/(3(\gamma-1)) passes through zero, so Etot=0E_{\mathrm{tot}} = 0 and any nudge grows.

Does the virial theorem apply to galaxies and clusters too?

Yes — that is where it made its biggest historical mark. For a collisionless system of stars or galaxies the same reasoning gives 2⟨T⟩+⟨U⟩=02\langle T\rangle + \langle U\rangle = 0, with ⟨T⟩\langle T\rangle the total kinetic energy of the orbiting bodies and ⟨U⟩\langle U\rangle their gravitational potential energy. Zwicky applied this to the Coma cluster in 1933: the galaxies' velocity dispersion gave ⟨T⟩\langle T\rangle, while the cluster's size and luminosity gave ⟨U⟩\langle U\rangle from visible mass. The two failed the virial relation by a large factor, implying far more mass than the light accounted for — the first evidence for dark matter. It is the same theorem applied to different constituents; only "internal energy" changes from heat to orbital motion.

What happens to the theorem if radiation pressure matters?

Radiation pressure changes the effective adiabatic index. Pure radiation has γ=4/3\gamma = 4/3, so as radiation takes a larger share of the support in a massive star, the overall γ\gamma slides from 5/35/3 toward 4/34/3 and the virial coefficient shrinks toward zero. The clean Etot=12EgravE_{\mathrm{tot}} = \tfrac{1}{2}E_{\mathrm{grav}} is replaced by something closer to zero — the star is more loosely bound and more easily disrupted. This is why the most massive stars are radiation-dominated and dynamically fragile, and one reason there is an upper limit to stellar masses. The 12\tfrac{1}{2} factor is only the ideal-gas endpoint of a slide.

Where does gravitational energy actually "go" during contraction?

Track it with the virial ledger. When a star contracts so its gravitational energy drops by ∣ΔEgrav∣|\Delta E_{\mathrm{grav}}|, exactly half of the released energy raises the internal energy — the interior heats — and the other half leaves as radiation. The virial theorem simply dictates the fifty-fifty split between what heats the star and what escapes. This is why pre-main-sequence contraction can simultaneously power a young star's luminosity and drive its centre toward ignition — one reservoir doing two jobs.

Before this

Where this leads