Imagine you measure the speed of the cars on the Bogotá–Girardot highway and find that the farther a car is from you, the faster it moves away, and that the relation is a perfect straight line. You would think something strange was going on with the road. That is exactly what Edwin Hubble found in 1929 with the galaxies, and the strange thing was not the road: it was space itself.
1. Hubble’s law
When we look at the light of a distant galaxy with a spectroscope, its lines appear shifted toward the red. That redshift tells us at what speed it is receding. In 1929, Hubble compared those velocities (almost all of them measured by Vesto Slipher) with the distances he himself had estimated and found that the farther away a galaxy is, the faster it recedes. Today we write it as the Hubble–Lemaître law:
- : recession velocity, in km/s.
- : distance, in megaparsecs (1 Mpc = one million parsecs ≈ 3.26 million light-years).
- : the Hubble constant, in km/s per Mpc. It is the slope of the line.
It is a direct proportionality: if the distance doubles, so does the velocity. The graph of against is a straight line through the origin.
Worked example 1. A galaxy is at Mpc. With km/s/Mpc:
about 350 times the speed of the Earth in its orbit (≈ 30 km/s). The other way around: if we measure km/s, then Mpc.
2. Measuring H₀ with a line: linear regression with data

In practice, measurements have errors and the points do not fall exactly on a line. Linear regression is the method for finding the line that best represents them. We will apply it twice: to Hubble’s original data and to modern data.
Hubble’s 24 objects (1929)
This is Table 1 of the 1929 paper (distances in Mpc, velocities in km/s, just as Hubble published them; the negative ones are galaxies that are approaching):
| Object | (Mpc) | (km/s) | Object | (Mpc) | (km/s) |
|---|---|---|---|---|---|
| Small Magellanic Cloud | 0.032 | +170 | NGC 3031 | 0.9 | −30 |
| Large Magellanic Cloud | 0.034 | +290 | NGC 3627 | 0.9 | +650 |
| NGC 6822 | 0.214 | −130 | NGC 4826 | 0.9 | +150 |
| NGC 598 | 0.263 | −70 | NGC 5236 | 0.9 | +500 |
| NGC 221 | 0.275 | −185 | NGC 1068 | 1.0 | +920 |
| NGC 224 (Andromeda) | 0.275 | −220 | NGC 5055 | 1.1 | +450 |
| NGC 5457 | 0.45 | +200 | NGC 7331 | 1.1 | +500 |
| NGC 4736 | 0.5 | +290 | NGC 4258 | 1.4 | +500 |
| NGC 5194 | 0.5 | +270 | NGC 4151 | 1.7 | +960 |
| NGC 4449 | 0.63 | +200 | NGC 4382 | 2.0 | +500 |
| NGC 4214 | 0.8 | +300 | NGC 4472 | 2.0 | +850 |
| NGC 4486 | 2.0 | +800 | |||
| NGC 4649 | 2.0 | +1090 |
Plot the 24 points on a plane with on the horizontal axis and on the vertical one. There is a lot of scatter, but the trend is clear: they go up.
The line through the origin
Since the law says that when , the most natural thing is to look for the best-fitting line through the origin, . The least-squares criterion is to choose so that the sum of the squared errors, , is as small as possible. The result (proved in Grade 11 with calculus, but one you can already use) is
where means “sum over all the galaxies” and , are the distance and the velocity of galaxy number . With Hubble’s table: and , so
The general line
If we do not force the line through the origin, we look for with two parameters: the slope and the
intercept . The least-squares formulas (the same ones used by the calculator or by the
SLOPE / INTERCEPT functions of a spreadsheet) are, with the number of data points:
With Hubble’s data (, , ) we get km/s/Mpc and km/s. The intercept is small compared with the velocities (hundreds of km/s), which supports the idea that the line “wants” to pass through the origin. Hubble, who also corrected the velocities for the motion of the Sun within the Milky Way, obtained km/s/Mpc and adopted the round value of 500 km/s/Mpc.
How good is the line? The correlation coefficient
The correlation coefficient measures how closely the data resemble a line: is a perfect rising line, no relation, a perfect falling line. The calculator gives it together with and . For Hubble’s data, : there is a clear relation, but with a lot of “noise”. That noise is the peculiar motions of the galaxies (a few hundred km/s), which are very noticeable when the galaxies are nearby and their expansion velocities are small.
Modern data: the Hubble Space Telescope Key Project
Seventy years later, the Hubble Space Telescope Key Project (Freedman et al., 2001) measured distances to galaxy clusters with the Tully–Fisher method, calibrated with Cepheid stars. Here are nine of its 21 clusters, with the velocity relative to the cosmic microwave background and the distance in Mpc:
| Cluster | (Mpc) | (km/s) | ||
|---|---|---|---|---|
| Ursa Major | 19.8 | 1088 | 21 542 | 392.0 |
| Fornax | 15.0 | 1380 | 20 700 | 225.0 |
| Eridanus | 20.7 | 1607 | 33 265 | 428.5 |
| Antlia | 45.1 | 3106 | 140 081 | 2034.0 |
| Pegasus | 53.3 | 3545 | 188 949 | 2840.9 |
| Hydra | 58.3 | 4061 | 236 756 | 3398.9 |
| Cancer | 74.3 | 4982 | 370 163 | 5520.5 |
| Coma | 85.6 | 7143 | 611 441 | 7327.4 |
| Abell 2634 | 114.9 | 8930 | 1 026 057 | 13 202.0 |
| Sums | 487.0 | 35 842 | 2 648 953 | 35 369.2 |
Worked example 2 (line through the origin).
Worked example 3 (general line). With :
Compare with 1929: the correlation went from 0.79 to 0.99, because the galaxies are a hundred times farther away and their expansion velocities (thousands of km/s) are no longer confused with the peculiar motions. The intercept km/s is only 3 % of the largest velocity; since physics requires , the fit through the origin () is the most sensible one.
See the 21 clusters of the Key Project (for the spreadsheet)
| Cluster | (Mpc) | (km/s) | Cluster | (Mpc) | (km/s) |
|---|---|---|---|---|---|
| Ursa Major | 19.8 | 1088 | Abell 262 | 66.7 | 4730 |
| Fornax | 15.0 | 1380 | NGC 507 | 57.3 | 4869 |
| Eridanus | 20.7 | 1607 | NGC 383 | 66.6 | 4924 |
| MDL 59 | 31.3 | 2304 | Cen 45 | 68.2 | 4820 |
| ESO 50 | 39.5 | 3149 | Cancer | 74.3 | 4982 |
| Antlia | 45.1 | 3106 | Abell 1367 | 89.2 | 6709 |
| NGC 3557 | 38.7 | 3294 | Abell 400 | 88.4 | 7016 |
| Cen 30 | 43.2 | 3272 | Coma | 85.6 | 7143 |
| Pegasus | 53.3 | 3545 | Abell 2634 | 114.9 | 8930 |
| Hydra | 58.3 | 4061 | |||
| Pavo 2 | 50.9 | 4398 | |||
| Abell 3574 | 62.2 | 4749 |
With all 21: line through the origin ; general line , , .
Why did the Key Project team publish 71 and not 75? Because our fit is “naive”: they corrected the velocities for local flows of matter, gave more weight to the best-measured clusters and applied a correction to the Cepheid distances. Their Tully–Fisher result was and, combining five methods, km/s/Mpc. The lesson is twofold: linear regression gives the right idea with few data, and the details of the analysis matter at the 5 % level.
3. How old is the universe?

If every galaxy had always receded at the same speed, they would all have been together a time ago: the Hubble time. Units must be converted: km and s (1 Gyr = one billion years). The result is
Worked example 4: the age problem. With Hubble’s value, : Gyr. But the Earth is Ga old (Dalrymple, 2001)! For decades this contradiction was an argument against the expansion. The solution came with the discovery that Hubble’s distances were about seven times too short (): his “Cepheids” were badly calibrated. With : Gyr, and the contradiction disappears.
The precise value, taking into account that the expansion has not proceeded at constant speed, is Gyr (Planck 2018). That it is so close to is, in part, a coincidence: matter slowed the expansion down at the beginning and dark energy is accelerating it now.
4. The Hubble tension

Today is measured in two very different ways, and they do not agree:
| Method | (km/s/Mpc) | (Gyr) |
|---|---|---|
| Cosmic microwave background + ΛCDM model (Planck 2018) | 14.5 | |
| Distance ladder: Cepheids + type Ia supernovae (SH0ES, Riess et al. 2022) | 13.4 |
The difference is km/s/Mpc, about five times the combined uncertainty: in statistics this is called a "" discrepancy, too large to be a coincidence. Either there is a subtle error in one of the two measurements, or the model of the universe is missing something. It is one of the most important open problems in current cosmology, and it is called the Hubble tension.
5. The balloon and the raisin bread

Two analogies help to picture the expansion:
- Raisin bread: as it bakes, the dough grows and every raisin moves away from all the others. From any raisin, the farther ones recede faster: that is Hubble’s law, and there is no “central” raisin.
- Balloon with dots: as it inflates, the dots painted on the surface move apart. The surface (2D) represents space; the dots, the galaxies.
Limits of the analogies: the bread has an edge and a center; the universe does not (as far as we know). The balloon has an “inside” that is not part of its surface, and that is confusing: the universe does not expand “into” anywhere. Besides, the raisins and the galaxies do not grow: gravity holds together galaxies, solar systems and you yourself. What grows is the distance between objects that are not bound to each other.
6. Matter and dark energy: Ω_m and Ω_Λ

The rate of the expansion depends on what the universe contains:
- measures how much matter there is (ordinary and dark). Its gravity slows down the expansion. If there were a lot ( large and nothing else), the braking could stop the expansion and the universe would contract again: a Big Crunch.
- measures the dark energy (cosmological constant). It acts as a repulsion that accelerates the expansion.
Both are measured as fractions of a reference density, the critical density. If , space is flat (Euclidean geometry on large scales). Planck 2018 gives and, with a flat universe, : dominated today by dark energy and set to expand forever.
Simulator: different universes
The upper plot shows the scale factor : how much the distance between galaxies has grown relative to today ( today; means twice the separation).
- Keep the Planck 2018 model and move from 67.4 to 73.0: how much does the age of the universe change? Compare it with the difference between 14.5 and 13.4 Gyr of the Hubble time.
- Click on the plane and choose , (Einstein–de Sitter). Is the age larger or smaller than ? Why?
- Find a universe that recollapses (Big Crunch) and one that expands forever. What do the ones that recollapse have in common?
Activity: Hubble’s law on a rubber band
Materials: a wide rubber band (or a 30 cm piece of bicycle inner tube), a marker, a ruler and a stopwatch.
- Without stretching it, mark dots every 2 cm along the band: they are the galaxies. Mark one of them as “us” (U).
- Measure and record the distance from each dot to U.
- Stretch the band uniformly until it is twice as long (take about 2 s to do it) and measure the distances from each dot to U again.
- The “velocity” of each galaxy is , with s. Make a table with and .
- Plot against and fit the line through the origin: . Check that (the band doubled its size in 2 s).
- Repeat choosing another dot as “us”. Does the slope change?
Final question: why does every galaxy see the others recede with the same law, even though none of them is the center?
Exercises
Basic level
- With km/s/Mpc, how fast is a galaxy located 40 Mpc away receding?
Show solution
km/s.
- A galaxy is receding at 13 500 km/s. How far away is it if km/s/Mpc?
Show solution
Mpc.
- Compute in Gyr for km/s/Mpc. Would the universe be younger or older than with ?
Show solution
Gyr; younger, because a faster expansion takes less time to reach the current size (with 67.4 we get 14.5 Gyr).
Intermediate level
- Repeat the fit through the origin of the nine clusters without Abell 2634, the most distant one. Does change much?
Show solution
and , so km/s/Mpc. It drops by 2 %: the most distant point “weighs” a lot in the fit because its is the largest.
- Use the formula for the line through the origin with the four objects of Hubble at 2.0 Mpc (the Virgo Cluster). What do you get? And the corresponding Hubble time?
Show solution
and : km/s/Mpc and Gyr, less than the age of the Earth. Today we know that Virgo is about seven times farther away than Hubble believed.
- In the simulator, choose Einstein–de Sitter (, ) with . Compare its age with .
Show solution
The age is Gyr, because matter slowed the expansion down: in the past it was faster, so it took less time to reach the current size.
Challenge level
- Why are the Milky Way and the Andromeda galaxy (NGC 224, km/s in Hubble’s table) not moving apart, even though the universe is expanding?
Show solution
They are gravitationally bound and are in fact approaching each other; Hubble’s law describes the average motion of distant galaxies, not bound to each other. At 0.8 Mpc the expansion would give only about 55 km/s (with ), much less than the speed of their mutual fall.
- In the general fit of the nine clusters we got km/s with . A classmate says that, since is not zero, Hubble’s law is wrong. What would you tell her?
Show solution
That is a parameter fitted with data that have errors of hundreds of km/s per cluster; km/s is compatible with zero within that error and is barely 3 % of the largest velocity. Besides, physics requires at (we do not recede from ourselves), so the right thing is to impose and use the line through the origin. An of 0.988 says that the linear relation is excellent.
- Planck gives and SH0ES km/s/Mpc. The combined uncertainty of a difference is . How many times does that uncertainty fit into the difference between the two values?
Show solution
Difference: . Combined uncertainty: . Ratio: , that is, about 5 standard deviations (""). That is why it is called a tension.
✦ Mini-quiz
Remember
- Hubble–Lemaître law: . Distant galaxies recede faster, in proportion to their distance.
- Regression through the origin: . General line: , with measuring the quality of the fit.
- Hubble (1929): km/s/Mpc with distances that were too short. Key Project (2001): .
- Hubble time: Gyr; with , about 14 Gyr. Precise age: Gyr.
- Hubble tension: (Planck) versus (SH0ES), a difference.
- slows the expansion down; accelerates it. The universe is flat and will expand forever.
🍎 Teacher guide
- Time
- 2 sessions of 55 min + rubber-band activity (30 min)
- Colombian national standard (MEN)
- Mathematics, Grades 8 to 9: “I recognize trends that appear in sets of related variables”; “I identify and use different ways of defining and measuring the slope of a curve that represents situations of variation in the Cartesian plane”; “I select and use some statistical methods appropriate to the type of problem, of information and to the level of the scale in which it is represented (nominal, ordinal, interval or ratio)”; “I use scientific notation to represent measurements of quantities of different magnitudes”. Natural Sciences, Grades 8 to 9: “I use mathematics as a tool to model, analyze and present data”; “I interpret results taking into account the order of magnitude of the experimental error”; “I communicate the inquiry process and its results using graphs, tables, arithmetic and algebraic equations”; “I recognize that scientific models change over time and that several may be valid at the same time”.
- Evidence of learning
- Plots the velocity and distance data, computes H₀ with the line through the origin (and with the general line in a spreadsheet or calculator), interprets r and b, converts 1/H₀ to years and explains with figures what the Hubble tension consists of.
Materials
- Graph paper or a spreadsheet (LibreOffice, Excel or Google Sheets)
- Scientific calculator with linear regression
- Wide rubber band or piece of bicycle inner tube, marker, ruler and stopwatch
- Computer or tablet with the expanding-universe simulator
Suggested sequence
Session 1. Hubble 1929 (55 min). Opening (10 min): the hook question and redshift in one sentence. Development (35 min): students plot Hubble’s 24 points on graph paper, estimate the slope “by eye” and then compute the line through the origin with the formula (the sums are shared out among groups). Compare with 465 ± 50 and with 500. Closing (10 min): worked example 4, the age problem, and exercises 1 and 2.
Session 2. Modern data and tension (55 min). Opening (10 min): what went wrong in 1929? Development (30 min): table of nine clusters, line through the origin by hand and general line with a calculator or spreadsheet (the 21 clusters as an extension); interpreting and ; Hubble time and Hubble tension. Closing (15 min): simulator (challenges 1 and 2), mini-quiz.
Rubber-band activity (30 min, can go at the start of session 1 as an experimental hook). Deliverable: table, plot and slope from two different “galaxies”.
Grade project (estimating the age of the universe). With the full table of 21 clusters in a spreadsheet:
SLOPE, INTERCEPT, CORREL and . Compare with 13.79 Gyr and discuss the differences.
Common mistakes
- Believing that the Milky Way is the center of the expansion. The rubber-band activity, repeated from two different dots, shows that everyone sees the same law.
- Thinking that galaxies "fly" through space. Insist that it is the distance between unbound objects that grows; galaxies and solar systems do not stretch.
- Reading a nonzero intercept as a failure of the law. Discuss the measurement error and the physical justification for imposing b = 0 (exercise 8).
- Confusing 1/H₀ with the exact age. Show in the simulator that the age depends on Ω_m and Ω_Λ (Einstein–de Sitter gives 2/3 of 1/H₀).
- Treating the Hubble tension as "scientists do not know". Rephrase: two very precise measurements do not agree, and that is valuable information.