Zeta's zeros repel each other, the way quantum energy levels do.

The zeros of the Riemann zeta function hide the pattern of the primes. In 1972 Hugh Montgomery found how they space out. Over tea, Freeman Dyson said he had seen that exact pattern before, in the random-matrix models physicists use for the energy levels of heavy nuclei. This page uses the real zeros, so you can check.

Same average gap in all three rows. Brackets mark neighbors closer than a quarter of that gap. Real zeros and matrix eigenvalues almost never get that close. Random points do it constantly.

Count the gaps yourself

Line up the zeros, measure every gap between neighbors in units of the average gap, and count. Slide down to 100 zeros and the picture is a mess. Slide up and the real zeros settle onto the random-matrix curve, not the random-points one.

1001,000100,000

Where on the critical line
Compare with

Loading the zeros…

Gap between neighboring zeros

Bars count how often neighbors sit a given distance apart. The ink curve is the GUE prediction, the amber one is what random points do.

Move over the chart to read a bin.

Pair correlation

How likely is another zero at distance u from a given one? Montgomery's curve, 1 − (sin πu / πu)², drops to zero at u = 0: two zeros never sit on top of each other.

Move over the chart to read a bin.

How the samples compare, using the current settings
SampleGaps under half the averageDistance from the GUE curve (lower is closer)

The tea-time story

Riemann's zeta function has infinitely many zeros, and the primes are encoded in where they sit. Montgomery was studying how those zeros space out along their line.

In 1972 he was visiting the Institute for Advanced Study in Princeton, and he had worked out how pairs of zeros ought to be spread, assuming the Riemann Hypothesis. Over afternoon tea he described the formula to Dyson. Dyson, who had spent years on random matrices, recognized it right away. It is the pair correlation of random-matrix eigenvalues, the same repulsion physicists see between quantum energy levels.

Nobody had a reason for the zeros of a number-theory function to behave like the levels of a nucleus. Nobody has one now.

  1. 1859Riemann ties the zeros to the primes and guesses they all lie on one line. That guess is the Riemann Hypothesis.
  2. 1972Montgomery's pair correlation, and the tea with Dyson.
  3. 1980sAndrew Odlyzko computes huge numbers of zeros and finds the match holds, closer and closer the further out he goes.
  4. 1996Rudnick and Sarnak extend Montgomery's result to groups of more than two zeros.

This is evidence, not a proof.

Matching a curve for a few hundred thousand zeros does not prove the Riemann Hypothesis, and it does not explain why the match happens.

Montgomery's own theorem assumes the hypothesis and only covers part of the pair correlation. The full match is a conjecture, backed by numerical work like Odlyzko's. At low heights the real zeros are a little more rigid than GUE predicts, and the gap closes as you climb. Try the 1021 setting.

Data and method

Real zeros
Andrew Odlyzko's published tables. The first 100,000 zeros, accurate to 3×10-9, and three blocks of 10,000 zeros each starting just after number 1012, 1021 and 1022. That is 130,000 real zeros in total. Tables of zeros of the Riemann zeta function. I spot-checked 35 of them against mpmath's zetazero. They agree to better than 10-9.
Unfolding
Zeros get denser as you go up. To compare them fairly, every gap is divided by the local average gap, log(t / 2π) / 2π. For the first table the page uses the smooth zero count θ(t)/π + 1. Afterwards the average gap is exactly 1.
Random matrix
A fresh GUE matrix is sampled in your browser every time, using the tridiagonal model of Dumitriu and Edelman, which has exactly the eigenvalue law of a full complex Hermitian matrix. Eigenvalues come from an implicit QL sweep. The middle 60% are unfolded with the semicircle law. The sample is capped at a 10,000 × 10,000 matrix, about 6,000 gaps.
Random points
Uniform random points on a line, sorted. Their gaps follow e-s.
Theory curves
GUE gap curve is the Wigner surmise, (32/π²) s² e-4s²/π, which is within about 1% of the exact answer. Pair correlation is Montgomery's 1 − (sin πu / πu)².
Sources
H. L. Montgomery, The pair correlation of zeros of the zeta function (1973).
A. M. Odlyzko, On the distribution of spacings between zeros of the zeta function (Mathematics of Computation, 1987).
Z. Rudnick and P. Sarnak, Zeros of principal L-functions and random matrix theory (Duke Math. J., 1996).
Code and packed data on GitHub