---
title: "Billions of Collisions in a Gas Interactive Lab | Sandbox Physics"
description: "How do random collisions settle into a steady pressure, temperature and speed distribution? By averaging."
canonical_url: "https://sandboxphysics.com/labs/ideal-gas/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/ideal-gas/"
last_modified: "2026-10-27"
---

Thermodynamics · molecular motion

# Kinetic Theory

**How do random collisions settle into a steady pressure, temperature and speed distribution?** By averaging. No single collision is predictable, but the average over enormous numbers of them hardly fluctuates. The speeds settle into the Maxwell-Boltzmann distribution, and pressure and temperature come out the same every time you measure.

Hard spheres bounce elastically off one another and off all six walls of the box. Each collision looks random, but the speeds settle toward the 3D Maxwell-Boltzmann distribution, which the live histogram follows.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

A 3D gas obeys $\langle KE\rangle=\frac32k_{\mathrm B}T$. Heat the gas and the speed distribution shifts right and broadens. Pressure is the steady drumbeat of particles hitting all six walls, and that drumbeat is where $PV=Nk_{\mathrm B}T$ comes from.

## Where the idea came from

[The extra weight that revealed argon](https://sandboxphysics.com/stories/thermal-complexity/rayleigh-argon-density/) [How a gas becomes a liquid and loses the boundary](https://sandboxphysics.com/stories/thermal-complexity/van-der-waals-critical-point/) [Explore heat, chance and collective behaviour](https://sandboxphysics.com/stories/thermal-complexity/)

Physics tutorial

## Ideal gas: how macroscopic laws emerge from collisions

**Background** A gas is made of many particles that keep colliding. Temperature sets the scale of their average energy, and pressure comes from the momentum they hand to the container walls.

**Why it matters** It shows that a statistical distribution can predict the behavior of the whole gas without tracking every particle.

Start with the essentials

- **Focus question**: Why do random collisions produce stable, repeatable pressure and temperature?
- **One-sentence intuition**: Individual collisions are unpredictable, but averages over many independent events become stable.

### Core mathematical model

#### Ideal-gas equation

$$
PV=Nk_{\mathrm B}T
$$

At fixed volume, adding particles or raising the temperature increases the pressure.

#### Mean translational energy in 3D

$$
\langle K\rangle=\frac{3}{2}k_{\mathrm B}T
$$

Each of the three translational degrees of freedom contributes one half of the Boltzmann constant times the temperature.

### Common difficulties

#### Temperature is not the speed of each particle

**Typical misconception** All particles at one temperature move equally fast.

**Better mental model** Temperature sets the energy scale of the distribution, and individual speeds still spread over a wide range.

#### Pressure does not come from particles repelling each other

**Typical misconception** Gas pressure mainly comes from particles pushing each other apart.

**Better mental model** In an ideal gas, pressure is the steady flow of momentum from particles striking the walls.

### Run the experiment

1. 01

   #### Watch the statistics settle

   Choose Warm and let the histogram settle.

   **What to observe:** Each bin keeps fluctuating, but the overall distribution settles down.

2. 02

   #### Change only the temperature

   Hold the particle count fixed and heat the gas.

   **What to observe:** The distribution shifts to higher speeds and spreads out, and the mean speed and the pressure rise.

3. 03

   #### Change only the particle count

   Hold the temperature fixed and add particles.

   **What to observe:** The mean speed stays about the same while the pressure goes up.

Physical conclusion

Thermodynamic quantities such as temperature and pressure are stable averages over many microscopic events.

## Related experiments and articles

Heat and collective behaviour · Reading path

### What a gas can tell us about atoms

Articles on this path that use this experiment, followed by the other experiments they suggest.

1. [Article **The extra weight that revealed argon**](https://sandboxphysics.com/stories/thermal-complexity/rayleigh-argon-density/)
2. [Article **How a gas becomes a liquid and loses the boundary**](https://sandboxphysics.com/stories/thermal-complexity/van-der-waals-critical-point/)

Fields & matter · Starter path

## From a field to an electron microscope

Map an electric field and steer a charged particle. Then find the electron's wavelength and use electron beams to see a crystal and a surface.

[Start here → **Make an Electric Field Visible** Move the probe around a dipole and check that the field always points downhill on the potential landscape. Observe · 8 min](https://sandboxphysics.com/labs/electric-field/)

1. [1 Make an Electric Field Visible](https://sandboxphysics.com/labs/electric-field/)
2. [2 A Charge Bending through Fields](https://sandboxphysics.com/labs/charged-particle/)
3. [3 Electron Wavelength & Voltage](https://sandboxphysics.com/labs/electron-wavelength/)
4. [4 Electron Diffraction & Reciprocal Space](https://sandboxphysics.com/labs/electron-diffraction/)
5. [5 TEM Bright Field, Dark Field & SAED](https://sandboxphysics.com/labs/tem-mode-selector/)
6. [6 SEM Secondary-Electron Topography](https://sandboxphysics.com/labs/sem-topography/)

[View the full path →](https://sandboxphysics.com/topics/fields-and-matter/#starter-path)
