The Mandelbrot Set: One Rule, Endless Detail
One rule, z → z² + c, repeated from zero, draws one of the most famous shapes in mathematics. We build it from scratch: complex numbers as points, the rule and its orbits, why anything more than two away from zero escapes, and how testing every pixel draws the set. Then the heart from last episode (the main body is exactly that cardioid), bulbs whose periods you can count on their antennas, a zoom 484 million times into seahorse valley that ends on a tiny copy of the whole set, why it's all one piece, Julia sets, and the digits of π hiding at its neck.
Chapters
- 0:00 Intro
- 0:44 Numbers on a plane
- 1:16 The rule
- 1:45 The escape line
- 2:10 Drawing the set
- 2:47 The heart, again
- 3:20 Bulbs and their periods
- 3:58 Into seahorse valley
- 4:30 A copy of everything
- 5:08 All one piece
- 5:47 Julia sets
- 6:23 Hidden π
- 7:01 Draw it yourself
- 7:26 Recap and next
Cheat sheet
- The rule: z₀ = 0, then z → z² + c, over and over (the orbit of c)
- The Mandelbrot set: every c whose orbit never runs off to infinity
- Once |z| is more than 2, the orbit always escapes; so the set fits inside the circle of radius 2
- Main body: c = e^(it)/2 − e^(2it)/4, the cardioid; inside it, orbits home in on one point
- Bulbs on the heart: period q, and q spokes where the antenna branches (counting the stem); between 2 and 3 sits 5
- Copies of the whole set are dense along the edge (McMullen); the set is connected (Douady and Hubbard, 1982)
- π: c = −3/4 + εi escapes after about π/ε steps (3,141,593 for ε = 0.000001)
Sources
- Mandelbrot set
- Who discovered the Mandelbrot set? (Scientific American, 1990)
- McMullen, The Mandelbrot set is universal
- Klebanoff, π in the Mandelbrot set
- Julia, MacTutor
- Fatou, MacTutor
Transcript
This shape comes from a rule so short it fits on a sticky note: z becomes z squared, plus c. Repeat it, and see what happens. Zoom into its edge, and the detail never runs out. Spirals inside spirals, seahorse tails, lightning. And after almost half a billion times magnification, the whole shape again, tiny and almost perfect.
By the end of this video, you'll know how one line of math makes all of this, why its heart is the one from our last episode, and where π is hiding inside it.
This is Just Known. From unknown, to known. Beauty of Math, episode four: the Mandelbrot set, one rule, endless detail. First, the numbers. Here, every point on the plane is a number.
The sideways part is the ordinary, real part, and the up and down part is the imaginary part: together, a complex number. You can add them like arrows, tip to tail. And squaring one does something beautiful. It doubles the angle, as we saw last time, and it squares the distance from the center. A point at distance two goes to four.
A point at a half goes to a quarter. So inside the unit circle, squaring pulls points in, and outside, it flings them out. Now the rule. Pick a number, and call it c. Start at zero.
Square it, and add c. Then square that, and add c again, over and over. The points you visit are called the orbit of c. For some values of c, the orbit stays close, circling, or settling down. For others, it runs off to infinity.
The Mandelbrot set is every c whose orbit stays. That's all it is: one rule, and one question. Does it escape? There's a shortcut. Once the orbit gets more than two away from zero, it's gone for good.
Out there, squaring makes it grow faster than adding c can ever pull it back. So the computer only has to watch for the orbit crossing a circle of radius two. And since the very first step lands on c itself, any c more than two away escapes at once. The whole set fits inside that circle. To draw it, test every pixel.
Each pixel stands for a value of c. Run the rule, and if the orbit never escapes, color the pixel dark: it's in the set. If it does escape, color it by how quickly it went. Those colors aren't part of the set: they show how long each point held out before escaping. The first pass is blocky.
With finer and finer pixels, the famous shape appears: a heart, a round bulb, and an edge covered in buds. In nineteen seventy-eight, one of the first pictures of it was a computer printout, drawn in asterisks. Today, your phone can draw it in a fraction of a second. Look at the main body. It's the cardioid from last episode, exactly.
For every c inside it, the orbit doesn't just stay: it homes in on a single point. Near that point, the rule shrinks distances, so every step pulls the orbit a little closer. The edge of the heart is where that point stops pulling the orbit in. And its formula is the one we found with two spinning circles: a big one at speed one, and one half its size at speed two. Now the round bulb on the left.
For c in there, the orbit settles too, but onto two points, hopping back and forth forever. The bulb on top: three points, for every c in that bulb. Every bulb on the heart has its own period, and you can read it straight off the picture: find where its antenna branches, and count the spokes, including the one that leads back to the bulb. Three spokes, period three. Five spokes, period five.
And the bulbs follow a rule of their own. Between the bulbs of period two and period three, the biggest bulb in the gap has period five: two plus three. Now zoom in, into the valley between the heart and the left bulb. Its nickname is seahorse valley. Spirals appear, and inside them, more spirals, and tails that curl like seahorses.
Keep going. A thousand times. A million. Almost half a billion. The detail never runs out, and it never repeats exactly.
At this zoom, on a laptop screen, the whole set would be about a hundred thousand kilometres wide. That's nearly eight Earths, side by side. And then, deep in the spirals, this. The whole Mandelbrot set again: the heart, the bulb, the antenna, almost five hundred million times smaller than the original. The orbit from its center comes back to exactly zero every hundred and fifty-six steps.
These tiny copies are everywhere along the edge. Each one is wrapped in its own spirals, with its own seahorse valley, hiding still smaller copies. They're not perfect copies, just very close: the set is nearly the same at every scale, but never exactly. Those copies look like islands, floating free. They're not.
In nineteen eighty-two, Adrien Douady and John Hubbard proved that the Mandelbrot set is connected: every speck is joined to the main body by filaments far too thin to see. They also gave the set its name, after Benoit Mandelbrot, who made it famous with his computer pictures at I B M. He had spent years showing that coastlines, clouds and even prices are rough at every scale, and he called such shapes fractals. Whether the set is joined up in an even stronger sense is still an open question, and one of the biggest in its field. Every value of c has a twin picture.
Fix c, and instead, start the rule from every point of the plane. The starting points that never escape fill a shape. Its edge is called the Julia set of c, named after Gaston Julia, who studied these rules in nineteen eighteen, with no computer at all, around the same time as Pierre Fatou. Pick c inside the Mandelbrot set, and its Julia set is one connected piece. Pick c outside, and it shatters into dust.
So the Mandelbrot set is a map: it shows, for every c, whether its Julia set holds together. Here's a surprise. Go to the narrow neck between the heart and the left bulb, at minus three quarters. Step a hundredth above it, and count how many steps the orbit takes to escape: three hundred and fifteen. A ten-thousandth above: thirty-one thousand, four hundred and seventeen.
A millionth: three million, one hundred and forty-one thousand, five hundred and ninety-three. The digits of π, appearing out of nowhere. And at the heart's sharp point on the right, at one quarter, it happens again, this time with square roots. Dave Boll noticed this in nineteen ninety-one. Ten years later, it was proved at the sharp point.
You can draw it yourself in about a dozen lines of code. For each pixel, work out its c. Start at zero, then square and add c, until the orbit gets more than two away, or you run out of patience at two hundred steps. Color the pixel by how many steps it took. That's the whole program.
Zoom by changing the numbers that turn a pixel into c. The code is in the description. Let's recap. One rule: square, add c, and repeat, starting from zero. The set is every c whose orbit never escapes, and once it's more than two away from zero, it always does.
Its heart is last episode's cardioid, its bulbs settle into cycles you can count on their antennas, and its edge holds endless detail, including tiny copies of the whole set, all joined in one piece. Next time, we follow the same kind of rule along a single line, and watch order turn into chaos: the logistic map. This is Just Known. From unknown, to known.
Note: every picture of the set is computed from its math, on the GPU, including the 484-million-times zoom. Pictures marked "illustration" (the Earth-scale card, the coastline, cloud and price icons) are schematic; the 1978 printout is recreated.
Narration voice generated with Google Gemini text-to-speech.
