# Complex numbers

The calculator displays complex number and its conjugate on the complex plane, evaluate complex number absolute value and principal value of the argument . It also demonstrates elementary operations on complex numbers.

Starting from 16th century mathematicians faced necessity of the special numbers, known nowadays as complex numbers. The complex number is a number of the form a+bi, where a,b — real numbers, i — imaginary unit is a solution of the equation: i^{2}=-1.

It's interesting to trace the evolution of the mathematician opinions on the complex number problems. Here are some quotes from ancient works on this topic:

- 16th century : So progresses arithmetic subtlety the end

of which... is as refined as it is useless.^{1} - 17th century : This miracle of analysis, this marvel of the world of ideas, an almost amphibian object between Being and Non-being that we call the imaginary number.
^{2} - 18th century : Square roots from the negative numbers are not equal zero, they are not less than zero, they are not great than zero. The negative number square roots cannot belong to the real numbers, so they are
*unreal numbers*. This circumstance make use to think of the numbers, which are inherently impossible and are usually called imaginary, because they are only in the mind can be imagined.^{3} - 19th century No one questions the exactness of the results which we obtain by the Calculus of imaginary quantities, although they are but algebraic forms, and the hieroglyphics of unreal quantities.
^{4}

It is used several ways of complex number defining. We'll show three of them

### Algebraic form

,

where a and b - real numbers, i - imaginary unit, so that i^{2}=-1. a - corresponds to real part, b - imaginary part.

### Polar form

,

where r - absolute value of complex number:

is a distance between pont 0 and complex point on the complex plane, and φ is an angle between positive real axis and the complex vector (argument).

### Exponential form (Euler's form)

is a simplified version of the polar form followed from Euler's formula.

Complex number argument is a multivalued function , for integer k. Principal value of the argument is a single value in the open period (-π..π].

Principal value can be calculated from algebraic form using the formula below:

This algorithm is implemented in javascript Math.atan2 function.

All elementary arithmetic operations is defined for complex number:

### Complex number addition

One complex number can be added to another in the same way as polynomials:

### Complex number multiplication

Using complex number definition i*i=-1, we can easily elaborate complex number multiplication formula:

### Complex number division

To derive complex number division formula we multiply both numerator and denominator by the complex number conjugate (to eliminate imaginary unit in denominator):

Conjugate is defined as:

So the final division formula is:

### Complex number exponentiation

Using Euler's form it looks like pretty simple:

This formula is derived from De Moivre's formula:

### n-th degree root

From De Moivre's formula n nth roots of z (the power of 1/n) are given by:

,

there are n roots, where k = 0..n-1 - a root integer index. The roots can be displayed on the complex plane as right polygon vertexes.

## Comments