The Mandelbrot Set
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
A Downloadable Mandelbrot and Julia Set Generator
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 I> 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.