Brownian Motion & Random Walks
A pollen grain kicked by molecules, or a cloud of random walkers spreading like a drop of ink.
- Pollen grain
- Molecule
- Path of the grain
A heavy grain jiggles as fast molecules bump into it from every side, more from one side than another at any moment. Drag the grain to move it, or switch to random walkers and tap to release a new cloud there; both are events in time that Restart and share links leave out.
How is Brownian Motion & Random Walks working for you?
About Brownian Motion & Random Walks
- First described
- Robert Brown, 1827 (published 1828)
- Explained
- Albert Einstein, 1905
- Spread
- Typical distance grows like √time
- Coming home
- Certain on a 2D grid, about 34% in 3D (Pólya, 1921)
In the summer of 1827 the botanist Robert Brown watched tiny particles released from pollen grains move without stopping in a drop of water under his microscope. He saw the same restless motion in dust from rocks, so it wasn't life. The explanation came from Albert Einstein in 1905: the particle is being kicked by the water's molecules, which are far too small to see, and at any instant a few more of them hit one side than the other. This simulation shows exactly that. A heavy grain sits among hundreds of fast molecules that bounce elastically off it and off each other, and the grain wanders off on a jagged path. Hide the molecules to see only what Brown saw, heat the water, or swap in a bigger, slower grain.
Einstein predicted that the mean squared distance such a particle travels grows in proportion to time, not to time squared, and Jean Perrin's careful measurements of this law, tracing grains at regular intervals, helped prove that atoms are real and won him the 1926 Nobel Prize. Perrin's tracing draws the grain's path the same way. The Random walkers mode strips the idea to its core, the random walk that Karl Pearson named in 1905: thousands of walkers each take random steps, the cloud spreads like a drop of ink, and its sideways spread matches a Gaussian bell curve whose width grows like the square root of time.
The charts compare the measured mean squared displacement with Einstein's straight line and the walkers' positions with the Gaussian, and the dashed circle shows where the predicted spread should be. On a grid, a single walker keeps finding its way back to the start, as George Pólya proved in 1921 for two dimensions, though in three dimensions it returns only about a third of the time. Drag the grain, tap to release a new cloud, and export the data as CSV or record a video or GIF.
How to use Brownian Motion & Random Walks
- Watch the pollen grain. Press Play: molecules fly around and bounce off the large amber grain, which drifts on a jagged path traced in red.
- Change the water. Set the number of Molecules and the Grain size, the grain's radius, and raise the Temperature to make the molecules faster. Turn off Show molecules to see only the grain.
- Compare runs. At 60 s of simulated time each pollen run adds a row to the Runs table: the grain's diffusion coefficient D, from its mean squared displacement, which grows as 4 D × time lag in two dimensions, with the settings that differ between rows. Reset clears the table.
- Trace it like Perrin. Turn on Perrin's tracing to mark the grain's position at regular intervals and join the marks with straight lines, as Jean Perrin drew them.
- Drag the grain. Press and drag the grain to move it somewhere else; the molecules keep kicking it from its new spot.
- Release random walkers. Switch Watch to Random walkers. Thousands of walkers spread from the center; tap anywhere to release a new cloud from there. Use Grid steps for a walk on a grid, and Trace one walker to follow a single path.
- Read the charts. Sideways spread compares the walkers with a Gaussian curve, and Mean squared displacement compares them with Einstein's straight line. For the grain, the chart shows its displacement against the time lag along its own path.
- Export. Save a PNG, a video or GIF, or the grain's displacement, the walkers' positions or the Runs table as CSV files. Record 30 s from the start plays the same setup again from the beginning and records its first 30 seconds.
Frequently asked questions
What is Brownian motion?
The random, jittering movement of a small particle suspended in a liquid or gas, first described by Robert Brown in 1827. It happens because the particle is constantly hit by the surrounding molecules, and the hits never quite balance: at any moment a few more come from one side, so the particle is pushed a little that way, then another way.
Why does the grain move so much less than the molecules?
It is much heavier, so each kick changes its velocity only a little. In equilibrium every particle has the same average energy of motion, so speed goes down with the square root of mass: a grain 100 times heavier than a molecule moves about 10 times slower. Try a bigger grain to see it move even less.
What did Einstein predict?
That the mean squared displacement of a Brownian particle grows in proportion to time, ⟨x²⟩ = 2Dt along each direction, where the diffusion coefficient D depends on temperature, the liquid's viscosity and the particle's size. Doubling the time doubles the mean squared distance but only multiplies the typical distance by √2. Jean Perrin confirmed the prediction and used it to measure Avogadro's number.
What is a random walk?
A path made of random steps, each independent of the ones before. Karl Pearson named it in a 1905 letter to Nature. After t steps of length s, the walker's mean squared distance from the start is s² × t, and with many walkers the cloud's sideways positions follow a bell-shaped Gaussian curve, the same mathematics as diffusion.
Does a random walker always come back to where it started?
On a grid in one or two dimensions, yes: George Pólya proved in 1921 that it returns with certainty, given enough time. In three dimensions there is so much more room that it returns only about 34% of the time. Try the Drunkard's walk preset and watch the counter of returns.
Is this how ink spreads in water?
Yes. Each ink particle performs its own Brownian motion, and together they spread out as a cloud whose width grows like the square root of time. That is why diffusion is fast over a millimeter and very slow over a meter. The Ink drop preset shows the cloud widening while the chart tracks its spread.
References
- Brown, R. (1828). A brief account of microscopical observations made in the months of June, July and August, 1827, on the particles contained in the pollen of plants; and on the general existence of active molecules in organic and inorganic bodies. The Philosophical Magazine 4(21), 161–173.
- Einstein, A. (1905). Über die von der molekularkinetischen Theorie der Wärme geforderte Bewegung von in ruhenden Flüssigkeiten suspendierten Teilchen. Annalen der Physik 322(8), 549–560.
- Pearson, K. (1905). The problem of the random walk. Nature 72, 294.
- Perrin, J. (1910). Brownian Movement and Molecular Reality (F. Soddy, trans.). London: Taylor and Francis.
- Pólya, G. (1921). Über eine Aufgabe der Wahrscheinlichkeitsrechnung betreffend die Irrfahrt im Straßennetz. Mathematische Annalen 84, 149–160.





