Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Part 3: The Virial Theorem as Universal Diagnostic

When Stars Become Particles | Statistical Thinking Module 2 | ASTR 596

San Diego State University

Learning Objectives

By the end of Part 3, you will be able to:


Part 3: The Virial Theorem

3.1 The Universal Energy Balance

Priority: 🔴 Essential

The virial theorem emerges from taking the second moment of the collisionless Boltzmann equation. Just as we derived conservation laws by taking moments of the Boltzmann equation, the virial theorem emerges from a special moment - one that involves both position and velocity.

Note on Notation: In stellar dynamics literature, the gravitational potential energy is traditionally denoted WW (from German “Werk” = work). We’ll use WW here for the gravitational potential energy, which is equivalent to the familiar UU you’ve seen. This distinguishes our approach from Module 2, where we used Ω\Omega for the gravitational energy in stellar interiors and derived the virial theorem through pressure integrals. Here we’ll use the moment of inertia tensor approach - a fundamentally different derivation that reveals the same universal truth.

The Tensor Virial Theorem Derivation

Consider the moment of inertia tensor for our system of stars:

Iij=kmkxkixkjI_{ij} = \sum_k m_k x_{ki} x_{kj}

where xkix_{ki} is the ii-th coordinate of the kk-th star. The scalar moment of inertia is the trace: I=iIii=kmkrk2I = \sum_i I_{ii} = \sum_k m_k r_k^2.

Taking the first time derivative:

I˙=2kmkrkvk\dot{I} = 2\sum_k m_k \vec{r}_k \cdot \vec{v}_k

Taking the second time derivative and using Newton’s second law (mkak=Fk=mkΦm_k \vec{a}_k = \vec{F}_k = -m_k \vec{\nabla}\Phi):

I¨=2kmkvk2+2kmkrkak=4K+2kmkrk(Φ)\ddot{I} = 2\sum_k m_k |\vec{v}_k|^2 + 2\sum_k m_k \vec{r}_k \cdot \vec{a}_k = 4K + 2\sum_k m_k \vec{r}_k \cdot (-\vec{\nabla}\Phi)

For the gravitational potential Φ=GM/r\Phi = -GM/r, we need to use Euler’s theorem for homogeneous functions. A function is homogeneous of degree nn if f(λr)=λnf(r)f(\lambda\vec{r}) = \lambda^n f(\vec{r}). Our potential Φr1\Phi \propto r^{-1} is homogeneous of degree n=1n = -1.

Euler’s theorem states that for homogeneous functions of degree nn:

rΦ=nΦ\vec{r} \cdot \vec{\nabla}\Phi = n\Phi

Since our gravitational potential has degree n=1n = -1:

rΦ=Φ\vec{r} \cdot \vec{\nabla}\Phi = -\Phi

This is the key property that makes gravity special - the specific factor of 2 in the virial theorem comes from the 1/r1/r nature of gravity! Therefore:

I¨=4K+2W\ddot{I} = 4K + 2W

In equilibrium, the system is neither collapsing (I¨<0\ddot{I} < 0) nor expanding (I¨>0\ddot{I} > 0), so I¨=0\ddot{I} = 0:

2K+W=0\boxed{2K + W = 0}

where:

K=12imivi2(total kinetic energy)K = \frac{1}{2}\sum_i m_i v_i^2 \quad \text{(total kinetic energy)}

W=i<jGmimjrij(total gravitational potential energy, negative)W = -\sum_{i<j} \frac{Gm_im_j}{r_{ij}} \quad \text{(total gravitational potential energy, negative)}

Physical intuition: In equilibrium, the kinetic energy (trying to disperse the system) exactly balances half the binding energy (trying to collapse it). This specific ratio of 2:1 emerges from the 1/r nature of gravity - it’s not arbitrary but mathematically inevitable!

Key Difference from Module 2: In Module 2, we derived the virial theorem for stellar interiors using pressure integrals over the stellar volume. Here, we’ve used the moment of inertia approach for a collection of point particles (stars). Same theorem, completely different derivation - showing the universality of this fundamental principle!

This applies to all gravitationally bound systems:

The profound discovery: When we apply the virial theorem using only visible matter, galaxies and clusters appear unbound! The observed kinetic energy requires 5-10× more mass than we can see. This “missing mass” is dark matter – discovered through the very equation you’re learning.

3.2 Different Forms, Same Physics

The virial theorem takes different mathematical forms depending on what we’re measuring:

For a star cluster (velocity dispersion):

Mσ2=W2=GM22RM\sigma^2 = -\frac{W}{2} = \frac{GM^2}{2R}

This gives the fundamental scaling relation:

σ2GMR\boxed{\sigma^2 \sim \frac{GM}{R}}

Key insight: Measuring velocity dispersion σ\sigma lets us “weigh” the system! If you observe σ\sigma and know RR, you can determine MM – this is how we measure dark matter in galaxies.

3.3 The Virial Theorem as Diagnostic Tool

Priority: 🔴 Essential The virial theorem provides the most important diagnostic for N-body simulations:

Virial ratio=2K+WW\text{Virial ratio} = \frac{|2K + W|}{|W|}

What different values mean:

Implementation hint for Project 2:

def check_virial(particles):
    """
    Check virial equilibrium for N-body simulation.
    Returns virial ratio - should be near zero for equilibrium.
    """
    # Calculate kinetic energy
    K = # Sum of (1/2) * m * v^2 for all particles
    
    # Calculate potential energy (the tricky part!)
    W = 0.0
    for i in range(N):
        for j in range(i+1, N):  # Count each pair once
            r_ij = # distance between particles i and j
            W -= G * m[i] * m[j] / r_ij
    
    virial_ratio = abs(2*K + W) / abs(W)
    
    if virial_ratio > 0.1:
        print(f"WARNING: System not virialized! Ratio = {virial_ratio:.3f}")
    
    return virial_ratio

3.4 Connection to Ergodicity and MCMC

Priority: 🟡 Standard Path The virial theorem assumes something profound that connects to Module 1: time averages equal ensemble averages.

For the virial theorem to hold, a system must explore its entire accessible phase space. Just as gas molecules sample all possible velocities through collisions, stars must sample all possible orbits consistent with their energy. This is ergodicity.

Ktime=limT1T0TK(t)dt=Kensemble\langle K \rangle_{\text{time}} = \lim_{T \to \infty} \frac{1}{T} \int_0^T K(t) \, dt = \langle K \rangle_{\text{ensemble}}

This is the ergodic hypothesis – a system explores all accessible phase space given enough time. This connects directly to your future work:

Part 3 Synthesis: The Universal Diagnostic

The virial theorem isn’t just an equation – it’s nature’s way of telling us when a gravitational system has found its balance. Its universality is breathtaking:

Why It Works Everywhere

The virial theorem applies to any system where:

  1. Gravity is the dominant force (1/r1/r potential)

  2. The system has had time to relax toward equilibrium

  3. External influences are negligible

This covers:

The Dark Matter Revolution

The virial theorem’s greatest triumph was revealing the invisible universe:

  1. Observe: Velocity dispersions in clusters

  2. Apply virial: M=Rσ2/GM = R\sigma^2/G

  3. Compare: Virial mass >> visible mass

  4. Conclude: Dark matter exists!

This simple application of statistical mechanics revolutionized cosmology.

Your Computational Toolkit

For Project 2, the virial theorem becomes your:

The same theorem that revealed dark matter will debug your code!

Important Limitations

The virial theorem assumes:

Despite these limitations, the virial theorem remains remarkably useful because:

  1. The tensor virial theorem can handle non-spherical shapes

  2. Many clusters are approximately isolated over several dynamical times

  3. Systems naturally evolve toward virial equilibrium (though may never fully reach it)

  4. Deviations from 2K+W=02K + W = 0 tell us about non-equilibrium dynamics

The virial theorem is like the ideal gas law - never perfectly true but almost always useful!