Riemann Zeta Function Explained: ζ(2), Zeros and Primes

Quick answer: The Riemann zeta function, written ζ(s), is defined by the infinite series ζ(s) = 1 + 1/2^s + 1/3^s + 1/4^s + …, which converges when the real part of s is greater than 1. Analytic continuation extends it to every complex number except s = 1, where it has a pole. Its best-known value is ζ(2) = π²/6 ≈ 1.644934. Euler’s product formula connects it to the prime numbers, and its nontrivial zeros, the first at 1/2 + 14.1347i, are the subject of the Riemann Hypothesis.

Facts checked November 23, 2026.

Why is the zeta function in the news? On November 20, 2026, Levent Alpöge announced a Claude-assisted formal proof of the Riemann Hypothesis, and on November 21 the Lean and Mathlib communities certified the statement and the formal proof. See what has been verified and the two proofs compared.

The Riemann zeta function is the most famous function in number theory. It starts as a simple sum that a high school student can write down, yet it encodes how prime numbers are distributed. This guide explains what the zeta function is, its famous values, its link to primes and its zeros, with a calculator you can use as you read.

What Is the Riemann Zeta Function?

For a number \(s\) greater than 1, the zeta function is the infinite sum

\[ \zeta(s) = \sum_{n=1}^{\infty} \frac{1}{n^s} = 1 + \frac{1}{2^s} + \frac{1}{3^s} + \frac{1}{4^s} + \cdots \]

Try \(s = 2\): the terms are \(1 + \tfrac14 + \tfrac19 + \tfrac1{16} + \cdots\). They shrink fast enough that the total settles at about 1.6449. At \(s = 1\), the sum becomes the harmonic series \(1 + \tfrac12 + \tfrac13 + \cdots\), which grows without limit, so \(\zeta(1)\) is undefined.

The function is named after Bernhard Riemann, who in his November 1859 paper Über die Anzahl der Primzahlen unter einer gegebenen Grösse (“On the Number of Primes Less Than a Given Magnitude”) studied it for complex numbers \(s = \sigma + it\) and connected it to the primes. Leonhard Euler had already studied it for whole numbers a century earlier.

Famous Values of the Zeta Function

ValueExact formDecimalNote
\(\zeta(2)\)\(\pi^2/6\)1.644934…The Basel problem, solved by Euler in 1734
\(\zeta(3)\)Not known to be a rational multiple of \(\pi^3\)1.202056…Apéry’s constant; proved irrational by Roger Apéry in 1978
\(\zeta(4)\)\(\pi^4/90\)1.082323…Every even value is a rational multiple of a power of \(\pi\)
\(\zeta(1)\)UndefinedNot finiteA simple pole; the harmonic series diverges
\(\zeta(0)\)\(-1/2\)−0.5From analytic continuation, not the sum
\(\zeta(-1)\)\(-1/12\)−0.08333…The source of the “1 + 2 + 3 + … = −1/12” meme
\(\zeta(-2), \zeta(-4), \ldots\)00The “trivial zeros”

The Basel problem: why ζ(2) = π²/6

In 1650, Pietro Mengoli asked for the exact value of \(1 + \tfrac14 + \tfrac19 + \cdots\). The problem defeated the best mathematicians for decades until Euler found the answer in 1734 (presenting it in 1735): \(\pi^2/6\). His idea was to treat \(\frac{\sin x}{x}\) like a polynomial with roots at \(\pm\pi, \pm 2\pi, \ldots\) and compare coefficients. Seeing \(\pi\), a number about circles, appear in a sum about whole numbers astonished his contemporaries.

One lovely consequence: the probability that two randomly chosen whole numbers share no common factor is \(1/\zeta(2) = 6/\pi^2 \approx 61\%\).

The Euler Product: How Zeta Encodes the Primes

In work dating to 1737, Euler showed that, for \(s \gt 1\), the zeta sum can be rewritten as a product over all prime numbers:

\[ \zeta(s) = \prod_{p\ \text{prime}} \frac{1}{1 – p^{-s}} = \frac{1}{1-2^{-s}} \cdot \frac{1}{1-3^{-s}} \cdot \frac{1}{1-5^{-s}} \cdots \]

Why? Each factor is a geometric series: \(\frac{1}{1-2^{-s}} = 1 + \frac{1}{2^s} + \frac{1}{4^s} + \cdots\). Multiplying the factors for all primes produces \(\frac{1}{n^s}\) for every whole number \(n\) exactly once, because every number factors into primes in exactly one way. This identity is the bridge between zeta and the primes. As a first payoff, since \(\zeta(1)\) is infinite, the product cannot have finitely many factors, which gives another proof that there are infinitely many primes.

Analytic Continuation: Zeta Beyond s = 1

The sum only works when \(s \gt 1\) (more precisely, when the real part of \(s\) is greater than 1). Riemann showed that zeta has a unique analytic continuation to the whole complex plane: a function that agrees with the sum where the sum works and is analytic everywhere except at \(s = 1\), where it has a simple pole. A key tool is his functional equation:

\[ \zeta(s) = 2^s \pi^{s-1} \sin\!\left(\frac{\pi s}{2}\right) \Gamma(1-s)\, \zeta(1-s). \]

This relates values at \(s\) and \(1 – s\), a reflection across the line \(\operatorname{Re}(s) = \tfrac12\). That is why the values at \(0, -1, -2, \ldots\) exist even though the original sum makes no sense there.

Does 1 + 2 + 3 + … really equal −1/12? No, not in the ordinary sense: the sum grows without limit. The statement \(\zeta(-1) = -\tfrac1{12}\) is about the extended function, which no longer equals the sum at \(s = -1\). The value −1/12 does appear in physics and in summation methods that assign values to divergent series, but writing “1 + 2 + 3 + … = −1/12” without that context is misleading.

The Zeros of the Zeta Function

A zero is a value of \(s\) where \(\zeta(s) = 0\). There are two kinds:

  • Trivial zeros at \(s = -2, -4, -6, \ldots\), caused by the sine factor in the functional equation. They are well understood.
  • Nontrivial zeros, which all lie in the critical strip \(0 \lt \operatorname{Re}(s) \lt 1\). There are infinitely many. If \(\rho\) is a nontrivial zero, so are its complex conjugate \(\bar\rho\) and the reflections \(1 – \rho\) and \(1 – \bar\rho\).

The first nontrivial zeros, written as \(\tfrac12 + it\), have these heights \(t\):

Zero12345
\(t\)14.134721.022025.010930.424932.9351

The Riemann Hypothesis states that every nontrivial zero has real part exactly \(\tfrac12\), meaning they all lie on the critical line. In 2004, Xavier Gourdon reported computing the first 10 trillion zeros and finding every one on the line; in 2021, David Platt and Timothy Trudgian rigorously verified more than 12 trillion using interval arithmetic. In November 2026, Levent Alpöge released a computer-verified Lean proof of the full hypothesis developed with Anthropic’s Claude; see our Riemann Hypothesis guide for what has been verified.

Why the Zeros Control the Primes

The prime number theorem says the number of primes up to \(x\) is about \(x/\ln x\). Riemann found an exact formula for the error, built from the zeros. In a later form due to von Mangoldt, with \(\psi_0(x)\) a weighted count of primes and prime powers up to \(x\) (counting half at a jump), for \(x \gt 1\):

\[ \psi_0(x) = x – \sum_{\rho} \frac{x^{\rho}}{\rho} – \ln(2\pi) – \tfrac12 \ln\!\left(1 – x^{-2}\right). \]

The sum runs over the nontrivial zeros \(\rho\), taken in pairs in order of height. Each zero adds a wave to the prime count, of size about \(x^{\operatorname{Re}(\rho)}/|\rho|\). If every zero has real part \(\tfrac12\), each wave has square-root size, and together they give the strongest possible bounds on how far the prime count strays from its smooth estimate, up to logarithmic factors. A zero further to the right would allow larger irregularities. That is why the location of the zeros matters so much.

Try It: Zeta Function Explorer

1. Zeta calculator. Enter any real number from −20 to 30 (except 1).

2. The Basel problem. Add up the first 10 terms of 1 + 1/4 + 1/9 + …

3. Zeros on the critical line. The curve is Hardy’s Z(t), a real function with the same size as ζ(1/2 + it). Each sign change is a zero of zeta on the critical line.

Try \(s = -1\) to see −1/12, \(s = -2\) for a trivial zero, and \(s = 0.5\), where \(\zeta(\tfrac12) \approx -1.4604\). In the graph, the first red dot sits at \(t \approx 14.135\): the first nontrivial zero, \(\tfrac12 + 14.135i\).

Where Else the Zeta Function Appears

  • Probability: the chance that two random whole numbers are coprime is \(6/\pi^2\).
  • Physics: zeta values show up in calculations of black-body radiation (\(\zeta(4)\) gives the Stefan-Boltzmann constant) and the Casimir effect.
  • Random matrices: in 1972, over tea at the Institute for Advanced Study in Princeton, Hugh Montgomery showed Freeman Dyson his formula for how zeta zeros are spaced, and Dyson recognized the same statistics used for random matrices, which model energy levels of heavy atomic nuclei.
  • Cryptography: estimates about primes, which zeta controls, help analyze how fast algorithms can find large primes for RSA encryption.

Common Misconceptions

“ζ(s) is just the sum 1 + 1/2^s + 1/3^s + …” Only for real part greater than 1. Everywhere else, zeta means the analytic continuation.

“1 + 2 + 3 + … = −1/12.” The ordinary sum diverges. The −1/12 is \(\zeta(-1)\), a value of the extended function.

“The zeros are where the sum equals zero.” The Euler product shows that zeta has no zeros where the real part of \(s\) is greater than 1, exactly where the sum converges. All zeros lie where the sum does not apply.

“Checking trillions of zeros proves the Riemann Hypothesis.” No. There are infinitely many zeros, so no finite computation can prove it. That is why a proof was needed.

Watch: The Zeta Function Visualized

If you learn better by watching, these videos are worth your time.

But what is the Riemann hypothesis? Visualizing analytic continuation (3Blue1Brown). The best visual introduction to how zeta is extended beyond s = 1.
The Key to the Riemann Hypothesis (Numberphile). How the zeros of zeta connect to the prime-counting function.
How The Riemann Zeta Function Encodes The Prime Numbers (CMMath). A step-by-step look at the Euler product and the explicit formula.

Frequently Asked Questions

What is the Riemann zeta function in simple terms?

It is the infinite sum 1 + 1/2^s + 1/3^s + 1/4^s + …, extended by analytic continuation to almost all complex numbers. Its zeros encode how prime numbers are distributed.

What is ζ(2)?

ζ(2) = π²/6 ≈ 1.6449. This is the famous Basel problem, solved by Leonhard Euler in 1734.

What is the first zero of the Riemann zeta function?

The first nontrivial zero is at about 1/2 + 14.1347i. The trivial zeros are at −2, −4, −6 and so on.

Is 1 + 2 + 3 + … really equal to −1/12?

Not as an ordinary sum, which diverges. The value −1/12 is ζ(−1), a value of the analytically continued zeta function.

How is the zeta function related to prime numbers?

Through the Euler product: ζ(s) equals a product over all primes. Riemann used this to write the prime count exactly in terms of the zeros of zeta.

What is ζ(3)?

About 1.2020569, called Apéry’s constant. Roger Apéry proved in 1978 that it is irrational, but no formula like π²/6 is known for it.

Keep Exploring

Sources and Further Reading

Quiz: Test Your Zeta Knowledge

Five questions on the zeta function. Pick an answer and press Submit to see a short explanation.

Answer each question and press Submit to see your result right away.

1. What is the value of ζ(2)?
Found a bug? Let us know!
2. Why is ζ(1) undefined?
Found a bug? Let us know!
3. What does the Euler product connect the zeta function to?
Found a bug? Let us know!
4. Where are the trivial zeros of the zeta function?
Found a bug? Let us know!
5. What does the Riemann Hypothesis say about the nontrivial zeros?
Found a bug? Let us know!

Related to This Article

What people say about "Riemann Zeta Function Explained: ζ(2), Zeros and Primes - Effortless Math"?

No one replied yet.

Leave a Reply