by Dale Winter

This lesson will concentrate on one of the most widely recognized icons of the field of chaos, dynamics and fractals - the Mandelbrot set. The appearance of the set will be familiar to many, and one image of it is given b elow.

The Mandelbrot set is named after Benoit Mandelbrot who constructed (via computer) the first images of this set in 1978. Mandelbrot asked (and answered) a question that boils down to:

If the functions g(z) = z2 + c are used to do the iterations, and the number zero is always used as the starting point for the orbit, then which values of c give orbi ts that escape, and which values of c give orbits that do not escape?

If we use black shade the c values whose orbits (starting with the point zero) do not escape, and other colors to shade the c values whose orbits (starting with the point zero) do escape, then the picture tha t emerges is the familiar icon of chaos theory, shown below.

In this lesson we will investigate the considerations that resulted in the question above (and hence the Mandelbrot set), some of the mathematical information encoded in the Mandelbrot set (including its rela tionship to Julia sets), and describe an algorithm for drawing pictures of the Mandelbrot set using a computer.

As you may have noticed, the Mandelbrot set has the property of self-similarity. For example, if we zoom in on part of the Mandelbrot set, we will be able to find tiny replicas of the entire se t. See the illustration below for evidence of this.

As indicated in this picture the Mandelbrot set has no shortage of copies of itself embedded into the image. Even parts of the Mandelbrot set that appear quite smooth and well-behaved in the original image s how a jagged outline consisting of lots and lots of tiny copies of the Mandelbrot set. For example, in the original image of the Mandelbrot set, there is a large, black region shaped like a cardioid, with a circle joined to it s upper right-hand corner. In the original image, the region where the cardioid and the circle are joined appears smooth. However, when the region is magnified, the detailed structure becomes apparent, and many, tiny copies of the Mandelbrot set can be seen (as shown in the illustration given below).

As mentioned, the Mandelbrot set is an answer the question asked (and answered) by Benoit Mandelbrot in 1978:

If the functions g(z) = z2 + c are used to do the iterations, and the number zero is always used as the starting point for the orbit, then which values of c give orbi ts that escape, and which values of c give orbits that do not escape?

With our experience with developing algorithms and writing programs to draw pictures of Julia sets, we can use the definition of the Mandelbrot set to develop an algorithm for drawing pictures of this set. I n words an algorithm to do this might be specified in the following way,

1. Decide what color your Mandelbrot set will be, and what color the

background will be. Teach the computer to do complex arithmetic.

Decide which part of the complex plane you wish to investigate and

divide this up into a grid of c values. Decide how many points of each

orbit it will take you to decide whether the orbit escapes or not (and call

this number n).

2. For the c value currently under investigation, calculate the first n points

on the orbit with starting point zero, when the function

g(z) = z2 + c

is used to do the iterations.

3. If you decide that the orbit will escape, color the point on the

computer screen corresponding to the complex number c the

color of the background.

4. If you decide that the orbit will not escape, color the point on the

computer screen corresponding to the complex number c the color

of the Mandelbrot set.

5. Go on to the next c value, and repeat steps 2., 3. and 4.

6. When you have considered all of the c values in the grid, stop,

This algorithm may also be represented using a flow chart. Again, our experience with developing algorithms to draw Julia sets in previous lessons can help to show the way here, too. A flow chart for drawing a picture of the Mandelbrot set is given in the third section of this lesson. In that section, we will also develop and prove some mathematical facts that will allow us to refine the algorithm used to draw the Mandelbrot set. These refi nements should decrease the amount of time that computer programs based on our algorithm will need in order to draw detailed pictures of the Mandelbrot set.

The algorithm described in words above will still produce pictures of the Mandelbrot set (although it may need quite a bit of time if you want a detailed picture). If you like, before going on to the next section, you might try implementing the algorithm as a computer program so that you will have a tool for investigating the mathematical properties of the Mandelbrot set discussed in the next section of this lesson.

· Try to implement the algorithms given here to create a computer program that can draw a picture of the Mandelbrot set. You will need to implement a package to do complex arithmetic in order to calculate the points on the orbits. The lessons on complex iteration and the Julia set include a package (written in the ‘C’ programming language) for complex arithmetic that you might like to refer back to (alternatively, refer to the section of this lesson on drawing pictures o f the Mandelbrot set using a computer).

· When you get your program for drawing pictures of the Mandelbrot set working, it will produce pictures which are like silhouettes of the dramatic, colorful images of the Mandelbrot set shown earlier in this lesson.

· Modify your program so that the c values whose orbits escape are colored different colors, depending on how quickly the orbit actually does escape. The pictures that your program now produces will resemble the dramatic images given e arlier in this lesson much more closely.

· There are some places on the World Wide Web where programs to draw Mandelbrot sets are available. You might like to check some of them out (see the links below) to see how to use the software, and investigate the structure of the Mandelbrot set for yourself.

Mandelbrot and Julia Set Browser

The Chaos Hypertextbook

The Fractal Microscope

Mandelbrot and Julia Set Generator

It is important to try to implement the computer program (or find a suitable program on the World Wide Web) to get the most out of this lesson. Using the programs that you develop (or find and learn to use), we will look at the detaile d structure of the Mandelbrot set, the relationships between the Mandelbrot set and the Julia sets of various functions, and the relationship between the structure of the Mandelbrot set and the mathe matical behavior of the functions that are used to construct it.

Critical Points and Orbits

Once the Mandelbrot set has been defined, we can work with it to investigate its mathematical properties. However, investigating the mathematical properties of the Mandelbrot set does not answer the question : Why would you be interested in this set in the first place?

Once the Mandelbrot set had been defined, and pictures generated using computers, people were interested because the set was unlike any mathematical object they had ever seen. However, before the Mandelbrot set had been defined and visualized, it must have had some kind of interest or meaning (otherwise it would never have been defined and drawn in the first place). In this section, we will investigate some of the mathematical reasons that people might have had to investigate the Mandelbrot set in the first place.

Firstly, recall the definition of the Mandelbrot set:

The Mandelbrot set is the set of c - values for which the orbit with starting point zero does not escape when the function g(z) = z2 + c is used to do the iterations.

Perhaps the first question to address is why only look at the orbits with starting point zero? In the next few thinking opportunities, we will look at how much information can be developed by studying just the orbit with starting point zero. We will conclude this section of the lesson by developing some vocabulary to describe the phenomena investigated - in particular, we will define the terms critical point and critical orbit.

· The behavior of the orbit with starting point zero can tell us about the structure of the Julia set. Using the programs that you have developed in earlier lessons to,

1. Calculate and display orbits, and

2. Calculate and display Julia sets,

describe the behavior of the orbit with starting point zero, and the appearance of the Julia set when the following functions are used to do the iterations.

1. g(z) = z2 - 1.

2. g(z) = z2 + 0.3i.

3. g(z) = z2.

4. g(z) = z2 + 1.

· When the orbit with starting point zero escapes, how would you describe the appearance of the corresponding Julia set? What about when the orbit with starting point zero doesn’t escape?

· When the orbit with starting point zero escapes, the Julia set is totally disconnected. Some of the literature refers to such a set as fractal dust. In mathematical terms, totally disconnected could be defined as follows.

Definition A subset of the complex plane, call this set S, is said to be

totally disconnected if for every point z in the set S, there

is a non-negative real number e z with the property that for

every point w in S, .

· How could you represent this definition graphically?

· The definition is actually slightly flawed (from a strictly mathematical point of view). Can you see the flaw? According to this definition, there is only one completely disconnected set. Can you figure out what that set is? How can the definit ion be fixed?

· Can you used the fixed definition of totally disconnected to explain why, if the orbit with starting point zero escapes to infinity, the Julia set is totally disconnected?

This computer investigation and thinking opportunity have illustrated one reason that the Mandelbrot set might be interesting: The points in the Mandelbrot set are the c-values which give conn ected Julia sets when the functions

g(z) = z2 + c

are used to do the iterations. The next computer investigation and thinking opportunity will develop another reason why the Mandelbrot set of c-values might be interesting.

· Use your program for tracking the orbits to observe the behavior of several different orbits when the function

g(z) = z2 - 2

is used to do the iterations. Use a variety of starting points (make sure zero is one of them), and describe the behavior of the orbits that you track.

· When the function

g(z) = z2 - 2

is used to do the iterations, there are many periodic orbits. Can you use algebra to find some them?

· How many periodic orbits does

g(z) = z2 - 2

have? How many of the orbits are attracting periodic orbits, and how many are repelling periodic orbits? Can you prove your conclusion rigorously?

· From your computer experiments, what is the behavior of the orbit with starting point zero? What is special about the periodic orbit that the orbit with starting point zero is attracted to?

· The information developed in this thinking opportunity suggest the following proposition. Do you think that this will always be the case? If so, try to find a proof of the proposition. If your thoughts and computer experiments do not confirm the proposition under all circumstances, try to find a counter-example.

Proposition Suppose that the function

g(z) = z2 + c

is used to so the iterations, and that there is an attracting

periodic orbit. Then the orbit with starting point zero is

attracted to the attracting periodic orbit.

So, the behavior of the orbit with starting point zero can be used as an indication of the presence of attracting periodic orbits. We will conclude this section with some definitions that may be useful throughout the rest of the lesson .

Definitions

1. When the functions

g(z) = z2 + c

are used to do the iterations, the orbit with starting point zero is called the critical orbit.

2. The starting point of the critical point is called a critical point.

· (For those who know calculus.) The term critical point has a specific meaning in calculus. How is this related to the definition given above?

· How could the definition of the critical orbit be generalized to other families of functions besides g(z) = z2 + c ?

Drawing Pictures of the Mandelbrot Set using a Computer

Recall our algorithm for drawing the Mandelbrot set, as outlined at the beginning of this lesson.

1. Decide what color your Mandelbrot set will be, and what color the

background will be. Teach the computer to do complex arithmetic.

Decide which part of the complex plane you wish to investigate and

divide this up into a grid of c values. Decide how many points of each

orbit it will take you to decide whether the orbit escapes or not (and call

this number n).

2. For the c value currently under investigation, calculate the first n points

on the orbit with starting point zero, when the function

g(z) = z2 + c

is used to do the iterations.

3. If you decide that the orbit will escape, color the point on the

computer screen corresponding to the complex number c the

color of the background.

4. If you decide that the orbit will not escape, color the point on the

computer screen corresponding to the complex number c the color

of the Mandelbrot set.

5. Go on to the next c value, and repeat steps 2., 3. and 4.

6. When you have considered all of the c values in the grid, stop,

This algorithm will produce pictures of the Mandelbrot set (although it will probably need quite a bit of time if you are interested in detail). This algorithm can be refined somewhat using some of the mathematical facts that we have investigated and developed in previous lessons.

For example, recall the theorem that we stated and proved in the previous lesson on Julia sets that enabled us to restrict the amount of the complex plane the program had to look at, and furnished a criteria for deciding whether an orbi t escaped or not.

Recall from the lesson on complex iterations that before proving the theorem, our method for deciding whether an orbit escaped or not involved nominating two values:

1. The number of iterates that we would consider (call this n), and,

2. A ‘stopping value’ (call this M).

The method was then to calculate the first n points of the orbit. If the absolute value of any of these n points exceeded M then we decided that the orbit did escape, otherwise we decided that the orbit did not escape.

In this method, both the number of iterates (n) and the stopping value (M) were left up to you to select. Of course, the higher the values selected, the more accurate the predictions of the computer. Howeve r, the higher the values selected, the longer the program would take to run.

The theorem told us that an appropriate stopping value (M) is when the functions

g(z) = z2 + c

(with |c| < 2) are used to do the iterations was M = 2, and that we only had to look at the part of the complex plane that was inside the circle of radius 2. The statement and proof of this theorem were as follows.

Theorem Suppose the function g(z) = z2 + c is used to do the iterations,

and that |c| < 2. Consider a starting point z0 in the complex plane. If

any point in the orbit starting at z0 has absolute value greater than 2,

then the orbit starting at z0 escapes.

Proof Suppose that the point z1 is on the orbit beginning at z0, and that

.

Using the triangle inequality we have,

as . For the same reason, . So,

.

Applying the same argument again gives that for some ,

.

Continuing in this way inductively shows that the orbit escapes, as

the factors that multiply |z1| are always greater than 1. This

concludes the proof of the theorem.

· If we are only interested in calculating the Mandelbrot set when the functions

g(z) = z2 + c

are used to do the iterations, and we restrict attention to the case where |c| < 2, how can the results of the theorem be used to refine the algorithm that we have for drawing pictures of the Mandelbrot set?

· Are the refinements that this theorem offers to drawing pictures of the Mandelbrot set identical to those that the theorem offers the algorithm that we used to draw pictures of the Julia set?

Two refinements that the theorem immediately suggests are:

1. If we always use functions of the form

g(z) = z2 + c

to do the iterations, where |c| < 2, then we only need to look at the part

of the complex plane that lies inside the circle of radius 2.

2. Again, if we always use functions of the form

g(z) = z2 + c

to do the iterations, where |c| < 2, then we can use M = 2 as the stopping

value to decide whether or not the orbit starting from zero escapes or not.

As with the Julia set case, the theorem does not shed any light on what value we should use for n (i.e. the number of points on the orbit that we consider). Just as in the Julia set case, this is something that you’ll have to experiment with so that your program draws pictures that are detailed, but on the other hand, doesn’t take an inordinate amount of time to produce the pictures.

This refined version of the algorithm may be represented using a flow chart. (If you are able to find further refinements, you could make your own flow chart that incorporates these special modifications.) Our experience with developi ng algorithms to draw Julia sets in previous lessons can help us here - in fact the flow chart that we use here to represent the algorithm for calculating the Mandelbrot set has many similarities to the algorithm that was used to draw Julia sets.

· When you get your program for drawing pictures of the Mandelbrot set working, it will produce pictures which are like silhouettes of the dramatic, colorful images of the Mandelbrot set shown earlier in this lesson.

· Modify your program so that the c values whose orbits escape are colored different colors, depending on how quickly the orbit actually does escape. The pictures that your program now produces will resemble the dramatic images given e arlier in this lesson much more closely.

· The refined algorithm that we used to draw the Julia set is shown below. Can you identify the differences between this algorithm and the algorithm used to draw the Mandelbrot set? Can you explain the reas ons for these differences using the mathematical definition of the Julia and Mandelbrot sets?

There are further refinements that can be made to the algorithm in order to reduce the amount of time that is required for the program to draw a picture of the Mandelbrot set. A further refinement of the algorithm that we already have stems from an understanding of complex conjugation. (If you are not very familiar with complex arithmetic, and would like to brush up before heading on, you may access an on-line tutorial on complex numbers by clicking *****here.*****)

Recall the definition of complex conjugation.

Definition Suppose that a complex number is any number, z, is given by:

z = a + bi

where a and b are real numbers, and . The complex

conjugate of z, denoted by , is:

z = a - bi.

Complex numbers can be thought of as pairs of real numbers. If a complex number, z, is written as,

z = a + bi ,

then ‘a’ and ‘b’ are the two real numbers. When complex numbers are represented as points on a plane the ‘a’ is plotted along the horizontal axis, and the ‘b’ is plotted up the vertical axis.

For example, the complex number 2 + 3i would be represented as the point (2, 3). The conjugate of this complex number is 2 - which would be represented as the point (2, - 3). These points are mirror images of each other (when the mirror is the x-axis), as indicated in the diagram below.

How can the concept of the complex conjugate help to develop an algorithm that will help us to draw the Mandelbrot set more quickly?

· The complex conjugate has two properties that we can use. These properties are summarized in the proposition stated below. Can you use the definition of the complex conjugate to prove this proposition?

Proposition Suppose that z and w are two complex numbers. Then,

1. The complex conjugate of the sum z + w is the

sum of the complex conjugates.

2. The complex conjugate of the product z × w is

the product of the complex conjugates.

· Suppose you know the behavior of the orbit with starting point z0 when the function

g(z) = z2 + c

is used to do the iterations. What can you say about the orbit with starting point when the function

is used to do the iterations?

· The relationship between the orbit with starting point z0 when the function g(z) = z2 + c is used to do the iterations and the orbit with starting point when the function can be used to halve the number of starting points that need to be considered when the computer figures out the Mandelbrot set. (Hint: the complex conjugate of zero is zero. ) How can the algorithm be modified to take advantage of this fact?

Complex Arithmetic

The algorithms described above require your program to have the ability to handle complex numbers and perform complex arithmetic. A package to represent complex numbers and to perform operations of complex arithmetic was developed in t he lessons on complex iteration and the Julia set. The package is written in the ‘C’ programming language, and is given below for your convenience, if you want to use this instead of developing your own package from scratch. Remember that in order to use this package with the ‘C’ programming language, you need to #include<...> your compiler’s math library, as the package uses the sqrt function.

/* The following type definition defines a type COMPLEX that can be used to represent complex numbers. */

typedef struct complex_number {

real_part double;

imaginary_part double

} COMPLEX;

/* The functions needed to do the complex arithmetic for quadratic functions are declared below. */

COMPLEX add( COMPLEX num_1 , COMPLEX num_2 );

COMPLEX subtract( COMPLEX num_1 , COMPLEX num_2 );

COMPLEX multiply( COMPLEX num_1 , COMPLEX num_2 );

DOUBLE abs_value( COMPLEX num_1 );

/* The package of functions needed to do complex arithmetic are defined below. */

COMPLEX add( COMPLEX num_1 , COMPLEX num_2 )

/* This function adds two complex numbers and returns the sum. */

{

COMPLEX result;

result.real_part = num_1.real_part + num_2.real_part;

result.imaginary_part = num_1.imaginary_part + num_2.imaginary_part;

return(result);

}

COMPLEX subtract( COMPLEX num_1 , COMPLEX num_2 )

/* This function subtracts the second argument from the first and returns the result. */

{

COMPLEX result;

result.real_part = num_1.real_part - num_2.real_part;

result.imaginary_part = num_1.imaginary_part - num_2.imaginary_part;

return(result);

}

COMPLEX multiply( COMPLEX num_1 , COMPLEX num_2 )

/* This function multiplies two complex numbers and returns the product. */

{

COMPLEX result;

result.real_part = num_1.real_part * num_2.real_part - num_1.imaginary_part * num_2.imaginary_part;

result.imaginary_part = num_1.real_part * num_2.imaginary_part + num_2.real_part * num_1.imaginary_part;

return(result);

}

double abs_value( COMPLEX num_1 )

/* This function returns the absolute value of a complex number. */

{

double result;

result = sqrt{ num_1.real_part * num_1.real_part +

num_1.imaginary_part * num_1.imaginary_part };

return(result);

}

Just in case your program is giving you trouble, or else is running so slowly that it is an impractical way to investigate the Mandelbrot set, there are some places on the World Wide Web where you can find programs for dra wing pictures of in zooming in on the structure of the Mandelbrot set.

· There are some places on the World Wide Web where programs to draw Mandelbrot sets are available. You might like to check some of them out (see the links below) to see how to use the software, and investigate the structure of the Mandelbrot set for yourself.

Mandelbrot and Julia Set Browser

The Chaos Hypertextbook

The Fractal Microscope

Mandelbrot and Julia Set Generator

· Here are some ideas for ways that you can enhance or modify your Mandelbrot-drawing program. Implement them as you see fit. Many of these enhancements and features may be found in the programs available on the World Wide Web.

· Enable the user to specify the part of the complex plane that he or she wishes to investigate. You could do this by,

· At the beginning of the program, have the user to input the corners of a

rectangular portion of the complex plane to investigate.

· Draw the whole Mandelbrot set, and then allow the user to use the mouse

to select a portion of the Mandelbrot set. The program then draws an enlarged

picture of this portion. (See the illustrations at the beginning of this lesson for

ideas here.)

· If you implement the mouse-driven Mandelbrot set explorer program, allow

the user to zoom even more closely on the ‘zoomed in’ pictures that have

been drawn.

· Implement a feature that will allow the user to save the pictures that the computer program generates.

· Implement a feature that allows the user to click on a point (i.e. a particular c - value) in the picture of the Mandelbrot set, and have the computer draw a picture of the Julia set that arises when the c - value selected and the function

g(z) = z2 + c

is used to do the iterations.

· When we studied the Julia set in the previous lesson, one of the effects that we saw was that the particular function used to do the iterations made a huge difference to the appearance of the Julia set that was generated. For example, when the function

is used to do the iterations, the Julia set had the following (now familiar) appearance.

· However, when the function

is used to do the iterations, the Julia set resembles the following picture.

· If you use the family of functions,

(instead of the usual g(z) = z2 + c) to calculate the Mandelbrot set, how does the appearance of the Mandelbrot set change with this new family of functions?

Relating the Mandelbrot Set to other Mathematics

In this section, we will investigate some of the meaning of the Mandelbrot set, and try to discover some of the structure and information that is encoded in the Mandelbrot set.

According the definition of the Mandelbrot set, this set consists of c - values for which the orbit with starting point zero does not escape when the function

g(z) = z2 + c

is used to do the iterations. One of the possible modifications or enhancements that you could have made to your program for drawing the Mandelbrot set was to include a feature that would draw Julia sets whe n specific points in the Mandelbrot set (i.e. c - values) were clicked on.

The output from one version of such a program is given below. The diagram shows the Mandelbrot set along with the Julia sets corresponding to three of the points in the Mandelbrot set.

· In each case shown, the Julia set is a connected set. Why is this to be expected? Where would you have to look for c - values that would give totally disconnected Julia sets?

· The c - values that Julia sets are shown for in the diagram given above all come from different parts of the Mandelbrot set. Use your Mandelbrot and Julia set explorer program to find out what the Julia sets of other bulbs and bulges in the Mandelbrot set look like.

· Use your orbit tracking program to find out what happens to the critical orbit for c - values selected from different parts (i.e. different bulbs and bulges) of the Mandelbrot set.

· Astonishingly, the behavior of the critical orbit is the same for all c - values selected from the same part of the Mandelbrot set, and usually involves the critical orbit being attracted to a n attracting periodic orbit. Can you think of any reasons why this might be?

· By using your orbit tracking program to map out the behavior of the critical orbit for c - values chosen from different parts of the Mandelbrot set, map out the Mandelbrot set to show how the critical orbit behaves when the c - value is chosen from different parts of the Mandelbrot set. A partial map to get you started is given below.

We have observed that the part of the Mandelbrot set that the c - value is selected from has a great effect on the behavior of the critical orbit. In the next thinking opportunities, we will st art to develop some of the mathematical reasons behind this.

Before getting into these thinking opportunities, you might like to review the lesson on Quadratic functions, and particularly the Bifurcation diagram that was drawn there.

To jog your memory, the bifurcation diagram was the diagram that showed the values that the critical orbit could end up having versus the c - value that was included in the function

g(x) = x2 + c

used to do the iterations. (The variable has been labeled ‘x’ here because the lesson on Quadratic functions dealt with functions that only used real numbers as their input and output values.) The bifurcation diag ram from the lesson on Quadratic functions resembled the diagram given below.

· In the diagram given below, the Bifurcation diagram and the Mandelbrot set have been lined up so that the c - values on the real (i.e. the horizontal axis) of the Mandelbrot set line up with t he c - values that are plotted along the horizontal axis of the Bifurcation diagram.

· By reviewing the mathematical behavior of the family of functions

g(x) = x2 + c

for real values of c between c = - 2 and c = 0.25, explain why the appearance of the Bifurcation diagram is the way that it is. (You might like to refer back the technique of Graphical analysis when you do this).

· Notice that the bulbs on the Mandelbrot set line up with the windows (the places where there are only a few, well - defined lines) on the Bifurcation diagram. Use your understanding of why the Bifurc ation diagram has the structure that it does, and your map of the Mandelbrot set showing the behavior of the critical orbit to explain why this should be the case.

· Is there any correspondence between the appearance of the Bifurcation diagram and the period of the attracting cycle that the critical orbit is attracted to? (Hint: note that the ‘period 1’ part of the Mandelbrot set lies above a part of the Bifurcation diagram that has only one line.)

· Where does the correspondence between Bifurcation diagram and Mandelbrot set suggest you should look for c - values where the critical orbit does not escape and is not attracted to a pe riodic cycle?

In this lesson we have made an intense study of the interesting and intricate object known as the Mandelbrot set. One word that we have used frequently to describe the Mandelbrot set is the word fracta l. At this point, we have not developed a clear sense of exactly what we mean by this term. In the next lesson, we will characterize geometric figures that are widely recognized as fractals, and widen some of our mathematical notio ns to accommodate these beautiful and complicated figures in a rigorous, mathematical framework.

Back to MMS Main Page|| Back to Chaos Contents Page