ζ Ramanujan & the Zeta Function
A 3D JOURNEY · FOLLOWING 3BLUE1BROWN'S PATH

How can 1+2+3+… “equal” −1/12?

It is the most famous “wrong” equation in mathematics — and hidden inside it is one of the deepest ideas ever found: analytic continuation. Scroll down, play with the spirals, fly over the 3D zeta landscape, and see exactly where −1/12 comes from — and what it does NOT mean.

1+2+3+… = +∞ (diverges)ζ(−1) = −1/121+2+3+… = −1/12 (ℜ)

✕ NOT the ordinary sum

Adding 1+2+3+… in the usual way never settles down — the partial sums S_N = N(N+1)/2 grow forever: S₁₀ = 55, S₁₀₀ = 5050, S_N → +∞. No ordinary addition gives −1/12.

✓ It IS an assigned value

−1/12 is the value given by two precise methods that agree: Ramanujan summation (ℜ) and the analytic continuation of the Riemann zeta function, ζ(−1) = −1/12. Always write it with its label: 1+2+3+… = −1/12 (ℜ).

Start the journey ↓ Jump to the 3D landscape
How to read the badges: FACT · proved / computed OBSERVATION · what the picture shows HEURISTIC · suggestive, not a proof HYPOTHESIS · unproven METHOD · assigned value APPLICATION · used in physics ARTIST'S IMPRESSION · a visualisation

Every claim and picture on this page carries one of these badges, so you always know what is proven, what is merely seen, and what is still a guess.

01

The impossible sum

FACT By ordinary addition the sum diverges: the partial sums are S_N = N(N+1)/2 — already S_100 = 5,050 — so 1+2+3+… = +∞ in the ordinary sense, and −1/12 is NOT that sum.

Why −1/12 makes sense

  1. The series 1 + 1/2^s + 1/3^s + … defines a genuine function ζ(s) wherever it converges (s > 1) — §03 shows its partial sums settling onto a height.
  2. That function can be continued past s = 1 in exactly ONE way that preserves angles — analytic continuation (§05–§07). It is forced, not a choice or a trick.
  3. The continued function, evaluated at s = −1, lands on −1/12. That is what “1+2+3+… = −1/12 (ℜ)” means: ζ(−1) = −1/12, an assigned value — never ordinary addition.
  4. Nature agrees with the assignment: the same −1/12 (and its family member ζ(−3) = 1/120) is the finite part left after the infinities cancel in real, measured physics — the Casimir force (§10).

So Ramanujan was not doing ordinary addition. He was using a different, carefully defined machine that assigns values to some divergent series. §02 starts with his famous shortcut; §§03–09 build the machine properly, piece by piece.

02

Ramanujan's shortcut — beautiful, but handle with care

In his famous 1913 letter to G. H. Hardy, Ramanujan announced results like this one. A popular reconstruction of the idea goes like this. First, a gentler divergent series:

A = 1 − 2 + 3 − 4 + 5 − 6 + ⋯ = 1/4
(this value 1/4 can be justified by careful methods — see §09)
c = 1 + 2 + 3 + 4 + 5 + 6 + ⋯
−4c =    −4       −8        −12 − ⋯
c − 4c = 1 − 2 + 3 − 4 + 5 − 6 + ⋯ = A = 1/4
−3c = 1/4  ⟹  c = −1/12
⚠ HEURISTIC — NOT A PROOF. HEURISTIC Shifting and subtracting infinite series term-by-term is NOT valid for divergent series in the ordinary sense — with tricks like this you can “prove” almost anything. The calculation is a brilliant hint that −1/12 is a natural value to assign, but the real justification is the zeta function and analytic continuation (§03–§08) and Ramanujan's own summation formula (§09).

A related assigned value from the same family: 1 − 1 + 1 − 1 + ⋯ = 1/2 (ℜ) — the partial sums bounce 1, 0, 1, 0… forever, and the assigned value sits exactly halfway. Keep that pattern in mind: these methods often pick the “centre of mass” of a bouncing or runaway process.

03

Meet the zeta function ζ(s)

FACT For real numbers s > 1, define ζ(s) = 1 + 1/2^s + 1/3^s + 1/4^s + ⋯ = Σ 1/n^s. The terms shrink fast enough that the sum converges. Euler found the jewel ζ(2) = π²/6 ≈ 1.645 — π hiding inside a sum of fractions! Also ζ(3) ≈ 1.202 and ζ(4) = π⁴/90 ≈ 1.082. But at s = 1 the series becomes 1 + 1/2 + 1/3 + ⋯, which diverges (a pole), and for s ≤ 1 the series definition stops working entirely.

s = 2.00 · ζ(s) ≈ 1.645 (first 400 terms)

OBSERVATION What this picture shows: ζ(s) is the height the dots settle at. Four curves, four heights — the nearer s gets to 1, the higher the limit and the slower the climb. The red curve (s = 1) never settles: it climbs forever, and that endless climb is the pole. For s ≤ 1 the series definition stops working entirely — which is why §05–§08 are needed.

04

The spiral sum — zeta with complex numbers

Now 3Blue1Brown's key picture. Let s be complex, s = a + bi. Each term splits into two effects:

Size — from the real part

|1/n^s| = 1/n^a. Only the real part a = Re(s) controls how fast terms shrink — exactly as in §03.

Rotation — from the imaginary part

1/n^s also rotates each term by an angle −b·ln(n). Bigger n, bigger twist. So the sum becomes a chain of arrows, each shorter and more rotated than the last.

s = 2 + 1i ·
n = 260 · partial sum S_n = …

OBSERVATION converges ✓ — the chain settles to ζ(s).

Why this picture matters

FACT 1. It makes ζ(s) a single visible point: the spiral’s endpoint IS ζ(s). A complex function value is not a mystery — it is simply where the chain of arrows lands.

OBSERVATION 2. The imaginary part only rotates: it never changes a term’s length, since |1/n^s| = 1/n^a depends only on a = Re(s). So convergence is decided by the real part alone — the spiral is just the straight real sum, twisted.

FACT 3. It shows exactly where the sum breaks: when Re(s) > 1 the arrows shrink fast enough and the spiral settles; when Re(s) ≤ 1 they do not shrink enough and the chain wanders off forever. That visible failure is why analytic continuation is needed at all (§05–§08) — the sum cannot define ζ on the left half of the plane.

OBSERVATION HYPOTHESIS 4. It previews the zeros: a zero of ζ is a value of s whose spiral lands exactly on the origin 0. The trivial zeros are established; the claim that every non-trivial zero lands on the critical line is the Riemann Hypothesis (§11) — still unproven.

05

Complex functions bend grids — and zeta's grid begs to continue

A complex function takes each point of the plane to a new point — so it bends whole grids. Warm-up: f(s) = s² doubles angles around the origin. The special functions whose bending preserves angles (locally, wherever the derivative is not 0) are called analytic — or conformal. The zeta function is analytic wherever its series works, Re(s) > 1.

Morph: 0%
Drag the gold point: s = 2.5 + 1.0i → ζ(s) =

OBSERVATION The neat grid on Re(s) > 1 warps into smooth curved arcs — and the arcs stop abruptly at the line Re(s) = 1. The picture begs to be continued to the left. That “begging” is intuition, not proof — but §07 shows the continuation, if it exists, can only be one function. HEURISTIC

OBSERVATION Watch the gold lines: straight lines in, smooth arcs out — and the arcs stop abruptly at Re(s) = 1. That hard edge is where the series stops working. Far to the right, ζ(s) ≈ 1, so the bent images of the high-Re(s) lines pile up on top of each other near ζ = 1 — that crowding is the picture's point (ζ flattens towards 1 as Re(s) grows), not a bug.

The view follows the morph on its own — wide for the input grid, closing in on ζ = 1 as the grid bends. Drag the gold point, or use the two sliders above, to move s.

Why this picture matters

OBSERVATION 1. A complex function is a transformation: every point s moves to ζ(s), so a whole grid moves with it. The bent grid IS the function — you can read what ζ does by watching straight lines become arcs.

FACT 2. The arcs still meet at right angles: ζ is analytic (angle-preserving) wherever its series works, so the grid’s crossings stay square even as the lines bend. That is what “analytic” means, geometrically.

OBSERVATION HEURISTIC 3. The arcs stop dead at Re(s) = 1: the picture is cut off mid-curve, and your eye wants to finish it. That “begging” is intuition, not proof — but it is exactly the question analytic continuation answers (§07).

FACT 4. The continuation is forced, not chosen: once you demand the finished picture still preserve angles everywhere, there is only one way to complete it (identity theorem, §07). The grid on the right half already determines the grid on the left — including ζ(−1) = −1/12.

06 · ★

The 3D zeta landscape — the whole story in one surface

Here is ζ(s) over the whole complex plane at once. The height of the surface is log|ζ(s)| — how big the value is — and the colour is the phase (argument) of ζ(s), cycling through the rainbow as the value rotates around 0. This single landscape contains every fact on this page:

The spike at s = 1

A tower shooting up: the pole. ζ(1) has no finite value — the surface itself tells you the series' home territory ends here.

FACT

Dips to −∞ are zeros

Where |ζ(s)| = 0 the height plunges. Find dips at s = −2, −4 (trivial zeros) and up the glowing critical line at s = 1/2 + 14.135i (first non-trivial zero).

FACT

The gold marker: s = −1

On the far left shore sits ζ(−1) = −1/12 ≈ −0.0833 — a small, perfectly ordinary value of the continued function. No infinity, no drama: just −1/12.

FACT
WebGL did not paint on this device, so the 3D landscape is hidden rather than left blank. The chart in §08 shows the same values along the real line.

ARTIST'S IMPRESSION Drag to orbit, scroll or pinch to zoom. The surface is computed live in your browser from the real ζ function (Dirichlet eta series + Riemann's functional equation — the same code verifies ζ(−1), ζ(−2) and ζ(2) below). The rendering is a visualisation; the values it shows are the mathematics itself.

FACT Ranges — Re(s): −4 to +4, ticks at −4, −2, 0, 1, 2, 4 (1 is the pole) · Im(s): −20 to +20, ticks at −20, −14.135, 0, +14.135, +20 (±14.135 marks the first non-trivial zero) · height log|ζ(s)|: −3 to +3, ticks at −3, 0, +3 — the pole spike is capped at +3; the true pole goes to +∞.

Legend — Height = log|ζ(s)|: how big the value is. Colour = phase (argument) of ζ(s). X axis (cyan): Re(s). Z axis (amber): Im(s). Height axis (gold): log|ζ(s)|.

…
07

Analytic continuation — a jigsaw with only one solution

Why should the arcs of §05 continue in one specific way, and not any way we like? Because of angle preservation. An analytic function keeps the angles between curves (wherever its derivative is not 0 — at a zero of the derivative, angles multiply instead: under s² a 67° corner becomes 134°, it doubles). Requiring every little grid square to stay square-cornered is an extremely rigid demand.

The chain of discs — continuation step by step

Disc 1 — home ground: the series itself defines ζ inside this disc.

Why only one way — squares must stay square

…

OBSERVATION The chain shows the forcing: each disc's values are fixed by its overlap with the previous disc, so the walk from s = 2 to s = −1 allows no choices. The square test shows the filter: any proposed continuation that bends a square's corners is not analytic and is ruled out. Forced steps + the square rule leave exactly one candidate.

Footnote — the exception that proves the rule: at isolated points where f′(s) = 0, angles multiply instead (under s², a 67° corner becomes 134°). Everywhere else, an analytic map preserves angles exactly.

The identity theorem — “only one way”

FACT A theorem (the identity theorem) says: if two analytic functions agree on any small patch, they agree everywhere they are both defined. So there is at most ONE angle-preserving extension of ζ beyond Re(s) > 1 — and Riemann found it in 1859. Analytic continuation is that unique extension. ζ(−1) = −1/12 is not a choice or a convention: any analytic continuation must give exactly this value.

08 · ★

The −1/12 reveal — walk the real line

Now walk s along the real line and watch the continued ζ(s). Start at s = 2, where the honest series gives π²/6. Slide left: ζ grows, blows up at the pole s = 1, then — on the continued side — comes back down, crosses ζ(0) = −1/2, and arrives at the famous address:

ζ(2.00) = 1.645
ζ(2)
π²/6 ≈ 1.645
FACT
ζ(0)
−1/2
FACT
ζ(−1)
−1/12 ≈ −0.0833
FACT METHOD
ζ(−2)
0
FACT

Near s = 1 the chart is clipped: ζ shoots to +∞ on both sides of the pole. Every value left of the pole comes from the continuation (computed here with the functional equation), not from the series.

Why does the graph jump?

FACT It is NOT a jump in the function. ζ(s) is continuous at every point on each side of s = 1. What s = 1 holds is a simple pole (with residue 1): approaching from the right, ζ(s) → +∞; approaching from the left, ζ(s) → −∞. No finite picture can contain infinity, so the curve leaves through the top of the frame on one side and re-enters from the bottom on the other. The break is in the PICTURE, not in ζ — the two sides never meet, and s = 1 itself has no value.

FACT The flat-looking stretch on the left (from s = −2 to 0) is real, and it is not a jump either: ζ is small there and changes slowly — ζ(−2) = 0, ζ(−1) = −1/12 ≈ −0.083, ζ(0) = −1/2 — so at this vertical scale the curve looks almost level. Stretch the vertical axis and you would see its gentle slope.

FACT You have seen this shape before: y = 1/(s − 1) does exactly the same thing at s = 1 (just as y = 1/x does at x = 0) — up to +∞ on one side, down to −∞ on the other. A simple pole always draws this +∞ / −∞ break; ζ's pole is the same familiar creature.

09

Ramanujan summation — the formula behind the magic

Ramanujan's own method grew out of the Euler–Maclaurin formula, which compares a sum with an integral and corrects the difference using the Bernoulli numbers B₂ = 1/6, B₄ = −1/30, B₆ = 1/42… For f(n) = n, the machinery gives the assigned value ζ(−1) = −B₂/2 = −(1/6)/2 = −1/12. In general ζ(−n) = −B_{n+1}/(n+1) — which is why every even negative argument gives 0: the odd Bernoulli numbers B₃, B₅, … are all zero. Those are the trivial zeros.

Values of the continued ζ on the real line

sζ(s)
2π²/6 ≈ 1.645FACT
3≈ 1.202FACT
4π⁴/90 ≈ 1.082FACT
1pole — no finite valueFACT
0−1/2FACT
−1−1/12 ≈ −0.0833FACT
−20FACT
−31/120 ≈ 0.00833FACT
−40FACT
−5−1/252 ≈ −0.00397FACT
−60FACT
−71/240 ≈ 0.00417FACT

Ramanujan-assigned sums (ℜ)

SeriesAssigned value
1 − 1 + 1 − 1 + ⋯1/2 (ℜ)
1 + 2 + 3 + 4 + ⋯−1/12 (ℜ)
1 + 4 + 9 + 16 + ⋯0 (ℜ)
1 + 8 + 27 + 64 + ⋯1/120 (ℜ)

METHOD Each (ℜ) value equals ζ at the matching negative point: squares → ζ(−2) = 0, cubes → ζ(−3) = 1/120. Two different machines, one set of answers — strong evidence the assignment is natural, though “natural” is a judgement, not a theorem.

Bernoulli numbers used

B₀ = 1 · B₁ = −1/2 · B₂ = 1/6 · B₄ = −1/30 · B₆ = 1/42 · B₈ = −1/30
ζ(−1) = −B₂/2 = −1/12 ✓

10

Where −1/12 earns its living

APPLICATION Why would physics care about a divergent sum? Because the vacuum itself is one. Every wave mode of a quantum field carries a zero-point energy ½E_n, and the vacuum energy is the sum over ALL modes: ⟨E_vac⟩ = ½ Σ E_n — a sum that always diverges. Zeta regularisation is the bookkeeping that tames it: keep the finite part that changes when you change something physical (a plate separation, the size of a dimension), and discard the infinite part that does not change. What you can measure is never the infinite total — it is always a difference, a force.

METHOD The definition is one line: for a series a₁ + a₂ + …, build ζ_A(s) = Σ 1/a_n^s, which converges for large Re(s), continue it analytically, and define the regularised sum to be ζ_A(−1). For a_n = n, ζ_A is the Riemann zeta function — and the regularised sum of 1+2+3+… is ζ(−1) = −1/12.

The Casimir effect

Two metal plates in a vacuum attract each other slightly, because only certain wave modes fit between them. Summing those mode energies uses ζ-regularisation — and out pops a finite answer matching the measured force. The force itself has been measured in the lab; whether ζ-regularisation is “why” it works, or just a very good bookkeeping device, is still debated by physicists.

APPLICATION OBSERVATION · force measured

Bosonic string theory

In the mathematics of bosonic string theory, a consistency calculation sums 1+2+3+… and uses its assigned value −1/12 to fix the number of space-time dimensions at 26. This is a use inside a theory — not evidence that the ordinary sum equals −1/12, and not proof that string theory describes our world.

APPLICATION

Worked example 1 — the 1D Casimir cavity (Obousy 2011, §3)

Standing waves in a cavity of length L: k = nπ/L, so the mode energies are E_n ∝ n.
Vacuum energy: E_0(L) = (π/2L) Σ_{n=1}^∞ n = (π/2L) ζ(−1)
Insert ζ(−1) = −1/12: E_0(L) = −π/(24L) — negative!
L = 1.00 · E_0(L) = −π/(24L) = −0.1309 · |F| = π/(24L²) = 0.1309

APPLICATION The energy is negative, and it dives further down as L shrinks — so the walls are pulled together: an attraction, with force magnitude |F| = π/(24L²) in this toy model. Obousy's own caveat: this 1D scalar result differs from the familiar 3D law, where the force falls as 1/a⁴ — see the next panel.

Worked example 2 — real 3D plates: the measured Casimir force

For two real parallel plates, the mode sum runs over three dimensions and becomes Σ n³, regularised to ζ(−3) = 1/120 — note: NOT −1/12. The same machine, a different member of the family. With plate separation a: energy per area E/A = −π²ħc/(720 a³), and force per area F/A = −π²ħc/(240 a⁴).

a = 500 nm · E/A = −3.47×10^-9 J/m² · F/A = −2.08×10^-2 Pa

OBSERVATION · force measured The force has been measured in laboratory experiments, and it matches. The infinite vacuum energy itself is never measured — only this finite difference is. Computed with ħc = 197.3 eV·nm.

Bosonic string theory: 24 × (−1/24) = −1 fixes D = 26

Each direction a bosonic string can vibrate in contributes a zero-point sum ½ Σ n, regularised to ½·ζ(−1) = −1/24. A string in D spacetime dimensions has D−2 transverse directions, so the total is −(D−2)/24. Consistency — a massless photon, no ghosts, Lorentz invariance — demands this total be exactly −1, so D−2 = 24 and D = 26.

MODEL-DEPENDENT · inside a theory APPLICATION 24 transverse directions × (−1/24) each = −1 → D = 26. This is a result inside bosonic string theory — a model-dependent consistency condition, not a measurement of our world.

Extra dimensions: Casimir energy ∝ ζ(5)/R⁴

E = −[3/(64π²)] · (1/R⁴) · ζ(5),   ζ(5) ≈ 1.037

Obousy (§4) puts a periodic scalar field on M₄×T¹ — our 4D spacetime times a tiny circle of radius R — and finds the Casimir energy density E = −[3/(64π²)]·(1/R⁴)·ζ(5), with ζ(5) ≈ 1.037. Because it grows as 1/R⁴ when R shrinks, this energy can push back against collapse — which is why Casimir energy is discussed as a possible way to stabilise the size of extra dimensions (modulus stabilisation).

HYPOTHESIS APPLICATION

APPLICATION The same tool appears across physics: Ray & Singer (1971) defined determinants of operators as exp(−ζ′_A(0)); Dowker & Critchley (1976) proposed zeta regularisation for quantum problems, and Hawking (1977) used it for path integrals in curved spacetime — partition functions for thermal gravitons and matter near black-hole horizons. Zeta regularisation is equivalent to dimensional regularisation, it preserves the symmetries of the system, and — unlike many methods — it needs no counterterms and returns only finite results.

One family of assigned values

SeriesAssigned valueWhere it appears
Σ nζ(−1) = −1/121D Casimir toy cavity METHOD
Σ n³ζ(−3) = 1/1203D Casimir plates (measured force) METHOD
Σ n⁵ζ(−5) = −1/252Extra-dimension Casimir — ζ(5) appears in Obousy's M₄×T¹ result METHOD
Important: Neither application proves that ordinary addition gives −1/12. They show the assigned value is useful — a different, and genuinely interesting, claim.
The honest boundary — why physicists trust it: FACT The same finite Casimir force comes out of several different regulators — a hard cutoff, dimensional regularisation, and zeta regularisation — once the separation-independent infinite part is subtracted. That agreement is a fact of calculation. The −1/12 is the finite remainder that survives the subtraction in a symmetry-preserving way. What it means is interpretation — and it does NOT prove that the ordinary sum 1+2+3+… equals −1/12. The physics lives in the subtraction, not in the bare sum.
11

The zeros and the million-dollar question

The continued ζ has two families of zeros. The trivial zeros sit at s = −2, −4, −6, … (§09 explains why). All other zeros — the non-trivial zeros — lie inside the critical strip 0 < Re(s) < 1, and the first one found is at s = 1/2 ± 14.135i: exactly on the central line Re(s) = 1/2, the critical line. In fact, every non-trivial zero ever computed — trillions of them — lies exactly on that line.

The critical strip — pick a line

The same line, in the ζ-plane: w(t) = ζ(Re + i·t)

Closest approach to the origin along this line: …

Re(s) = 0.50 ·
t = 0.00 · ζ(0.50 + 0.00i) = … · |ζ| = …

HYPOTHESIS The Riemann Hypothesis (1859) claims ALL non-trivial zeros lie on Re(s) = 1/2. It is still UNPROVEN — and the Clay Mathematics Institute offers $1,000,000 for a proof. The chart shows the strip and the first few zeros on the line; zeros off the line have never been found, but “never found” is not a proof.

What to look for

FACT 1. Drag the red line onto Re(s) = 1/2 and sweep t: the pink curve threads the origin exactly three times in this range — at t = 14.135, 21.022 and 25.011. Those threadings ARE the first three non-trivial zeros.

OBSERVATION 2. Drag the line to 0.43 or 0.70 and sweep again: the curve still loops and dances around the origin, but it now misses it every time — the closest-approach readout stays above zero.

HYPOTHESIS 3. The Riemann Hypothesis claims that NO line except Re(s) = 1/2 ever threads the origin, at any height t, however far up you go. Trillions of zeros have been checked on the line and none found off it — but “never found” is not a proof.

12

Quiz — did the −1/12 story click?

0 / 5

Your answers live only in this tab — nothing is recorded or sent anywhere.

✦

Timeline — three centuries, one number

~1730s — Euler studies Σ 1/n^s and solves ζ(2) = π²/6; the Bernoulli numbers (Jacob Bernoulli, a generation earlier) quietly hold the key to the negative values.
1859 — Bernhard Riemann's single short paper extends ζ to the whole plane, finds the functional equation, and states what we now call the Riemann Hypothesis.
1913 — Ramanujan writes to G. H. Hardy in Cambridge, announcing — among many marvels — that 1+2+3+… has the assigned value −1/12 in his summation sense.
2000 — The Riemann Hypothesis becomes one of the Clay Millennium Prize problems: $1,000,000, still unclaimed.
2016 — 3Blue1Brown publishes “Visualizing the Riemann zeta function and analytic continuation” (9 Dec 2016) — the visual path this page follows.
§

Sources & further watching