What do the zeros of the zeta function have to do with prime numbers?
- Series
- Explain
- Summary
- A beginner-first, full-length article explaining how the non-trivial zeros of the Riemann zeta function connect to prime-number distribution through Euler’s product, the logarithmic derivative, Chebyshev’s psi function, contour shifting and the explicit formula.
- Math Level
- GENERAL
- Index Excerpt
- The primes enter zeta through Euler’s product; after the logarithmic derivative and complex inversion, zeta’s zeros reappear as oscillatory correction terms governing the fine structure of prime counting.
There is a point in the story of the Riemann Hypothesis where an entirely reasonable reader might suspect that mathematics has performed a sleight of hand.
We begin with prime numbers:
These are ordinary whole numbers. You can write them on a piece of paper. You can count them. You can see the uneven gaps between them.
Then, somehow, the story takes us into the complex plane.
We meet the Riemann zeta function. We allow its input to have a real part and an imaginary part. We extend the function into places where its original infinite series no longer converges. We search for points where the function becomes exactly zero.
And then comes the astonishing claim:
the locations of those zeros tell us how irregularly the primes are distributed.
Why?
What could a point somewhere in the complex plane possibly have to do with the fact that 101 and 103 are prime, while 102 is not?
There is a precise mathematical answer.
And although the full proof uses complex analysis, the shape of the answer can be understood without already knowing complex analysis.
The journey is a loop:
primes → zeta → prime-power information → zeros → ripples → prime counting.
We are going to follow that loop slowly.
Not merely to see the formulas, but to develop some feeling for what the formulas are doing.
Begin with a staircase
Suppose we simply count the primes.
Mathematicians use
for the number of primes less than or equal to .
( is called the prime-counting function. The symbol here is unrelated to the familiar number 3.14159… from circles.)
For example,
because the primes up to 10 are
Now imagine walking along the number line while keeping a running total.
At 2, the count jumps to 1\.
At 3, it jumps to 2\.
Nothing happens at 4\.
At 5, it jumps again.
Nothing happens at 6\.
At 7, another jump.
If we draw the result, we get a staircase.
Each prime creates one new step.
Between primes, the staircase stays flat.
This is the actual arithmetic landscape.
It is jagged.
It is uneven.
Its steps appear at irregular intervals.
And yet, if we stand much farther back, something surprising happens.
The staircase begins to follow a smooth curve.
A smooth ramp through the staircase
The prime number theorem tells us that
(As becomes very large, describes the overall scale of the number of primes up to increasingly well.)
A useful mental picture is to imagine the prime-counting staircase alongside a smooth ramp.
The staircase is the real prime count.
The ramp is the broad statistical trend.
The two are not identical.
They could not be: one is made of jumps, while the other is smooth.
But as we move farther and farther along the number line, the ramp captures the large-scale behaviour remarkably well.
The following figure is deliberately schematic rather than numerical. Its purpose is simply to give us a picture we can carry through the rest of the article.
Schematic graph of a rising step function for the actual prime count alongside a smoother dotted trend. The staircase rises only when a prime is reached; the smooth line represents average large-scale behaviour. The drawing is conceptual, not plotted numerical data.
That already tells us something profound.
The primes are irregular, but they are not lawless.
There is order in the way they thin out.
The next question is therefore not simply:
How many primes are there?
It is:
How far can the staircase wander away from the smooth ramp?
That is the question which begins to lead us towards the Riemann Hypothesis.
(The prime number theorem describes the main trend. RH is connected with the much finer question of how large the remaining fluctuations around that trend can become.)
So keep that first picture in mind.
A jagged arithmetic staircase.
A smooth large-scale trend.
And a gap between them whose behaviour we would like to understand.
Why mathematicians change the counting system
At this point, it would be natural to continue working directly with .
Instead, mathematicians often introduce something that at first looks more complicated.
They count not only primes, but also powers of primes:
because
Each prime power is also given a weight.
The tool that does this is called the von Mangoldt function:
So
but
because 6 is not a power of a single prime.
(The von Mangoldt function acts like a marker pen. It highlights primes and prime powers, ignores ordinary composite numbers, and writes beside every power of the prime .)
Now add all those markings up to :
This is the Chebyshev psi function.
If this feels like an unnecessary detour, keep only one idea in mind for now:
is the most natural way to count primes, while is a slightly redesigned prime-counting tool that fits the zeta function much more neatly.
We have not changed the subject. We have changed the measuring instrument.
(On a first read, you do not need to worry about why the precise weight is . The next two sections show that this weight appears automatically when Euler's product is opened up and differentiated.)
If you are wondering why anyone would replace the wonderfully simple question “how many primes are there?” with this more elaborate construction, that is exactly the right question.
The answer is that fits the zeta function almost perfectly.
Prime powers are not being introduced as a mathematical trick.
They are already hiding inside zeta.
We are about to watch them emerge.
The zeta function as a machine built from primes
From the previous article, we know Euler's product:
There is one factor for every prime.
This means that although the zeta function can be written as a sum over all positive integers, it can also be assembled entirely from primes.
Imagine a complicated machine.
On its outside we see only one finished object:
But if we open the casing, we discover that the internal mechanism consists of one component for 2, one for 3, one for 5, one for 7, and so on through every prime.
Euler's product is the blueprint.
Our problem is that all those components are currently multiplied together.
They are tightly interlocked.
If we want to inspect what each prime is contributing, we would rather lay the pieces out separately.
And mathematics has exactly the tool we need.
A logarithm takes multiplication apart
One of the defining properties of logarithms is
A multiplication becomes an addition.
So you might think of a logarithm as a device that takes an assembled product and lays its components side by side.
If logarithms are unfamiliar, that single property is all we need here.
Apply it to Euler's product:
The vast multiplication over all primes has become a sum.
(The logarithm does not destroy the prime information. It changes the format so that the contribution from each prime can be examined separately.)
Now something interesting happens.
We use the series
for .
If
then one prime contributes
Look at the exponents.
The prime has brought its whole family with it:
For , we get
For ,
The prime powers are spilling out of Euler's product.
They were there all along.
(This is why counting prime powers is natural in this subject. Repeated powers of each prime are already built into the product structure of zeta.)
So our seemingly odd decision to work with has begun to make sense.
But the weights are not quite right yet.
That is where differentiation enters.
Differentiation changes the labels
If calculus is unfamiliar, this section can be read as one exact transformation rather than as a calculus lesson.
Differentiation is an operation that records how an expression changes when its input changes. Here we need only what it does to one particular term.
At the moment, a prime power appears with a factor
The von Mangoldt function wants the weight
Differentiate with respect to .
The term
becomes
The that appears during differentiation cancels the we started with.
What remains is exactly the weight we wanted:
So after differentiating and changing the sign,
And because each is simply an integer at which is non-zero, we can write
(The right side is now a complete weighted record of primes and prime powers. The left side is built entirely from the zeta function.)
This equation is the hinge of the article.
It is worth stopping.
On the right, we have arithmetic.
Primes.
Prime powers.
Whole numbers.
On the left, we have complex analysis:
They are the same mathematical object.
We have found a translator.
Why this object notices zeros
There is something remarkable about
Its coefficients tell us about prime powers.
But it also reacts very strongly to the zeros of zeta.
To see why, forget zeta for a moment and take a very simple function:
This function has a zero at
Now form its logarithmic derivative:
Because
we get
The quiet zero of the original function has turned into a sharp pole.
(A pole is a point where the function blows up. So the logarithmic derivative turns the location of a zero into something analytically impossible to miss.)
This makes the logarithmic derivative a little like a fault detector.
A function may pass through ordinary values without attracting attention.
But where the original function drops exactly to zero, the logarithmic derivative produces a dramatic signal.
There is an important limit to the image: nothing is physically detecting anything, and no electrical alarm is going off.
What is exact is the mathematics:
zeros of a function become poles of its logarithmic derivative.
So now look again at
One face of this object contains prime-power information.
The other face lights up at the zeros of zeta.
It is the same machine.
The diagram below can now be read without taking either side on trust.
A bridge diagram showing the logarithmic derivative of zeta in the centre. On the arithmetic side its coefficients record prime powers through the von Mangoldt function; on the analytic side its poles occur at zeros of zeta and at zeta's pole.
That is the first place where the mysterious connection between primes and zeros becomes something we can almost hold in our hands.
We have encoded the primes. Now we need to decode them.
The series
contains the individual prime-power weights.
But we want the accumulated total
Imagine that every integer has been given a tiny label containing its value of .
The infinite series has packed all those labels into a complex analytic signal.
Now we want to ask:
Give me all the labels belonging to integers up to , and add them.
Complex analysis has a decoding operation that can do exactly this.
Before looking at the formula, it is worth knowing what you need from it on a first read: not how to calculate the integral, but simply that there is an exact mathematical operation which turns the encoded series back into a running arithmetic total.
One form is
with the usual technical convention when itself is a jump point.
At first sight this is probably the least friendly equation in the article.
That is fine.
You do not need to be able to calculate it in order to understand its role.
Think of it as a mathematical scanner.
The encoded signal contains contributions from every integer.
The extra factor involving makes the integral separate contributions lying up to the chosen cutoff from those lying beyond it.
After the scan is performed, the result is the cumulative arithmetic total .
(This kind of operation is called Perron inversion. On a first read, the important idea is simply that information encoded as an infinite complex series can be recovered as a running sum over integers.)
We have therefore built a route from primes into complex analysis and a route back out again.
But something very interesting happens on the return journey.
Picture a vertical line moving across a landscape
The integral begins along a vertical line in the complex plane, safely to the right of
That is the region where our original prime-power series behaves nicely.
Now imagine sliding that vertical line towards the left.
This is not merely a decorative picture: in complex analysis, one can often replace one contour of integration with another.
The schematic below shows the basic geometry. Only selected special points are drawn; their positions are illustrative rather than numerical data.
Schematic complex-plane diagram with an original vertical integration contour to the right of 1, a shifted contour to the left, non-trivial zeros inside the critical strip, the critical line at one-half, and the pole at s=1. Zero positions are illustrative, not plotted data.
There is a catch to moving the contour.
The complex plane is not empty.
There are special points in the way.
There is the pole of zeta at
There are the non-trivial zeros
If the contour is moved farther left, the trivial zeros
also enter the accounting.
And because our integral contains , the point matters as well.
As the integration path is moved, complex analysis keeps an exact account of the poles that are crossed.
Each pole contributes a quantity called a residue.
(A residue is a precisely defined contribution associated with the behaviour near a pole. You do not need to know how to calculate one here; the key point is that the residue theorem gives an exact bookkeeping rule for what changes when a contour crosses poles.)
Another picture may help.
Imagine drawing a curtain sideways past a row of small hooks.
Most of the space offers no resistance.
But whenever the moving curtain passes a hook, something happens at that exact location and has to be accounted for.
That is only a picture — poles are not hooks, and contours do not physically drag across anything — but it captures the bookkeeping idea.
The contour moves.
It crosses a special point.
That point leaves behind an exact mathematical contribution.
Now recall what our logarithmic derivative did.
The zeros of zeta became poles.
So as we move the contour, the zeros cannot remain invisible.
Each one contributes.
This is how the zeros enter prime counting.
The moment the two worlds meet
After the contour calculation is carried through, the result is an explicit formula.
Because jumps at prime powers, it is convenient to use a symmetrised value at those exact jumps.
One standard form is
(The first term comes from the pole of zeta at . The large sum comes from the non-trivial zeros. The remaining terms come from other known parts of zeta's analytic structure, including the trivial zeros.)
It is worth forgetting the algebra for a moment and simply looking at what the equation is saying.
On one side:
a weighted count of primes and prime powers.
On the other:
a smooth term, the zeta zeros, and a few precisely known corrections.
These are equal.
This is the point at which a statement that sounded almost mystical becomes a theorem.
The zeros are not vaguely “related” to prime numbers.
They appear explicitly in a formula for prime-counting behaviour.
(The sum over zeros has a standard symmetric limiting interpretation; it should not be treated as an ordinary absolutely convergent sum whose terms may be shuffled arbitrarily.)
And now we can ask the most interesting question:
What does one zero contribute?
One zero creates a ripple
Write one non-trivial zero as
Its contribution contains
Now unpack that:
This may look technical, but it separates beautifully.
There are two pieces.
One is
The other is
The first controls scale.
The second oscillates.
We already know why from Euler's formula:
So
is built from sine and cosine.
(Every non-trivial zero therefore contributes something genuinely oscillatory. Calling these contributions “ripples” is not merely metaphor: the oscillation is literally present in the exponential factor.)
Now return to our first picture.
We had a smooth ramp describing the broad density of primes.
The actual arithmetic count wandered around its broad trend.
The explicit formula tells us that the correction can be decomposed into contributions associated with the zeros.
Imagine laying a ripple across the smooth trend.
Then another.
Then another.
Some reinforce each other.
Some partially cancel.
Some vary slowly.
Others vary more rapidly.
Taken together, they build an increasingly intricate correction to the smooth background.
That is the next major picture to hold onto:
the zeros contribute overlapping ripples to the smooth prime-counting trend.
Why the ripples are real even though the zeros are complex
There is an obvious objection.
A zero such as
is complex.
But is an ordinary real quantity.
How can complex ripples produce a real answer?
Because the zeros occur in conjugate pairs.
If
is a zero, then so is
Their contributions pair together.
The imaginary parts cancel, leaving a real oscillation.
Formally,
And that real contribution can be written as
(You do not need to memorise this formula. Its job here is to show that a conjugate pair of complex zeros combines into one ordinary real oscillation.)
Now the two coordinates of the zero begin to have intuitive meanings.
The height of the zero controls one thing.
Its left-right position controls another.
The height controls the rhythm
The quantity
is the vertical coordinate of the zero.
Look at the oscillatory factor:
The larger becomes, the more rapidly the phase changes as changes.
So, in our ripple picture:
the height of a zero controls its rhythm.
Zeros relatively low in the critical strip contribute slower oscillations.
Zeros higher up contribute finer, faster ones.
If we set
the expression becomes
which makes the resemblance to a frequency especially clear.
(Higher zeros do not simply produce “bigger” effects. Their larger imaginary coordinates chiefly introduce finer oscillatory structure.)
This is one reason people sometimes draw comparisons with frequencies or harmonics.
There really is a frequency-like quantity present.
But we should also mark the limit of the analogy.
The explicit formula is not simply an ordinary Fourier series.
The primes are not a sound wave.
There is no physical loudspeaker generating them.
The useful part of the comparison is narrower:
many oscillatory components with different frequencies combine to produce complicated structure.
That much is genuinely present in the mathematics.
The sideways position controls the scale
Now look at the horizontal coordinate:
The contribution contains
This controls how the scale of the oscillation grows as grows.
This matters enormously.
Suppose, just as an illustration, that one zero had
Its contribution would involve roughly the scale
A zero on the critical line has
giving the much smaller scale
For small , that difference may not feel dramatic.
For enormous , it is.
(Changing the horizontal coordinate changes an exponent. Even a modest change in an exponent can become enormous when itself becomes enormous.)
So our picture now has two simple rules:
the height of the zero controls the rhythm;
the sideways position controls the scale.
That is perhaps the most useful intuition in the article.
Imagine many ripples at once
Return to the smooth prime-counting trend.
Imagine that the first pair of zeros lays one broad oscillatory correction over it.
Add another pair, and a second ripple appears.
Then another.
Each has its own rhythm.
Their peaks and troughs sometimes reinforce each other and sometimes cancel.
As more zeros are included, the combined pattern becomes richer.
Fine structure appears on top of broad structure.
The figure below deliberately separates those ingredients before recombining them.
Stacked schematic showing a smooth main trend, a slower oscillation from one lower zero pair, a finer oscillation from a higher zero pair, their combined correction, and the corrected trend. The curves are explanatory sketches, not numerical plots.
This is schematic rather than a numerical reconstruction, but the structural idea is real.
The smooth term supplies the broad background.
Different zero pairs contribute different oscillatory corrections.
Together they generate increasingly fine structure.
And now the visual thread of the article closes back on itself.
The first figure showed us a smooth trend and an irregular arithmetic count.
The middle of the article has been explaining how the analytic structure of zeta supplies the corrections that separate the exact arithmetic behaviour from its smooth main term.
Again, we should not push the image beyond its mathematical support.
The primes are not literally ripples on water.
But the mathematical formula really does build the correction out of oscillatory terms.
The image helps us see what the algebra is saying.
(A good analogy here does not replace the equation. It gives us something to picture while the equation tells us exactly what is true.)
And now the Riemann Hypothesis becomes visual
We can finally return to the famous statement
For every non-trivial zero, RH says
Think about what that means in our ripple picture.
The zeros may sit at wildly different heights.
So they may contribute wildly different rhythms.
But horizontally, every one of them is anchored to exactly the same line.
None is allowed to wander farther to the right and acquire a larger exponent.
Every zero-driven oscillation is constrained to the scale associated with
This does not mean every individual term has exactly the same amplitude.
There is also the factor , phases differ, and the full sum has subtleties.
But the crucial growth exponent is fixed.
(RH says that all the non-trivial zeros share the same horizontal coordinate, and that shared coordinate places a powerful restriction on the possible size of prime-counting fluctuations.)
Now compare two imaginary universes.
In one universe, every zero lies on
In another, some zero sits much farther to the right.
That second zero would carry a larger power of .
Its ripple would be allowed to grow on a larger scale.
The arithmetic count could therefore wander farther from its smooth trend.
This is why the horizontal location of the zeros matters.
From a picture to a precise statement
Our staircase-and-ripples picture is useful, but mathematics can state the connection exactly.
For the Chebyshev psi function, the prime number theorem says
(The main trend is , while the remaining error becomes small compared with itself.)
RH is equivalent to the much stronger statement that, for every
If the notation is unfamiliar, it is describing an upper scale for the size of the error rather than giving its exact value.
The message is close to the picture we have already built.
The deviation from the smooth trend is restricted to essentially square-root scale.
(The small gives an arbitrarily tiny extra allowance in the exponent. The important feature is the appearance of one-half.)
So these two statements are equivalent:
Every non-trivial zeta zero lies on the critical line.
and
Prime-power counting never wanders from its main trend by more than essentially square-root scale.
That is an astonishing equivalence.
A geometric statement about zeros in the complex plane becomes a statement about the irregularity of prime numbers.
Why one-half matters twice
The number
has now appeared from two directions.
In the zeta function's geometry, it is the centre of the critical strip and the symmetry line of the functional equation.
In the explicit formula, it becomes the exponent
governing the characteristic scale associated with the zeros under RH.
So one-half is simultaneously:
a location in the complex plane,
and
an exponent controlling arithmetic fluctuation.
(This is one of the beautiful features of the subject: geometry and arithmetic are not merely sitting beside one another. The same number has meaning in both languages.)
Can we rebuild the primes from the zeros?
In an important sense, yes.
The explicit formula says that the weighted prime-power count can be reconstructed from:
the main smooth term,
the contributions from all the non-trivial zeros,
and several additional known correction terms.
If we use only a small number of zero pairs, we recover only part of the oscillatory structure.
Add more zeros, and finer detail appears.
Higher zeros introduce more rapid oscillations on the logarithmic scale.
In the full limiting expression, the entire population of zeros participates.
But there is an important misconception to avoid.
There is no direct pairing such as
first zero ↔ prime 2 second zero ↔ prime 3 third zero ↔ prime 5\.
One zero does not “contain” one prime.
Each zero contributes globally across the counting function.
The prime distribution emerges from their combined structure.
(The relationship is collective. The zeros encode the pattern of prime distribution as a whole rather than serving as labels for individual primes.)
This is a little like reconstructing a complicated shape from many overlapping components.
No single component is the final picture.
The picture emerges when they are combined.
The translator has two directions
We can now see the full journey.
Euler gives us
This travels from primes into the zeta function.
Take the logarithm, and the prime factors separate.
Expand it, and prime powers appear.
Differentiate, and the weights become exactly the von Mangoldt weights:
At the same time, the logarithmic derivative turns the zeros of zeta into poles.
Complex inversion asks the analytic object to return the cumulative arithmetic count.
Moving the contour crosses those poles.
The residue theorem records their contributions.
And the explicit formula emerges:
One direction is:
primes → zeta.
The other is:
zeta zeros → prime-counting fluctuations.
The same bridge carries information both ways.
The whole mechanism in everyday language
We can now tell the story almost without notation.
Prime numbers are irregularly spaced, but their overall density follows a smooth trend.
Euler discovered that all the primes can be packed into a single analytic object: the zeta function.
A logarithm separates the prime components.
Opening those components reveals prime powers.
Differentiation gives them the right weights.
The resulting logarithmic derivative has a remarkable double life: its coefficients record prime powers, while its singularities reveal the zeros of zeta.
Complex integration can decode the coefficient information back into a running count.
When that integration path is moved across the complex plane, every pole it crosses has to be accounted for.
The poles created by zeta's zeros therefore contribute to the recovered arithmetic formula.
Those contributions oscillate.
The vertical position of a zero controls the rhythm of its oscillation.
The horizontal position controls its scale.
Add all those oscillations to the smooth main trend, together with the remaining known corrections, and you recover the weighted irregularity of the primes.
The Riemann Hypothesis says that every non-trivial zero has the same horizontal position:
And that is why a statement about points in the complex plane becomes a statement about how irregular the primes are allowed to be.
A compact technical view
For readers who would like the complete mathematical skeleton after the intuitive route, here it is.
For
Euler's product gives
Taking a logarithm and differentiating gives
where
The cumulative weighted prime-power count is
A Perron-type inversion recovers from the logarithmic derivative.
Shifting the contour and evaluating residues yields, in a standard symmetrised form,
where the zero sum is interpreted in the standard symmetric limiting sense.
For a conjugate pair
their combined contribution is
So
controls oscillation in , while
controls the scale.
The Riemann Hypothesis states
for every non-trivial zero, and is equivalent to the estimate
for every .
That is the formal skeleton underneath the pictures.
What the pictures do — and do not — mean
We have used several images in this article:
a staircase and a smooth ramp;
a machine with two faces;
a scanning line crossing special points;
overlapping ripples.
Each is there to make one structural idea easier to hold in the mind.
None should be mistaken for the mathematics itself.
The prime numbers are not physically climbing stairs.
The zeta function is not a mechanical machine.
Contours do not drag through the complex plane like curtains.
The primes are not literally water waves.
What is real is the structure beneath each picture:
prime counting really does have a smooth leading trend and an irregular remainder;
the logarithmic derivative really does simultaneously expose prime-power coefficients and zeta zeros;
contour shifts really do collect residues from poles;
and the zero contributions really do contain oscillatory factors.
The metaphors are handrails.
The equations are the building.
Why this changes the way the Riemann Hypothesis feels
The bare statement of RH is short:
for every non-trivial zero.
Seen in isolation, it can feel arbitrary.
Why should anyone care where these strange complex zeros sit?
But after following the entire loop, the statement looks very different.
Each zero contributes to the arithmetic correction around the smooth prime-counting trend.
Its height influences the rhythm.
Its sideways position influences the scale.
Put every zero on the critical line, and the collective irregularity of the primes is powerfully constrained.
So the question
Where are the zeta zeros?
and the question
How wildly can the primes deviate from their average distribution?
are not two unrelated puzzles.
They are two ways of looking at the same structure.
That is what the zeros of the zeta function have to do with prime numbers.
Where Riemann Console enters the story
This classical bridge also helps explain why research around the Riemann Hypothesis can involve objects that seem, at first glance, far removed from primes.
Once zero information can be translated into arithmetic information, mathematicians can search for other ways to constrain or reformulate those zeros: transforms, kernels, positivity conditions, spectral descriptions, equivalent criteria and many other analytic structures.
Riemann Console's public research programme explores some of those directions while maintaining a strict distinction between an interesting representation, a bounded result, a sufficient condition, a failed route and a proof of RH itself.
The explicit formula is part of the classical foundation beneath that work.
It shows why moving from primes into complex analysis is not a journey away from the original problem.
Complex analysis is one of the ways mathematics finds its way back to the primes.
And we are now ready for the next question.
We have learned that a zero's horizontal position controls the scale of its arithmetic contribution, while its vertical position behaves rather like a frequency.
So what happens when we stop looking at one zero at a time and look at the whole population?
Where are the non-trivial zeros?
How are they spaced?
What patterns have mathematicians found among them?
And why, after looking at so many of them, does the critical line continue to command so much attention?