Complex Logarithm Calculator
Evaluate principal complex logarithms Log(z) and multi-valued Riemann sheet branches for any nonzero complex number a + bi or r·e^(iθ), supporting custom bases and Argand plane visualization.
Complex Number & Base
z != 0Argand Plane & Log Branch Visualization
Left: input z = r*e^(i*theta) on the unit/scaled circle. Right: vertical stack of w_k spaced by 2*pi/ln(b)
Complex Logarithm Formula and Branch Structure
The logarithm of a nonzero complex number z = a + bi splits into a real magnitude component ln|z| plus an imaginary phase angle theta + 2πk radians: ln(z) = ln(sqrt(a² + b²)) + i(atan2(b, a) + 2πk). Setting k = 0 yields the unique Principal Value Log(z) with phase strictly inside (-π, π].
Polar Representation, Euler’s Formula, and Complex Log Definition
While real logarithms halt at zero and negative inputs, extending into the two-dimensional complex plane resolves every nonzero number smoothly through Leonhard Euler’s celebrated polar identity . Any nonzero point sits at Euclidean distance from the origin and rotated counter-clockwise by angle —a polar geometry also explored directly in our complex exponential form tool and general complex number calculator.
Separating real and imaginary equations proves why this works cleanly: matching magnitudes requires (whose unique real solution is ), while matching unit directions requires because full circular rotations by radians leave cosine and sine unchanged. For arbitrary positive bases , dividing by scales both components simultaneously: .
Principal Branch Arg(z), Branch Cuts, and Riemann Surfaces
Because adding any integer multiple of gives another valid inverse of the complex exponential, the unrestricted complex logarithm is infinitely multi-valued. To define a single-valued holomorphic function across almost the entire complex plane, mathematicians select the Principal Value denoted with a capital L, restricting the angle strictly to the principal interval computed by atan2(b, a):
The negative real ray forms the standard branch cut: approaching from the upper half-plane yields , whereas approaching from just below the negative axis approaches , jumping abruptly by . Imagine infinitely many spiral parking-garage ramps stacked vertically—each full counter-clockwise loop around the origin climbs smoothly up one floor on the logarithmic Riemann surface!
Logarithms of Negative Reals, Imaginary Unit i, and i^i
Three classical mathematical gems drop out immediately once complex phase angles replace the real-line restriction:
| Input z | Polar (r, Arg) | Principal Log(z) | All Multi-Valued Branches |
|---|---|---|---|
| -1 | r = 1, theta = pi | i * pi ≈ 3.141593i | i * pi * (1 + 2k) |
| i | r = 1, theta = pi/2 | i * pi/2 ≈ 1.570796i | i * (pi/2 + 2*pi*k) |
| -i | r = 1, theta = -pi/2 | -i * pi/2 ≈ -1.570796i | i * (-pi/2 + 2*pi*k) |
| -e² | r = e², theta = pi | 2 + i * pi | 2 + i * pi * (1 + 2k) |
Even more astonishing, evaluating substitutes to give —an infinite family of purely real numbers whose principal value equals !
Why log(z₁z₂) != log(z₁) + log(z₂) on the Principal Branch
On the positive real line, holds without exception. On the principal branch , however, phase angles wrap around modulo , creating subtle discrepancies whenever angles add past ! For example, set (each having principal argument ). Then , whereas the product has principal argument —differing by ! Thus, on the principal branch, product and quotient laws hold strictly modulo (unlike the pure positive-real logarithm product rule).
Conformal Mapping, AC Impedance, and Quantum Phase Angles
Fluid Flow & Electrostatics
Complex potential maps concentric rings around a line source cleanly onto horizontal strips, making potential equipotentials and radial streamlines.
RF Transmission Lines & Attenuation
Evaluating the complex propagation constant extracts both signal decay in Nepers/m and phase delay in radians/m directly from complex voltage phasors.
Step-by-Step Worked Complex Logarithm Examples
Example 1: Quadrant III Complex Number z = -1 − √3 i
Compute . Since both real and imaginary parts are negative in Quadrant III, atan2(-sqrt(3), -1) gives principal angle rad (). Hence .
Example 2: Base-10 Logarithm log₁₀(-100)
Here and . Converting base yields .
Common Mistakes with Complex Arguments and Angles
- Using atan(b / a) instead of quadrant-aware atan2(b, a): Plain arctangent returns values inside , missing Quadrant II and Quadrant III points (like or ) by 180 degrees!
- Measuring theta in degrees inside ln(r) + i·theta: Euler’s formula requires radians strictly; plugging degrees directly into the imaginary part produces wrong exponential checks.
- Assuming real power laws commute unconditionally: Naive cancellations like break down on principal branches because .
Computational Accuracy and Argand Plane Plotting
All complex logarithmic moduli, quadrant-exact principal angles via Math.atan2, multi-sheet branches across (or any custom integer sheet), and complex Euler inverse reconstructions run instantaneously inside your browser and plot dynamically on a dual HTML5 <canvas> Argand/branch diagram. For purely real logs without complex phase angles, return to our real logarithm calculator.
Lead Developer & Founder of Basic Math Tools. Specializes in browser-native computational algorithms and applied mathematics.
Mathematics & curriculum specialists. Audited against standard algebraic and arithmetic principles.