The Mandelbrot Set

The Mandelbrot set is the picture of a kind of repetitive calculation.

The Mandelbrot set is a collection of points plotted on a Cartesian (x,y) plane. The points form an irregular area inside a single closed curve, like the area inside a circle or ellipse. (In fact, the Mandelbrot set is broken into an indeterminately large number of images of itself, all connected together by a network of lines.)

real, imaginary & complex numbers The horizontal (x) dimension of the plane represents real numbers, positive and negative, extending in either direction from the origin 0. Real numbers create the arithmetic of the everyday world.

The vertical (y) dimension of the plane represents imaginary numbers, positive and negative, from the origin 0. An imaginary number is any real number multiplied by i, the square root of -1. Imaginary numbers are useful in certain algebraic problems.

These real and imaginary number dimensions combine to form the complex plane, the geometrical equivalent of complex numbers. All complex numbers are the sum of a real number and an imaginary number:

z = x + iy.

Real numbers (such as -7.324 or 3.14159...) can be greater than or less than other real numbers. So each number corresponds to a point on a line, like a mark on a ruler. A line is the geometrical equivalent of real numbers.

Complex numbers cannot be greater than or less than other complex numbers. So they cannot be ordered on a line. However the pair of real and imaginary numbers that constitute a complex number (x+iy) can be treated as the (x,y) coordinates of a point on the complex plane, so that each complex number has a unique location on this plane. As a result, the complex plane is the geometrical equivalent of complex numbers.  

a Verhulst process The repetitive process that defines the Mandelbrot set on the complex plane is a mathematical calculation called a Verhulst process. At its simplest, it looks like this:

zn+1 —> zn2 + c.

This is a simple feedback mechanism: an endlessly repeated calculation performed at each step on the result of the previous step:

Start with any number z0.
Square this number.
Add to z02 the constant c. Call this number z1.
Square z1 and add the constant c to create z2.
Square z2 and add the constant c again to create z3,
Repeat to create z4,
and so on without limit.

outcomes of a Verhulst process What happens as we repeat (iterate) these calculations? Depending on the values of z and c we start with, one of three things: (1) z eventually increases to infinity; (2) z comes to rest at a constant value, or an endlessly repeated series of values; or (3) z jumps randomly and unpredictably in an infinite series of unique values.

So the Verhulst process classifies the starting values of z or c into three groups, depending on the outcome of the repeated calculations:

All the starting values of z that eventually fly off to infinity form one group of numbers, called a set. They are the escape set.

The values of z that come to rest at one constant value or series of repeated values form the prisoner set.

The values of z that jump unpredictably in an endless series of unique values form the boundary set.

a Verhulst process using two complex numbers The specific innovation necessary to image the Mandelbrot set is to define a Verhulst process in which both z and c are complex numbers:

z = x + iy

c = a + ib.

This new Verhulst equation looks like this:

zn+1 => [ xn + iyn ]2 + [ a + ib ]

This form of the equation requires a slightly more complicated set of repeated calculations, because both real and imaginary numbers are involved.

The equation can be algebraically rearranged so that only real numbers remain. In this version, we must calculate separately at each step the values of x and y, then square these and add them together to get the value of z:

xn+1 = x2n - y2n + a

yn+1 = 2xnyn + b

zn+1 = x2n+1 + y2n+1

two faces of zn+1 => [ xn + iyn ]2 + [ a + ib ] Now, each of the two complex numbers in this equation, z and c, can be represented as a point on the (real, imaginary) dimensions of the complex plane: z by the point (x,y) representing the numbers x and iy, or c by the point (x,y) representing the numbers a and ib.

This means there are two ways to represent graphically on a plane the total range of outcomes of a Verhulst process containing two complex numbers:

(1) We can use a constant starting value for c and many different starting values for z (x and iy), and plot the results of these iterations on the (x,iy) complex plane. This will create an image of the Verhulst process called a Julia set.

or

(2) We can use a single starting value for z and many different starting values for c (a and ib), and plot the results of these iterations on the (a,ib) complex plane. This will create an image of the Mandelbrot set.

That is, the Mandelbrot set contains all points in the prisoner set and boundary set for the behavior of the Verhulst process defined by two complex numbers.

To create the standard Mandelbrot set, we use starting values for z of x0 = 0 and iy0 = 0 and watch z to see what the Verhulst process produces for the different values of a and ib we put into play.

Because we always start with the same values of x0 and iy0, all differences in the way the repeated calculations unfold are due entirely to the values of a and ib we choose.

The Mandelbrot set is thus an image of the effects on the Verhulst process behavior of variations in the value of the constant c. The set is a pictorial encyclopedia of all these variations.  

"coloring in" the Mandelbrot set But how can we create an image of this encyclopedia? The answer starts with the fact that every point (a,b) on the complex plane will represent a constant c (a+ib) in the escape set, the prisoner set, or the boundary set of the Verhulst process.

If we perform the repeated calculations starting from a large number of different values of c (a and iy) and with the same starting values of z (x0 = 0 and iy0 = 0), we can display the results by coloring each corresponding point (a,b) in the complex plane according to the Verhulst outcomes. To do this, we will need coloring rules.

Here are typical coloring rules:

If z comes to rest at a constant value or repeated series of values, color the point (a,b) black. Black represents the prisoner set.

If z increases to infinity, color the point using a contrasting color to black that is not white. (In the diagram above, I've used blue.) This color represents the escape set.

If z never goes either to infinity or to a stable value or repeated series of values, color the point white. White represents the boundary set.  

the limits of physical computation In practice, for many values of either (x,y) (in a Julia set) or (a,b) (in the Mandelbrot set), literally billions or trillions of iterations may be required before z repeats a numerical orbit or escapes to infinity. And even after a trillion iterations, we can't be sure that a value of z will not escape to infinity, or begin exactly repeating the whole series of numbers again, if we were to continue the iterations just a little longer.

In addition, computers must place limits on the number of decimal places (the amount of memory) used to compute a mathematical result. This introduces rounding error in every numerical value that requires a greater number of decimal places to be written exactly. Iterations of the rounding error only amplify its effect.

Finally, it quickly becomes computationally very time consuming to search a string of a billion or a trillion iterations for a series of repeated numbers that may itself be a billion or a trillion numbers long. So this aspect of the definition of the boundary set must be entirely omitted.

So there is always uncertainty in defining the prisoner set for values of (a,b) that are on or very near the boundary set.

Note that this uncertainty has an entirely physical basis — it is not an inherent property of the mathematics, but is introduced by limitations in time (iterations) or resources (computer memory and rounding errors). The uncertainty grows smaller as we perform a larger number of iterations, or perform the iterations on more powerful computers, but it never entirely disappears.

dealing with computational limits However, using the starting Mandelbrot values for z of x0 = 0 and iy0 = 0, it is mathematically certain that z will escape to infinity if the iterated values of z increase above a minimum value of 10. So we can stop the process when z > 10 and note the number of iterations required for this to occur. This yields an iteration value for every pair of values a and ib used in the complex number c.

All that is necessary to make this information useful is to alter our definition of the coloring rules to display each point's iteration value.

If the iteration value is equal to the arbitrary maximum number of iterations we have chosen to perform for each value of c (a+ib), and the value of z is still less than 10, then we assume that z is in either the prisoner or boundary set. We color the point black.

If the value of z goes above 10 we stop the process, and color the point (a,b) from blue to red to yellow to show its iteration value. For example, if 1 million were the arbitrary limit we have set for the maximum number of iterations to perform, then blue would mean fewer than 100 iterations were necessary to exceed a value of 10, red would mean fewer than 1000 iterations were necessary, orange fewer than 10,000, yellow fewer than 100,000, and green would mean fewer than 1,000,000 iterations were necessary to exceed a value of 10.

If we graphically display these colors the results for every unique pixel combination of points a and b in the complex plane, the result will be an image of the Mandelbrot set very similar to the image above.

These coloring rules create graded contours brightening to the edge of a black silhouette, contrasting clearly the Mandelbrot set and the escape set outside it. But this image of the Mandelbrot set is approximate. More detail will always appear if we increase the number of iterations and/or the precision used to define the numerical values a and b. The depth of detail is too complex and intricate to permit us to create its exact image.

In the image above, a bead of light shows the zero point where the imaginary and real axes intersect. The Mandelbrot set lies inside a circle of radius 2 inches [96 pixels per inch on a PC] around the origin; it can be proven that every point in the Mandelbrot set must be on or inside this circle. The quadrants of the circle are clouded if they lie in the negative side of either the real or imaginary number dimensions.

Credit to Adam Smith's Floating Fractals 5.1 for the figures shown here. This program is available for free at shareware.com and other shareware sites on the Web.