Complex Root Calculator | De Moivre's Theorem
Advanced Mathematics Tool

Complex Root Calculator

Instantly compute all n-th roots of any complex number. Explore the principal root and visualize the perfect symmetrical distribution on the complex plane.

Calculate Roots of z = a + bi

Enter the real part (a), imaginary part (b), and the degree of the root (n) to find all solutions based on De Moivre's Theorem.

Complex Number (z)
Complex Number (z)
i

Quick Presets

Root Degree (n)
Root Degree (n)

Enter an integer between 2 and 24.

The Fundamental Theorem of Algebra guarantees that every non-zero complex number has exactly n distinct n-th roots. These roots form a perfect regular n-sided polygon in the complex plane.

The Methodology

How this calculator works

A complex root calculator finds the $n$-th roots of a complex number. For a nonzero complex number $z = re^{i\theta}$, its $n$-th roots are $w_k = r^{1/n}e^{i(\theta+2\pi k)/n}$, where $k=0,1,\ldots,n-1$. The calculator returns all $n$ roots, which are equally spaced around a circle in the complex plane.

A complex root calculator determines the distinct values that, when raised to a specified power n, equal the original complex number. It calculates these roots by converting the number into its polar form (magnitude and angle) and applying De Moivre's Theorem. Results include the principal root and all other symmetrically distributed roots in the complex plane.

The core logic relies entirely on De Moivre's Theorem and Euler's formula. To find the $n$-th roots of a complex number $z = r(\cos \theta + i \sin \theta)$, the calculator uses the formula:

zk = r1/n [ cos((θ + 2πk)/n) + i sin((θ + 2πk)/n) ]

The calculator first finds the magnitude ($r$) and the phase angle ($\theta$) of your input. It takes the real $n$-th root of the magnitude to find the distance of all roots from the origin. Then, it divides the phase angle by $n$, and adds fractions of a full circle ($2\pi / n$) for each successive integer step $k$ from $0$ up to $n-1$. Finally, it converts these polar coordinates back into the standard rectangular form ($a + bi$).

Visualizing Mathematics

The Argand Plane & Regular Polygons

Complex numbers are best understood not on a traditional number line, but on a 2D coordinate system called the Argand plane (or complex plane). The horizontal x-axis represents the Real part, and the vertical y-axis represents the Imaginary part.

When you calculate the $n$-th roots of a complex number, a beautiful geometric property emerges. Because they all share the exact same magnitude ($r^{1/n}$) but have phase angles evenly spaced by $360°/n$, the roots always form the vertices of a regular $n$-sided polygon centered at the origin.

  • Square roots ($n=2$) sit on exactly opposite sides of a circle (180° apart).
  • Cube roots ($n=3$) form a perfect equilateral triangle.
  • 4th roots ($n=4$) form a perfect square.

Defining the Starting Point

The Principal Root

When solving $x^n = z$, there are $n$ distinct answers. So which one is the "main" answer? By mathematical convention, the principal root is the root generated when $k = 0$.

This is the root derived by taking the principal argument of the original complex number (the angle strictly between $-180°$ and $+180°$, or $-\pi$ and $\pi$) and dividing it exactly by $n$. In computer science and modern mathematics, if software (like Python, MATLAB, or this calculator) returns only a single root for a complex operation, it is returning this principal root.

Beyond the Classroom

Practical Applications in Engineering and Physics

While finding the $n$-th root of a complex number might seem like a purely theoretical exercise, it forms the mathematical backbone for several advanced technical fields. In electrical engineering and signal processing, complex roots are essential for analyzing alternating current (AC) circuits, designing digital filters, and evaluating system stability by plotting poles and zeros in the s-plane.

In quantum mechanics, complex numbers are used to represent probability amplitudes. Finding roots and raising complex numbers to fractional powers is frequently required when calculating wave functions, evaluating eigenvalues, and solving the Schrödinger equation for various physical states.

Computational Strategy

The Polar Advantage: Why Rectangular Form Fails

Students often wonder why we must convert $a + bi$ into polar coordinates ($r$ and $\theta$) before taking the root. Attempting to calculate the $n$-th root strictly algebraically in rectangular form requires setting up and solving a complex system of nonlinear polynomial equations.

This algebraic method becomes virtually impossible to solve by hand for degrees higher than two (square roots) or three (cube roots). By utilizing the polar form and De Moivre's Theorem, mathematicians cleverly transform a difficult algebraic problem into a straightforward geometric and arithmetic process involving simple division of angles.

Advanced Mathematics

Branch Cuts and Multi-Valued Functions

In real-number arithmetic, the square root operation is treated as single-valued by simply returning the positive result. However, roots in the complex plane are inherently multi-valued functions (yielding $n$ distinct answers for an $n$-th root).

To force the root operation to act as a proper mathematical function—returning exactly one definitive output for one input—mathematicians must define a branch cut. This is a boundary line drawn across the complex plane (typically along the negative real axis) that cannot be crossed. This cut creates a continuous, single-valued "principal branch," which strictly defines why software and computational tools default to outputting the principal root.

Frequently Asked Questions

What is the square root of a negative number?

In the real number system, negative numbers do not possess a square root solution. However, when we extend into the complex plane using advanced algebra, the calculation introduces the imaginary unit $i$, where $i = \sqrt{-1}$. This allows us to process an imaginary number. For example, if you input the complex number $z = -9 + 0i$ and ask this calculator for the result with an exponent or degree of 2 (a square root), it will yield two conjugate roots: $0 + 3i$ and $0 - 3i$.

What are the roots of unity?

The "roots of unity" are simply the nth root values of the number 1 (where the real part coefficient is 1 and the imaginary part is 0). If you input $z = 1 + 0i$ into the calculator, you are effectively finding the solution to the polynomial equation $x^n = 1$. The result of this calculation is foundational in advanced algebra, discrete Fourier transforms, and number theory. The principal root is always just 1, but the other $n-1$ solutions are spread evenly around the unit circle on a graph. For instance, finding a cube root ($n=3$) yields three distinct points.

Why do I see tiny decimals like 1.22e-16 instead of zero?

This is a common artifact of floating-point arithmetic used by all modern computers when processing the trigonometric form. When evaluating sines and cosines of a phase angle or argument like $\pi$ or $\pi/2$, the mathematical answer is exactly 0. However, the computer stores $\pi$ as an approximation, resulting in an infinitesimally small number (e.g., $10^{-16}$). Our calculator algorithm actively detects these floating-point rounding errors during the equation processing and safely truncates them to absolute zero to provide clean, readable rectangular form outputs.

How do you convert polar back to rectangular form?

Once you find the magnitude (or modulus, $r_k$) and the phase angle ($\theta_k$) of a specific root in its polar form, you convert it back to the rectangular form ($a+bi$) using basic trigonometry. The real part $a = r_k \cdot \cos(\theta_k)$ and the imaginary part $b = r_k \cdot \sin(\theta_k)$. This process maps the circular coordinate back to horizontal and vertical axes on a 2D graph representing the complex plane.

Why is Euler's Formula important here?

Euler's formula ($e^{i\theta} = \cos \theta + i \sin \theta$) establishes the deep relationship between the trigonometric form and the exponential form of a complex number. De Moivre's theorem is effectively a direct corollary of Euler's work, providing a powerful formula and theorem for dealing with powers and roots. Using an exponent makes calculating roots extremely intuitive: finding the nth root of a complex value is as simple as taking $(re^{i\theta})^{1/n}$, which perfectly yields $r^{1/n} e^{i\theta/n}$ and effortlessly provides the final solution.

Credible Sources & References

Other useful calculators

Disclaimer

This calculator provides exact computational roots for complex numbers utilizing standard Javascript double-precision 64-bit floating point formats (IEEE 754). While robust logic is applied to truncate infinitesimally small rounding errors (e.g., treating $10^{-15}$ as exactly zero for sines of $\pi$), users should be aware that highly complex floating-point calculations may exhibit extremely minor precision variances in the furthest decimal places.

The principal root ($k=0$) is determined by utilizing the `atan2(b, a)` function, anchoring the principal argument strictly in the interval $(-\pi, \pi]$. This tool is intended for educational purposes, homework verification, and theoretical exploration of the Argand plane.

Last updated

Based on standard complex analysis (De Moivre's Theorem).