The Mandelbrot set produces one of the most famous fractal shapes. Fractals on Wikipedia are illustrated mainly by its image.

It also a great example of mathematical visualization and mathematical beauty. Its image can be found on the Wikipedia pages about aesthetics and mathematical visualization.

But what’s exactly these images about? Let’s explore what they show.

The Mandelbrot set is a set of complex numbers c for which function

f(z) = z² + c

does not diverge when iterated from z = 0.

Sounds scary? Let’s try on examples.

For example, let’s check if c = 1 belongs to this set.

Step 1: z = 0
Step 2: z = f(0) = 0*0 + 1 = 0 + 1 = 1
Step 3: z = f(1) = 1*1 + 1 = 1 + 1 = 2
Step 4: z = f(2) = 2*2 + 1 = 4 + 1 = 5
Step 5: z = f(3) = 5*5 + 1 = 25 + 1 = 26

That doesn’t look good. Every step the result gets bigger and bigger, i.e. it diverges. Therefore c = 1 doesn’t belong to this set.

Let’s check c = 0.16.

Step 1: z = 0
Step 2: z = f(0) = 0*0 + 0.16 = 0.16
Step 3: z = f(0.16) = 0.16*0.16 + 0.16 = 0.1856
Step 4: z = f(0.1856) = 0.1856*0.1856 + 0.16 = 0.19444736
Step 5: z = f(0.19444736) = 0.19444736*0.19444736 + 0.16 = 0.1978097758109696

That’s interesting, the result also gets bigger and bigger, but will it grow forever? Actually it won’t. It converge towards 0.2:

Step infinity: z = f(0.2) = 0.2*0.2 + 0.16 = 0.04 + 0.16 = 0.2

So c = 0.16 belongs to this set.

Let’s try another one, c = -1.

Step 1: z = 0
Step 2: z = f(0) = 0*0 - 1 = -1
Step 3: z = f(-1) = (-1)*(-1) - 1 = 1 - 1 = 0
Step 4: z = f(0) = 0*0 - 1 = -1
Step 5: z = f(-1) = (-1)*(-1) - 1 = 1 - 1 = 0

We can do this forever. It means it does not diverge, therefore c = -1 also belongs to this set.

For c = -1 we have a period of two 2. Are there any longer periods?

Yes, there are! We’ve just checked a few real numbers, but the Mandelbrot set is a set of complex numbers.

To investigate periods, I created a web app:

https://dmage.github.io/mandelbrot/

It uses red lines to show how the sequence converges. If you see multiple red lines, it means the sequence has some period.

Happy investigating!

P.S. I also recommend to watch Derek’s video about this set and how it’s connected to the logistic map: https://youtu.be/ovJcsL7vyrk