# 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*0) is squared and added to * c* resulting in the next * z* value (denoted by * z*1) to be used in the recurrence relation. That is, * z*1 is plugged back into the relation to calculate * z*2, and so on.

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

To calculate * z*2, we plug * z*1 back into the recurrence relation:

To calculate * z*3, * z*2 is iterated as above:

This iterative process continues in order to determine if * z*n becomes unbounded or not. For example, after 194 iterations, we find that * z*192 ≈ * z*193 ≈ * z*n ≈ 0.024020542767376 + 0.420186201234005*i*. 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.4*i*), * z*n remains bounded.

Determining if * z*n becomes unbounded or not is typically accomplished by examining * z*n’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*193 is:

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

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 = 0 and applying the iteration repeatedly, the absolute value of * z*n 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*n| remains bounded or |* z*n| 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 = 0, as required), we know from the above calculation that the absolute value of * z*n is small (≈0.4209). Thus, it appears that *c* = 0.2 + 0.4*i* is part of the Mandelbrot set in that |* z*n| doesn't tend toward infinity under iteration of the complex quadratic polynomial* z*n+1 = * z*n + *c* with * z*0 = 0.

Now for each *c* = *x* + *yi* = (*x*, *y*) point in the complex plane, we use the above iterative procedure to determine if |* z*n| 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, |
*z*c(0.01, 0.01)| stabilizes to approximately 0.0143. - After 16 iterations, |
*z*c(0.5, 0.5)| becomes too large for Excel to signify (|*z*14| ≈ 8.0716 x 10287).

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.

## Related topics