What are the gas laws?
Squeeze a gas and it pushes back, heat it and it swells, and one short rule, PV = nRT, explains both. Push a piston, breathe like Boyle, light diesel with a squeeze, whistle a pressure cooker, fly a hot-air balloon, and turn CO₂ into a liquid.
▶ Play with it · Read the 60-second explainer · Watch the 40-second video
- Pressure is molecules hitting walls. Air molecules fly at about 500 m/s and bounce off everything. Each bounce is a tiny push; billions of billions a second add up to pressure. More molecules, faster ones or less room all mean more pushes.
- Four laws, one rule. Boyle: half the volume, twice the pressure. Charles: heat it and it swells. Gay-Lussac: heat it sealed and the pressure climbs. Avogadro: twice the gas needs twice the room. Together they are PV = nRT, with T in kelvin.
- Squeeze it: lungs and engines. A bigger chest means lower pressure, so air flows in: that is breathing. Squeeze air fast, as an engine does, and it heats up: a diesel squeezes 18 times and the air passes 500 °C, enough to light the fuel.
- Heat it: tyres, cookers and balloons. A hot tyre gains about 3.4 % pressure per 10 °C. A pressure cooker holds steam at 2 atm so water boils at about 120 °C. Heated air spreads thinner, so a balloon full of it floats.
- Where the rule breaks. Squeeze CO₂ below 31 °C and it turns to liquid; LPG cylinders use this on purpose. For the air around you, though, PV = nRT is right to within 0.1 %. And gases don't fill jars because they are light: it is their motion.
| Term | Meaning |
|---|---|
| Pressure | The push of a gas on each square metre of wall, from its molecules hitting it. Air around you is about 101 kPa. |
| Ideal gas law | PV = nRT: pressure × volume = moles × 8.314 × temperature in kelvin. |
| Kelvin | Temperature counted from absolute zero, −273.15 °C. The gas laws only work in kelvin. |
| Mole | A count of molecules: 6.022 × 10²³. A litre of air holds about 0.04 mol. |
| Boyle's law | At steady temperature, pressure × volume stays the same. |
| Charles's law | At steady pressure, volume grows in step with kelvin temperature. |
| Partial pressure | Each gas in a mixture pushes as if it were alone, and the pushes add up (Dalton's law). |
| Critical point | Above it, no squeeze can turn a gas into a liquid. For CO₂: 31 °C and 74 bar. |
From a tube of mercury in Florence to a number fixed forever in 2019: 400 years of learning how gases push, stretch and move.
- 1662 · Squeeze the air and it pushes back harder (Robert Boyle, with Robert Hooke; helped by Richard Towneley and Henry Power, Oxford, England)
- 1783 · People fly for the first time, on hot air (Joseph-Michel and Jacques-Étienne Montgolfier; flown by Jean-François Pilâtre de Rozier and the Marquis d'Arlandes, Paris, France)
- 1802 · Charles's law goes public, with credit (Joseph Louis Gay-Lussac, Paris, France)
- 1811 · Equal volumes hold equal numbers (Amedeo Avogadro; later championed by Stanislao Cannizzaro, Turin, Kingdom of Sardinia (published in Paris))
- 1834 · One equation for every gas (Émile Clapeyron, Paris, France)
- 1873 · A law for real gases (Johannes Diderik van der Waals, Leiden, Netherlands)
The full story, with 20 moments, charts, people and 35 sources: glassbox.how/e/gaslawclear/history. The data lives in history.json.
Made with the Glassbox studio from this box's storyboard (window.glassbox.director). Free to reuse under CC BY 4.0.
| File | What | Size |
|---|---|---|
glassbox/reel.mp4 |
Reel / Short, with captions and soundtrack | 1080×1920 |
glassbox/video.mp4 |
YouTube video, with captions and soundtrack | 1920×1080 |
glassbox/slide-1…10.jpg |
Instagram carousel | 1080×1350 |
glassbox/thumb.jpg |
YouTube thumbnail | 1280×720 |
glassbox/cover.jpg |
Share card and repo social preview | 1200×630 |
glassbox/history-reel.mp4 |
“History in 10 moments” Reel / Short | 1080×1920 |
glassbox/history-slide-*.jpg |
History carousel | 1080×1350 |
glassbox/post.json |
Post copy and schedule used by the publish kit |
This box has no accounts and no ads, and it ships its own fonts and libraries. When you run it yourself it sends nothing anywhere. On glassbox.how, the site's /bar.js also loads Glassbox's analytics: Google Analytics to count visits (it asks first in the EU, UK and Switzerland, and stays off when your browser sends Global Privacy Control or Do Not Track) and ClickTrust to detect bots.
It remembers a few things in your own browser only, and never sends them anywhere:
| Browser storage key | What it holds |
|---|---|
gaslawclear.v1 |
Which chapters you have opened, your best quiz scores, and sound on or off. |
Exactly what each one sees is at glassbox.how/privacy.
- Code: MIT. Use it, change it, ship it.
- Explanations, text, images and videos (
glassbox.json,glassbox/): CC BY 4.0. Credit “Glassbox, glassbox.how/e/gaslawclear”. - Third-party parts keep their own licences: three.js (MIT), Geist, Instrument Serif (SIL OFL 1.1).
- The Glassbox name and logo aren't covered by either licence. See the terms.
Found a mistake? Open an issue. Corrections happen in public.
It's plain HTML, CSS and JavaScript. No build step and no dependencies. Run locally, it contacts no other website.
python3 -m http.server 8000Three.js and the fonts ship in vendor/ and fonts/, so it also works offline.
Then open http://localhost:8000.
| File | What |
|---|---|
index.html, css/app.css |
The page and its styles |
js/app.js, js/stage.js, js/ui.js, js/kit.js |
The shared Glassbox 3D engine: chapters, 3D stage, controls, quiz, video director |
js/gas.js |
Gas physics (ideal gas, van der Waals with Maxwell's equal-area rule, vapour pressures of water, propane and butane, the standard atmosphere), chart boards, gauges and particle helpers shared by the chapters |
js/chapters/*.js |
One file per chapter: the 3D model, controls, text, key terms, quiz and video scenes |
glassbox.json |
Title, question, explainer beats, key terms, browser storage and credits shown on glassbox.how |
reel in each chapter |
The storyboard the Glassbox studio records into short videos |
glassbox/ |
The published video, slides, thumbnail and post copy |
fonts/, vendor/three/ |
Self-hosted Geist and Instrument Serif (SIL OFL 1.1) and three.js (MIT) |




