The Riemann zeta function: from primes to the critical line

April 26, 2026 · math, number-theory

Add up the reciprocals of the squares: 1+14+19+116+1 + \frac{1}{4} + \frac{1}{9} + \frac{1}{16} + \cdots. Euler found that this converges to π2/6\pi^2/6 — a strange place for π\pi to show up, in a sum that has nothing visibly to do with circles. Do the same thing with cubes, or fourth powers, or in general with nsn^{-s} for any real s>1s > 1, and you get a well-defined number. Push ss down to 11 and the sum becomes the harmonic series, which diverges. That single boundary case — the harmonic series’ divergence — is also, via a completely different route, Euclid’s-proof-in-disguise that there are infinitely many primes. The two facts are not a coincidence, and untangling exactly how they’re connected is what pulls you into the Riemann zeta function.

From a curious sum to the primes

For a complex number ss with Re(s)>1\operatorname{Re}(s) > 1, define

ζ(s)=n=11ns.\zeta(s) = \sum_{n=1}^{\infty} \frac{1}{n^s}.

Convergence here is easy to pin down. Write s=σ+its = \sigma + it with σ=Re(s)\sigma = \operatorname{Re}(s). Then ns=eslogn=nσ|n^{-s}| = |e^{-s \log n}| = n^{-\sigma}, so the series converges absolutely exactly when nσ\sum n^{-\sigma} does — which, by the integral test against 1xσdx\int_1^\infty x^{-\sigma}\,dx, happens precisely for σ>1\sigma > 1. So ζ\zeta is a well-defined, holomorphic function on the right half-plane Re(s)>1\operatorname{Re}(s) > 1. Nothing exotic yet.

The reason to care about primes at all comes from a factorization identity Euler wrote down: the Euler product,

ζ(s)=p prime11ps,Re(s)>1.\zeta(s) = \prod_{p \text{ prime}} \frac{1}{1 - p^{-s}}, \qquad \operatorname{Re}(s) > 1.

This is worth deriving in full, because the derivation is genuinely elegant and it’s the entire reason ζ\zeta is a number-theoretic object rather than just a curiosity in analysis. Fix a prime pp. Since ps<1|p^{-s}| < 1 for Re(s)>1\operatorname{Re}(s) > 1, the geometric series

11ps=1+ps+p2s+p3s+\frac{1}{1 - p^{-s}} = 1 + p^{-s} + p^{-2s} + p^{-3s} + \cdots

converges absolutely. Now take the finite product over all primes pXp \le X for some cutoff XX, and multiply these geometric series together:

pX11ps=pX(k=0pks).\prod_{p \le X} \frac{1}{1-p^{-s}} = \prod_{p \le X}\left(\sum_{k=0}^{\infty} p^{-ks}\right).

Expanding this product of sums (legitimate term-by-term because every series involved converges absolutely) produces one term for every way of choosing an exponent kp0k_p \ge 0 for each prime pXp \le X, almost all zero. Each such choice corresponds to the integer n=pXpkpn = \prod_{p \le X} p^{k_p}, and by the fundamental theorem of arithmetic that correspondence is a bijection: every positive integer whose prime factors are all X\le X arises from exactly one choice of exponents. So the expanded product is exactly

pX11ps=n1pnpX1ns.\prod_{p \le X} \frac{1}{1-p^{-s}} = \sum_{\substack{n \ge 1 \\ p \mid n \Rightarrow p \le X}} \frac{1}{n^s}.

As XX \to \infty, the right-hand side includes more and more integers, and its difference from the full sum n1ns\sum_{n\ge 1} n^{-s} is bounded by n>Xnσ0\sum_{n > X} n^{-\sigma} \to 0 (again using absolute convergence for σ>1\sigma>1). Taking the limit gives the Euler product exactly as stated.

Why does this matter? Unique factorization is doing all the work — the identity is a generating-function encoding of “every integer factors into primes in exactly one way.” Take logarithms and expand each log(1ps)1\log(1-p^{-s})^{-1} as a power series in psp^{-s}:

logζ(s)=pk=1pksk=pps+O(1)(the k2 terms converge for Re(s)>12).\log \zeta(s) = \sum_p \sum_{k=1}^{\infty} \frac{p^{-ks}}{k} = \sum_p p^{-s} + O(1)\quad\text{(the } k\ge2 \text{ terms converge for } \operatorname{Re}(s) > \tfrac12\text{)}.

So the growth of ζ(s)\zeta(s) as s1+s \to 1^+ is governed, to leading order, by pps\sum_p p^{-s} — a sum running only over primes. Since ζ(s)\zeta(s) \to \infty as s1+s \to 1^+ (it has a pole there — the harmonic series diverging), this forces pps\sum_p p^{-s} \to \infty too, which recovers Euler’s classical proof that p1/p\sum_p 1/p diverges, i.e. that there are infinitely many primes, via completely elementary complex-free reasoning about a sum over primes. That’s the shallow end of the pool. The deep end — where the zeros of ζ\zeta pin down the fine-grained error term in how primes are distributed — is where the rest of this post is headed.

Why extend past Re(s)>1\operatorname{Re}(s) > 1?

Two things push you to ask what ζ\zeta “should” mean outside its natural domain. First, curiosity about divergent-looking sums like 1+2+3+1+2+3+\cdots, which formally is ζ(1)\zeta(-1) if you plug s=1s=-1 into the defining series — except that series diverges, so the defining formula is simply not valid there and gives no answer on its own. Second, and far more importantly for the theory: it turns out the deep arithmetic information about primes — the size of the error term in the prime counting function, not just the crude fact that there are infinitely many — lives in the location of the zeros of ζ\zeta, and those zeros mostly aren’t in the region Re(s)>1\operatorname{Re}(s) > 1 at all (the Euler product shows ζ(s)0\zeta(s) \ne 0 there, since an infinite product of nonzero factors that converges to a nonzero value can’t vanish). To find the zeros that matter, you need ζ\zeta defined on a much larger region of the complex plane.

This is where analytic continuation comes in. The idea is: find a function ζ^(s)\hat\zeta(s) that is holomorphic on a larger domain and agrees with ζ(s)\zeta(s) wherever the original series converges (Re(s)>1\operatorname{Re}(s) > 1). A basic fact of complex analysis — the identity theorem — says that if such an extension exists on a connected domain, it is unique: two holomorphic functions that agree on a set with a limit point (in particular, on an open set) must agree everywhere they’re both defined. So the question is purely existence, and “the Riemann zeta function” for ss outside Re(s)>1\operatorname{Re}(s)>1 means, unambiguously, this unique continuation — not the original series, which simply diverges out there and is not being “resummed” to anything.

Continuing ζ\zeta: the idea, sketched honestly

Deriving the continuation properly uses machinery — the Jacobi theta function and Poisson summation — that’s genuinely beyond what a single post can derive from scratch. What follows is a sketch of the shape of the argument, not a full derivation.

Start from Euler’s integral for the Gamma function, Γ(z)=0euuz1du\Gamma(z) = \int_0^\infty e^{-u} u^{z-1}\,du. Substituting u=πn2xu = \pi n^2 x and rearranging turns this into a statement about a single term nsn^{-s}:

πs/2Γ(s/2)ns=0eπn2xxs/21dx.\pi^{-s/2}\,\Gamma(s/2)\, n^{-s} = \int_0^\infty e^{-\pi n^2 x}\, x^{s/2 - 1}\, dx.

Summing over n1n \ge 1 and swapping sum and integral (valid for Re(s)>1\operatorname{Re}(s) > 1) turns the left side into πs/2Γ(s/2)ζ(s)\pi^{-s/2}\Gamma(s/2)\zeta(s), and the right side into an integral of ω(x):=n1eπn2x\omega(x) := \sum_{n\ge1} e^{-\pi n^2 x} — half of the Jacobi theta function θ(x)=nZeπn2x=1+2ω(x)\theta(x) = \sum_{n\in\mathbb{Z}} e^{-\pi n^2 x} = 1 + 2\omega(x).

This is the key move: θ\theta satisfies a modular-type transformation law, θ(1/x)=xθ(x)\theta(1/x) = \sqrt{x}\,\theta(x), which is a direct consequence of applying Poisson summation to the Gaussian function. Splitting the integral 0\int_0^\infty at x=1x=1 and using this transformation to rewrite the 01\int_0^1 piece in terms of ω(1/x)\omega(1/x) produces (after collecting the extra terms that the "1+1+" in θ\theta contributes) a formula of the shape

πs/2Γ(s/2)ζ(s)  =  1s11s  +  1ω(x)(xs/21+x(1s)/21)dx.\pi^{-s/2}\Gamma(s/2)\zeta(s) \;=\; -\frac{1}{s} - \frac{1}{1-s} \;+\; \int_1^\infty \omega(x)\left(x^{s/2-1} + x^{(1-s)/2 - 1}\right) dx.

The right-hand side is now visibly symmetric under s1ss \leftrightarrow 1-s, and the integral converges for every complex ss (because ω(x)\omega(x) decays like eπxe^{-\pi x} as xx\to\infty, beating any power of xx). That gives, in one stroke, both the analytic continuation of ζ\zeta to a meromorphic function on all of C\mathbb{C} (with a single simple pole, at s=1s=1, coming from the 1/(1s)-1/(1-s) term) and the functional equation below — because the completed function ξ(s):=πs/2Γ(s/2)ζ(s)\xi(s) := \pi^{-s/2}\Gamma(s/2)\zeta(s) visibly satisfies ξ(s)=ξ(1s)\xi(s) = \xi(1-s).

The functional equation

Stripping the Γ(s/2)πs/2\Gamma(s/2)\pi^{-s/2} normalization out of ξ(s)=ξ(1s)\xi(s)=\xi(1-s) and using Gamma’s duplication and reflection identities (a purely mechanical, if slightly tedious, algebraic step I’ll take on faith here) gives the classical form:

ζ(s)=2sπs1sin ⁣(πs2)Γ(1s)ζ(1s).\zeta(s) = 2^s \pi^{s-1} \sin\!\left(\frac{\pi s}{2}\right) \Gamma(1-s)\, \zeta(1-s).

This single identity is doing a lot of work: it relates the value of ζ\zeta at ss to its value at the “mirror point” 1s1-s, and it’s the tool for essentially everything past this point in the post — the trivial zeros, the value at negative integers, and the structural reason the critical line Re(s)=12\operatorname{Re}(s) = \tfrac12 (the fixed axis of s1ss \leftrightarrow 1-s) is special.

The trivial zeros, derived properly

Unlike the continuation and the functional equation itself, this part is fully derivable from what we already have — no sketching required. Plug s=2ms = -2m for a positive integer mm into the functional equation:

ζ(2m)=22mπ2m1sin(mπ)Γ(1+2m)ζ(1+2m).\zeta(-2m) = 2^{-2m}\, \pi^{-2m-1}\, \sin(-m\pi)\, \Gamma(1+2m)\, \zeta(1+2m).

Check each factor. 22m2^{-2m} and π2m1\pi^{-2m-1} are just positive real numbers. sin(mπ)=0\sin(-m\pi) = 0 for every integer mm, since sine vanishes at integer multiples of π\pi. Γ(1+2m)=(2m)!\Gamma(1+2m) = (2m)! is finite — Gamma’s poles sit only at 0,1,2,0, -1, -2, \ldots, and 1+2m1+2m is a positive integer for m1m \ge 1, nowhere near those poles, so this factor cannot blow up and rescue the vanishing sine. And ζ(1+2m)\zeta(1+2m) is just the original convergent series evaluated at a point with Re(1+2m)=1+2m>1\operatorname{Re}(1+2m) = 1+2m > 1, hence finite. A finite quantity times zero is zero:

ζ(2,4,6,)=0.\zeta(-2,\, -4,\, -6,\, \ldots) = 0.

These are the trivial zeros. It’s worth checking why s=0s=0 is not among them, since naively sin(π0/2)=0\sin(\pi \cdot 0/2) = 0 too. The difference is that at s=0s=0, the functional equation reads ζ(0)=π1sin(0)Γ(1)ζ(1)\zeta(0) = \pi^{-1}\sin(0)\,\Gamma(1)\,\zeta(1) — and ζ(1)\zeta(1) is exactly the pole of the original series, i.e. \infty. So the right side is a genuine 00 \cdot \infty indeterminate form, not a clean zero, and resolving it requires a limiting argument (it works out to the finite, nonzero value ζ(0)=12\zeta(0) = -\tfrac12). That’s why the trivial zeros start at 2-2, not 00.

About that 1/12-1/12

The functional equation also hands us ζ(1)\zeta(-1) directly, and it’s worth computing since it’s simultaneously the internet’s favorite fact about ζ\zeta and its favorite source of a badly garbled claim. Plug s=1s = -1:

ζ(1)=21π2sin ⁣(π2)Γ(2)ζ(2)=121π2(1)1π26=112.\begin{aligned} \zeta(-1) &= 2^{-1}\pi^{-2}\sin\!\left(-\frac{\pi}{2}\right)\Gamma(2)\,\zeta(2) \\ &= \frac{1}{2}\cdot\frac{1}{\pi^2}\cdot(-1)\cdot 1 \cdot \frac{\pi^2}{6} \\ &= -\frac{1}{12}. \end{aligned}

That last step used ζ(2)=π2/6\zeta(2) = \pi^2/6 — the Basel sum from the very first line of this post — so this comes full circle nicely.

Here’s the part to be careful about. ζ(1)=1/12\zeta(-1) = -1/12 is a true statement about the value of the analytically continued function at the point s=1s=-1. It is emphatically not a statement that the series 1+2+3+4+1 + 2 + 3 + 4 + \cdots converges to 1/12-1/12 — that series has terms growing without bound and diverges to ++\infty in every ordinary sense of “sum.” The formula ζ(s)=ns\zeta(s) = \sum n^{-s} is only valid as a convergent series for Re(s)>1\operatorname{Re}(s) > 1; at s=1s=-1 it is not the same object as 1+2+3+1+2+3+\cdots, it’s the value of a different (continued) function that happens to agree with that series’ defining expression only where the expression actually converges. The popular framing that “physicists sum the naturals and get 1/12-1/12” conflates these two things, and it’s worth resisting — ζ(1)=1/12\zeta(-1)=-1/12 is a fact about a specific holomorphic function evaluated off its original domain, full stop, not a resummation of a divergent series in any sense where “sum” keeps its ordinary meaning. (There are legitimate divergent-series regularization frameworks — Abel summation, zeta regularization itself — where 1/12-1/12 shows up as a regularized value assigned to 1+2+3+1+2+3+\cdots by convention, and that’s a real and useful thing in, e.g., string theory and Casimir-effect calculations; but “regularized value under a specific convention” is a different claim than “the sum equals 1/12-1/12,” and the distinction is exactly the caveat being made here.)

The same functional-equation machine gives every ζ(n)\zeta(-n) for n1n \ge 1 as a rational number (they’re related to the Bernoulli numbers: ζ(n)=Bn+1/(n+1)\zeta(-n) = -B_{n+1}/(n+1)) — Euler had already found these values, using divergent-series techniques rather than a rigorous continuation, well before Riemann’s construction made them precise.

The critical strip and the Riemann Hypothesis

The trivial zeros are, as the name suggests, the easy ones — they follow immediately from the sine factor. The Euler product rules out any zero with Re(s)>1\operatorname{Re}(s) > 1, and a further (nontrivial, not shown here) argument rules out zeros exactly on the line Re(s)=1\operatorname{Re}(s)=1 as well. That leaves the critical strip 0<Re(s)<10 < \operatorname{Re}(s) < 1 as the only place any other zeros can live, and ζ\zeta does have infinitely many zeros there — the nontrivial zeros.

The Riemann Hypothesis (Riemann’s 1859 paper, where he introduced most of this machinery and stated the conjecture) says that every nontrivial zero has real part exactly 12\tfrac12 — that they all lie on the critical line Re(s)=12\operatorname{Re}(s) = \tfrac12, the line fixed by the symmetry s1ss \leftrightarrow 1-s of the functional equation. This is, plainly, unproven. It is one of the Clay Mathematics Institute’s Millennium Prize Problems, extensive computer verification has found no counterexample among a very large number of zeros checked directly on the line, and a great deal of theory has been built assuming it — but none of that constitutes a proof, and stating otherwise would be wrong.

Why the zeros actually matter

It’s fair to ask why the exact real part of some zeros of an analytically-continued function should be a famous open problem rather than a curiosity. The answer is the explicit formula, which connects the zeros directly to the distribution of primes. Sketching its shape (not deriving it): there’s a formula, due to von Mangoldt building on Riemann’s approach, expressing a prime-counting function ψ(x)\psi(x) (a weighted count of prime powers up to xx) as

ψ(x)=x    ρxρρ    log(2π)    12log(1x2),\psi(x) = x \;-\; \sum_{\rho} \frac{x^{\rho}}{\rho} \;-\; \log(2\pi) \;-\; \tfrac12\log(1-x^{-2}),

where the sum runs over the nontrivial zeros ρ\rho. The main term xx is the “expected” growth (this is essentially the content of the Prime Number Theorem, proved in the 1890s independently by Hadamard and de la Vallée Poussin, showing π(x)x/logx\pi(x) \sim x/\log x); everything else is correction. Each zero ρ=β+iγ\rho = \beta + i\gamma contributes an oscillating term of size roughly xβx^{\beta}. If every zero has β=Re(ρ)=12\beta = \operatorname{Re}(\rho) = \tfrac12 exactly — the Riemann Hypothesis — every one of those correction terms is of size about x\sqrt{x}, giving the tightest possible control on the gap between the actual prime-counting function and its smooth approximation Li(x)\mathrm{Li}(x): an error bound of size roughly O(xlogx)O(\sqrt{x}\log x). If some zero had real part closer to 11, primes would be allowed to clump and thin out far more irregularly than we currently believe they do, with an error term as large as roughly xβx^{\beta} for that zero’s real part β\beta. So the Riemann Hypothesis is exactly the statement that the primes are distributed as smoothly and predictably as the analytic machinery is theoretically capable of showing — that’s the actual stake, not just “an unsolved equation.”

A numerical look at the critical line

None of this requires taking anyone’s word for the oscillation — you can see it. The chart below plots ζ(12+it)|\zeta(\tfrac12 + it)| for real tt from 00 to 6060, and it should visibly dip toward zero near several real values of tt (the first few nontrivial zeros sit near t14.13, 21.02, 25.01, 30.42, 32.94,t \approx 14.13,\ 21.02,\ 25.01,\ 30.42,\ 32.94,\ldots).

A quick note on how the number is actually computed, since it isn’t a closed form: the direct Dirichlet series ns\sum n^{-s} doesn’t converge on the critical line at all (Re(s)=12<1\operatorname{Re}(s) = \tfrac12 < 1), so this uses the classical trick of relating ζ\zeta to the Dirichlet eta function, η(s)=n=1(1)n1ns=(121s)ζ(s)\eta(s) = \sum_{n=1}^{\infty} (-1)^{n-1} n^{-s} = (1-2^{1-s})\zeta(s), whose alternating series converges (conditionally) for Re(s)>0\operatorname{Re}(s) > 0. The chart truncates that alternating series at 300300 terms and divides out the (121s)(1-2^{1-s}) factor. This is a genuine numerical approximation, not an exact evaluation — checked against the known zero locations above it tracks them well out to t60t\approx 60, but truncating an alternating series at a fixed number of terms loses accuracy as tt grows (the terms oscillate faster), so treat the far right of a much wider plot with more skepticism than the region shown here.

Watching the Euler product converge

Back to something fully rigorous and exact rather than approximate: the Euler product derivation earlier claimed that multiplying (1ps)1(1-p^{-s})^{-1} over more and more primes converges to the same value as summing nsn^{-s} over more and more integers. At s=2s=2 both sides converge to π2/61.6449\pi^2/6 \approx 1.6449, and it’s a nice concrete check to watch both partial computations climb toward the same number, term by term:

The product converges to π2/6\pi^2/6 noticeably faster than the sum does, term for term — using just the first 15 primes gets within about 0.0060.006 of the target, while the first 15 integers alone are still off by about 0.060.06. That’s a small, concrete illustration of the general fact underlying the whole Euler product argument: primes carry disproportionately more arithmetic information per term than integers do, which is exactly why a product over primes alone can reconstruct a sum over all integers.

Closing

Everything here starts from a series that only converges on half the complex plane, extends uniquely (if you’re willing to take the extension’s existence on faith, or work through the theta-function argument yourself) to a function defined almost everywhere, and turns out to have zeros whose locations directly control how irregular the distribution of primes is allowed to be. Whether all of those zeros line up on a single vertical line is still, as of this writing, completely open.