Skip to content
Tutorials Center
My learning

Topics

Lesson 17 of 36 · Elementary Functions

The Complex Logarithm and Branches

Define log z as a multi-valued inverse of the exponential, use the principal value Log z, understand branch cuts, and compute logarithms of negative and imaginary numbers.

The real logarithm ln x is the inverse of e^x, defined for x > 0. In the complex plane we want an inverse of e^z too, but e^z is not one-to-one: e^z = e^(z + 2πi). So the inverse cannot be an ordinary function. It has infinitely many values, and handling that carefully is the key lesson of this chapter.

The multi-valued logarithm

For w ≠ 0 we say z is a logarithm of w if e^z = w. From the lesson on the exponential, the solutions are

Text
log w = ln abs(w) + i arg w = ln abs(w) + i (Arg w + 2πk),     k = 0, ±1, ±2, ...

The real part is always the real logarithm of the modulus; the imaginary part is any argument of w. Here log (lowercase) denotes this full set of values.

Examples:

  • log 1 = 2πik: the values are 0, ±2πi, ±4πi, ...
  • log(-1) = i(π + 2πk): iπ, -iπ, 3iπ, ...
  • log i = i(π/2 + 2πk)
  • log(1 + i) = (1/2) ln 2 + i(π/4 + 2πk)

Unlike the real case, negative numbers have logarithms, as long as you accept imaginary parts.

The principal value

To get a single value, pick Arg w in (-π, π]:

Text
Log w = ln abs(w) + i Arg w

with capital L. It is a genuine function defined on all nonzero numbers. For positive real w, it agrees with ln w. Values: Log(-1) = iπ, Log i = iπ/2, Log(-i) = -iπ/2, Log(1 + i) = (1/2) ln 2 + iπ/4.

Log is the inverse of e^z on the horizontal strip -π < Im z ≤ π: e^(Log w) = w for every w ≠ 0, but Log(e^z) = z only when Im z lies in (-π, π]. For example Log(e^(3πi)) = Log(-1) = iπ, not 3πi.

Branches and branch cuts

Why can't we choose a continuous Arg on the whole plane? Walk once around the origin counterclockwise on the unit circle: the argument grows from 0 to 2π. When you return to the start, the argument has increased by 2π but the point is the same. Any single-valued choice must jump somewhere along the walk.

The principal value places the jump on the negative real axis. That ray, with the origin, is the branch cut of Log. On the plane with the cut removed, Log is continuous and in fact analytic with

Text
d/dz Log z = 1 / z

You can verify this from the Cauchy-Riemann equations in polar form: u = ln r, v = θ give u_r = 1/r = (1/r) v_θ and v_r = 0 = -(1/r) u_θ. ✓.

Other choices of the angle range, such as (0, 2π), give other branches of the logarithm, each analytic on the plane minus its own ray. The origin is a branch point: you cannot define a continuous logarithm on any loop around it.

Python Walking around the origin

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The blue sawtooth is Im Log z along the path: it returns to -π every time it crosses the negative real axis. The dashed line keeps growing. Both describe the same points of the plane, which is why the logarithm is multi-valued.

Rules for logarithms

For the multi-valued log, the familiar rules hold as equalities of sets:

Text
log(z w) = log z + log w          log(z/w) = log z - log w

For the principal value, they hold only up to a multiple of 2πi:

Text
Log(z w) = Log z + Log w + 2πi k     for some k in {-1, 0, 1}

Counterexample: z = w = -1. Then Log(zw) = Log 1 = 0, but Log z + Log w = iπ + iπ = 2πi. They differ by 2πi.

Do not use ln(zw) = ln z + ln w with Log blindly. Whenever angles are involved, check that the sum of the arguments stays inside (-π, π].

Python Log of products

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Several rows give 0, and the rows where the two arguments add up to more than π in size give -1 or +1.

Solving equations

Solve e^z = -2: z = log(-2) = ln 2 + i(π + 2πk). Solve log z = iπ/2 with Log: z = e^(iπ/2) = i. Evaluate Log(1 - i√3): modulus 2, argument -π/3, so Log = ln 2 - iπ/3.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What is Log(-1)?

    abs(-1) = 1 and Arg(-1) = π, so Log(-1) = ln 1 + iπ = iπ.
  2. 2. What is the derivative of Log z on the plane minus the negative real axis?

    As in the real case, d/dz Log z = 1/z; the cut is excluded because Log is discontinuous there.
  3. 3. Which statement about Log(zw) = Log z + Log w is correct?

    The arguments add, but their sum may leave (-π, π], so the principal values can differ by 2πi.
  4. 4. Where is the branch point of the complex logarithm?

    Going around the origin changes the argument by 2π, so no continuous branch exists on a loop around 0.

Summary

  • log w = ln abs(w) + i(Arg w + 2πk) has infinitely many values; Log w takes Arg w in (-π, π].
  • Log is analytic on the plane minus the closed negative real axis, with (Log z)' = 1/z.
  • The branch cut and branch point (at 0) exist because the argument cannot be chosen continuously around the origin.
  • The product rule for log is a set identity; for Log it can fail by 2πi.

Next: Complex Powers and Inverse Trigonometric Functions