On Monday we covered the real, imaginary, and complex numbers. Yesterday we went over the complex plane. Only one thing left…
Constructing the Mandelbrot Set
Let’s play a game.
You think of any number. I’ll take that number, square it, and add the original number. Then I’ll take that number, square it, and add the original number. And so on.
Let’s try it with the number 2:
It’s easy to see that the numbers will just keep getting higher and higher forever.
But what if we played the game with a different number? Let’s say, -1.
No matter how long we play this game, we’ll never get anything besides -1 and 0.
This “game” is called an iterative algorithm – “iterative” meaning “doing the same thing over and over,” and “algorithm” meaning “a series of well-defined steps.” The formal mathematical definition for our game would be:
That is, the next number in the game equals the current number squared, plus our original number.
But enough formality. Let’s get back to the game.
We’ve only played this game twice, but already we can see there are two different classes of numbers. Some numbers, like 2, shoot off to infinity. We’ll call those the “Superman Numbers,” since they are up, up, and away. Other numbers, like -1, just circle around in one spot no matter how long we wait. We’ll call those the “Tornado Numbers.”
So far, though, we’ve only played the game with real numbers. Let’s try it with i.
By the way, if you want a quick way to do these calculations, try Google. The main search bar actually does all kinds of calculations, even with complex numbers. For instance, to figure out Step 3, you’d just type in the following, and hit Enter: (i – 1)^2 + i
Anyway – we can see that i is another Tornado Number. Let’s try just one more example, with another complex number, i + 1. And by the way, I’m totally cheating and using Google for these calculations.
Actually, when I tried this just now, Google got confused on Step 4 and, for some unfathomable reason, tried to correct my spelling (and refused to do the calculation). Very helpful. I did it by hand, but I’m pretty sure it’s right.
Anyway, i + 1 is another Superman Number.
Let’s take the four numbers we’ve done so far and plot them on the complex plane. We’ll put the Superman Numbers in blue, and the Tornado Numbers in green. (Click image to enlarge.)
Suppose we got a computer to play this game, over and over, for millions of points on the complex plane, still plotting the Tornado Numbers in green and the Superman Numbers in blue. What would that look like?
By now, you can probably guess…
Ta-da! The Mandelbrot Set!
I’m out of time, so I’ll stop here for today. Let me know if you have any questions. Tomorrow we’ll dive a little further into this monster we’ve just created!