# 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 + 0*i* = 0 and * c* = 0.2 + 0.4*i*. 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.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*ₙ 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.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 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.4*i* 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, |
*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*₁₄| ≈ 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.

## Related topics