 # Omega Red's garbage heap

Information wants to be free.

## Complex numbers

To not go to deep into history, these numbers were created to help solve third-grade polynomial equations. In some cases there existed "normal", real solutions, but to copute them, one had to compute square roots of... negative numbers!

Yeah... Roots of negative numbers? How this is supposed to work? Well:

• The letter i means the imaginary unit, in other words square root of -1.
• This results, that i 2 = -1 :-)
• Complex number is an expression of form a + b*i, where a and b are "normal" real numbers.
• Real part of number a+bi is written as Re(a+bi) = a
• Imaginary part liczby a+bi is written as Im(a+bi) = b
• Real part and imaginary part of a complex number are both real numbers.
• Complex numbers with zero imaginary part are just "normal" real numbers.
• Conjugate of number z = a+bi is equal z * = a-bi
(This means, that conjugate of a real number is the same number)
• Modulus of number z = a+bi is equal |z| = sqrt(a2+b2), where sqrt is a square root. For real numbers it is equal to their absolute values.
• Adding of complex numbers z = a + bi and w = c + di goes as follows: z + w = (a+c) + (b+d)i (We treat complex numbers just as polynomials with coefficient i , grouping real and imaginary parts)
• Multiplication is a little bit more difficult:
z * w =
(a+bi) * (c+di) = (ac-bd) + (ad+bc)i
• This operations are always computable and have the same properties as analogous operations in real numbers domain: they are commutative, associative, multiplication is separable in regard of addition, the complex number 0+0i is a complex zero, and 1+0i complex unit (neutral elements of addition and multiplication).
• Now division: when dividing (a+bi) / (c+di) we are proceeding like with removing irrationality from denominator (but this time we are removing imaginarity :-)
(a+bi) / (c+di) = [(a+bi)(c-di)] / [(c+di)(c-di)] = (ac-adi+bci-bdi2) / (c2-(di)2) = [(ac+bd)+(bc-ad)i] / (c2+d2) = (ac+bd)/(c2+d2) + i*(bc-ad)/(c2+d2)
• There are formulas (more complicated ;) for roots, logarithms, trigonometrical functions etc. in complex domain. Their most important property is that for real numbers their give the same results as "old" functions. Complex numbers are an extension of real numbers.

Real numbers can be visualised as points on the numerical axis (one-dimensional). So a question comes to mind, how we can visualize complex numbers? The answer is not that surprising: because complex numbers are ordered pairs of real numbers, we display them as points on a plane : the x coordinate is a real part, and y - imaginary part.

To complicate things a little bit more, I should mention that there exist hypercomplex numbers or quaternions, and they are in fact extensions of complex numbers. They are built up from four real parts... Formulas for basic operations are yet stranger, multiplication of quaterions is not commutative, and product of two non-zero quaternions can be zero... This numbers can be used to produce fractals just like complex numbers, but resulting "things" are four-dimensional and we can't directly see them... But we can display their two- or three-dimensional "intersections", so does great Quat program.