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 , or . Because is negative for any bound configuration, the total energy 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 , generalizes the factor to an arbitrary adiabatic index , and puts it to work: central temperatures and pressures from mass and radius alone, the Kelvin–Helmholtz timescale, and the stability threshold that governs the fate of the heaviest stars.
- Integrating hydrostatic equilibrium over a whole star gives the exact pressure form , valid for any pressure source with .
- For a monatomic ideal gas () this collapses to , so and — 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 and alone: and for the Sun, without integrating the structure equations.
- The general form makes a knife-edge: there and equilibrium is marginally unstable — the regime of radiation-dominated and relativistically degenerate stars.
- Key idea: Integrating hydrostatic equilibrium over a star gives ; for an ideal monatomic gas this becomes , so the total energy is — 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 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 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 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 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.
The most startling consequence hides in that minus sign. If the star radiates, drops; since the gravitational energy falls too — the star contracts — but , 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 and and read off a central temperature good to order unity. The one number that does control everything is the adiabatic index . As support shifts from ordinary gas () toward radiation or relativistic degeneracy (), the virial coefficient slides to zero, and at the star becomes marginally bound — the physics behind the collapse of the most massive stars and of near-Chandrasekhar cores.
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 () 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.
where: — local pressure; — radial coordinate; — enclosed mass within ; — local mass density; — 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.
where: — total stellar volume; — 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.
where: — total stellar mass; — mass of a shell at . Reading: deeper shells are bound more tightly; for a uniform sphere the integral is , 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 , so it becomes twice .
where: — 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.
where: — total (internal plus gravitational) energy. Reading: a bound star sits in a well half as deep as its binding; radiating makes more negative, forcing contraction and heat. The factor is special to . For a general index it becomes a simple function of whose sign decides stability.
where: — adiabatic index of the dominant pressure source. Reading: is negative (bound, stable) only for ; at it vanishes and the star is marginally bound. Finally, the pressure form yields interior conditions directly. With and , the pressure and — via the ideal-gas law — the temperature follow.
where: — mean interior pressure; — stellar radius; — central temperature; — mean molecular weight (in units of ); — hydrogen mass; — Boltzmann constant. Reading: pressure climbs steeply with mass and shrinking radius, and temperature scales as — the reason massive, compact stars run hot.
The goal is to obtain the energy statement 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 to eliminate , equation (1) becomes . Why: the mass coordinate runs cleanly from to and makes the gravitational-energy integral appear naturally.
Step 2. Multiply both sides by the interior volume and integrate from centre to surface: . 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 , the right side is exactly . Why: this is just the definition of gravitational potential energy, so no approximation enters.
Step 4. Integrate the left side by parts, . The boundary term vanishes at both ends — at the surface because , at the centre because as . What remains is . 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 at , so , and with Step 4, . Why: the factor is where 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
The goal is to see why the innocuous factor in is really a dial controlling whether a star is stable at all. We keep the exact pressure form but let the gas carry an arbitrary adiabatic index , so its internal energy density is . Following through to the total energy exposes a coefficient that changes sign at — the boundary between a bound, stable star and one poised to collapse.
Step 1. Write the internal energy for a general index. With , integrating over the star gives . Why: this generalises the closure to any polytropic-like gas — radiation, non-relativistic or relativistic degeneracy — each with its own .
Step 2. Add the gravitational energy: . Why: a single coefficient times isolates the one number that decides whether the star is bound.
Step 3. Read off the threshold. Because , the total energy is negative — bound and dynamically stable — only when the coefficient is positive, i.e. . At exactly, for any radius: the star is marginally bound, and an infinitesimal perturbation costs no energy to grow. Why: 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. recovers , matching equation (5); gives . Why: the general form must reduce to the ideal-gas result and the marginal case, and it does so cleanly. *As a quick check: evaluates to at , confirming the sign change at and the ideal-gas value of at .*
Go deeper · Derivation C · 1 minNegative 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 and , 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 , then and : the internal energy, and hence the temperature, rises even as the star radiates. Why: the effective heat capacity 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 , the total changes by 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 liberates . Why: the reservoir a star can spend by shrinking is its binding energy, so the time to exhaust it depends only on , and .
Step 4. Divide by the luminosity. The time to radiate this reservoir at luminosity is . Why: this Kelvin–Helmholtz timescale is the natural clock of contraction; for the Sun it is around 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 of the dominant pressure source.
| Case | Result | Meaning |
|---|---|---|
| Nonrelativistic ideal gas () | Ordinary main-sequence matter; bound, stable, negative heat capacity, internal energy per particle. | |
| Radiation or ultrarelativistic gas () | Radiation pressure or relativistic degeneracy dominant; marginal stability — very massive stars and near-Chandrasekhar cores sit here and are prone to collapse. | |
| General polytrope ( arbitrary) | Bound and stable only when ; below that the coefficient turns negative and equilibrium fails. | |
| Externally confined gas | A surface pressure leaves a surviving surface term — relevant for interstellar clouds and Bonnor–Ebert spheres, not isolated stars where . |
Worked examples
1 · Central temperature of the Sun
Estimate the Sun's central temperature from the virial theorem, using , , . Compare with the detailed model value.
Step 1. Equate internal energy to half the binding energy. With particles each carrying , the virial theorem sets .
Step 2. Solve for the temperature. Rearranging gives , the prefactor order unity and profile-dependent.
Step 3. Insert the numbers (, , ):
Step 4. Evaluate. The bracket without the is ; with it, — so one estimates a few to . The detailed model gives ; 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 and alone.
2 · Kelvin–Helmholtz timescale of the Sun
If the Sun shone only by gravitational contraction, how long could it last? Use with the same , .
Step 1. Write the available energy. Only half the gravitational energy is radiated, so the reservoir is , and dividing by luminosity gives .
Step 2. Insert the numbers.
Step 3. Convert to years. Dividing by gives — only sixteen million years, hundreds of times shorter than the radiometric age of the Earth ( yr). That mismatch was the nineteenth-century crisis that proved gravitational contraction cannot power the Sun; a nuclear source is required. The same still sets the contraction time of pre-main-sequence stars, and the same energetics fix the interior pressure scale at .
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
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 — and proved that for a bound system in a steady state the time-averaged kinetic energy equals the virial: . 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 ; 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.
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 with a vanishing surface term; the closure at ; the general coefficient gives at and at . The solar estimates use , , , , and yield , few –, . 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 is exact for any star in hydrostatic equilibrium with negligible surface pressure — a mathematical consequence of integrating the equilibrium equation. The energy statement is exact given one further assumption: a monatomic ideal gas, . Only the order-of-magnitude estimates like are approximate — there we replace by 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: and . When the surface radiates, 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 , while an adiabatic gas's pressure scales as . If pressure wins and restores equilibrium; if gravity wins and compression runs away; at the two scale identically and there is no restoring force. The virial coefficient passes through zero, so 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 , with the total kinetic energy of the orbiting bodies and their gravitational potential energy. Zwicky applied this to the Coma cluster in 1933: the galaxies' velocity dispersion gave , while the cluster's size and luminosity gave 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 , so as radiation takes a larger share of the support in a massive star, the overall slides from toward and the virial coefficient shrinks toward zero. The clean 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 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 , 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.