An iteration means repeating the same rule over and over, feeding the result back in each time. Think of it like a machine: you put a number in, the machine does something to it, and the output becomes the next input.
Let's start with the simplest possible rule:
Pick a value for x and watch what happens to z as we keep applying the rule:
With this simple rule, the numbers always march off toward infinity (unless x = 0). That's pretty boring — everything explodes. Let's make the rule more interesting...
Now let's change the rule to include squaring:
This tiny change makes things much more interesting. For some values of x, the numbers still explode to infinity. But for others, they stay small and bounce around forever!
So x = 0.5 and x = -0.5 sit on a number line. What if we tested every value of x and coloured the result — green for stable, red for explodes?
That's nice, but it's just a 1D line. What if we could do this across a whole 2D plane of values?
To go from a line to a plane, we need a way to describe points in 2D. This is where complex numbers come in.
Don't worry — a complex number is just a point on a 2D plane. Instead of one number x, we write c = x + iy, where x is the horizontal position and y is the vertical position. The letter i is a special marker that just means "this part goes up/down."
So complex numbers are just coordinates. Now our rule becomes:
The squaring of complex numbers involves a twist (literally — it rotates and scales). But the key idea is the same: iterate, and see if the result explodes or not.
Now we do something bold: we test every single point on the plane. For each point c, we run the rule z → z² + c over and over and ask: does it explode, or stay small?
Here's a map of the plane. Let's pick two points and test them — one deep inside the dark region, and one clearly outside:
Now imagine doing this for every single point. Points that never escape are black. Points that escape get coloured by how quickly they escape — fast escapers get one colour, slow ones get another.
That image you just watched being built? That's the Mandelbrot set.
Formally, the Mandelbrot set is the collection of all points c where the iteration z → z² + c does not fly off to infinity. Those are the black points in the image.
But the real magic is at the boundary — the edge between the black region and the coloured region. That's where the incredible detail lives:
Each zoom reveals structure that wasn't visible before, yet the same patterns keep reappearing at every scale.
Here's the mind-bending part. Take two points that are incredibly close together near the boundary. One might escape after 50 iterations. The other might never escape at all. A tiny change in starting position leads to a huge difference in outcome.
This is a hallmark of chaos — extreme sensitivity to starting conditions. It's the same idea behind "the butterfly effect" in weather: a small change now can lead to a completely different result later.
That's the Mandelbrot set: a simple rule, applied over and over, creating infinite complexity from almost nothing.
Now close this and explore it yourself. Drag a rectangle on the boundary and zoom in — see what you discover!