You are currently browsing the tag archive for the ‘complex numbers’ tag.

Plotting the Mandelbrot Set

The video above gives a fantastic account of how we can use technology to generate the Mandelbrot Set – one of the most impressive mathematical structures you can imagine. The Mandelbrot Set can be thought of as an infinitely large picture – which contains fractal patterns no matter how far you enlarge it.  Below you can see a Mandelbrot zoom – which is equivalent to starting with a piece of A4 paper and enlarging it to the size of the universe!  Even at this magnification you would still see new patterns emerging.

The way the Mandelbrot set is formed in the first video is by using the following iterative process:

Zn+1 = Zn2 + c

Here Z is a complex number (of the form a + bi) and c is a constant that we choose.  We choose our initial Z value as 0.  Z1 = 0. We then choose a value of c (which is also a complex number) and see what happens when we follow the iterative process.

Let’s choose c = 2i +1. Z1 = 0

Zn+1 = Zn2 + 2i +1
Z2 = (0)2 + 2i +1
Z2 = 2i + 1

We then repeat this process:
Z3 = Z22 + 2i +1
Z3 = (2i+1)2 + 2i +1
Z3 = (2i)(2i) + 2i + 2i + 1 + 2i +1
Z3 = 6i-2 (as i.i = -1)

As we continue this process Zn spirals to infinity.

What we are looking for is whether this iterated Z value will diverge to infinity (i.e get larger and larger) or if it will remain bounded. If diverges to infinity we colour the initial point 2i+1 as blue on a complex axis. If it remains bounded we will colour it in black. In this case our initial point 2i+1 will diverge to infinity and so it will be coloured in blue.

So, let’s use Geogebra to see this is action.  The Geogrebra online program for this is here.

We choose a value for c.  Let’s say c = 0.23 + 0.42i.  Z1 = 0
Zn+1 = Zn2 + 0.23 + 0.42i.
Z2 = (0)2 + 0.23 + 0.42i.
Z2 = 0.23 + 0.42i.

Z3 = Z22 + 0.23 + 0.42i.
Z3 = (0.23 + 0.42i.)2 + 0.23 + 0.42i.
Z3 = 0.1065 + 0.6132i
Z4 = (0.1065 + 0.6132i)2 + 0.23 + 0.42i.
Z4 = -0.13467199 + 0.5506116i

We carry on with this iterative process and plot the points that we get each time.  We can see the (0.23, 0.42), (0.1065, 0.42) and (-0.13467199, 0.5506116) correspond to the first coordinates on the spiral after (0,0).  We can see that as this process continues we see a convergence to a point close to (0.05, 0.45).

Screen Shot 2019-04-25 at 3.09.17 PM

If we choose another starting value for c: c = 0.17 + 0.56i we get the following diagram:

Screen Shot 2019-04-25 at 3.09.33 PM

Again we have a stable spiral which spirals around a geometric shape and does not diverge to infinity.

If we choose another starting value for c: c = -0.25 + 0.64i we get the following diagram:

Screen Shot 2019-04-25 at 3.10.04 PM

If we choose another starting value for c: c = 0.11 + 0.59i we get the following diagram:

Screen Shot 2019-04-25 at 3.09.43 PM

However, If we choose another starting value for c: c = 0.3 + 0.68i we get the following diagram:

Screen Shot 2019-04-25 at 3.10.12 PM

This time we can see that the orbit of points does not converge, but instead it diverges to infinity.

We can then colour in each point – simply categorising whether the value of c leads to an orbit which diverges or remains bounded.  Black means it remains bounded, blue that it has escaped to infinity.  So, below we can see that when we do the iterative process with c = 0.39+ 0.63i our orbit will escape to infinity (as it is coloured blue)

Screen Shot 2019-04-25 at 3.13.45 PM

If we do this exercise in much finer detail we arrive at the following picture:

Screen Shot 2019-04-25 at 3.14.02 PM

This is the Mandelbrot Set – and will keep producing fractal patterns as you zoom in to infinity.

 

 

 

 

Mandelbrot and Julia Sets – Pictures of Infinity

The above video is of a Mandelbrot zoom.  This is a infinitely large picture – which contains fractal patterns no matter how far you enlarge it.  To put this video in perspective, it would be like starting with a piece of A4 paper and enlarging it to the size of the universe – and even at this magnification you would still see new patterns emerging.

Screen Shot 2015-02-04 at 3.34.57 PM

To understand how to make the Mandelbrot set, we first need to understand Julia sets.  Julia sets are formed by the iterative process:

Zn+1 = Zn2 + c

Here Z is a complex number (of the form a + bi) and c is a constant that we choose.  So, for example if we choose Z1 = 1+i and c = 1 then:

Z2 = Z12 + 1
Z2 =(1+i)2 + 1
Z2 = 2i + 1

We then repeat this process:
Z3 = Z22 + 1
Z3 = (2i+1)2 + 1
Z3 = 4i-2

and so on – what we are looking for is whether this iterated Z value will diverge to infinity (i.e get larger and larger) or if it will remain bounded. If diverges to infinity we colour the initial point 1+i as red on a complex axis. If it remains bounded we will colour it in black. In this case our initial point 1 + i will diverge to infinity and so it will be coloured in red.

Next we do this for every single point in the complex plane – each time seeing what happens when we iterate it many times. Each time we colour it in as red if it diverges and black if it remains bounded. Once we have done that we will have a picture which represents what happens to every point in the complex plane. This then is our Julia set.

For example the Julia set for c = 1 looks like this:

Screen Shot 2015-02-04 at 4.10.09 PM

 

This is because every single complex number when iterated by  Zn+1 = Zn2 + 1 will diverge to infinity (get infinitely big).

Not very interesting so far, but different values of c provide some amazing patterns.

Screen Shot 2015-02-04 at 4.13.42 PM

This above pattern is generated by c = 0.376 – 0.1566i.

Screen Shot 2015-02-04 at 4.15.27 PM

and this pattern is for c = 0.376 – 0.1566i.

Screen Shot 2015-02-04 at 4.17.35 PM

and this one is c = -0.78 + 0.1i.

Screen Shot 2015-02-04 at 4.24.45 PM

This last one for c = 0.4 + 0.1i looks different to the others – this one has patterns but they are not connected together as in the other examples.

Mandelbrot Set

This brings us on to how to calculate the Mandelbrot set.  We calculate every possible Julia set for all complex numbers c, and then for every Julia set which is connected then we colour the c value in black, and every value of c which the Julia set is disconnected we colour the c value in red.  We then have a new plot in the complex plane of c values.  This gives us the Mandelbrot set shown below:

Screen Shot 2015-02-04 at 4.31.23 PM

 

Don’t worry if this seem a bit complicated – it is!  You can play around making your own Julia sets by choosing a c value at this online generator.  You might also like towatch the Numberphile video on the same topic:

 

 If you enjoyed this post you might also like Dan Pearcy’s post on this topic which explains how Geogebra can be used to generate these sets.  Also PlusMaths have a number of posts on this amazing subject

Website Stats

  • 6,250,498 views

Recent Posts

Follow IB Maths Resources from British International School Phuket on WordPress.com