# This Quantum World/Appendix/Complex numbers
### Complex numbers

The natural numbers are used for counting. By subtracting natural numbers from natural numbers, we can create integers that are not natural numbers. By dividing integers by integers (other than zero) we can create rational numbers that are not integers. By taking the square roots of positive rational numbers we can create real numbers that are irrational. And by taking the square roots of negative numbers we can create complex numbers that are imaginary.
Any imaginary number is a real number multiplied by the positive square root of $-1,$ for which we have the symbol $i=\,_{+}\!{\sqrt {-1}}.$
Every complex number $z$ is the sum of a real number $a$ (the real part of $z$) and an imaginary number $ib.$ Somewhat confusingly, the imaginary part of $z$ is the real number $b.$
Because real numbers can be visualized as points on a line, they are also referred to as (or thought of as constituting) the real line. Because complex numbers can be visualized as points in a plane, they are also referred to as (or thought of as constituting) the complex plane. This plane contains two axes, one horizontal (the real axis constituted by the real numbers) and one vertical (the imaginary axis constituted by the imaginary numbers).
Do not be mislead by the whimsical tags "real" and "imaginary". No number is real in the sense in which, say, apples are real. The real numbers are no less imaginary in the ordinary sense than the imaginary numbers, and the imaginary numbers are no less real in the mathematical sense than the real numbers. If you are not yet familiar with complex numbers, it is because you don't need them for counting or measuring. You need them for calculating the probabilities of measurement outcomes.
This diagram illustrates, among other things, the addition of complex numbers:
    $z_{1}+z_{2}=(a_{1}+ib_{1})+(a_{2}+ib_{2})=(a_{1}+a_{2})+i(b_{1}+b_{2}).$
As you can see, adding two complex numbers is done in the same way as adding two vectors $(a,b)$ and $(c,d)$ in a plane.
Instead of using rectangular coordinates specifying the real and imaginary parts of a complex number, we may use polar coordinates specifying the absolute value or modulus $r=|z|$ and the complex argument or phase $\alpha$, which is an angle measured in radians. Here is how these coordinates are related:
    $a=r\cos \alpha ,\qquad b=r\sin \alpha ,\qquad r=\,_{+}\!{\sqrt {a^{2}+b^{2}}},$
(Remember Pythagoras?)
    $\alpha ={\begin{cases}\arctan({\frac {b}{a}})&{\mbox{if }}a>0\\\arctan({\frac {b}{a}})+\pi &{\mbox{if }}a<0{\mbox{ and }}b\geq 0\\\arctan({\frac {b}{a}})-\pi &{\mbox{if }}a<0{\mbox{ and }}b<0\\+{\frac {\pi }{2}}&{\mbox{if }}a=0{\mbox{ and }}b>0\\-{\frac {\pi }{2}}&{\mbox{if }}a=0{\mbox{ and }}b<0\end{cases}}\qquad {\hbox{or}}\quad \alpha ={\begin{cases}+\arccos({\frac {a}{r}})&{\mbox{if }}b\geq 0\\-\arccos({\frac {a}{r}})&{\mbox{if }}b<0\end{cases}}$
All you need to know to be able to multiply complex numbers is that $i^{2}=-1$:
    $z_{1}z_{2}=(a_{1}+ib_{1})(a_{2}+ib_{2})=(a_{1}a_{2}-b_{1}b_{2})+i(a_{1}b_{2}+b_{1}a_{2}).$
There is, however, an easier way to multiply complex numbers. Plugging the power series (or Taylor series) for $\cos$ and $\sin ,$
    $\cos x=\sum _{k=0}^{\infty }{\frac {(-1)^{k}}{(2k)!}}x^{2k}=1-{x^{2} \over 2!}+{x^{4} \over 4!}-{x^{6} \over 6!}+\cdots$
    $\sin x=\sum _{k=0}^{\infty }{\frac {(-1)^{k}}{(2k+1)!}}x^{2k+1}=x-{x^{3} \over 3!}+{x^{5} \over 5!}-{x^{7} \over 7!}+\dots ,$
into the expression $\cos \alpha +i\sin \alpha$ and rearranging terms, we obtain
    $\sum _{k=0}^{\infty }{(ix)^{k} \over k!}=1+ix+{(ix)^{2} \over 2!}+{(ix)^{3} \over 3!}+{(ix)^{4} \over 4!}+{(ix)^{5} \over 5!}+{(ix)^{6} \over 6!}+{(ix)^{7} \over 7!}+\cdots$
But this is the power/Taylor series for the exponential function $e^{y}$ with $y=ix$! Hence Euler's formula
    $e^{i\alpha }=\cos \alpha +i\sin \alpha ,$
and this reduces multiplying two complex numbers to multiplying their absolute values and adding their phases:
    $(z_{1})\,(z_{2})=r_{1}e^{i\alpha _{1}}\,r_{2}e^{i\alpha _{2}}=(r_{1}r_{2})\,e^{i(\alpha _{1}+\alpha _{2})}.$
An extremely useful definition is the complex conjugate $z^{*}=a-ib$ of $z=a+ib.$ Among other things, it allows us to calculate the absolute square $|z|^{2}$ by calculating the product
    $zz^{*}=(a+ib)(a-ib)=a^{2}+b^{2}.$
1. Show that
    $\cos x={e^{ix}+e^{-ix} \over 2}\quad {\hbox{and}}\quad \sin x={e^{ix}-e^{-ix} \over 2i}.$
2. Arguably the five most important numbers are $0,1,i,\pi ,e.$ Write down an equation containing each of these numbers just once. (Answer?)