### Complex Numbers

The Mandelbrot set is a set of complex numbers, and a basic understanding of complex numbers is necessary to understand the definition of this set.

A complex number has the general format **a+b i** where

**a**and

**b**are real numbers while

**is the imaginary unit which is defined as the square root of -1. A complex number thus has a real part**

*i***a**and an imaginary part

**b**. If

*i***z**is a complex number such that

**z=a+bi**, then

**a**is sometimes referred to as

**Re(z)**while

**b**is referred to as

**Im(z)**(Re - real part, Im - imaginary part).

Addition, subtraction, multiplication and division of complex numbers are defined as follows:

(a+b*i*) + (c+d*i*) = (a+c) + (b+d)*i*

(a+b*i*) - (c+d*i*) = (a-c) + (b-d)*i*

(a+b*i*) * (c+d*i*) = (a*c-b*d) + (b*c+a*d)*i*

(a+b*i*) / (c+d*i*) = (a*c + b*d) / (c*c + d*d) + ((b*c - a*d) / (c*c + d*d))*i*

The absolute value of a complex number is defined as:

| a+b*i* | = √(a^{2}+b^{2})

The square of a complex number (according to the multiplication rule above) is:

a^{2}-b^{2} + 2ab*i*

### Complex Plane

A complex number can be viewed as a point in a two-dimensional Cartesian coordinate system, referred to as the complex plane.
By convention, **a** is then the horizontal (x-axis) component, while **b** is the vertical (y-axis) component. The complex number 2.5+1.2*i* will then correspond to the point (2.5, 1.2)
in the coordinate system.

### Mandelbrot Set

The Mandelbrot Set has the most well-known graphical visualization of mathematically derived fractal patterns. To understand the set, consider the complex quadratic polynomial

z_{n+1} = z_{n}^{2} + c

where **c** is a complex parameter.

The following sequence can be defined from the polynomial above:

z_{0} = c

z_{1} = z_{0}^{2}+c = c^{2}+c

z_{2} = z_{1}^{2}+c = (c^{2}+c)^{2}+c

:

For the complex parameter c = 1+2*i* the sequence develops as follows:

z_{0} = 1+2*i*

z_{1} = 1^{2}-2^{2}+2*1*2*i*+1+2*i* = -2+6*i*

z_{2} = (-2)^{2}-6^{2}+2*(-2)*6*i*+1+2*i* = -31-22*i*

z_{3} = (-31)^{2}-22^{2}+2*(-31)*(-22)*i*+1+2*i* = 478+1366*i*

:

It will easily been seen that this sequence will yield increasingly "big" numbers, that is, it is not ** bounded**. A sequence which on the other hand
is

**, must be such that there exists a complex number**

*bounded***such that**

*s***is greater than**

*s***for any**

*z*_{n}**.**

*n*

∀n∈{0,1,2,...}∃s∈R : |z_{n}| < s

For the complex parameter c = 0.5+0.6*i* the sequence develops as follows:

z_{0} = 0.5+0.6*i*

z_{1} = 0.5^{2}-0.6^{2}+2*0.5*0.6*i* +0.5+0.6*i* = -0.39+1.2*i*

z_{2} = (-0.39)^{2}-1.2^{2}+2*(-0.39)*1.2*i* +0.5+0.6*i* = -0.7879-0.336*i*

:

This sequence look like it is bounded, however, there is generally no way to know this for sure (unless the same number appears for a second time in the sequence, i.e. there exists a **j**
and a **k** where
**j ≠ k** and **z _{j} = z_{k}**).

The Mandelbrot set is defined as the set of all complex numbers **c** for which the sequence **z _{n+1} = z_{n}^{2} + c** is bounded.