Trig without Tears Part 10:

# Fun with Complex Numbers

Copyright © 1997–2024 by Stan Brown, BrownMath.com

Trig without Tears Part 10:

Copyright © 1997–2024 by Stan Brown, BrownMath.com

**Summary:**
Trig can answer some of the
**questions your algebra teacher wouldn’t answer**, like
what’s √i? and
what’s the log of a negative number?

As you may remember, complex numbers like 3+4i and 2−7i are often plotted on a complex plane. This makes it easier to visualize adding and subtracting. The illustration at right shows that

(3+4i) + (2−7i) = 5−3i

It turns out that for multiplying, dividing, and finding
powers and roots,
complex numbers are easier to work with in
**polar form**. The graph at left shows
−3+5i, but in polar form you don’t think about the real
and imaginary components (the “−3” and “5” in
−3+5i).
Instead, you think about **the length and direction of the line**
that connects the origin to the plotted point.

The length is easy, just the good old Pythagorean theorem in fact:

*r* = √3² + 5² = √34
≈ 5.83

(The length *r* is called the **absolute value** or
**modulus** of the complex number.)

But what about the direction? You can see from the picture
that *θ* is about 120° or about 2 radians (measured
counterclockwise from the positive real axis, which points east), but
what is it exactly? Well, you know that
tan *θ* = −5/3. If you take
Arctan(−5/3) on your calculator, you get about −1.03, and
adding π to get into the proper quadrant gives
*θ* ≈ 2.11 radians.
(In degrees, Arctan(−5/3) ≈ −59.04°, and
adding 180 gives *θ* ≈ 120.96°.)

Here’s a nice trick to
**find the angle in the correct quadrant automatically**:

*θ* = 2 Arctan(*y*/(*x* + *r*))

with *x*, *y*, and *r* as
defined here.

This formula automatically adjusts to the correct quadrant, so you never have to worry about whether to add or subtract 180° or π. If you test 2 Arctan(5/(−3 + √34)) on your calculator, you get 2.11 radians or 120.96° as before.

The formula is particularly handy when you’re writing a
program or spreadsheet formula to find *θ*. It flows directly
from the formulas for tangent of half an
angle.

A July 2003 article by Rob Johnson, archived here, inspired me to add this section.

A *lot* of
**ways to write a given number in polar form** exist, and all of
them can use degrees or radian measure.

- The one that relates most clearly to the diagram and the way you
actually find polar form is
−3+5i ≈ 5.83(cos 2.11 + i sin 2.11) or 5.83(cos 120.96° + i sin 120.96°)

- To save writing, that’s often abbreviated using
**cis**for “cosine of an angle plus i times sine of the angle”:−3+5i ≈ 5.83 cis 2.11 or 5.83 cis 120.96°

- We know from Euler’s formula (equation 47) that
cos
*θ*+ i sin*θ*= e^{iθ}, so we can write the polar form with an exponent:−3+5i ≈ 5.83 e

^{2.11i}or, rarely, 5.83 e^{120.96°i} - Finally, you may see an angle mark, especially in engineering
contexts. Engineers are more likely to use degrees than radians, so
I’ll put that version first:
−3+5i ≈ 5.83∠120.96° or, rarely, 5.83∠2.11

Remember, these are just notation. They all mean the same thing and follow the same rules.

It’s not exactly hard to multiply complex numbers in rectangular form, but it’s not exactly easy either:

(*a*+*b*i) × (*c*+*d*i) =
(*a**c*−*b**d*) +
(*b**c*+*a**d*)i

Division is harder because of eliminating imaginaries from the denominator:

(*a*+*b*i) / (*c*+*d*i) =
[(*a*+*b*i)(*c*−*d*i)] /
[(*c*+*d*i)(*c*−*d*i)] =
[(*a**c*+*b**d*) + (*b**c*−*a**d*)i] / (*c*²
+ *d*²)

But in polar form, it’s much easier because of the laws of exponents:

(81) *r* e^{iθ} × *s* e^{iφ} = *r**s* e^{i(θ+φ)} and *r* e^{iθ} / *s* e^{iφ} = (*r*/*s*)e^{i(θ−φ)}

Let’s make an example, with 11+24i and 22−17i. (Be
careful! *d* is negative.)

(11+24i) × (22−17i) = (11×22+24×17) + (24×22−11×17)i = 650+341i

And dividing:

(11+24i) / (22−17i) = [(11×22−24×17) + (24×22+11×17)i] / (22²+17²)

(11+24i) / (22−17i) = (−166+715i)/773 ≈ −0.215+0.925i

Now put 11+24i into polar form:

*r* = √11²+24² ≈ 26.401

*θ* ≈ 2 Arctan(24/(11+26.401)) ≈
1.141 (radians)

And 22−17i:

*r* = √22²+17² ≈ 27.803

*θ* ≈ 2
Arctan(17/(−17+27.803))
≈ −0.658 (radians)

Multiplying and dividing is a piece of cake:

26.401 e^{1.141i} × 27.803 e^{−0.658i} =
26.401×27.803 e^{(1.141−0.658)i} ≈
734.017 e^{0.483i}

26.401 e^{1.141i} / 27.803 e^{−0.658i} =
(26.401/27.803) e^{(1.141+0.658)i} ≈
0.950 e^{1.799i}

Once the numbers are in polar form, multiplying and dividing them is very easy. But if you have numbers in rectangular form, getting them into polar form is not exactly trivial, so in that case you may opt to do your arithmetic in rectangular form after all.

One of the applications of Euler’s formula (equation 47) is finding any power or root of any complex number. (Sawyer doesn’t do this, or at least not in the same book.) It’s not hard to develop the formula, using just Euler’s formula and the laws of exponents.

Start by writing down Euler’s formula, multiplied left and
right by a scale factor *r*:

*r* (cos *x* + i sin *x*) =
*r* e^{ix}

Next, raise both sides to the *n*th power:

[*r* (cos *x* +
i sin *x*)]^{n} =
[*r* e^{ix}]^{n}

Let’s leave the left-hand side alone for a while, and simplify the right-hand side. First, by the laws of exponents

[*r* e^{ix}]^{n} =
*r*^{n} e^{inx}

Apply Euler’s formula to the right-hand side and you have

[*r* e^{ix}]^{n} =
*r*^{n} (cos *n**x* + i sin *n**x*)

Connect that right-hand side to the original left-hand side and
you have **DeMoivre’s theorem**:

(82) [*r*(cos *x* + i sin *x*)]^{n} = *r*^{n} (cos *n**x* + i sin *n**x*)

This tells you that if you put a number into
polar form, you can
find any power or root of it. (Remember that the *n*th root of a
number is the same as the 1/*n* power.)

Because this textbook helps you,

please click to donate!Because this textbook helps you,

please donate at

BrownMath.com/donate.

please click to donate!Because this textbook helps you,

please donate at

BrownMath.com/donate.

For instance, you know the square roots of −1 are i and −i, but what’s the square root of i? You can use DeMoivre’s theorem to find it.

First, put i into e^{ix}
form (**polar form**), using the above
technique. i = 0+1i.
cos *x* = 0 and sin *x* = 1
when *x* = 90° or π/2.
Therefore

i = cos(π/2) + i sin(π/2)

√i = i^{½} =
[cos(π/2) + i sin(π/2)]^{½}

And by equation 82

√i = cos(½×π/2) + i sin(½×π/2)

√i = cos(π/4) + i sin(π/4)

√i = 1/√2 + i×1/√2

√i = (1+i)/√2

The other square root is minus that, as usual.

You can find any root of any complex number in a similar way, but usually with one preliminary step.

For instance, suppose you want
the cube roots of 3+4i. The first step is to put that number
into polar form. The absolute value is
√3²+4² = 5, and you use
the Arctan technique given
above to find the angle *θ* = 2 Arctan(4/(3+5)) ≈
2 Arctan(½) ≈
53.13° or 0.9273 radians. The polar form is

3+4i ≈ 5(cos 53.13° + i sin 53.13°)

To take a cube root of that, use equation 82
with *n* = 1/3:

cube root of (3+4i) ≈
5^{1/3} [*cos*(53.13°/3) + i *sin*(53.13°/3)]

The cube root of 5 is about 1.71.
Dividing the angle *θ* by 3,
53.13°/3 ≈ 17.71°; the cosine
and sine of that are about 0.95 and 0.30.
Therefore

cube root of (3+4i) ≈ 1.71 × (cos 17.71° + i sin 17.71°)

cube root of (3+4i) ≈ 1.63+0.52i

You may have noticed that I talked about “**the** cube
root**s** [plural] of 3+4i” and what we found was
“**a** cube root”. Even with the square root of i,
I waved my hand and said that the “other” square root was minus the
first one, “as usual”.

You already know that every positive real has two square roots. In
fact, **every complex number has n nth roots**.

How can you find them? It depends on the periodic nature of the cosine and sine functions. To start, look back at Euler’s formula,

e^{ix} =
cos *x* + i sin *x*

What happens if you add 2π or 360° to *x*? You have

e^{i(x+2π)} =
cos(*x* + 2π) + i sin(*x* + 2π)

But taking sine or cosine of 2π plus an angle is exactly
the same as taking sine or cosine of the original angle. So the
right-hand side is equal to
cos *x* + i sin *x*, which is equal to
e^{ix}. Therefore

e^{i(x+2π)} =
e^{ix}

In fact, you can keep adding 2π or 360° to *x* as long as
you like, and never change the value of the result. Symbolically,

e^{i(x+2πk)} =
e^{ix}
for all integer *k*

When you take an *n*th root, you simply use that
identity.

Getting back to the cube roots of 3+4i, recall that
that number is the same as 5e^{iθ}, where
*θ* is about 53.13° or 0.9273 radians. The
three cube roots of e^{iθ} are

e^{i(θ+2πk)/3}
for *k* = 0,1,2

Expanding that, you have

e^{iθ/3},
e^{i(θ+2π)/3}, and
e^{i(θ+4π)/3}

or

e^{iθ/3},
e^{i(θ/3+2π/3)}, and
e^{i(θ/3+4π/3)}

Compute those as cos *x* + i sin *x* in the usual way, and then
multiply by the (principal) cube root of 5. I get these three
roots:

cube roots of 3+4i ≈ 1.63+0.52i, −1.26+1.15i, −0.36−1.67i

More generally, we can extend DeMoivre’s theorem
(equation 82) to show the *n* *n*th roots of any complex
number:

(83) [*r* (cos *x* + i sin *x*)]^{(1/n)} = *r*^{(1/n)} [cos(*x*/*n*+2π*k*/*n*) + i sin(*x*/*n*+2π*k*/*n*)] for *k* = 0,1,2,…,*n*−1

Because this textbook helps you,

please click to donate!Because this textbook helps you,

please donate at

BrownMath.com/donate.

please click to donate!Because this textbook helps you,

please donate at

BrownMath.com/donate.

**See also:**
If you need a refresher on logarithms, please see
It’s the Law Too — the Laws of Logarithms.

Another application flows from a famous special case of Euler’s formula.
Substitute *x* = π or 180° in equation 47. Since
sin 180° = 0, the imaginary term drops out.
And cos 180° = −1, so you have the famous formula

(84) −1 = e^{iπ}

It’s interesting to take the natural log of both sides:

ln(−1) = ln e^{iπ}

ln(−1) = iπ

It’s easy enough to find the logarithm of any other negative number. Since

ln *ab* = ln *a* + ln *b*

then for all real *a* you have

ln(−*a*) =
ln(*a* × −1) =
ln *a* + ln(−1) =
ln *a* + iπ

(85) ln(−*a*) = ln *a* + iπ

I don’t honestly know whether all of this has any practical application. But if you’ve ever wondered about the logarithm of a negative number, now you know.

But why stop there? You can play the same game in taking the logarithm of a complex number.

But wait! A number like 3+4i isn’t ready to have its logarithm
taken. First you have to convert it to polar
form.
That’s nothing new: look back at the previous
section. I started with −1 = e^{iπ},
and what is that but converting −1 to polar form?

(86) ln(*r* e^{iθ}) = ln r + i*θ*

There’s really no need to memorize that formula; it’s just
ln(*x**y*) = ln *x* + ln *y* and
ln(e^{z}) = *z*.

**Example:** Earlier, in Principal Root
of a Complex Number, we found that 3+4i ≈
5 e^{0.9273i}. Therefore,

ln(3+4i) ≈
ln(5 e^{0.9273i}) =
ln 5 + 0.9273i ≈ 1.609 + 0.9273i

To get the most benefit from these problems, work them without first looking at the solutions. Refer back to the chapter text if you need to refresh your memory.

**Recommendation**: Work them on paper —
it’s harder to fool yourself about whether you really
understand a problem completely.

You’ll find full solutions for all problems. Don’t just check your answers, but check your method too.

1
Express in *a*+*b*i form:
(a) 62∠240°
(b) 100e^{1.17i}

2
Express in polar form, in both degrees and radian measure:
(a) −42+17i
(b) 100i
(c) −14.7

3
Find the three cube roots of −i, in
*a*+*b*i form. You’ll be able to give
an exact answer, not rounded decimals.

4
Find (1.04−0.10i)^{16}.

5
In Multiplying and Dividing Complex Numbers in
Polar Form we found a product of 650+341i and a quotient of about
−0.215+0.925i from two complex numbers in rectangular form,
then translated the original numbers to polar form and found a product
of about 734.017 e^{0.483i} and a quotient of about
0.950 e^{1.799i}. Convert the rectangular product and
quotient to polar form to verify that they match the polar ones.

6
Find the logarithms, to four decimal places: (a) -67.12;
(b) 1−i; (c) 734.017 e^{0.483i}.

**5 Oct 2023**:- New section: Multiplying and Dividing Complex Numbers in Polar Form.
- New section: Log of a Complex Number.
- In the section on polar form, expanded the list of notations instead of jumbling some of them together and leaving others to be assumed.
- Added a link to explain my otherwise-puzzling reference to “Sawyer”.
- Added practice problems 5 and 6.
- Made numerous small changes to improve the flow of the text.

**30 Oct 2016**: Added practice problems.**27 Oct 2016**:- This document had gradually accumulated a grab bag of unrelated topics. I broke out this material on complex numbers with trig as a separate chapter, and added a Summary.
- Updated the mathematical notation, particularly the use of italics and spaces, to conform to the standard. I used Jukka Korpela’s comprehensive Writing Mathematical Expressions (2014, Suomen E-painos Oy), ISBN 978-952-6613-25-3.

- (intervening changes suppressed)
**19 Feb 1997**: New document.

Because this textbook helps you,

please click to donate!Because this textbook helps you,

please donate at

BrownMath.com/donate.

please click to donate!Because this textbook helps you,

please donate at

BrownMath.com/donate.

Updates and new info: https://BrownMath.com/twt/