The Math Forum

Ask Dr. Math - Questions and Answers from our Archives
Associated Topics || Dr. Math Home || Search Dr. Math

Log of Complex Number

Date: 9/15/96 at 3:55:21
From: Rod Langlands
Subject: Log of Complex Number

Does the log of a complex number have any meaning?  If so, are there 
log laws, and what are they?

Date: 9/15/96 at 11:50:38
From: Doctor Pete
Subject: Re: Log of Complex Number

Yes, to both questions.

Let's begin with complex exponentiation, if you are not already 
familiar with it.  We define

     e^(I*t) = Cos[t]+I*Sin[t] 

where t is a real number and I is the imaginary unit.  (Actually, this 
is not so much a definition as an extension of the exponential 
function on the reals, and can be "derived" in many ways.)  Thus,

     e^(x+I*y) = e^x (Cos[y]+I*Sin[y])
               = e^x*Cos[y] + I*e^x*Sin[y] 

and we have the formula for the exponential of a general complex 
number z = x+I*y expressed in Cartesian coordinates.  Let's shorten 
this to

     e^z = w

where z and w are both complex.  Taking the logarithm of both sides,

     z = Log[w]

Thus, if we let w = a+I*b, and we solve for x and y in terms of a and 
b, we will have a formula for the complex logarithm.  But note that

     a = e^x*Cos[y]                   [eq. 1]
     b = e^x*Sin[y]                   [eq. 2]

by equating the real and imaginary parts.  So we solve for x and y.  
To solve for x, square equations [1] and [2] and add them together.  

     a^2+b^2 = e^(2x)*Cos[y]^2+e^(2x)*Sin[y]^2
             = e^(2x)*(Cos[y]^2+Sin[y]^2)
             = e^(2x)                  <--since Cos[y]^2+Sin[y]^2 = 1
                                          for all y


     2x = Log[a^2+b^2]
      x = (1/2)*Log[a^2+b^2]
        = Log[(a^2+b^2)^(1/2)]
        = Log[Sqrt[a^2+b^2]] .

We will write Sqrt[a^2+b^2] more compactly as |w|, which is the 
*magnitude* of the complex number w, the distance from w = a+I*b to 
the origin in the complex plane.

Now, to solve for y, we divide equation [2] by equation [1], giving

     b/a = Sin[y]/Cos[y]
         = Tan[y] 


     y = ArcTan[b/a] 

But we have to be careful of our signs, because if b < 0 and a < 0, 
then -Pi < y < -Pi/2, which is not evident from the ArcTan expression 
but is obvious from looking at it geometrically.  ArcTan[b/a] is the 
angle formed by the line connecting w = a+I*b to the origin; this is 
called the *argument* of w, or Arg[w].  But say w = 1+I.  Then 
Arg[w] = Pi/4, but it can also be Pi/4+2*Pi = 9*Pi/4, or 
Pi/4-2*Pi = -7*Pi/4.  In fact, we can add any integer multiple of 
2*Pi to Arg[w] and still get the same angle.  So, compactly written,

     y = Arg[w] + 2*Pi*k, for any integer k.

Putting this all together, we see that

     x = Log[|w|], y = Arg[w]+2*Pi*k,
     z = x+I*y = Log[|w|]+I*(Arg[w]+2*Pi*k), for any integer k.

But z = Log[w], so

     Log[w] = Log[|w|]+I*(Arg[w]+2*Pi*k), for any integer k.

This is our formula!  But notice that it is a bit strange:  For one 
complex value w, there are infinitely many logarithms, because we can 
choose any integer k!  So it is clearly not like the real logarithm.  
This arises because the complex exponential is many-to-one, that is, 
more than one value (in fact, infinitely many) of z will give the same 
value of e^z.  Thus the inverse, Log[w], should be one-to-many, where 
one value of w will give infinitely many logarithms.

Now that we've found a formula, the usual algebraic laws apply to it, 
so no additional laws need to be taken into account.  The only tricky 
part is the one-to-many aspect of the complex logarithm- 
simplifications can be made by forcing Arg[w] to be in the interval 
[-Pi,Pi] and always taking k = 0.  This is called taking the 
*principal value*, though depending on how you use the complex 
logarithm, different intervals (like [0,2*Pi]) and values of k may 
have to be used.  Notice this is much like taking the principal value 
of the square root; we usually say Sqrt[4] = 2, not Sqrt[4] = -2, 
though both are equally valid.

-Doctor Pete,  The Math Forum
 Check out our web site!   

Date: 9/15/96 at 7:56:16
From: Anonymous
Subject: Re[2]: Log of Complex Number

So are you saying that there is more than one solution to ln (x^a) 
where a is complex or that there IS no solution for when a is complex?

Subject: Re: Log of Complex Number
Author:  "Dr. Math" <> at Internet
Date:    9/13/96 9:31 PM

The natural logarithm is not well-defined on the complex plane for 
the same reason that the exponention function is not one to one.
Thus, a=b does not imply ln(a)=ln(b).
Your argument is similar to the following:
4 = 4
Take square roots, and you get
-2 = 2 !

-Doctor Ceeks,  The Math Forum
 Check out our web site!   

Date: 9/15/96 at 11:16:30
From: Doctor Pete
Subject: Re: Re[2]: Log of Complex Number

The former is true; that is, the logarithm of a complex number is 
generally not a unique value, much in the same way that the square 
root of a positive real number has two possible values, the positive 
(principal) value and its negative.  This analogy was made by Dr. 

Let's illustrate this property further.  We will call a function f an
*injection* if a is not equal to b implies f(a) is not equal to f(b).  
Such a function is also called "one-to-one."

From this definition then, we see that y = x^2 is not an injection, 
because if we let a = -1, and b = 1, we have f(a) = f(b) = 1.  Thus it 
is not one-to-one.  y = x, of course, is an injection.  What about 
y = x^3?  Is it an injection?  Well, it depends on what domain we are 
considering.  If we think of y = x^3 as a mapping from the reals to 
the reals, that is, if we only allow x and y to be real, then yes, it 
is an injection.  But if we take it as a mapping over the complex 
numbers, then no, it is not, because 1^3 = (-1/2+I*Sqrt[3]/2)^3 = 1.  
(There's a third complex number whose cube is 1; what is it?)

So for the question of injectivity to be meaningful, one must specify 
the domain.  This is also the case for the exponential function, e^x 
or Exp[x].  Over the reals, e^x is injective.  But in the complex 
plane, e^x is *not* an injection.  This is because

     e^(x+I*y) = e^x (Cos[y]+I*Sin[y]) ,

Note that cosine and sine are not injective--in fact, their 
periodicity (Sin[x] = Sin[x+2*Pi] = Sin[x+4*Pi] = ...) is immediate 
proof of this fact. It follows, then, that complex exponentiation is 
not injective.  In fact, it is a many-to-one mapping, so infinitely 
many values of z will give the same value of e^z.

Thus, when we consider its inverse, the natural logarithm over the 
complex numbers, it is not surprising that it should be a one-to-many 
mapping, where one value of z will result in infinitely many values of 
Log[z].  In particular,

     Log[z] = Log[Abs[z]] + I*(Arg[z]+2*Pi*k), k = ...-2,-1,0,1,2,...

which is a good excercise to show.  (Abs[z] is the magnitude of z, or
Sqrt[x^2+y^2] if z = x+I*y.  Arg[z] is the argument of z, or the angle 
it creates as a vector in the complex plane.)

I know this is very long-winded, but I hope the background information 
I've provided here explains why the complex logarithm does funny 
things (which really aren't so strange in the end).  Again, as Dr. 
Ceeks explained, your argument is analogous to the one he provided.

-Doctor Pete,  The Math Forum
 Check out our web site!   
Associated Topics:
College Imaginary/Complex Numbers

Search the Dr. Math Library:

Find items containing (put spaces between keywords):
Click only once for faster results:

[ Choose "whole words" when searching for a word like age.]

all keywords, in any order at least one, that exact phrase
parts of words whole words

Submit your own question to Dr. Math

[Privacy Policy] [Terms of Use]

Math Forum Home || Math Library || Quick Reference || Math Forum Search

Ask Dr. MathTM
© 1994- The Math Forum at NCTM. All rights reserved.