Complex numbers are required to compute the Mandelbrot and Julia Set fractals. Here is an explanation of complex numbers:
If someone were to ask you what the roots of x 2 + 1 = 0 were, you would most likely answer that there are none. This is because most people have been taught that you cannot take the square roots of negative numbers. This is not entirely true.
The correct statement would be that the square root of a negative number is not a real number. In actuality the square root of negative 1 is called i . Thus the root of any negative number is simply the root of the number if it were positive, times i. (e.g.: the square root of -4 would be ± 2i ). A complex number is one that has both real and imaginary parts to it. A complex number can be written in the form x + yi, where x is the real number and yi is the imaginary part.
Just as real numbers can be represented on a number line, complex numbers are represented on a Cartesian plane, where real numbers are plotted along the x-axis and imaginary numbers are plotted along the y-axis. Thus the complex number 3 + 4i would be at the point (3, 4) on the Cartesian plane and it would be a distance of 5 units from the origin (by the Pythagorean Theorem).
To add complex numbers, the following rule can be used:
To multiply two complex numbers, the following rule can be used:
note : it is quite similar to the multiplication of two binomials. Also, the negative in the last term is
because of the fact that you are multiplying (bi)(di) which results in (bd) i2 and since i 2 is equal
to -1 , the negative must be taken into account.
These are the two basic operations that must be understood to understand how the basic Mandelbrot and Julia sets are computed.