\documentclass{article} % Specifies the document class
% The preamble begins here.
\usepackage{amsmath}
\usepackage{amssymb}
\title{Complex Numbers}
% Declares the document's title.
\author{John M. Morrison} % Declares the author's name.
\date{\today} % Deleting this command produces today's date.
\setlength{\parskip}{6pt}
\newenvironment{code}{\begin{quote}\obeylines\tt\setlength{\parskip}{0pt}}{\end{quote}}
\newenvironment{ul}{\begin{itemize}\setlength{\parskip}{0pt} }{\end{itemize}}
\newenvironment{ol}{\begin{enumerate}\setlength{\parskip}{0pt}}{\end{enumerate}}
\newcommand{\re}{{\rm Re}}
\newcommand{\im}{{\rm Im}}
\newcommand{\Log}{{\rm Log}}
\newcommand{\Arg}{{\rm Arg}}
\begin{document}
\section{Introduction}
You will learn enough about complex numbers in this article to complete the
programs {\tt Complex.java} and {\tt CMath.java}. No specfic knowledge of
complex arithmetic or complex functions is assumed. Everything will be done
from scratch.
You are assumed to know about real numbers and their arithmetic. We will
realize the complex numbers as an extension of the real numbers. They will
have the four basic operations of arithmetic, addition, subtraction,
multiplication, and division.
\section{Extension and Number Systems}
When you first learned about numbers from Mrs. Wormwood, you learned about the {\it natural numbers}
$\mathbb{N}$; these are the positive counting numbers $\{1, 2, 3, 4, ..... \}$. You learned about
the operaton of addition, first by using your fingers, then by using the efficient {\it ripple-carry}
algorithm which looks like this.
\begin{verbatim}
1 1
6322
+4382
----
10704
\end{verbatim}
Also, you learned how to
subtract natural numbers first by using your fingers, then by using the ``borrowing'' method.
For quite some time, you were steered around mysteries such as $3 - 8$. At some juncture, you were
introduced to negative numbers and you saw that $3 - 8 = -5$. This gave you signed arithmetic and
introduced you to the set of all integers
$$\mathbb{Z} = \{\dots -2, -1, 0, 1, 2, \dots\}.$$
The integers behave nicely with +, - and *: the product, difference and sum of integers is yet
another integer. This property is called {\it closure}; the integers are closed under +, - and *. More
generally, if $f$ is a polynomial with integer coefficients and $a\in\mathbb{Z}$, $f(a)\in \mathbb{Z}$.
Unfortunately, the integers are not closed under exact division, although they are closed under
integer division. This brings us to and extension of the integers, the {\it rational numbers}, which
are known by the symbol $\mathbb{Q}$, for ``quotient.''
The rules for arithmetic were then exteneded again by Mrs Wormwood to work for fractions. You have
closure under division in the rationals, save for the special case of 0; this number cannot be a divisor of
anything but itself. With the rationals, you can solve any equation of the form
$$ax+b = 0,$$
provided that $a\not=0.$ All linear equations in the rationals become solvable, unless they are of the
form $q = 0$, where $a$ is some nozero number.
Consider the modest equation
$$x^2 = 2.$$
Can we solve this in the rationals? Suppose we can; the solution must be of the form
$$x = {p\over q}$$ where $p$ and $q$ are positive integers. Moreover, we can take this fraction
to be in lowest terms. If this is so, we have
$${p^2\over q^2} = 2.$$ Thus, $p^2 = 2q^2$, so 2 divides $p^2$ evenly. But 2 is prime, so we must
have that 2 divides $p$ evenly. Hence, 4 divides $p^2$. Since $p^2 = 2q^2$, 2 must divide $q^2$ evenly.
We are cooked: we just showed that 2 is a factor of $p$ and $q$, violating the premise that $p/q$ be in lowest
terms. No rational solution to the equation is possible. Again, we wish to extend our notion of
number.
What we would like is for the real numbers to be realizable as a geometric line. This is certainly true
for $\sqrt{2}$. You can construct this length with a compass and ruler. Just make two perpendicular
lines and mark off one unit from the intersection. Now draw the square described by this process; its
diagonal by the Pythagorean theorem is of length $\sqrt{2}$. This process of completion to a line
gives us the real numbers $\mathbb{R}$. The actual construction of the real numbers is a hairy complex
process. But it gives the real numbers the properties that make calculus go.
This brings us to the doorstop of another mystery. The geometric series
theorem says that if $x$ is a real number and if $x\not=1,$ then
$$\sum_{k=0}^n x^k = {x^{n+1} - 1\over x - 1}.$$
Now suppose that $|x| < 1$. Then $x^n\to 0$ as $n\to\infty$. Taking the limit on both sides of the
previous equation yields
$$\sum_{k=0}^\infty x^k = {- 1\over x - 1} = {1\over 1 - x}.$$
So far all looks innocent. However, we can perform a little substitution of $x^2$ for $x$ to get
$$\sum_{k=0}^\infty x^{2k} = {1\over 1 + x^2}\qquad |x| < 1.$$
This works; you can do a little programming experiment in Python to see it. Draw the graph of the
function $x\mapsto(1/(1 + x^2)$. It is a nice bell-shaped affair. Nothiing blows up, but the series for some
mysterious reason behaves badly if $|x| \ge 1$. Exactly what sort of chicanery is going on here? Things like
this happen for reasons!
Whatever could be lurking? Take some derivatives and see that
$$f'(x) = -{2x\over (1+x^2)^2}$$
and
$$f''(x) = {1 - 3x^2\over(1 + x^2)^3}.$$
These functions are well mannered, and the denominators are bounded below by
1, so this trail offers nary a hint. Uh oh. Dead end. But there is a nub;
the polynomial $x^2 + 1$ has no roots. Mathematically we say the real numbers
are not {\it algebraically complete}; there are polynomials with real
coefficients lacking real roots. Perhaps if we could extend the real numbers
in such a way that this polynomial has a root, the mystery might reveal itself.
\section{A New Number System}
We are going to extend the real numbers with a new set of objects called {\it complex numbers}.
A complex number is a symbol of the form $a + bi$, where $a, b\in \mathbb{R}$; the totality of
these objects is denoted by $\mathbb{C}$. We are going to
define the operations of arithmetic on these objects. You will program in in Java
and create this number system as a new data type.
If $a$ and $b$ are real, and $z = a + bi$, we say that $a$ is the {\it real part}
of $z$ and denote it by $\Re(z)$, and that $b$ is the {\it imaginary part} of
$z$ and denote it by $\im(z)$. We say two complex numbers are equal if their real parts
and imaginary parts are equal.
\subsection{The Plane Facts}
It is easy and useful to represent the complex numbers as points in the plane.
If $z = a + bi$, and $a, b\in\mathbb{R}$, we shall represent it as the point
$(a,b)$ in the plane. In this plane, the $x$--axis is is the set of all
complex numbers whose imaginary parts are zero.
Every real number $a$ can be thought of as complex number by writing $a + i0$.
We will make this association without further remark. In particular, the zero
for addition is $0 + 0i$, which we will henceforth know as 0. This is exactly
what happens when we think of the $x$--axis in the complex plane as being a
copy of the real numbers.
For this reason the $x$--axis also called the {\it real axis}. Likewise, the
$y$--axis is called the {\it imaginary axis}.
As we develop the complex numbers, this planar representation will bring some
interesting geometric meaning to addition and multiplication. This geometric
relationship will be key to sovling the mystery of the stopping power series.
\subsection{Adding Complex Numbers}
We begin by defining addition; to do so we insist that non-$i$ terms and $i$
terms are unlike and we add them algebraically. For example,
$$(1 + 4i) + (5 -2i) = 6 + 2i.$$
It is not difficult to check that this operation is commutiative and associative.
If you have seen vectors before, this form of addition is just vector addition.
You can think of a complex number as a vector.
If you have not seen vectors before, here are the essentials. A vector is a
directed line segment, which simply meands it is a line segment with labeled
ends. The best way to think of this is that a vector is an arrow with a head
and a tail. The complex number $z = a + bi$ can be thought of as an arrow
with its tail at the origin and its head at the point $(a,b)$. This vector
represents displacement by $a$ units horizontally and $b$ units vertically. If
you look in a Physics book, you will see this vector denoted by $ai + bj$,
where $i$ represents one horizontal unit of displacement and $j$ represents one
vertical unit of displacment.
Every complex number $a + bi$ has an {\it additive inverse} which is $-a - bi$.
If $z = a + bi$, then we will write $-z$ for $-a -bi$. You will notice that if
your think of $z$ as a vector, then $-z$ is just the vector pointing in the
opposite directon of $z$ with the same length.
Subtraction is defined as follows. If $z, w\in {\mathbb{C}}$, then we define
$$z - w = z + (-w).$$
Happily, this enterprise just boils down to subtracting and combining like
terms algebraically. Be careful when computing $z - w$ to distribute the $-$
to both terms of $w$.
\subsection{Addition and Geometry}
Suppose that $z, w\in\mathbb{C}$. Think of them as vectors with their tails at
the origin. You can see that they span a parallelogram. (Draw one!) Now
imagine taking the tail of $z$ and dragging it to the head of $w$. This will
form one side of the spanning parallelogram. Now do the reverse: drag the tail
of $w$ and stick it on the head of $z$. The result of doing either puts the
head of the second vector at the same point! Draw a new vector from the origin
to this point; this is $z + w$. Notice how this supplies a geometric
interpretation to addition. This is what is commonly known as the {\it
parallelogram law}.
\subsection{Argument}
If $z\in\mathbb{C}$ is nonzero, we define the {\it argument} of $z$, ${\rm Arg}(z)$ to be
the angle in $[-\pi, \pi]$ between the real axis adn $z$ created when $z$ is
realized as a vector, and placed at the origin. For example,
$${\rm Arg}(1 + i) = \pi/4$$ since $1 + i$ is one-eigth of a circle from
from the real axis in the counterclockwise direction. Likewise,
$${\rm Arg}(1 - i) = -\pi/4.$$
Observe that for any positive real number $z$ in the complex plane, ${\rm Arg}(z) = 0$ and
if $z$ is real and negative, ${\rm Arg}(z) = \pi$.
\subsection{Multiplication Conjugation and Intege Powers}
Now comes multiplication. We will first define $i*i = -1$. Now we shall
extend this to any complex numbers by saying that the distributive law (and
therefore the FOIL rule) works. This suffices. Notice what happens when we
multiply two complex numbers. If $z = a + bi$ and $w = c + di$, then
$$zw = (a + bi)(c + di) = ac + adi + bci + bdi^2 = (ac - bd) + i(ad + bc).$$
Multiplication is commutative, associative and enjoys the distributive
property. Its neutral element is $1 = 1 + 0i$.
Finally, we must determine if every complex number has a multiplicative
inverse. To this end, we first make a helpful definition. If $z = a + bi$, then
we define the {\it conjugate} of $z$ by ${\overline z} = a - bi$. Observe that
in this case,
$$z{\overline z} = (a + bi)(a - bi) = a^2 - b^2i^2 = a^2 + b^2.$$
You should notice that $\sqrt{z\overline z}$ is the planar distance from $z$ to the origin.
We will therefore define the {\it absolute value} of a complex number $z$ by $|z| = \sqrt{z\overline z}$.
This is the distance from the origin to the complex number. We then define the {\it distance}
between $z, w\in \mathbb{C}$ by
$$d(z, w) = |z - w|.$$
This is just the planar distance between $z$ and $w$.
\subsection{Division} Let us begin by seeing that any nonzero complex number has a multiplicative
inverse. Let $z\in\mathbb{C}$ be nonzero. Then $|z| > 0$. We will now show that
$$w = {{\overline z}\over {|z|^2}}$$ is a multiplicative inverse for $z$. To see this, just multiply
as follows
$$zw = z\cdot \frac{{\overline z}}{|z|^2} = {z{\overline z}\over |z|^2} = 1.$$
Now suppose $z = a + bi$. then
$${1\over z} = {{\overline z}\over |z|^2} = {a - bi \over {a^2 + b^2}} = {a\over a^2 + b^2} - i\cdot{b\over{a^2 + b^2}}.$$
Since $z\not= 0$, you can be assured that $a^2 + b^2 > 0$, so the expression has no possibility of a
division by zero.
We can now define positive integer powers just as you might expect, and we can define for any
positive integer $n$,
$$z^{-n} = {1\over z^n} = \left({1\over z}\right)^n.$$
Now, all of the rational functions we know from the real domain can be extended to the complex
numbers. Let us now return to the mysterious stoppage of convergence we saw before.
\subsection{Mystery Solved}
We saw that
$${1\over 1 + x^2} = \sum_{n=0}^\infty x^{2k}, \qquad -1 < x < 1.$$
The geometric series theorem works in the complex case just as for the real one; to wit
$${1\over 1 + z^2} = \sum_{n=0}^\infty z^{2k}, \qquad |z| < 1.$$
Next observe that $z^2 + 1 = (z - i)(z + i);$ this tells us that the rational function
$z\mapsto{1/(z^2 + 1)}$ blows up at $z=\pm i$. It is no conincidence that the real verson on the
series stops converging for $x$ with $|x| \ge 1$. The distance from $\pm i$ to the origin is 1. This
series actually converges in the biggest domain possible for it.
\subsection{Is another extension needed here?}
In short, no. The fundamental theorem of algebra states that all complex polynomials factor into linear
factors.
\section{Complex Functions}
The most important complex function outside of the rational functions is the exponential function, which is
defined by
$$e^z = \exp(z) = \sum_{n=0}^\infty {z^n\over n!}, \qquad z\in\mathbb{C}.$$
This infinite sum converges for any complex number since the terms go to zero faster than
any exponential function of $n$, no matter the choice of $z$.
There is an interesting cyclic pattern for powers of $i$ which will now come into play. We can
easily see that $i^4 = i^2\cdot i^2 = (-1)(-1) = 1.$ The powers of $i$ repeat cyclically every 4th power.
We have that $i^{2k} = (-1)^k$ and $i^{2k + 1} = i^{2k} i = (-1)^ki.$ This works for any integer $k$.
Suppose that $t\in\mathbb{R}$. Then we have
$$e^{it} = \sum_{n = 0}^\infty {(it)^n\over n!} = \sum_{n=0}^\infty {(it)^{2k}\over (2k)!} +\sum_{n=0}^\infty {(it)^{2k + 1}\over (2k+1)!} $$
This holds because we sume the even and odd terms separately. Now let us take advantage of what we
know about powers of $i$ to see that
$$e^{it} = \sum_{n=0}^\infty {(it)^{2k}\over (2k)!} +\sum_{n=0}^\infty {(it)^{2k + 1}\over (2k+1)!}
= \sum_{n=0}^\infty {(-1)^{k}\over (2k)!} + i \sum_{n=0}^\infty {(-1)^kt^{2k + 1}\over (2k+1)!}.$$
This is the famous Euler Theorem, which says
$$e^{it} = \cos(t) + i\sin(t).$$
Hence, if $z = a + ib$,
$$e^{z} = e^{a + ib} = e^a e^{ib} = e^a(\cos(b) + i\sin(b)).$$
From this the pair of relationships
$$e{iz} = \cos(z) + i\sin(z)$$
and
$$e^{-iz} = \cos(-z) + i\sin(-z) - \cos(z) - i\sin(z).$$
Now add and you can see that
$$2\cos(z) = e^{iz} + e^{-iz},$$
so that
$$\cos(z) ={ e^{iz} + e^{-iz}\over 2}.$$
Likewise, if you subtract you see that
$$\sin(z) ={ e^{iz} - e^{-iz}\over 2i}.$$
\subsection{Some Consequences} In the real domain, we know that
the exponential function is increasing, and it is therefore
1-1. It has an inverse, called the (natural) log function. In the
complex domain, we have the following.
$$e^{z + 2i\pi} = e^z e^{2i\pi} = e^z(\cos(2\pi) + i\sin(2\pi) = e^z.$$
The complex exponential function is perioidic with period $2i\pi$. It is
not 1-1 so there is not a cleanly defined log function on the complex plane.
It is also interesting to notice that for any $t\in\mathbb{R}$,
$$|e^{it}|^2 = \cos^2(t) + \sin^2(t) = 1.$$
The function $t\mapsto e^{it}$ maps the real line onto the unit circle
by sketching it out counterclockwise. This function has a period
of $2\pi$, so the intervbal $(-\pi, \pi]$ constitutes one trip around
the unit circle.
As a result every complex number $z$ can be written as
$$z = re^{it},$$
where $r = |z|$ and $t\in (\-pi, \pi]$. If $z\not=0$, we have $r > 0$
so we can write
$$z = e^{log(r)} + e^{it} = e^{log(r) + it}.$$
The quantity $log(r) + it$ is called the {\it principal branch
of the logarithm} in the complex plane. You shoulld also notice that
in this case, $t = {\rm Arg}(z).$ We henceforth define
$$Log(z) = log|z| + i{\rm Arg}(z).$$
If $w\in\mathbb{C}$, then we can define
$$z^w = e^{w\Log(z)}.$$
\end{document}