Naru News日本語

Home › Glossary › Math

What is the zeta function (the function born from an endless sum and tied to the primes)?

Also called: Riemann zeta function, ζ function

Term explainer · Checked November 21, 2026 · 13 min read

In one minute

The zeta function is the function you get by adding up “1 ÷ (that number to the power s)” for every whole number 1, 2, 3, …, as in 1 + 1/2^s + 1/3^s + …, and it is deeply tied to the prime numbers.

For example, with s = 2, 1 + 1/4 + 1/9 + … settles at π²/6 (about 1.645), the answer to the “Basel problem” that Euler solved. With s = 1, the sum grows without limit. The sum can also be rewritten as a product over the primes alone (the Euler product), and from this it follows that there are infinitely many primes.

The sum only gives a value when s is greater than 1, but in 1859 Riemann extended s to complex numbers (numbers shown as points on a plane) and joined the function up smoothly. The Riemann Hypothesis asks how the places where its value is 0 are arranged. Usually “the zeta function” means this one (the Riemann zeta function), and there are also relatives called “the zeta function of …”.

A common mix-up

“Adding up all the whole numbers, 1 + 2 + 3 + 4 + …, gives −1/12”

It is true that the number −1/12 is closely tied to this sum. The value at s = −1 of the extended zeta function, ζ(−1), is exactly −1/12. If you plug s = −1 into the sum 1 + 1/2^s + 1/3^s + … just by its form, “1 ÷ (n to the power −1)” becomes n, so it takes the form 1 + 2 + 3 + 4 + …, which is why the equation is sometimes written. But the sum only gives a value when s is greater than 1. The −1/12 at s = −1 is not the answer to a sum; it is the value of the function extended beyond the range of the sum. If you simply add, you get 55 up to 10 and 5,050 up to 100, the total grows without limit, and there is no answer. Still, one more thing is right. If, instead of stopping the sum abruptly, you fade the terms out smoothly as you add, the sum splits into “a part that grows without limit”, “−1/12” and “a part that shrinks to 0”, and changing how you fade does not change the −1/12. −1/12 shows up as the fixed number left over once the growing part is taken away.

Explained in pictures

A figure comparing the zeta-function sum for s = 2 and s = 1. Title: “What happens if you keep adding?”; subtitle: “Running sums for s = 2 and s = 1”. On the left, a graph: across, the number of terms added (0 to 30); up, the running sum (0 to 4). A navy solid line, “s = 2” (1 + 1/4 + 1/9 + …), rises from 1 and creeps up to just below a gray dotted line, “π²/6 (≈1.645)”. An orange dashed line, “s = 1” (1 + 1/2 + 1/3 + …), climbs to about 4 by 30 terms and ends in an arrow, with “↗ rising”. On the right, a table headed “As you add more terms”: for 10, 100 and 1 million terms, s = 2 gives 1.5498, 1.6350 and 1.644933, and s = 1 gives 2.929, 5.187 and 14.39; with more terms, s = 2 approaches π²/6 and s = 1 grows forever. Below the table: “(π²/6 = 1.6449…; computed values)”. Band at the bottom: s = 2 settles at π²/6; s = 1 grows without limit.
This figure compares the running sums of the zeta-function sum, adding one term at a time, for s = 2 (navy solid line) and s = 1 (orange dashed line). For s = 2, 1 + 1/4 + 1/9 + … settles toward π²/6 (about 1.645, dotted line), because the terms shrink quickly. For s = 1, 1 + 1/2 + 1/3 + … has terms that shrink only gently; as the table on the right shows, even a million terms give only about 14.39, but the sum keeps growing without limit, very slowly.
A figure showing how the zeta-function sum equals a product over the primes alone. Title: “Whole-number sum = product over primes”. At the top, “For every whole number 1, 2, 3, 4, …” and the sum “1 + 1/2^s + 1/3^s + 1/4^s + 1/5^s + 1/6^s + …”. Below it, “=” and “Euler product: one bracket per prime”. Three boxes joined by “×”: the “Prime 2” box, 1 + 1/2^s + 1/4^s + …; the “Prime 3” box, 1 + 1/3^s + 1/9^s + …; the “Prime 5” box, 1 + 1/5^s + …; then “…”. Orange rings mark 1/4^s, 1/3^s and 1. Lower left: “Pick one term per bracket and multiply:” 1/4^s × 1/3^s × 1 × 1 × … = 1/12^s; “(12 = 2 × 2 × 3; it turns up just once)”; “Each whole number splits into primes in only one way, so each 1/n^s appears once”. Lower right box, “Check with s = 2”: primes up to 7, 1.595; primes up to 100, 1.642; the sum, π²/6, 1.645. Band at the bottom: at s = 1 the sum is endless, so the primes never run out.
This figure shows why the zeta-function sum equals the product of one bracket per prime (each bracket adds up the powers of that prime). Picking one term from each bracket and multiplying gives, for example, 1/12^s from 1/4^s and 1/3^s. Because every whole number splits into primes in only one way, each 1/n^s appears exactly once. With s = 2, the product creeps toward 1.645 as more primes are included. With s = 1 the sum grows without limit, so finitely many brackets cannot match it: there are infinitely many primes.
A graph of the zeta function extended beyond the range of the sum, drawn only for real s. Title: “Extending the function beyond the sum”; subtitle: “Only real s is drawn; it really extends over the whole complex plane”. Across is s (−5 to 5); up is the value of ζ(s) (−3 to 3.5). A vertical dashed line at s = 1: “s = 1: value shoots to infinity”. Where s is greater than 1, on a pale navy background, a navy solid curve (label “s > 1: value from the sum (solid)”) drops from high up near s = 1 and approaches 1 as s grows; a point “ζ(2) = π²/6 (≈1.645)”. Where s is 1 or less, an orange dashed curve (label “s ≤ 1: the sum does not work → smoothly extended (dashed)”) rises from far below near s = 1 to −1/2 at s = 0, and to the left it runs almost along the horizontal axis. Points “ζ(0) = −1/2”, a ringed point “ζ(−1) = −1/12”, and points on the axis “ζ(−2) = ζ(−4) = 0”. Band at the bottom: “Complex plane: only one smooth extension, so values are fixed”.
This graph shows the values of the zeta function, for real s only. Where s is greater than 1 (pale background, navy solid line), the sum gives the value; for example, ζ(2) is π²/6. Where s is 1 or less, the sum has no answer, but the function Riemann extended (orange dashed line) does have values: ζ(0) = −1/2, ζ(−1) = −1/12, ζ(−2) = 0. Only at s = 1 does the value shoot off to infinity. Since there is only one way to extend it smoothly on the complex plane, these values are fixed.
A figure explaining what “1 + 2 + 3 + 4 + … = −1/12” means. Title: “What “1 + 2 + 3 + 4 + … = −1/12” really means”. Left, a gray dotted box, “Ordinary adding”: 1 = 1, 1 + 2 = 3, 1 + 2 + 3 = 6, 1 + 2 + … + 10 = 55, 1 + 2 + … + 100 = 5,050, and “→ Grows forever; no answer”. In the middle, “≠”. Right, a navy solid box, “Value of the extended zeta”: ζ(s) = 1 + 1/2^s + 1/3^s + …, “(works only when s > 1)”, “↓ extend smoothly”, “Its value at s = −1 is”, in large orange letters ζ(−1) = −1/12, and “(the sum itself does not apply here)”. A pale navy strip below: “What is right: fade the terms out smoothly instead of cutting them off, and” “sum = (part that grows forever) − 1/12 + (part that shrinks to 0)”. Band at the bottom: −1/12 is a value of the extended function, not the sum.
This figure shows what the equation “1 + 2 + 3 + 4 + … = −1/12” really means. As in the dotted box on the left, ordinary adding gives 5,050 by 100 alone and grows without limit, so there is no answer. As in the box on the right, −1/12 is the value at s = −1 of the zeta function, smoothly extended from the sum that works when s is greater than 1. As the strip below shows, if you fade the terms out smoothly as you add, −1/12 is left as a fixed number alongside the part that grows without limit.

You’re free to use these figures in lessons, slides and posts if you credit Naru News (naru.news). CC BY 4.0.

Think of it like this

Stretching the “add half each time” formula beyond its range

Add 1 + 1/2 + 1/4 + 1/8 + …, halving each time, and the total gets closer and closer to 2. For any x between −1 and 1, the sum 1 + x + x² + x³ + … (adding x multiplied again and again) always equals the simple formula “1 ÷ (1 − x)”. With x = 1/2, 1 ÷ (1 − 1/2) = 2, a perfect match.

But “1 ÷ (1 − x)” can be worked out for any x except 1. Put in x = 2 and you get 1 ÷ (1 − 2) = −1. Put x = 2 into the sum instead and you get 1 + 2 + 4 + 8 + …, which grows without limit. The formula “1 ÷ (1 − x)” is the sum stretched smoothly beyond the range where the sum makes sense, and −1 is the value of that stretched formula. “1 + 2 + 4 + 8 + … = −1” is not the answer to a sum.

The zeta function’s ζ(−1) = −1/12 works the same way. But the analogy differs in places. 1 ÷ (1 − x) is a simple formula, while extending the zeta function needs an elaborate formula with integrals, like the one Riemann used. Also, the zeta sum does not multiply one number x again and again; it adds up 1 divided by the s-th power of each of 1, 2, 3, ….

Key points

Why is it π²/6 when s = 2? (The Basel problem)

What do you get if you add up 1 + 1/4 + 1/9 + 1/16 + …, that is, 1 divided by the square of every whole number 1, 2, 3, …? This question became known as the “Basel problem”, and it defeated many top mathematicians, including the Bernoulli family (Jacob, Johann and Daniel).

In 1735, Euler gave the answer: π²/6, the square of pi divided by 6 (1.6449…). The number π, which belongs to circles, came out of a sum of whole numbers alone. Euler used a bold method: he took the formula that writes sine, a function born from the circle, as an endless sum, and applied the relations between the roots and coefficients of a polynomial to it.

Adding it up to check, you get 1.5498 with 10 terms, 1.6350 with 100 terms and 1.644933 with a million terms, slowly approaching π²/6. With the same method, Euler also found the values when s is even, such as π⁴/90 for s = 4 and π⁶/945 for s = 6.

Why does it grow without limit when s = 1? (The harmonic series)

1 + 1/2 + 1/3 + 1/4 + … is called the “harmonic series”. The terms keep getting smaller, yet the sum grows without limit.

Grouping the terms shows why. 1/3 + 1/4 is more than 1/4 + 1/4 = 1/2; the four terms from 1/5 to 1/8 add up to more than four 1/8s, which is 1/2; the eight terms from 1/9 to 1/16 also add up to more than 1/2; and so on. You can make as many groups worth more than 1/2 as you like, so you can keep adding 1/2 forever, and the sum has no ceiling.

But it grows very slowly: about 2.93 with 10 terms, about 5.19 with 100, and only about 14.39 with a million. The sum first passes 10 at the 12,367th term, and passing 20 takes about 272.4 million terms. The sum of x terms grows only about as fast as the natural logarithm of x (log x, a number that goes up by only about 2.3 each time x becomes ten times bigger).

If s is even slightly greater than 1, the terms shrink faster and the sum settles on one value. That is why the sum gives the zeta function’s value only when s is greater than 1.

Why does the sum become a product over primes? How does that show there are infinitely many primes?

For the prime 2, make the sum 1 + 1/2^s + 1/4^s + 1/8^s + … (a sum over the numbers made by multiplying 2 by itself). Make the same kind of sum for each prime 3, 5, 7, …, and multiply them all together. Opening the brackets gives every product you can make by picking one term from each bracket. For example, picking 1/4^s from the 2 bracket, 1/3^s from the 3 bracket and 1 from all the others gives 1/12^s (12 = 2 × 2 × 3).

Every whole number splits into a product of primes in only one way. So 1/1^s, 1/2^s, 1/3^s, … each turn up exactly once, and the zeta sum equals the product over the primes alone. This is called the Euler product. Euler showed it in a 1737 paper, and Riemann began his 1859 paper from this formula. Checking with s = 2, multiplying the brackets for the primes up to 7 gives about 1.595, and up to 100 about 1.642, approaching π²/6 (about 1.645).

This shows that there are infinitely many primes. If there were only finitely many primes, there would be only finitely many brackets. At s = 1, each bracket is a fixed number (for the prime 2, 1 + 1/2 + 1/4 + … = 2), so multiplying finitely many of them can only give a fixed number (if the only primes were 2, 3, 5 and 7, it would be 2 × 3/2 × 5/4 × 7/6 = 4.375). Yet the product equals the sum, and at s = 1 the sum is the harmonic series, which grows without limit. These cannot both be true, so there must be infinitely many primes.

How did Riemann extend s? (Analytic continuation)

When s is 1 or less, the sum has no answer: s = 0 gives 1 + 1 + 1 + …, and s = −1 gives 1 + 2 + 3 + …. In his 1859 paper, Riemann wrote that both the sum and the product over primes make sense only when the real part of s (explained just below) is greater than 1, and then found a different formula, using an integral, that works for any s.

Here s is a complex number. A complex number is written like 3 + 2i, using a number i whose square is −1, and it can be shown as a point on a plane: across is the ordinary-number part (the real part), and up is how many times i (the imaginary part). Riemann’s formula gives exactly the same values as the original sum where the real part is greater than 1, and it also gives values on the rest of the plane (only at s = 1 does the value shoot off to infinity).

Stretching a function smoothly beyond the range where its original form works, in this way, is called “analytic continuation”. On the complex plane, there is only one way to extend it while keeping it smooth (differentiable). That is why the extended values are fixed, one each.

Values of the extended function include ζ(0) = −1/2, ζ(−1) = −1/12 and ζ(−2) = 0. At the negative even numbers −2, −4, −6, … it is always 0. Euler had already studied the equivalent of its values at negative whole numbers before Riemann. Riemann wrote this function as ζ(s) (ζ is the Greek letter zeta), and that notation is still used today.

How are the zeros related to the Riemann Hypothesis?

A value of s where the zeta function is 0 is called a “zero”. The zeros at the negative even numbers −2, −4, −6, … follow right away from the form of the function, so they are called the “trivial zeros”. The product over primes shows that there are no zeros where the real part is greater than 1. All the other zeros, the “nontrivial zeros”, are infinitely many, and they all lie in the strip where the real part is between 0 and 1.

In his 1859 paper, Riemann built a formula for the number of primes below a number x using the nontrivial zeros. He wrote that it was “very probable” that all the nontrivial zeros lie on the line where the real part is 1/2 (in his wording, that “all roots are real”). This is the Riemann Hypothesis, and how the zeros are arranged decides how accurate the estimate of the number of primes is.

On November 20, 2026, a mathematician announced that he believes he has found a proof together with an AI. The next day, the two groups behind Lean (software in which a machine checks proofs) and its shared library of mathematics, Mathlib, certified that both the statement and the proof of the Riemann Hypothesis are correct. But there is still no paper that people can read, and it is still ahead for mathematicians to understand its new ideas and for it to appear in a journal and be broadly accepted. The arrangement of the zeros, how far it has been checked by computer, the steps from “proved” to “solved”, and the prize are explained in detail on the Riemann Hypothesis page.

Are there other “zeta functions”?

Yes. Usually “the zeta function” means the Riemann zeta function on this page, but functions of a similar form are also named “the zeta function of …”. For example, the “Hurwitz zeta function” is 1/a^s + 1/(a + 1)^s + 1/(a + 2)^s + …, the same kind of sum but starting from a instead of 1, and when a = 1 it is the same as the Riemann zeta function.

Zeta functions are also built for “number worlds” other than the whole numbers. They can be written as a product (an Euler product) using whatever plays the role of primes in that world, and they are deeply tied to how that world’s primes are spread out. In particular, for the zeta functions of curves over a world with only finitely many numbers in which you can add, subtract, multiply and divide (a finite field), the statement of the same form as the Riemann Hypothesis was proved by Weil in the early 1940s, and Deligne proved it for more general shapes too.

The Riemann zeta function is also the model for a large family of similar functions called L-functions, and there are hypotheses of the same form for them too (such as the Generalized Riemann Hypothesis).

Check yourself

  1. Q1In the zeta-function sum 1 + 1/2^s + 1/3^s + …, what happens if you keep adding for s = 2 (1 + 1/4 + 1/9 + …) and for s = 1 (1 + 1/2 + 1/3 + …)?

    Answer and explanation

    Answer: B s = 2 settles at a value; s = 1 grows forever

    For s = 2, 1 + 1/4 + 1/9 + … settles at π²/6 (about 1.645), the answer to the Basel problem that Euler gave in 1735. For s = 1, 1 + 1/2 + 1/3 + … (the harmonic series) grows without limit, very slowly, because you can make as many groups worth more than 1/2 as you like. The sum gives the zeta function’s value only when s is greater than 1.

    More on this → Key points: Why does it grow without limit when s = 1? (The harmonic series)

  2. Q2About the equation “1 + 2 + 3 + 4 + … = −1/12”, which says that adding up all the whole numbers gives −1/12, which explanation is right?

    Answer and explanation

    Answer: C The zeta function’s value at s = −1 is −1/12

    −1/12 is ζ(−1), the value at s = −1 of the zeta function smoothly extended beyond the range of the sum. Ordinary adding gives 5,050 by 100 alone and grows without limit; it never approaches −1/12. The extended function’s value at s = 0 is ζ(0) = −1/2, not −1/12.

    More on this → Key points: How did Riemann extend s? (Analytic continuation)

  3. Q3In his 1859 paper, what did the mathematician Riemann do with the zeta function?

    Answer and explanation

    Answer: A Extended s to complex numbers and gave values beyond the sum

    Riemann took s into the complex numbers and smoothly extended the function to the whole complex plane, including the places where neither the sum nor the product over primes gives a value (analytic continuation). That the s = 2 sum equals π²/6 (1735) and that the sum can be rewritten as a product of one bracket per prime (the Euler product, 1737) were both shown by Euler, and Riemann began his paper from the Euler product.

    More on this → Key points: How did Riemann extend s? (Analytic continuation)

Sources and how we checked

AI wrote this page from the sources above, and a different AI checked it against the text of those sources (November 21, 2026). A person with a master’s degree in science and a Japanese high-school science teaching license also read and checked it before publishing. Numbers are as of that date. If anything was hard to follow, you spot a mistake, or there’s a term you’d like explained, please write to [email protected].

Glossary

All 10 Math terms →