On this page
A cosmic-ray proton moves at very nearly the speed of light. Point it straight across the galaxy and it would cross in tens of thousands of years. Yet measurements say cosmic rays stay inside the Milky Way for millions of years, and the ones that reach Earth arrive evenly from every direction of the sky. Both facts come from the same cause: the galaxy's magnetic fields keep turning the particles, so their path is a random walk, not a straight line. A one-line random-walk formula from Class 11 kinetic theory turns that into a number.
What are cosmic rays, and why can't we see where they come from?
Cosmic rays are charged particles, mostly protons, with a smaller share of helium nuclei and heavier nuclei, travelling through space at close to the speed of light. They were found by Victor Hess on balloon flights in 1912, a story told in our post on Victor Hess and the balloon flights that found cosmic rays.
Light from a star travels in a straight line, so you can point a telescope back along it. A charged particle cannot be traced that way. Interstellar space is threaded with weak, tangled magnetic fields, and the magnetic force qv × B on a moving charge is always at right angles to its velocity. The force never speeds the particle up or slows it down. It only bends it. After many bends the direction a proton arrives from tells you almost nothing about where it started.
How much does the galaxy's magnetic field bend a proton?
The radius of a charged particle's circle in a field B is r = p/(qB), where p is its momentum. For a particle moving near the speed of light, p ≈ E/c. Take an illustrative galactic field of 3 × 10⁻¹⁰ T (a round value of the right order, a few microgauss) and a 10 GeV proton:
p ≈ (10 × 10⁹ × 1.6 × 10⁻¹⁹ J)/(3.0 × 10⁸ m/s) ≈ 5.3 × 10⁻¹⁸ kg m/s
r = p/(qB) ≈ 5.3 × 10⁻¹⁸/(1.6 × 10⁻¹⁹ × 3 × 10⁻¹⁰) ≈ 1.1 × 10¹¹ m
That is under one Earth–Sun distance, in a galaxy about 100,000 light years across. So the proton does not fly straight; it spirals tightly around a field line, just as in our post on the helical path of a charge in a magnetic field. The field lines themselves twist and kink, so every few hundred light years the spiral is sent off in a new direction. Each of those stretches is one step of a random walk.
How does a random walk slow the trip down?
If each step has length λ and points in a random direction, the steps partly cancel. After N steps the root-mean-square distance from the start is
R = √N λ
This is the rule behind diffusion, worked through for ink and gas molecules in our random walk simulation post. Turn it round to find how many steps it takes to get a distance R away: N = (R/λ)². The total path length is Nλ = R²/λ, and at speed c the time is
t = R²/(λc)
Compare that with the straight-line time R/c. The ratio is R/λ. When the steps are much shorter than the distance to cover, the wandering particle takes R/λ times longer.
Worked example: how long does a cosmic ray take to cross the galaxy?
Problem idea: British Physics Olympiad, Paper 1 for the 2008 competition (sat 2007), question 6 (CC BY 4.0). The numbers below are BPhO's round model values: a galaxy size R = 5 × 10²⁰ m and a step length (mean free path) λ = 3 × 10¹⁸ m. The particle moves at c = 3.0 × 10⁸ m/s.
In light years: R ≈ 52,800 and λ ≈ 320.
Number of steps: N = (R/λ)² = (5 × 10²⁰ / 3 × 10¹⁸)² = (167)² ≈ 2.8 × 10⁴.
Total path: Nλ = 2.8 × 10⁴ × 3 × 10¹⁸ m ≈ 8.3 × 10²² m.
Time: t = Nλ/c = 8.3 × 10²² / 3.0 × 10⁸ ≈ 2.8 × 10¹⁴ s.
In years: 2.8 × 10¹⁴ s ÷ 3.16 × 10⁷ s per year ≈ 8.8 million years.
Straight line for comparison: R/c = 5 × 10²⁰ / 3.0 × 10⁸ ≈ 1.7 × 10¹² s ≈ 53,000 years.
The ratio is 2.8 × 10¹⁴ / 1.7 × 10¹² ≈ 170, which is just R/λ. Check the units: m²/(m × m/s) = s, as it should be.
The answer depends strongly on the step length, because t goes as 1/λ:
λ = 1 × 10¹⁸ m gives about 26 million years.
λ = 3 × 10¹⁸ m gives about 8.8 million years.
λ = 1 × 10¹⁹ m gives about 2.6 million years.
Do measured cosmic-ray ages agree with this?
Roughly, yes. When cosmic rays hit interstellar gas they knock out fragments, including radioactive beryllium-10, whose half-life is about 1.39 million years (Korschinek and colleagues, 2010). If cosmic rays escaped in a few thousand years, almost none of their Be-10 would have decayed. If they stayed a billion years, almost all of it would have. The fraction left works as a clock. The CRIS instrument on NASA's ACE spacecraft measured it and found a confinement time of 15.0 ± 1.6 million years (Yanasak and colleagues, The Astrophysical Journal, 2001). The same isotope, made in Earth's air, is used to date ocean mud, as in our post on Peters and beryllium-10 dating.
That is the same order as the BPhO estimate. The model is simple: real cosmic rays fill a thick halo around the disc, not a flat disc, and they slide along field lines rather than taking straight steps with sharp turns. The random walk is a model that gets the size right, not the actual path.
Can any cosmic rays be traced back to their source?
The radius r = p/(qB) grows with energy. At 10¹⁸ eV it is about 10¹⁹ m, already over a thousand light years, and at 10²⁰ eV it is larger than the galaxy itself. The most energetic particles are bent so little that their arrival directions keep some memory of where they came from. The Pierre Auger Observatory found that cosmic rays above 8 × 10¹⁸ eV arrive slightly more often from one broad part of the sky, pointing to sources outside our galaxy (Pierre Auger Collaboration, Science, 2017). For the ordinary GeV protons that make up most cosmic rays, the sky looks the same in every direction.
To watch √N growth happen step by step, the Simulation Lab has interactive simulations for ideas that are easier to see than to read. If mean free path or the magnetic force on a moving charge feels shaky, the Concept Library gives each concept its own lesson.
Quick checklist
The magnetic force bends a charged particle but does not change its speed.
Random steps add in squares: R = √N λ, so N = (R/λ)².
Time to wander a distance R at speed c: t = R²/(λc).
The delay compared with a straight path is R/λ, about 170 in BPhO's model.
BPhO's model gives about 9 million years; the Be-10 clock gives about 15 million years.
Only the highest-energy cosmic rays keep a hint of their direction.



