A brief overview of the Mandelbrot set

This topic provides a basic overview of the Mandelbrot set.

Consider the complex number z = x + yi. The real (Re) part of z is x and the imaginary (Im) part is y. Much like a point on the Cartesian plane, a complex number can be identified on the complex plane by the ordered pair (x, y) as follows:

In other words, the complex number z can be represented by the point (x, y).

Now consider the following recurrence relation, where both z and c are complex numbers:

To use this recurrence relation, an initial value for z (denoted by z₀) is squared and added to c resulting in the next z value (denoted by z₁) to be used in the recurrence relation. That is, z₁ is plugged back into the relation to calculate z₂, and so on.

An example might help illustrate this iterative process. To begin, let z₀ = 0 + 0i = 0 and c = 0.2 + 0.4i. Then, z₁ is calculated as follows:

To calculate z₂, we plug z₁ back into the recurrence relation:

To calculate z₃, z₂ is iterated as above:

This iterative process continues in order to determine if zₙ becomes unbounded or not. For example, after 194 iterations, we find that z₁₉₂ ≈ z₁₉₃ ≈ zₙ ≈ 0.024020542767376 + 0.420186201234005i. This was determined using Microsoft Excel's COMPLEX, IMPOWER, IMSUM, and INABS functions, as shown here. Thus, we can safely say that for the given c value (0.2+0.4i), zₙ remains bounded.

Determining if zₙ becomes unbounded or not is typically accomplished by examining zₙ’s absolute value. The absolute value (or modulus) of the complex number x + yi, denoted by | z|, is defined as:

As shown, the absolute value of a complex number is always a non-negative real value. For example, the absolute value of z₁₉₃ is:

Because zₙ has stabilized to about 0.4209, it appears that | zₙ| doesn't tend toward infinity (escape) for the given value of c (that is, 0.2 + 0.4i).

With this in mind, the definition of the Mandelbrot set is straightforward: The Mandelbrot set consists of the set of points c in the complex plane for which the iteratively defined sequence:

remains bounded. That is, a complex number c is part of the Mandelbrot set if, when starting with z₀ = 0 and applying the iteration repeatedly, the absolute value of zₙ doesn't tend towards infinity however large n gets.

One of the simplest ways to visualize this remarkably intricate set is to let each point in the complex plane represent a c value, and then iterate the recurrence relation with the given c value to determine if c is part of the Mandelbrot set or not. That is, if | zₙ| remains bounded or | zₙ| tends towards infinity, respectively.

For example, consider the following c value in the complex plane:

When we iterate this c value (starting with z₀ = 0, as required), we know from the above calculation that the absolute value of zₙ is small (≈0.4209). Thus, it appears that c = 0.2 + 0.4i is part of the Mandelbrot set in that | zₙ| doesn't tend toward infinity under iteration of the complex quadratic polynomial zₙ₊₁ = zₙ + c with z₀ = 0.

Now for each c = x + yi = (x, y) point in the complex plane, we use the above iterative procedure to determine if | zₙ| tends towards infinity or not. If it does escape, we color the point associated with c white. If it doesn’t escape, we color the point black. Doing so results in an image similar to the following (courtesy of Wikipedia Commons):

From this image, it appears that the point c = (0.01, 0.01) doesn't escape in that (0.01, 0.01) looks black. Similarly, it appears that point c = (0.5, 0.5) does escape in that (0.5, 0.5) looks white. By using the prior Excel spreadsheet, you can see that both of these conjectures are true:

  • After 10 iterations, | zc(0.01, 0.01)| stabilizes to approximately 0.0143.
  • After 16 iterations, | zc(0.5, 0.5)| becomes too large for Excel to signify (| z₁₄| ≈ 8.0716 x 10²⁸⁷).

This image also suggests that the Mandelbrot set may be contained within some finite area of the complex plane. As described in Basic properties, it turns out that the Mandelbrot set lies entirely within a circle of radius 2 (centered at the origin) of the complex plane.

With this mathematical understanding in place, we can now create an image similar to the above using the HTML5 canvas element, as described in An initial rendering of the Mandelbrot set using canvas.

An initial rendering of the Mandelbrot set using canvas