← SciSim / Physics

Maxwell–Boltzmann Distribution

Thermodynamics #55
Section 01
Interactive Simulation
Maxwell–Boltzmann Distribution — SciSim
Ready
T
K
v_p
m/s
⟨v⟩
m/s
v_rms
m/s
⟨KE⟩
J
N particles
Controls
Gas Properties
Temperature T300 K
Particle mass m4.65e-26 kg
Number of particles200
Display Options
Trail length8 frames
Histogram bins30
Escape v_esc1500 m/s
Section 02
The Idea, Step by Step

Picture a crowded bumper-car rink. Everyone starts at roughly the same speed, but after a few minutes of crashing into each other, the speeds are all over the place — a few cars crawl, a few zoom, and most are somewhere in the middle. Nobody planned that spread; the random collisions just produced it. The molecules in any gas do exactly the same thing. They are not all moving at one "temperature speed" — they share out their energy through countless collisions until a stable pattern of speeds appears. That pattern is the Maxwell–Boltzmann distribution.

To pin it down we need three quantities: the speed of a molecule $v$, the temperature $T$ of the gas, and the mass $m$ of one molecule. The plain-language rule is: hotter or lighter means faster; colder or heavier means slower. The cleanest single number is the root-mean-square speed, a kind of energy-weighted average:

Typical molecular speed
$$v_{\text{rms}} = \sqrt{\frac{3 k_B T}{m}}$$

Try it for the air in this room. A nitrogen molecule has $m \approx 4.65\times10^{-26}$ kg, and at $T = 300$ K this gives $v_{\text{rms}} \approx \sqrt{3(1.38\times10^{-23})(300)/(4.65\times10^{-26})} \approx 517$ m/s — faster than a passenger jet. The molecules whizzing past you right now are doing roughly half a kilometre per second, in every direction at once.

Why a spread, and why a peak?

The full curve, $f(v)\propto v^2\,e^{-mv^2/2k_BT}$, is a tug-of-war between two factors. The Boltzmann factor $e^{-mv^2/2k_BT}$ says high speeds cost a lot of energy and are rare. The geometric factor $v^2$ says there are very few ways to be almost stationary, so $v=0$ is rare too. Their product peaks in between, at the most probable speed $v_p$. That is why the distribution always has a hump rather than a single spike, and why three averages appear — $v_p < \langle v\rangle < v_{\text{rms}}$. Raising $T$ doesn't lift every molecule equally; it shifts and flattens the whole curve, while $\langle KE\rangle = \tfrac{3}{2}k_B T$ ties temperature directly to energy. (The animation runs in 2D, so its on-screen curve is $f(v)\propto v\,e^{-mv^2/2k_BT}$ and $\langle KE\rangle = k_B T$ — same physics, one fewer dimension.)

Try this in the sim above

First, drag Temperature T from 300 K up to 1200 K and watch the histogram slide right and flatten — quadrupling $T$ only doubles the speeds, because $v\propto\sqrt{T}$. Second, open Different Gas Masses mode: light H₂, medium N₂ and heavy Ar share the same $T$, yet the light gas spreads far into the high-speed tail. Third, switch to Escape Velocity mode and lower $v_{\text{esc}}$ — the readout shows what fraction of molecules sit in the tail above it, which is exactly why Earth keeps its nitrogen but lets hydrogen and helium leak away.

Section 03
Equations & Derivation
Maxwell–Boltzmann Speed Distribution
$$f(v)\,dv = 4\pi\,n \left(\frac{m}{2\pi k_B T}\right)^{\!3/2}\!v^2\,\exp\!\left(-\frac{m v^2}{2 k_B T}\right) dv$$
Three Characteristic Speeds
$$v_p = \sqrt{\frac{2 k_B T}{m}},\quad \langle v \rangle = \sqrt{\frac{8 k_B T}{\pi m}},\quad v_{\text{rms}} = \sqrt{\frac{3 k_B T}{m}}$$
Speed Ordering (always)
$$v_p < \langle v \rangle < v_{\text{rms}},\qquad v_p : \langle v \rangle : v_{\text{rms}} = 1 : \sqrt{4/\pi} : \sqrt{3/2} \approx 1 : 1.128 : 1.225$$
Equipartition & Average Kinetic Energy
$$\langle KE \rangle = \tfrac{1}{2}\,m\,\langle v^2 \rangle = \tfrac{3}{2}\,k_B T$$
1D Velocity Distribution
$$f(v_x)\,dv_x = \sqrt{\frac{m}{2\pi k_B T}}\,\exp\!\left(-\frac{m v_x^2}{2 k_B T}\right)dv_x$$

Symbol Definitions

SymbolMeaningSI Unit
$m$Mass of one moleculekg
$T$Absolute temperatureK
$k_B$Boltzmann constant ($1.381\times10^{-23}$ J/K)J K⁻¹
$v$Molecular speed (magnitude of velocity)m s⁻¹
$f(v)$Probability density of speedss m⁻¹
$v_p$Most probable speed (peak of $f(v)$)m s⁻¹
$\langle v \rangle$Mean speedm s⁻¹
$v_{\text{rms}}$Root-mean-square speedm s⁻¹
Step 1Start with the Boltzmann factor. In thermal equilibrium, the probability of finding a molecule with kinetic energy $\tfrac12 m v^2$ is proportional to $\exp(-mv^2/2k_BT)$. Velocities are 3D vectors, so the 3D velocity distribution has $\exp(-m\vec v^2/2k_BT)$.
Step 2Convert from velocity to speed. A speed $v$ corresponds to a spherical shell of radius $v$ and thickness $dv$ in velocity space. The shell has volume $4\pi v^2\,dv$. Multiply the velocity density by this volume to get $f(v)\propto v^2 e^{-mv^2/2k_BT}$.
Step 3Normalise. Require $\int_0^\infty f(v)\,dv = n$ (total number density). The Gaussian integral $\int_0^\infty v^2 e^{-\alpha v^2}\,dv = \sqrt{\pi}/(4\alpha^{3/2})$ fixes the prefactor, giving the boxed result.
Step 4Find $v_p$. Set $df/dv = 0$. Differentiate $v^2 e^{-mv^2/2k_BT}$: $2v e^{-...} - v^2(mv/k_BT)e^{-...} = 0 \Rightarrow 2 = mv^2/k_BT \Rightarrow v_p = \sqrt{2k_BT/m}$.
Step 5Find $\langle v \rangle$ and $v_{\text{rms}}$. Compute $\langle v\rangle = \int_0^\infty v f(v)\,dv/n = \sqrt{8k_BT/\pi m}$ using $\int_0^\infty v^3 e^{-\alpha v^2}\,dv = 1/(2\alpha^2)$. Compute $\langle v^2\rangle = \int_0^\infty v^2 f(v)\,dv/n = 3k_BT/m$, so $v_{\text{rms}} = \sqrt{3k_BT/m}$. Equipartition follows: $\tfrac12 m\langle v^2\rangle = \tfrac32 k_B T$.

How simulation variables map to the equations

Slider T directly enters all three speed formulas. Slider m represents particle mass — heavier molecules ⇒ slower at the same temperature. The "Different Gas Masses" mode shows H₂ (light), N₂ (intermediate), and Ar (heavy) at the same $T$ — the histograms shift accordingly. The "Escape Velocity" mode highlights the high-speed tail: at low $v_{\text{esc}}/v_{\text{rms}}$ ratio, a significant fraction of molecules can escape (atmospheric loss). The simulation uses a 2D version with $\langle KE\rangle = k_B T$ instead of $\tfrac32 k_B T$ — physics is the same, just one fewer degree of freedom.

Reference: Reif — Fundamentals of Statistical and Thermal Physics, McGraw-Hill 1965, Ch. 7 §7.10; Halliday, Resnick & Walker — Fundamentals of Physics, 10th Ed., §19-7: "The Distribution of Molecular Speeds".
Section 04
Frequently Asked Questions

Atmospheric escape (light gases like H and He escape Earth's gravity faster because their high-speed tails extend past escape velocity), evaporation cooling (only the fastest molecules leave the liquid surface, lowering average kinetic energy), Doppler broadening of spectral lines (atoms moving toward/away shift emission frequency), Bose-Einstein condensation (laser cooling cuts the high-speed tail to lower $T$), and chemical reaction rates (Arrhenius factor $e^{-E_a/k_B T}$ comes directly from the high-speed tail).

💡 Every thermal process is shaped by this curve.

A swarm of particles bouncing elastically inside a 2D box. Their initial speeds are sampled from a Maxwell-Boltzmann distribution at temperature $T$. The histogram below tracks the live speed distribution — you'll see it stay close to the theoretical curve (red line) once the system reaches equilibrium. Heat the gas (raise $T$) and the curve flattens and shifts right; cool it and it sharpens to lower speeds.

💡 Watch the histogram match the red theoretical curve — that's equilibrium.

Two competing effects shape $f(v)$. The Boltzmann factor $e^{-mv^2/2k_BT}$ is largest at $v=0$ — energetically, low speeds are favoured. But the geometric factor $4\pi v^2$ (volume of a velocity-space shell) goes to zero at $v=0$ — there are very few ways to be exactly stationary. Their product peaks at $v_p$. So the peak comes from balancing energy cost against geometric availability.

💡 It's a Boltzmann × geometry compromise — neither factor alone has a peak.

They average different things. $v_p$ = location of histogram peak (most likely value). $\langle v\rangle$ = arithmetic mean (good for collision rates). $v_{\text{rms}}$ = $\sqrt{\langle v^2\rangle}$ (good for kinetic energy: $\tfrac32 k_B T = \tfrac12 m v_{\text{rms}}^2$). They are different because the distribution is asymmetric — a long high-speed tail pulls $\langle v\rangle$ above $v_p$, and pulls $v_{\text{rms}}$ even higher.

💡 Different physical questions have different "right" averages.

The exponent comes from energy ($\propto v^2$). The polynomial prefactor comes from dimensionality: in $D$ dimensions, the surface of a $D$-sphere of radius $v$ scales as $v^{D-1}$. So 1D has $v^0=$ constant (Gaussian), 2D has $v^1$, 3D has $v^2$. In 4 dimensions you'd get $v^3 e^{-mv^2/2k_BT}$. The $v^{D-1}$ factor is just the volume of the velocity-space shell.

💡 The $v^2$ comes from 3D space, not from physics specific to gases.

Earth's gravitational escape velocity at the exobase is ~10.4 km/s. At thermospheric temperatures (~1000 K), $v_{\text{rms}}$ for hydrogen is ~5 km/s and for helium ~2.5 km/s — significant fractions of these molecules sit in the high-speed tail above escape velocity, so they leak away over geological time. For nitrogen ($v_{\text{rms}}$ ~1 km/s) the tail past 10.4 km/s is astronomically negligible. This is why all of Earth's primordial He and H₂ are gone, but mantle outgassing replenishes some He today.

💡 Atmospheric composition is selected by the Boltzmann tail.

Laser cooling uses photon scattering to selectively slow atoms moving toward the laser (Doppler-shifted into resonance). Each photon absorption removes a small momentum from the atom. Over millions of cycles, fast atoms get preferentially slowed, "shaving off" the high-speed tail of the distribution. Repeated stages can reach microkelvins. Removing the tail also means $\langle KE\rangle$ drops — the Maxwell-Boltzmann curve gets sharper and shifts to lower $v$. This is how Bose-Einstein condensates are made.

💡 Cooling = selectively removing the high-speed tail.
Resource: HyperPhysics — Maxwell-Boltzmann Distribution; MIT OCW 8.044 — Statistical Physics; Khan Academy — Kinetic Theory of Gases.
Section 05
Common Misconceptions
❌ All molecules in a gas at temperature T have the same speed.
✅ Molecules have a wide distribution of speeds even at fixed $T$. The distribution's width is comparable to its mean — a typical molecule's speed differs from $v_{\text{rms}}$ by factors of two or more. Temperature determines the shape of the distribution, not a single speed value.
📖 HRW 10th Ed., §19-7, Fig. 19-8.
❌ Higher temperature means all molecules move faster.
✅ Higher $T$ shifts the distribution to higher speeds, but at any temperature there are slow molecules and fast molecules. Heating doesn't lift every molecule's speed by the same amount — it broadens and shifts the distribution. Some molecules in a hot gas are slower than the average molecule in a cold gas.
📖 Reif — Fundamentals of Statistical Physics, §7.10.
❌ Maxwell-Boltzmann only applies to ideal gases.
✅ It applies to any classical system in thermal equilibrium where particles are non-interacting (or weakly interacting) and translation degrees of freedom are independent — including dilute liquids, plasmas, even some quasi-classical regimes of quantum gases at high $T$. Real-gas corrections are small until intermolecular forces become comparable to $k_B T$.
📖 Pathria & Beale — Statistical Mechanics, 4th Ed., Ch. 6.
❌ The most probable speed equals the average speed.
✅ They differ by the factor $\sqrt{4/\pi} \approx 1.128$ (so $\langle v\rangle$ is about 13% larger than $v_p$). The asymmetric long high-speed tail pulls the mean above the peak. Many problems unwittingly substitute one for the other and get $\sim$10% errors.
📖 HRW 10th Ed., §19-7, Eqs. 19-31 and 19-35.
❌ Doubling temperature doubles the speeds.
✅ Speeds scale as $\sqrt{T}$, not $T$. To double the speeds, you must quadruple the temperature ($v \propto \sqrt{T}$). What scales linearly with $T$ is the kinetic energy: $\langle KE\rangle = \tfrac32 k_B T$.
📖 HRW 10th Ed., §19-7.
❌ A 2D Maxwell-Boltzmann is essentially the same as 3D — just project.
✅ Projection of a 3D MB distribution onto a 2D plane is not a 2D MB distribution. The 1D velocity component $v_x$ is Gaussian (from any dimension). The 2D speed distribution is $f(v) \propto v\,e^{-mv^2/2k_BT}$ (single $v$ factor, not $v^2$). The dimensionality enters explicitly in the geometric prefactor.
📖 Reif — Fundamentals of Statistical Physics, §7.9.
Misconception research: Loverude, Kautz & Heron (2002), Am. J. Phys. 70, 137 — "Student understanding of the first law of thermodynamics"; Meltzer (2004), Am. J. Phys. 72, 1432 — investigations of student reasoning about gas distributions.