Calculators and Complex Numbers: Index

I’m using the Twelve Days of Christmas (and perhaps a few extra days besides) to do something that I should have done a long time ago: collect past series of posts into a single, easy-to-reference post. The following posts formed my series on how the trigonometric form of complex numbers, DeMoivre’s Theorem, and extending the definitions of exponentiation and logarithm to complex numbers.

Part 1: Introduction: using a calculator to find surprising answers for \ln(-5) and \sqrt[3]{-8}. See the video below.

Part 2: The trigonometric form of complex numbers.

Part 3: Proving the theorem

\left[ r_1 (\cos \theta_1 + i \sin \theta_1) \right] \cdot \left[ r_2 (\cos \theta_2 + i \sin \theta_2) \right] = r_1 r_2 (\cos [\theta_1+\theta_2] + i \sin [\theta_1+\theta_2])

Part 4: Proving the theorem

\displaystyle \frac{ r_1 (\cos \theta_1 + i \sin \theta_1) }{ r_2 (\cos \theta_2 + i \sin \theta_2) } = \displaystyle \frac{r_1}{r_2} (\cos [\theta_1-\theta_2] + i \sin [\theta_1-\theta_2])

Part 5: Application: numerical example of De Moivre’s Theorem.

Part 6: Proof of De Moivre’s Theorem for nonnegative exponents.

Part 7: Proof of De Moivre’s Theorem for negative exponents.

Part 8: Finding the three cube roots of -27 without De Moivre’s Theorem.

Part 9: Finding the three cube roots of -27 with De Moivre’s Theorem.

Part 10: Pedagogical thoughts on De Moivre’s Theorem.

Part 11: Defining z^q for rational numbers q.

Part 12: The Laws of Exponents for complex bases but rational exponents.

Part 13: Defining e^z for complex numbers z

Part 14: Informal justification of the formula e^z e^w = e^{z+w}.

Part 15: Simplification of e^{i \theta}.

Part 16: Remembering DeMoivre’s Theorem using the notation e^{i \theta}.

Part 17: Formal proof of the formula e^z e^w = e^{z+w}.

Part 18: Practical computation of e^z for complex z.

Part 19: Solving equations of the form e^z = w, where z and w may be complex.

Part 20: Defining \log z for complex z.

Part 21: The Laws of Logarithms for complex numbers.

Part 22: Defining z^w for complex z and w.

Part 23: The Laws of Exponents for complex bases and exponents.

Part 24: The Laws of Exponents for complex bases and exponents.

Inverse Functions: Logarithms and Complex Numbers (Part 30)

Ordinarily, there are no great difficulties with logarithms as we’ve seen with the inverse trigonometric functions. That’s because the graph of y = a^x satisfies the horizontal line test for any 0 < a < 1 or a > 1. For example,

e^x = 5 \Longrightarrow x = \ln 5,

and we don’t have to worry about “other” solutions.

However, this goes out the window if we consider logarithms with complex numbers. Recall that the trigonometric form of a complex number z = a+bi is

z = r(\cos \theta + i \sin \theta) = r e^{i \theta}

where r = |z| = \sqrt{a^2 + b^2} and \tan \theta = b/a, with \theta in the appropriate quadrant. This is analogous to converting from rectangular coordinates to polar coordinates.

Over the past few posts, we developed the following theorem for computing e^z in the case that z is a complex number.

Definition. Let z = r e^{i \theta} be a complex number so that -\pi < \theta \le \theta. Then we define

\log z = \ln r + i \theta.

Of course, this looks like what the definition ought to be if one formally applies the Laws of Logarithms to r e^{i \theta}. However, this complex logarithm doesn’t always work the way you’d think it work. For example,

\log \left(e^{2 \pi i} \right) = \log (\cos 2\pi + i \sin 2\pi) = \log 1 = \ln 1 = 0 \ne 2\pi i.

This is analogous to another situation when an inverse function is defined using a restricted domain, like

\sqrt{ (-3)^2 } = \sqrt{9} = 3 \ne -3

or

\sin^{-1} (\sin \pi) = \sin^{-1} 0 = 0 \ne \pi.

The Laws of Logarithms also may not work when nonpositive numbers are used. For example,

\log \left[ (-1) \cdot (-1) \right] = \log 1 = 0,

but

\log(-1) + \log(-1) = \log \left( e^{\pi i} \right) + \log \left( e^{\pi i} \right) = \pi i + \pi i = 2\pi i.

green line

This material appeared in my previous series concerning calculators and complex numbers: https://meangreenmath.com/2014/07/09/calculators-and-complex-numbers-part-21/

 

 

 

Inverse Functions: Rational Exponents (Part 8)

In this series of posts, we have seen that the definition of \sqrt[n]{x} and saw that the definition was a little different depending if n is even or odd:

  1. If n is even, then y = \sqrt[n]{x} means that x = y^n and y \ge 0. In particular, this is impossible (for real y) if x < 0.
  2. If n is odd, then y = \sqrt[n]{x} means that x = y^n. There is no need to give a caveat on the possible values of y.

Let’s now consider the definition of x^{m/n}, where m and n are positive integers greater than 1. Ideally, we’d like to simply defined

x^{m/n} = \left[ x^{1/n} \right]^m

This definition reduces to previous work (like a good MIT freshman), using prior definition for raising to powers that are either integers or reciprocals of integers. Indeed, if x \ge 0, there is absolutely no ambiguity about this definition.

Unfortunately, if x < 0, then a little more care is required. There are four possible cases.

Case 1. m and n are odd. In this case, there is no ambiguity if x < 0 is negative. For example,

(-32)^{3/5} = \left[ (-32)^{1/5} \right]^3 = [-2]^3 = -8

Case 2: m is even but n is odd. Again, there is no ambiguity if x< 0 is negative. For example,

(-32)^{4/5} = \left[ (-32)^{4/5} \right]^3 = [-2]^4 = 16

rationalpower1

Case 3: m is odd but n is even. In this case, x^{m/n} is undefined if x < 0. For example, we would like (-16)^{3/2} to be equal to \left[ (-16)^{1/2} \right]^3, but {-16}^{1/2} = \sqrt{-16} is undefined (using real numbers).

rationalpower2

Case 4. m and $latex $n$ are both even. This is perhaps the most interesting case. For example, how should we evaluate (-8)^{4/6}?. There are two legitimate choices… which lead to different answers!

Option #1: If we just apply the proposed definition of x^{m/n}, we find that

(-8)^{2/6} = \left[ (-8)^2 \right]^{1/6} = [64]^{1/6} = 2

Option #2: We could first reduce 2/6 to lowest terms:

(-8)^{2/6} = (-8)^{1/3} = -2

So… which is it?!?!?!?! The rule that mathematicians have chosen is that simplifying the exponent takes precedence over the above definition. In other words, the definition x^{m/n} = \left[ x^{1/n} \right]^m should only be applied in m/n has been reduced to lowest terms in order to remove the above ambiguity.

rationalpower3green lineFor the sake of completeness, I note that the above discussion restricts our attention to real numbers. If complex numbers are permitted, then things become a lot more interesting. If we repeat a few of the above calculations using complex numbers, we get answers that are different!

rationalpower4

The explanation for this surprising result is not brief, but I discussed it in a previous series of posts:

https://meangreenmath.com/2014/06/19/calculators-and-complex-numbers-part-1/

https://meangreenmath.com/2014/06/20/calculators-and-complex-numbers-part-2/

https://meangreenmath.com/2014/06/21/calculators-and-complex-numbers-part-3/

https://meangreenmath.com/2014/06/22/calculators-and-complex-numbers-part-4/

https://meangreenmath.com/2014/06/23/calculators-and-complex-numbers-part-5/

https://meangreenmath.com/2014/06/24/calculators-and-complex-numbers-part-6/

https://meangreenmath.com/2014/06/25/calculators-and-complex-numbers-part-7/

https://meangreenmath.com/2014/06/26/calculators-and-complex-numbers-part-8/

https://meangreenmath.com/2014/06/27/calculators-and-complex-numbers-part-9/

https://meangreenmath.com/2014/06/28/calculators-and-complex-numbers-part-10/

https://meangreenmath.com/2014/06/29/calculators-and-complex-numbers-part-11/

https://meangreenmath.com/2014/06/30/calculators-and-complex-numbers-part-12/

https://meangreenmath.com/2014/07/01/calculators-and-complex-numbers-part-13/

https://meangreenmath.com/2014/07/02/calculators-and-complex-numbers-part-14/

https://meangreenmath.com/2014/07/03/calculators-and-complex-numbers-part-15-2/

https://meangreenmath.com/2014/07/04/calculators-and-complex-numbers-part-16/

https://meangreenmath.com/2014/07/05/calculators-and-complex-numbers-part-17/

https://meangreenmath.com/2014/07/06/calculators-and-complex-numbers-part-18/

https://meangreenmath.com/2014/07/07/calculators-and-complex-numbers-part-19/

https://meangreenmath.com/2014/07/08/calculators-and-complex-numbers-part-20/

https://meangreenmath.com/2014/07/09/calculators-and-complex-numbers-part-21/

https://meangreenmath.com/2014/07/10/calculators-and-complex-numbers-part-22/

https://meangreenmath.com/2014/07/11/calculators-and-complex-numbers-part-23/

https://meangreenmath.com/2014/07/12/calculators-and-complex-numbers-part-24/

Calculators and complex numbers (Part 24)

In this series of posts, I explore properties of complex numbers that explain some surprising answers to exponential and logarithmic problems using a calculator (see video at the bottom of this post). These posts form the basis for a sequence of lectures given to my future secondary teachers.

To begin, we recall that the trigonometric form of a complex number z = a+bi is

z = r(\cos \theta + i \sin \theta) = r e^{i \theta}

where r = |z| = \sqrt{a^2 + b^2} and \tan \theta = b/a, with \theta in the appropriate quadrant. As noted before, this is analogous to converting from rectangular coordinates to polar coordinates.

Theorem. If z = x + i y, where x and y are real numbers, then

e^z = e^x (\cos y + i \sin y)

Definition. Let z = r e^{i \theta} be a complex number so that -\pi < \theta \le \theta. Then we define

\log z = \ln r + i \theta.

Definition. Let z and w be complex numbers so that z \ne 0. Then we define

z^w = e^{w \log z}

Technical point: for the latter two definitions, these are the principal values of the functions. In complex analysis, these are usually considered multiply-defined functions. But I’m not going to worry about this technicality here and will only consider the principal values.

This is the last post in this series, where I state some generalizations of the Laws of Exponents for complex numbers.

In yesterday’s post, we saw that z^{w_1} z^{w_2} = z^{w_1 + w_2} as long as z \ne 0. This prevents something like 0^4 \cdot 0^{-3} = 0^1, since 0^{-3} is undefined.

Theorem. Let z \in \mathbb{C} \setminus \{ 0 \}, w \in \mathbb{C}, and n \in \mathbb{Z}. Then (z^w)^n = z^{wn}.

As we saw in a previous post, the conclusion could be incorrect outside of the above hypothesis, as \displaystyle \left[ (-1)^3 \right]^{1/2} \ne (-1)^{3/2}.

Theorem. Let u \in \mathbb{R} and z \in \mathbb{C}. Then (e^u)^z = e^{uz}.

Theorem. Let x, y > 0 be real numbers and z \in \mathbb{C}. Then x^z y^z = (xy)^z.

Again, the conclusion of the above theorem could be incorrect outside of these hypothesis, as (-2)^{1/2} (-3)^{1/2} \ne \left[ (-2) \cdot (-3) \right]^{1/2}.

green line

For completeness, here’s the movie that I use to engage my students when I begin this sequence of lectures.

 

 

Calculators and complex numbers (Part 23)

In this series of posts, I explore properties of complex numbers that explain some surprising answers to exponential and logarithmic problems using a calculator (see video at the bottom of this post). These posts form the basis for a sequence of lectures given to my future secondary teachers.

To begin, we recall that the trigonometric form of a complex number z = a+bi is

z = r(\cos \theta + i \sin \theta) = r e^{i \theta}

where r = |z| = \sqrt{a^2 + b^2} and \tan \theta = b/a, with \theta in the appropriate quadrant. As noted before, this is analogous to converting from rectangular coordinates to polar coordinates.

Theorem. If z = x + i y, where x and y are real numbers, then

e^z = e^x (\cos y + i \sin y)

Definition. Let z = r e^{i \theta} be a complex number so that -\pi < \theta \le \theta. Then we define

\log z = \ln r + i \theta.

Definition. Let z and w be complex numbers so that z \ne 0. Then we define

z^w = e^{w \log z}

Technical point: for the latter two definitions, these are the principal values of the functions. In complex analysis, these are usually considered multiply-defined functions. But I’m not going to worry about this technicality here and will only consider the principal values.

In the remaining posts in this series, I want to explore which properties of exponential functions remain true when complex numbers are used.

To begin, if w is a real rational number, then there is an alternative definition of z^w that matches De Moivre’s Theorem. Happily, the two definitions agree. Suppose that z = r e^{i \theta} with -\pi < \theta \le \pi. Then

z^w = e^{w \log z}

= e^{w [\ln r + i \theta]}

= e^{w \ln r + i w \theta}

= e^{w \ln r} e^{i w \theta}

= r^w (\cos w\theta + i \sin \theta)

Next, one of the Laws of Exponents remains true even for complex numbers:

z^{w_1} z^{w_2} = e^{w_1 \log z} e^{w_2 \log z}

= e^{w_1 \log z + w_2 \log z}

= e^{(w_1 + w_2) \log z}

= z^{w_1 + w_2}.

However, in previous posts, we’ve seen that the rules (x^y)^z = x^(yz) and x^z y^z = (xy)^z may not be true if nonpositive bases, let alone complex bases, are used.

We can also derive the usual rules z^0 = 1 and z^{-w} = \displaystyle \frac{1}{z^w}. First,

z^0 = e^{0 \log z} = e^0 = 1.

Next, we think like an MIT freshman and use the above Law of Exponents to observe that

z^w z^{-w} = z^{w-w} = z^0 = 1.

Dividing, we see that z^{-w} = \displaystyle \frac{1}{z^w}.

green line

For completeness, here’s the movie that I use to engage my students when I begin this sequence of lectures.

 

 

Calculators and complex numbers (Part 22)

In this series of posts, I explore properties of complex numbers that explain some surprising answers to exponential and logarithmic problems using a calculator (see video at the bottom of this post). These posts form the basis for a sequence of lectures given to my future secondary teachers.

To begin, we recall that the trigonometric form of a complex number z = a+bi is

z = r(\cos \theta + i \sin \theta) = r e^{i \theta}

where r = |z| = \sqrt{a^2 + b^2} and \tan \theta = b/a, with \theta in the appropriate quadrant. As noted before, this is analogous to converting from rectangular coordinates to polar coordinates.

Theorem. If z = x + i y, where x and y are real numbers, then

e^z = e^x (\cos y + i \sin y)

Definition. Let z = r e^{i \theta} be a complex number so that -\pi < \theta \le \theta. Then we define

\log z = \ln r + i \theta.

At long last, we are now in position to explain the last surprising results from the calculator video below.

Definition. Suppose that z and w are complex numbers so that z \ne 0. Then we define

z^w = e^{w \log z}

Naturally, this definition makes sense if z and w are real numbers.

For example, let’s consider the computation of i^i. For the base of i, we note that

\log i = \log e^{\pi i/ 2} = \displaystyle \frac{\pi i}{2}.

Therefore,

i^i = e^{i \log i} = e^{i \pi i/2} = e^{-\pi/2},

which is (surprisingly) a real number.

As a second example, let’s compute (-8)^i. To begin,

\log(-8) = \log \left( 8 e^{\pi i} \right) = \ln 8 + \pi i.

Therefore,

(-8)^i = e^{i \log(-8)}

= e^{i (\ln 8 + \pi i)}

= e^{-\pi + i \ln 8}

= e^{-\pi} (\cos [\ln 8] + i \sin [ \ln 8 ] )

= e^{-\pi} \cos (\ln 8) + i e^{-\pi} \sin (\ln 8)

In other words, a problem like this is a Precalculus teacher’s dream come true, as it contains e, \ln, \pi, \cos, \sin, and i in a single problem.

green line

For completeness, here’s the movie that I use to engage my students when I begin this sequence of lectures.

 

 

Calculators and complex numbers (Part 21)

In this series of posts, I explore properties of complex numbers that explain some surprising answers to exponential and logarithmic problems using a calculator (see video at the bottom of this post). These posts form the basis for a sequence of lectures given to my future secondary teachers.

To begin, we recall that the trigonometric form of a complex number z = a+bi is

z = r(\cos \theta + i \sin \theta) = r e^{i \theta}

where r = |z| = \sqrt{a^2 + b^2} and \tan \theta = b/a, with \theta in the appropriate quadrant. As noted before, this is analogous to converting from rectangular coordinates to polar coordinates.

Over the past few posts, we developed the following theorem for computing e^z in the case that z is a complex number.

Definition. Let z = r e^{i \theta} be a complex number so that -\pi < \theta \le \theta. Then we define

\log z = \ln r + i \theta.

Of course, this looks like what the definition ought to be if one formally applies the Laws of Logarithms to r e^{i \theta}. However, this complex logarithm doesn’t always work the way you’d think it work. For example,

\log \left(e^{2 \pi i} \right) = \log (\cos 2\pi + i \sin 2\pi) = \log 1 = \ln 1 = 0 \ne 2\pi i.

This is analogous to another situation when an inverse function is defined using a restricted domain, like

\sqrt{ (-3)^2 } = \sqrt{9} = 3 \ne -3

or

\sin^{-1} (\sin \pi) = \sin^{-1} 0 = 0 \ne \pi.

The Laws of Logarithms also may not work when nonpositive numbers are used. For example,

\log \left[ (-1) \cdot (-1) \right] = \log 1 = 0,

but

\log(-1) + \log(-1) = \log \left( e^{\pi i} \right) + \log \left( e^{\pi i} \right) = \pi i + \pi i = 2\pi i.

green line

For completeness, here’s the movie that I use to engage my students when I begin this sequence of lectures.

 

 

Calculators and complex numbers (Part 20)

In this series of posts, I explore properties of complex numbers that explain some surprising answers to exponential and logarithmic problems using a calculator (see video at the bottom of this post). These posts form the basis for a sequence of lectures given to my future secondary teachers.

To begin, we recall that the trigonometric form of a complex number z = a+bi is

z = r(\cos \theta + i \sin \theta) = r e^{i \theta}

where r = |z| = \sqrt{a^2 + b^2} and \tan \theta = b/a, with \theta in the appropriate quadrant. As noted before, this is analogous to converting from rectangular coordinates to polar coordinates.

Over the past few posts, we developed the following theorem for computing e^z in the case that z is a complex number.

Theorem. If z = x + i y, where x and y are real numbers, then

e^z = e^x (\cos y + i \sin y)

As a consequence, there are infinitely many complex solutions of the equation

e^z = -2 - 2i,

namely, z = \ln 2\sqrt{2} - \displaystyle \frac{3\pi}{4} + 2 \pi n i.

Choosing the solution that has an imaginary part in the interval (-\pi,\pi] leads to the definition of the complex logarithm.

Definition. Let z = r e^{i \theta} be a complex number so that -\pi < \theta \le \theta. Then we define

\log z = \ln r + i \theta.

Of course, this looks like what the definition ought to be if one formally applies the Laws of Logarithms to r e^{i \theta}. So, for example,

\log (-2-2i) = \ln 2\sqrt{2} - \displaystyle \frac{3\pi}{4}

A technicality: this is the principal value of the complex logarithm. In complex analysis, this is technically thought of as a multiply-defined function.

The complex version of the natural logarithm function matches the ordinary definition when applied to real numbers. For example,

\log 6 = \log \left( 6 e^{0i} \right) = \ln 6 + 0 i = \ln 6.

A couple of observations. In high school, the symbol \log is usually dedicated to base 10. However, in higher-level mathematics courses, \log always means natural logarithm. That’s because, for the purposes of abstract mathematics, base-10 logarithms are practically useless. They are helpful for us people since our number system uses base 10; it’s easy for me to estimate \log_{10} 9000, but \ln 9000 requires a little more thought. But nearly all major theorems that involve logarithms specifically employ natural logarithms. Indeed, when I first become a professor, I had to remind myself that my students used \ln for natural logarithms and not \log. Still, I write \log_{10} for base-10 logarithms and not \log as a silent acknowledgment of the use of the symbol in higher-level courses.

This use of the logarithm explains the final results of the calculator in the video below. When \ln(-5) is entered, it assumes that a real answer is expected, and so the calculatore returns an error message. On the other hand, when \ln(-5+0i) is entered, it assumes that the user wants the principal complex logarithm. Since -5+0i = 5 e^{i \pi}, the calculator correctly returns \ln 5 + \pi i as the answer. (Of course, the calculator still uses \ln and not \log to mean natural logarithm.)

green line

For completeness, here’s the movie that I use to engage my students when I begin this sequence of lectures.

 

 

Calculators and complex numbers (Part 19)

In this series of posts, I explore properties of complex numbers that explain some surprising answers to exponential and logarithmic problems using a calculator (see video at the bottom of this post). These posts form the basis for a sequence of lectures given to my future secondary teachers.

To begin, we recall that the trigonometric form of a complex number z = a+bi is

z = r(\cos \theta + i \sin \theta) = r e^{i \theta}

where r = |z| = \sqrt{a^2 + b^2} and \tan \theta = b/a, with \theta in the appropriate quadrant. As noted before, this is analogous to converting from rectangular coordinates to polar coordinates.

Over the past few posts, we developed the following theorem for computing e^z in the case that z is a complex number.

Theorem. If z = x + i y, where x and y are real numbers, then

e^z = e^x (\cos y + i \sin y)

Example. Find all complex numbers z so that e^z = 5.

Solution. If z = x + iy, then

e^x (\cos y + i \sin y) = 5 (\cos 0 + i \sin 0)

Matching parts, we see that e^x = 5 and that the angle y must be coterminal with 0 radians. In other words,

x = \ln 5 \qquad and \qquad y = 2\pi n for any integer n.

Therefore, there are infinitely many answers: z = \ln 5 + 2 \pi n i.

Notice that there’s nothing particularly special about the number 5. This could have been any nonzero number, including complex numbers, and there still would have been an infinite number of solutions. (This is completely analogous to solving a trigonometric equation like \sin \theta = 1, which similarly has an infinite number of solutions.) For example, the complex solutions of the equation

e^z = -2 - 2i

are z = \ln 2\sqrt{2} - \displaystyle \frac{3\pi}{4} + 2 \pi n i.

These observations lead to the following theorems, which I’ll state without proof.

Theorem. The range of the function f(z) = e^z is \mathbb{C} \setminus \{ 0 \}.

Theorem. e^z = e^w \Longleftrightarrow z = w + 2\pi n i.

Naturally, these conclusions are different than the normal case when z is assumed to be a real number.

green line

For completeness, here’s the movie that I use to engage my students when I begin this sequence of lectures.

 

 

Calculators and complex numbers (Part 18)

In this series of posts, I explore properties of complex numbers that explain some surprising answers to exponential and logarithmic problems using a calculator (see video at the bottom of this post). These posts form the basis for a sequence of lectures given to my future secondary teachers.

To begin, we recall that the trigonometric form of a complex number z = a+bi is

z = r(\cos \theta + i \sin \theta) = r e^{i \theta}

where r = |z| = \sqrt{a^2 + b^2} and \tan \theta = b/a, with \theta in the appropriate quadrant. As noted before, this is analogous to converting from rectangular coordinates to polar coordinates.

Definition. If z is a complex number, then we define

e^z = \displaystyle \sum_{n=0}^{\infty} \frac{z^n}{n!}

This of course matches the Taylor expansion of e^x for real numbers x.

In the last few posts, we proved the following theorem.

Theorem. If z and w are complex numbers, then $e^z e^w = e^{z+w}$.

This theorem allows us to compute e^z without directly plugging into the above infinite series.

Theorem. If z = x + i y, where x and y are real numbers, then

e^z = e^x (\cos y + i \sin y)

Proof. With the machinery that’s been developed over the past few posts, this one is actually a one-liner:

e^z = e^{x+iy} = e^x e^{iy} = e^x (\cos y + i \sin y).

For example,

e^{4+\pi i} = e^4 (\cos \pi + i \sin \pi) = -e^4

Notice that, with complex numbers, it’s perfectly possible to take e to a power and get a negative number. Obviously, this is impossible when using only real numbers.

Another example:

e^{-2+3i} = e^{-2} (\cos 3 +i \sin 3)

In this answer, we have to remember that the angle is 3 radians and not 3 degrees.

green line

For completeness, here’s the movie that I use to engage my students when I begin this sequence of lectures.