# Arithmetic Course/Types of Number/Complex Number
## Complex Number

Complex Number and its Complex Conjugate is a number that has the general form
    Z = a + i b
    Z = a - i b

## Mathematic Operations
### Addition of 2 Complex Numbers

    $(a+ib)+(c+id)=(a+c)+i(b+d).\$
    $(a+ib)+(a-ib)=2a.\$

### Subtraction of 2 Complex Numbers

    $(a+ib)-(c+id)=(a-c)+i(b-d).\$
    $(a+ib)-(a-id)=2ib.\$

### Multiplication of 2 Complex Numbers

    $(a+ib)\times (c+id)=(ac-bd)+i(ad+bc)$
    $(a+ib)\times (a-ib)=a^{2}+b^{2}.\$

### Division of 2 Complex Numbers

    ${\frac {(a+ib)}{(c+id)}}={\frac {(ac-bd)+i(ad+bc)}{(c+id)^{2}}}$
    ${\frac {(a+jb)}{(a-jb)}}={\frac {a^{2}-b^{2}}{(a-jb)^{2}}}$

### Square root

The square roots of a + bi (with b ≠ 0) are $\pm (\gamma +\delta i)$, where
    $\gamma ={\sqrt {\frac {a+{\sqrt {a^{2}+b^{2}}}}{2}}}$
and
    $\delta ={\frac {|b|}{b}}{\sqrt {\frac {-a+{\sqrt {a^{2}+b^{2}}}}{2}}}.$
This can be seen by squaring $\pm (\gamma +\delta i)$ to obtain a + bi. Here ${\sqrt {a^{2}+b^{2}}}$ is called the modulus of a + bi, and the square root with non-negative real part is called the principal square root.

### Conjugation

The complex conjugate of the complex number z = x + yi is defined to be x − yi. It is denoted ${\bar {z}}$ or $z^{*}\,$. Geometrically, ${\bar {z}}$ is the "reflection" of z about the real axis. In particular, conjugating twice gives the original complex number: ${\bar {\bar {z}}}=z$.
The real and imaginary parts of a complex number can be extracted using the conjugate:
    $\operatorname {Re} \,(z)={\tfrac {1}{2}}(z+{\bar {z}}),\,$
    $\operatorname {Im} \,(z)={\tfrac {1}{2i}}(z-{\bar {z}}).\,$
Moreover, a complex number is real if and only if it equals its conjugate.
Conjugation distributes over the standard arithmetic operations:
    ${\overline {z+w}}={\bar {z}}+{\bar {w}},\,$
    ${\overline {zw}}={\bar {z}}{\bar {w}},\,$
    ${\overline {(z/w)}}={\bar {z}}/{\bar {w}}\,$
The reciprocal of a nonzero complex number z = x + yi is given by
    ${\frac {1}{z}}={\frac {\bar {z}}{z{\bar {z}}}}={\frac {\bar {z}}{x^{2}+y^{2}}}.$
This formula can be used to compute the multiplicative inverse of a complex number if it is given in rectangular coordinates. Inversive geometry, a branch of geometry studying more general reflections than ones about a line, can be expressed in terms of complex numbers, too.

## Polar form
### Absolute value and argument

Another way of encoding points in the complex plane than using the x- and y-coordinates is to use the distance of a point P to O, the point whose coordinates are (0, 0) (origin), and the angle of the line through P and O. This idea leads to the polar form of complex numbers.
The absolute value (or modulus or magnitude) of a complex number z = x+yi is
    $\textstyle r=|z|={\sqrt {x^{2}+y^{2}}}.\,$
If z is a real number (i.e., y = 0), then r = |x|. In general, by Pythagoras' theorem, r is the distance of the point P representing the complex number z to the origin.
The argument or phase of z is the angle to the real axis, and is written as $\arg(z)$. As with the modulus, the argument can be found from the rectangular form $x+iy$:
    $\varphi =\arg(z)={\begin{cases}\arctan({\frac {y}{x}})&{\mbox{if }}x>0\\\arctan({\frac {y}{x}})+\pi &{\mbox{if }}x<0{\mbox{ and }}y\geq 0\\\arctan({\frac {y}{x}})-\pi &{\mbox{if }}x<0{\mbox{ and }}y<0\\{\frac {\pi }{2}}&{\mbox{if }}x=0{\mbox{ and }}y>0\\-{\frac {\pi }{2}}&{\mbox{if }}x=0{\mbox{ and }}y<0\\{\mbox{undefined }}&{\mbox{if }}x=0{\mbox{ and }}y=0\end{cases}}$
The value of φ can change by any multiple of 2π and still give the same angle (note that radians are being used). Hence, the arg function is sometimes considered as multivalued. Normally, as given above, the principal value in the interval $(-\pi ,\pi ]$ is chosen. Values in the range $[0,2\pi )$ are obtained by adding $2\pi$ if the value is negative. The polar angle of the origin is undefined but the value 0 is commonly used.
Together, r and φ give another way of representing complex numbers, the polar form, as the combination of modulus and argument fully specify the position of a point on the plane. Recovering the original rectangular co-ordinates from the polar form is done by the formula called trigonometric form
    $z=r(\cos \varphi +i\sin \varphi ).\,$
Using Euler's formula this can be written as
    $z=re^{i\varphi }.$
Using the cis function, this is sometimes abbreviated to
    $z=r\ \operatorname {cis} \ \varphi .\,$
In angle notation, often used in electronics to represent a phasor with amplitude r and phase φ it is written as
    $z=r\angle \varphi .\,$

### Multiplication, division and exponentiation in polar form

The relevance of representing complex numbers in polar form stems from the fact that the formulas for multiplication, division and exponentiation are simpler than the ones using Cartesian coordinates. Given two complex numbers z$_1$ = r$_1$(cos φ$_1$ + isin φ$_1$) and z$_2$ =r$_2$(cos φ$_2$ + isin φ$_2$) the formula for multiplication is
    $z_{1}z_{2}=r_{1}r_{2}(\cos(\varphi _{1}+\varphi _{2})+i\sin(\varphi _{1}+\varphi _{2})).$
In other words, the absolute values are multiplied and the arguments are added to yield the polar form of the product. For example, multiplying by i corresponds to a quarter-rotation counter-clockwise, which gives back i$^2$ = −1. The picture at the right illustrates the multiplication of
    $(2+i)(3+i)=5+5i\,$
Since the real and imaginary part of 5+5i are equal, the argument of that number is 45 degrees, or π/4 (in radian). On the other hand, it is also the sum of the angles at the origin of the red and blue triangle are arctan(1/3) and arctan(1/2), respectively. Thus, the formula
    ${\frac {\pi }{4}}=\arctan {\frac {1}{2}}+\arctan {\frac {1}{3}}$
holds. As the arctan function can be approximated highly efficiently, formulas like this—known as Machin-like formulas—are used for high-precision approximations of π.
Similarly, division is given by
    ${\frac {z_{1}}{z_{2}}}={\frac {r_{1}}{r_{2}}}\left(\cos(\varphi _{1}-\varphi _{2})+i\sin(\varphi _{1}-\varphi _{2})\right).$
This also implies de Moivre's formula for exponentiation of complex numbers with integer exponents:
    $z^{n}=r^{n}\,(\cos n\varphi +i\sin n\varphi ).$
The n-th roots of z are given by
    ${\sqrt[{n}]{z}}={\sqrt[{n}]{r}}\left(\cos \left({\frac {\varphi +2k\pi }{n}}\right)+i\sin \left({\frac {\varphi +2k\pi }{n}}\right)\right)$
for any integer k satisfying 0 ≤ k ≤ n − 1. Here ${\sqrt[{n}]{r}}$ is the usual (positive) nth root of the positive real number r. While the nth root of a positive real number r is chosen to be the positive real number c satisfying c$^n$ = x there is no natural way of distinguishing one particular complex nth root of a complex number. Therefore, the nth root of z is considered as a multivalued function (in z), as opposed to a usual function f, for which f(z) is a uniquely defined number. Formulas such as
    ${\sqrt[{n}]{z^{n}}}=z$
(which holds for positive real numbers), do in general not hold for complex numbers.

## de Moivre's formula

In mathematics, de Moivre's formula, named after Abraham de Moivre, states that for any complex number (and, in particular, for any real number) x and integer n it holds that
    $\left(\cos x+i\sin x\right)^{n}=\cos \left(nx\right)+i\sin \left(nx\right).\,$
The formula is important because it connects complex numbers (i stands for the imaginary unit) and trigonometry. The expression cos x + i sin x is sometimes abbreviated to cis x.
By expanding the left hand side and then comparing the real and imaginary parts under the assumption that x is real, it is possible to derive useful expressions for cos (nx) and sin (nx) in terms of cos x and sin x. Furthermore, one can use a generalization of this formula to find explicit expressions for the nth roots of unity, that is, complex numbers z such that z$^n$ = 1.

### Derivation

Although historically proven earlier, de Moivre's formula can easily be derived from Euler's formula:
    $e^{ix}=\cos x+i\sin x\,$
and the exponential law for integer powers
    $\left(e^{ix}\right)^{n}=e^{inx}.\,$
Then, by Euler's formula,
    $e^{i(nx)}=\cos(nx)+i\sin(nx).\,$

## References

* ↑ Abramowitz, Miltonn; Stegun, Irene A. (1964). [/books?id=MtU8uP7XMvoC Handbook of mathematical functions with formulas, graphs, and mathematical tables]. Courier Dover Publications. p. 17. ISBN 0-486-61272-4. {{cite book}}: Check |url= value (help), Section 3.7.26, p. 17
* ↑ Cooke, Roger (2008). [/books?id=lUcTsYopfhkC Classical algebra: its nature, origins, and uses]. John Wiley and Sons. p. 59. ISBN 0-470-25952-3. {{cite book}}: Check |url= value (help), Extract: page 59
* ↑ Kasana, H.S. (2005). [/books?id=rFhiJqkrALIC Complex Variables: Theory And Applications] (2nd ed.). PHI Learning Pvt. Ltd. p. 14. ISBN 81-203-2641-5. {{cite book}}: Check |url= value (help), Extract of chapter 1, page 14
* ↑ Nilsson, James William; Riedel, Susan A. (2008). [/books?id=sxmM8RFL99wC Electric circuits] (8th ed.). Prentice Hall. p. 338. ISBN 0-131-98925-1. {{cite book}}: Check |url= value (help), Chapter 9, page 338