Last verified · v1.0
Calculator · math
Complex Root Calculator
Calculate all n distinct nth roots of any complex number a + bi using De Moivre's theorem. Returns real or imaginary component of each root w_k.
Inputs
Root Component Value
—
Explain my result
Get a plain-English breakdown of your result with practical next steps.
The formula
How the
result is
computed.
Understanding Complex nth Roots
Every non-zero complex number z = a + bi has exactly n distinct complex nth roots. The Complex Root Calculator applies De Moivre's theorem in polar form to compute each root with precision, returning the real or imaginary component of any selected root wk.
Step 1: Converting to Polar Form
The calculation begins by converting the rectangular form z = a + bi into polar form using two fundamental quantities:
- Modulus (r): r = √(a² + b²) — the distance from the origin to the point (a, b) in the complex plane.
- Argument (θ): θ = atan2(b, a) — the angle in radians measured counterclockwise from the positive real axis, with range (−π, π].
The atan2 function handles all four quadrants correctly. For example, z = −1 + 0i yields r = 1 and θ = π, while z = 1 + i yields r = √2 and θ = π/4 ≈ 0.7854 rad. This two-argument form avoids the quadrant ambiguity of the single-argument arctangent.
Step 2: The nth Root Formula
With r and θ established, each of the n distinct nth roots is computed as:
wk = r1/n · [cos((θ + 2πk)/n) + i · sin((θ + 2πk)/n)]
where k = 0, 1, 2, …, n − 1. The root at k = 0 is the principal root. All n roots share the same modulus r1/n but are equally spaced around a circle of that radius in the complex plane, each separated by an angular gap of 2π/n radians (360°/n).
Worked Example: Cube Roots of −8
Find all three cube roots of z = −8 + 0i with n = 3.
- Modulus: r = √(64 + 0) = 8
- Argument: θ = atan2(0, −8) = π ≈ 3.14159 rad
- Shared magnitude: r1/3 = 81/3 = 2
- k = 0 (principal): w0 = 2[cos(π/3) + i·sin(π/3)] = 1 + i√3 ≈ 1 + 1.7321i
- k = 1: w1 = 2[cos(π) + i·sin(π)] = −2 + 0i
- k = 2: w2 = 2[cos(5π/3) + i·sin(5π/3)] = 1 − i√3 ≈ 1 − 1.7321i
Verification: (−2)3 = −8 ✓. All three roots satisfy w3 = −8, and they lie exactly 120° apart on a circle of radius 2 centered at the origin.
Square Roots of a Complex Number
For n = 2, the formula yields exactly two roots 180° apart. For z = 3 + 4i: r = 5, θ = atan2(4, 3) ≈ 0.9273 rad, and r1/2 = √5 ≈ 2.2361. The two square roots are w0 ≈ 2 + i and w1 ≈ −2 − i. For any real positive z, both roots are real; for any real negative z, both roots are purely imaginary; for general complex z, the two roots are unrelated complex numbers.
Applications of Complex Roots
- Electrical engineering: Phasor analysis of AC circuits relies on complex exponentials derived from roots of unity, enabling impedance calculations across all frequencies.
- Signal processing: The Fast Fourier Transform (FFT) uses the n-th roots of unity as twiddle factors, enabling O(n log n) transforms that underpin modern audio and image compression.
- Control systems: Locations of characteristic polynomial roots in the complex plane determine closed-loop stability. Roots with negative real parts indicate stable exponential decay.
- Differential equations: Complex characteristic roots α ± βi produce oscillatory solutions of the form eαt(C1cos(βt) + C2sin(βt)), as detailed in Paul's Online Math Notes on Complex Roots.
Methodology and Sources
This calculator implements the standard polar-form nth root algorithm derived from De Moivre's theorem. The atan2 convention follows IEEE 754 floating-point practice, ensuring correct branch selection across all quadrants without division-by-zero errors. Computational implementation follows practices documented in UC Berkeley's guide to Working with Complex Numbers. Numerical root stability analysis draws from NIST research on calculating zeros of polynomials. Algebraic treatment of complex roots in educational contexts follows Louisiana DOE Algebra II Teacher Companion standards.
Reference