The Mandelbrot Set – created with Geogebra
It’s possible, or more like probable, that the most mysterious shape ever to arise from the study of Mathematics is that of the Mandelbrot Set. It’s amazing how such an intriguing shape could arise from purely mathematical pursuits. The shape of the Mandelbrot set (often likened to a Beetle), is highly complex yet it is derived from such a simple equation.
Before I get into the post, it’s important to give huge credit to Professor Lee Stemkoski who works at Adelphi University. He figured out a simple and effective way to paint the Mandelbrot set in Geogebra using a lovely little trick – have ten points trace the fractal instead of one! The pictures in this post are a result of some small tweaks to his method.
Any discussion of the Mandelbrot set should start with Julia Sets…
It was Gaston Julia (1893-1978) and Pierre Fatou (1978-1929) who began the study of Julia Sets during the First World War. They were essentially interested in whether, when you continually apply a rule to a number, it gets closer to a particular finite value (it converges) or whether it goes off to infinity (it diverges).
As an example, take the function f(x) = x². If I put x=2 into this function then I get 4 out.
and if I put what came out, back into the function, then in this case I’ll get f(4)=4²=16, then f(16)=16²=256, and so on. As you can see, putting 2 into this function to start with shows that it diverges off to infinity.
However, if I put x=0.5 into the function then it will converge and get closer and closer to zero. (f(0.5)=0.5²=0.25, f(0.25)=0.25²=0.0625, …)
The thing that scares students about Julia Sets is that Julia and Fatou were looking at whether complex numbers converge or diverge. This isn’t a problem because complex numbers really aren’t that complex at all. They arose out of a simple choice to see what happens if we allow square roots of negative numbers to have solutions (weird to think of at first but then doing that turns out to make lots of calculations much simpler). See the Khan Academy section on Complex Numbers if you’d like to learn more about them before reading on.
The function Julia and Fatou were inputting complex numbers into is written below:
where z and c are complex numbers, c being a constant.
So, like the example above, you take a complex number, say for example, z=1+i, choose a constant, say c=0.3 and put these numbers into the function f(z)=z²+c.
Then of course put 2i+0.3 into the function again, and keep going until you see whether it diverges or converges. This is what happens if you continue the process (the continual process of inputting values into the function is called iteration) :
1+i → 0.3 + 2i → -3.6 + 1.2i → 11.9 – 8.7i → -66.6 – 206i → -38019 + 27472i →
6908220936 + 2088930939i → etc.
and by the way, after six more iterations, the number is so big that geogebra cannot compute it. To give you some idea of how big these numbers get, after 4 more iterations, the number is so big that it can’t even fit across the laptop screen in font 12. So it’s pretty obvious that this number diverges off to infinity.
In fact, for most of the input numbers (points on the complex plane), the value diverges off to infinity. However, it’s interesting to look at how quickly they diverge. On a very simple level, you could colour a point black if geogebra can compute it after 25 iterations (i.e. it’s not too big to fit on the screen) and red if geogebra can’t compute it.
Hence, the point z=1+i we inputted above would be coloured black when c=0.3 but the point z=0.2-0.2i for example would be colored red. Indeed, if we did this for every point in the complex plane, we get this picture in geogebra:
Note again that all the points which are black here may diverge, they just don’t do it as quickly as the red points. The above Julia set is called disconnected – which is self explantory really because the black parts aren’t all connected into one object.
Here’s what happens if you do it for different values of c (the constant).
For c = -1
For c = -0.8 +0.2i
The two examples above are connected Julia sets.
Isn’t it amazing how a simple equation, changed ever so slightly, can result in such amazingly interesting and complex shapes! I also love the fact that using the applet, you’re essentially unveiling the pictures bit by bit which adds suspense to the mysterious beauty behind these objects. It’s a real shame that Julia and Fatou never got to see these objects in all of their beauty due to lack of computing power.
So you might be wondering how the Mandelbrot set is related to the Julia sets?
The Mandelbrot set is essentially a map of the Julia sets. If the Julia set for a particular value of c is disconnected, then we’ll paint the point c black, if it’s connected we’ll paint the point c red (see top of post). If we do this for all values of c then we get the Mandelbrot set (Wolfram Alpha shows this quite nicely – if you type in “Julia set c = 0.3”, then you’ll see the Julia set and this point on the Mandelbrot Set). I tweaked Professor Stemkoski’s geogebra file just to show that we can make it more interesting with Geogebra. Basically, I painted the points that converge (or diverge slowly) pink, points that diverge (but do it ‘quite’ slowly) blue and points that diverge quickly black. Here’s what you get.
Some people ask what the point of the Mandelbrot set is? Does it have any real applications? From what I’m aware of, it currently doesn’t. It does show however that shapes exist in the mathematical world which don’t exist in nature – how interesting!
Here’s the link to Professor Stemkoski’s youtube video explaining how he put the initial file together.
Here’s the links to the geogebra files (Julia set painter and Mandelbrot set painter) – you HAVE to play with these – it gives you a very, very, very small sense of how Benoit Mandelbrot must have felt when he saw the first printed image of the Mandelbrot set in 1980.