Complex Numbers and Complex Exponentials

Appendix A
Complex Numbers and Complex
Exponentials
A.1
Complex Numbers
These notes are intended as a summary and review of complex numbers. I’m assuming that the definition,
notation, and arithmetic of complex numbers are known to you, but we’ll put the basic facts on the
record. In the course we’ll also use calculus operations involving complex numbers, usually complex valued
functions of a real variable. For what we’ll do, this will not involve the area of mathematics referred to
as “Complex Analysis.”
For our purposes, the extensions of the formulas of calculus to complex numbers are straightforward and
reliable.
Declaration of principles Without apology I will write
√
i = −1 .
In many areas of science and engineering it’s common to use j for
in your own work I won’t try to talk you out of it. But I’ll use i.
√
−1. If you want to use j
Before we plunge into notation and formulas there are two points to keep in mind:
• Using complex numbers greatly simplifies the algebra we’ll be doing. This isn’t the only reason they’re
used, but it’s a good one.
• We’ll use complex numbers to represent real quantities — real signals, for example. At this point in
your life this should not cause a metaphysical crisis, but if it does my only advice is to get over it.
Let’s go to work.
Complex numbers, real and imaginary parts, complex conjugates A complex number is determined by two real numbers, its real and imaginary parts. We write
z = x + iy
where x and y are real and
i2 = −1 .
416
Chapter A Complex Numbers and Complex Exponentials
x the real part and y is the imaginary part, and we write x = Re z, y = Im z. Note: it’s y that is the
imaginary part of z = x + iy, not iy. One says that iy is an imaginary number or is purely imaginary. One
says that z has positive real part (resp., positive imaginary part) if x (resp., y) is positive. The set of all
complex numbers is denoted by C. (The set of all real numbers is denoted by R.)
Elementary operations on complex numbers are defined according to what happens to the real and imaginary parts. For example, if z = a + ib and w = c + di then their sum and product are given by
z + w = (a + c) + (b + d)i
zw = (ac − bd) + i(ad + bc)
I’ll come back to the formula for the general quotient z/w, but here’s a particular little identity that’s used
often: Since i · i = i2 = −1 we have
1
= −i and i(−i) = 1 .
i
The complex conjugate of z = x + iy is
z̄ = x − iy .
Other notations for the complex conjugate are z ∗ and sometimes even z † . It’s useful to observe that
z = z̄
if and only if z is real, i.e., y = 0.
Note also that
z +w = z +w,
zw = z w ,
z =z.
We can find expressions for the real and imaginary parts of a complex number using the complex conjugate.
If z = x + iy then z = x − iy so that in the sum z + z the imaginary parts cancel. That is z + z = 2x, or
x = Re z =
z+z
.
2
Similarly, in the difference, z − z̄, the real parts cancel and z − z̄ = 2iy, or
y = Im z =
z − z̄
.
2i
Don’t forget the i in the denominator here.
The formulas z + w = z̄ + w̄ and zw = z̄ w̄ extend to sums and products of more than two complex numbers,
and to integrals (being limits of sums), leading to formulas like
Z
f (t)g(t) dt =
Z
f (t) g(t) dt
(here dt is a real quantity.)
This overextended use of the overline notation for complex conjugates shows why it’s useful to have alternate
notations, such as
Z
Z
∗
f (t)g(t) dt
=
f (t)∗ g(t)∗ dt .
It’s best not to mix stars and bars in a single formula, so please be mindful of this. I wrote these formulas
for “indefinite integrals” but in our applications it will be definite integrals that come up.
A.1
Complex Numbers
417
The magnitude of z = x + iy is
|z| =
p
x2 + y 2 .
Multiplying out the real and imaginary parts gives
zz̄ = (x + iy)(x − iy) = x2 − i2 y 2 = x2 + y 2 = |z|2 .
This formula comes up all the time.
More generally,
|z + w|2 = |z|2 + 2 Re{z w̄} + |w|2
which is also
|z|2 + 2 Re{z̄w} + |w|2 .
To verify this,
|z + w|2 = (z + w)(z̄ + w̄)
= zz̄ + z w̄ + wz̄ + ww̄
= |z|2 + (z w̄ + +z w̄) + |w|2
which is also |z|2 + (z̄w + z̄w) + |w|2 .
The quotient z/w For people who really need to find the real and imaginary parts of a quotient z/w
here’s how it’s done. Write z = a + bi and w = c + di. Then
a + bi
z
=
w
c + di
a + bi c − di
=
c + di c − di
(ac + bd) + (bc − ad)i
(a + bi)(c − di)
=
.
=
2
2
c +d
c2 + d2
Thus
ac + bd
bc − ad
a + bi
a + bi
= 2
= 2
, Im
.
c + di
c + d2
c + di
c + d2
Do not memorize this. Remember the “multiply the top and bottom by the conjugate” sort of thing.
Re
Polar form Since a complex number is determined by two real numbers it’s natural to associate z = x+iy
with the pair (x, y) ∈ R2 , and hence to identify z with the point in the plane with Cartesian coordinates
(x, y). One also then speaks of the “real axis” and the “imaginary axis”.
We can also introduce polar coordinates r and θ and relate them to the complex number z = x+iy through
the equations
p
y
r = x2 + y 2 = |z| and θ = tan−1 .
x
The angle θ is called the argument or the phase of the complex number. One sees the notation
θ = arg z
and also
θ = ∠z .
Going from polar to Cartesian through x = r cos θ and y = r sin θ, we have the polar form of a complex
number:
x + iy = r cos θ + ir sin θ = r(cos θ + i sin θ) .
418
A.2
Chapter A Complex Numbers and Complex Exponentials
The Complex Exponential and Euler’s Formula
The real workhorse for us will be the complex exponential function. The exponential function ez for a
complex number z is defined, just as in the real case, by the Taylor series:
∞
ez = 1 + z +
X zn
z2 z3
+
+ ··· =
.
2!
3!
n!
n=0
This converges for all z ∈ C, but we won’t check that.
Notice also that
∞
X
zn
ez =
=
n!
n=0
∞
X
z̄ n
n=0
z̄
!
(a heroic use of the bar notation)
n!
=e
Also, ez satisfies the differential equation y ′ = y with initial condition y(0) = 1 (this is often taken as a
definition, even in the complex case). By virtue of this, one can verify the key algebraic properties:
ez+w = ez ew
Here’s how this goes. Thinking of w as fixed,
hence ez+w
d z+w
e
= ez+w
dz
must be a constant multiple of ez ;
ez+w = cez .
What is the constant? At z = 0 we get
ew = ce0 = c .
Done. Using similar arguments one can show the other basic property of exponentiation,
(ez )r = ezr
if r is real. It’s actually a tricky business to define (ez )w when w is complex (and hence to establsh
(ez )w = ezw ). This requires introducing the complex logarithm, and special considerations are necessary.
We will not go into this.
The most remarkable thing happens when the exponent is purely imaginary. The result is called Euler’s
formula and reads
eiθ = cos θ + i sin θ .
I want to emphasize that the left hand side has only been defined via a series. The exponential function in
the real case has nothing to do with the trig functions sine and cosine, and why it should have anything
A.2
The Complex Exponential and Euler’s Formula
419
to do with them in the complex case is a true wonder.1
Plugging θ = π into Euler’s formula gives eiπ = cos π + i sin π = −1, better written as
eiπ + 1 = 0 .
This is sometimes referred to as the most famous equation in mathematics; it expresses a simple relationship
— and why should there be any at all? — between the fundamental numbers e, π, 1, and 0, not to mention
i. We’ll probably never see this most famous equation again, but now we’ve seen it once.
The polar form z = r(cos θ + i sin θ) can now be written as
Consequences of Euler’s formula
z = reiθ ,
where r = |z| is the magnitude and θ is the phase of the complex number z. Using the arithmetic properties
of the exponential function we also have that if z1 = r1 eiθ1 and z2 = r2 eiθ2 then
z1 z2 = r1 r2 ei(θ1 +θ2 ) .
That is, the magnitudes multiply and the arguments (phases) add.
Euler’s formula also gives a dead easy way of deriving the addition formulas for the sine and cosine. On
the one hand,
ei(α+β) = eiα eiβ
= (cos α + i sin α)(cos β + i sin β)
= (cos α cos β − sin α sin β) + i(sin α cos β + cos α sin β).
On the other hand,
ei(α+β) = cos(α + β) + i sin(α + β) .
Equating the real and imaginary parts gives
cos(α + β) = cos α cos β − sin α sin β
sin(α + β) = sin α cos β + cos α sin β
I went through this derivation because it expresses in a simple way an extremely important principle in
mathematics and its applications.
1
Euler’s formula is usually proved by substituting into and manipulating the Taylor series for cos θ and sin θ. Here’s another
more elegant way of seeing it. It relies on results for differential equations, but the proofs of those are no more difficult that the
proofs of the properties of Taylor series that one needs in the usual approach. Let f (θ) = eiθ . Then f (0) = 1 and f ′ (θ) = ieiθ ,
so that f ′ (0) = i. Moreover
f ′′ (θ) = i2 eiθ = −eiθ = −f (θ)
i.e., f satisfies
f ′′ + f = 0,
f (0) = 1, f ′ (0) = i .
On the other hand if g(θ) = cos θ + i sin θ then
g ′′ (θ) = − cos θ − i sin θ = −g(θ),
or
g ′′ + g = 0
and also
g(0) = 1,
g ′ (0) = i .
Thus f and g satisfy the same differential equation with the same initial conditions, so f and g must be equal. Slick. I prefer
using the second order ordinary differential equation here since that’s the one naturally associated with the sine and cosine.
We could also do the argument with the first order equation y ′ = y. Indeed, if f (θ) = eiθ then f ′ (θ) = ieiθ = if (θ) and
f (0) = 1. Likewise, if g(θ) = cos θ + i sin θ then g ′ (θ) = − sin θ + i cos θ = i(cos θ + i sin θ) = ig(θ) and g(0) = 1. This implies
that f (θ) = g(θ) for all θ.
420
Chapter A Complex Numbers and Complex Exponentials
If you can compute the same thing two different ways, chances are you’ve done something
significant.
Take this seriously.2
Symmetries of the sine and cosine: even and odd functions
Using the identity
eiθ = eiθ = e−iθ
we can express the cosine and the sine as the real and imaginary parts, respectively, of eiθ :
eiθ − e−iθ
eiθ + e−iθ
and sin θ =
2
2i
Once again this is a simple observation. Once again there is something more to say.
cos θ =
You are very familiar with the symmetries of the sine and cosine function. That is, cos θ is an even function,
meaning
cos(−θ) = cos θ ,
and sin θ is an odd function, meaning
sin(−θ) = − sin θ .
Why is this true? There are many ways of seeing it (Taylor series, differential equations), but here’s one
you may not have thought of before, and it fits into a general framework of evenness and oddness that
we’ll find useful when discussing symmetries of the Fourier transform.
If f (x) is any function, then the function defined by
fe (x) =
f (x) + f (−x)
2
is even. Check it out:
fe (−x) =
f (−x) + f (x)
f (−x) + f (−(−x))
=
= fe (x) .
2
2
Similarly, the function defined by
fo (x) =
f (x) − f (−x)
2
is odd. Moreover
f (x) + f (−x) f (x) − f (−x)
+
= f (x)
2
2
The conclusion is that any function can be written as the sum of an even function and an odd function. Or,
to put it another way, fe (x) and fo (x) are, respectively, the even and odd parts of f (x), and the function is
the sum of its even and odd parts. We can find some symmetries in a function even if it’s not symmetric.
fe (x) + f0 (x) =
And what are the even and odd parts of the function eiθ ? For the even part we have
eiθ + e−iθ
= cos θ
2
and for the odd part we have
eiθ − e−iθ
= i sin θ .
2
Nice.
2
In some ways this is a maxim for the Fourier transform class. As we shall see, the Fourier transform allows us to view a
signal in the time domain and in the frequency domain; two different representations for the same thing. Chances are this is
something significant.
A.3
A.3
Algebra and Geometry
421
Algebra and Geometry
To wrap up this review I want to say a little more about the complex exponential and its use in representing
sinusoids. To set the stage for this we’ll consider the mix of algebra and geometry — one of the reasons
why complex numbers are often so handy.
We not only think of a complex number z = x + iy as a point in the plane, we also think of it as a vector
with tail at the origin and tip at (x, y). In polar form, either written as reiθ or as r(cos θ + i sin θ), we
recognize |z| = r as the length of the vector and θ as the angle that the vector makes with the x-axis (the
real axis). Note that
|eiθ | = | cos θ + i sin θ| =
Many is the time you will use |ei(something real) | = 1.
p
cos2 θ + sin2 θ = 1 .
Once we make the identification of a complex number with a vector we have an easy back-and-forth between
the algebra of complex numbers and the geometry of vectors. Each point of view can help the other.
Take addition. The sum of z = a + bi and w = c + di is the complex number z + w = (a + c) + (c + d)i.
Geometrically this is given as the vector sum. If z and w are regarded as vectors from the origin then z + w
is the vector from the origin that is the diagonal of the parallelogram determined by z and w.
Similarly, as a vector, z − w = (a − c) + (b − d)i is the vector that goes from the tip of w to the tip of z,
i.e., along the other diagonal of the parallelogram determined by z and w. Notice here that we allow for
the customary ambiguity in placing vectors; on the one hand we identify the complex number z − w with
the vector with tail at the origin and tip at (a − c, b − d). On the other hand we allow ourselves to place
the (geometric) vector anywhere in the plane as long as we maintain the same magnitude and direction of
the vector.
It’s possible to give a geometric interpretation of zw (where, you will recall, the magnitudes multiply and
the arguments add) in terms of similar triangles, but we won’t need this.
Complex conjugation also has a simple geometric interpretation. If z = x + iy then the complex conjugate
z̄ = x − iy is the mirror image of z in the x-axis. Think either in terms of reflecting the point (x, y) to the
point (x, −y) or reflecting the vector. This gives a natural geometric reason why z + z̄ is real — since z and
z̄ are symmetric about the real axis, the diagonal of the parallelogram determined by z and z̄ obviously
goes along the real axis. In a similar vein, −z̄ = −(x − iy) = −x + iy is the reflection of z = x + iy in the
y-axis, and now you can see what z − z̄ is purely imaginary.
There are plenty of examples of the interplay between the algebra and geometry of complex numbers, and
the identification of complex numbers with points in the plane (Cartesian or polar coordinates) often leads
to some simple approaches to problems in analytic geometry. Equations in x and y (or in r and θ) can
often be recast as equations in complex numbers, and having access to the arithmetic of complex numbers
frequently simplifies calculations.
A.4
Further Applications of Euler’s Formula
We’ve already done some work with Euler’s formula eiθ = cos θ + i sin θ, and we agree it’s a fine thing to
know. For additional applications we’ll replace θ by t and think of
422
Chapter A Complex Numbers and Complex Exponentials
eit = cos t + i sin t
as describing a point in the plane that is moving in time. How does it move? Since |eit | = 1 for every t,
the point moves along the unit circle. In fact, from looking at the real and imaginary parts separately,
x = cos t,
y = sin t
we see that eit is a (complex-valued) parametrization of the circle; the circle is traced out exactly once in
the counterclockwise direction as t goes from 0 to 2π. We can also think of the vector from the origin to z
as rotating counterclockwise about the origin, like a (backwards moving) clock hand.
For our efforts I prefer to work with
e2πit = cos 2πt + i sin 2πt
as the “basic” complex exponential. Via its real and imaginary parts, the complex exponential e2πit
contains the sinusoids cos 2πt and sin 2πt, each of frequency 1 Hz. If you like, including the 2π or not is the
difference between working with frequency in units of Hz, or cycles per second, and “angular frequency”
in units of radians per second. With the 2π, as t goes from 0 to 1 the point e2πit traces out the unit circle
exactly once (one cycle) in a counterclockwise direction. The units in the exponential e2πit are (as they
are in cos 2πt and sin 2πt)
e2π radians/cycle·i·1 cycles/sec·t sec .
Without the 2π the units in eit are
ei·1 radians/sec·t sec .
We can always pass easily between the “complex form” of a sinusoid as expressed by a complex exponential,
and the real signals as expressed through sines and cosines. But for many, many applications, calculations,
prevarications, etc., it is far easier to stick with the complex representation. As I said earlier in these
notes, if you have philosophical trouble using complex entities to represent real entities the best advice I
can give you is to get over it.
We can now feel free to change the amplitude, frequency, and to include a phase shift. The general (real)
sinusoid is of the form, say, A sin(2πνt + φ); the amplitude is A, the frequency is ν (in Hz) and the phase
is φ. (We’ll take A to be positive for this discussion.) The general complex exponential that includes this
information is then
Aei(2πνt+φ) .
Note that i is multiplies the entire quantity 2πνt + φ. The term phasor is often used to refer to the complex
exponential e2πiνt .
And what is Aei(2πνt+φ) describing as t varies? The magnitude is |Aei(2πiνt+φ) | = |A| = A so the point
is moving along the circle of radius A. Assume for the moment that ν is positive — we’ll come back to
negative frequencies later. Then the point traces out the circle in the counterclockwise direction at a rate
of ν cycles per second — 1 second is ν times around (including the possibility of a fractional number of
times around). The phase φ determines the starting point on the circle, for at t = 0 the point is Aeiφ . In
fact, we can write
Aei(2πνt+φ) = e2πiνt Aeiφ
and think of this as the (initial) vector Aeiφ set rotating at a frequency ν Hz through multiplication by
the time-varying phasor e2πiνt .
A.4
Further Applications of Euler’s Formula
423
What happens when ν is negative? That simply reverses the direction of motion around the circle from
counterclockwise to clockwise. The catch phrase is just so: positive frequencies means counterclockwise
rotation and negative frequencies means clockwise rotation. Now, we can write a cosine, say, as
e2πiνt + e−2πiνt
2
and one sees this formula interpreted through statements like “a cosine is the sum of phasors of positive
and negative frequency”, or similar phrases. The fact that a cosine is made up of a positive and negative
frequency, so to speak, is important for some analytical considerations, particularly having to do with the
Fourier transform (and we’ll see this phenomenon more generally), but I don’t think there’s a geometric
interpretation of negative frequencies without appealing to the complex exponentials that go with real
sines and cosines —“negative frequency” is clockwise rotation of a phasor, period.
cos 2πνt =
Sums of sinusoids As a brief, final application of these ideas we’ll consider the sum of two sinusoids of
the same frequency.3 In real terms, the question is what one can say about the superposition of two signals
A1 sin(2πνt + φ1 ) + A2 sin(2πνt + φ2 ) .
Here the frequency is the same for both signals but the amplitudes and phases may be different.
If you answer too quickly you might say that a phase shift between the two terms is what leads to beats.
Wrong. Perhaps physical considerations (up to you) can lead you to conclude that the frequency of the
sum is again ν. That’s right, but it’s not so obvious looking at the graphs of the individual sinusoids and
trying to imagine what the sum looks like, e.g., (see graph below):
Figure A.1: Two sinusoids of the same frequency. What does their sum look like?
3
The idea for this example comes from A Digital Signal Processing Primer by K. Stieglitz
424
Chapter A Complex Numbers and Complex Exponentials
An algebraic analysis based on the addition formulas for the sine and cosine does not look too promising
either. But it’s easy to see what happens if we use complex exponentials.
Consider
A1 ei(2πνt+φ1 ) + A2 ei(2πνt+φ2 )
whose imaginary part is the sum of sinusoids, above. Before messing with the algebra, think geometrically
in terms of rotating vectors. At t = 0 we have the two vectors from the origin to the starting points,
z0 = A1 eiφ1 and w0 = A2 eiφ2 . Their sum z0 + w0 is the starting point (or starting vector) for the sum of
the two motions. But how do those two starting vectors move? They rotate together at the same rate, the
motion of each described by e2πiνt z0 and e2πiνt w0 , respectively. Thus their sum also rotates at that rate —
think of the whole parallelogram (vector sum) rotating rigidly about the vertex at the origin. Now mess
with the algebra and arrive at the same result:
A1 ei(2πνt+φ1 ) + A2 ei(2πνt+φ2 ) = e2πiνt (A1 eiφ1 + A2 eiφ2 ) .
And what is the situation if the two exponentials are “completely out of phase”?
Of course, the simple algebraic manipulation of factoring out the common exponential does not work if
the frequencies of the two terms are different. If the frequencies of the two terms are different . . . now that
gets interesting.