dash–calculator

04 Numbers and Counting

Roots of Unity: Complex Numbers Explained

Readout 04-0302 · Updated · Standard formula, shown below

Real part -0.8090
Imaginary part
0.5878
Result, rounded to 4 decimal places
Angle (degrees)
144.00 °
Result, rounded to 2 decimal places
n (number of roots)
5
Input
You enter
n (number of roots), k (root index, 0 to n-1)
You get
Real part, Imaginary part, Angle (degrees) (°)
Rounding
4 dp · 2 dp

The roots of unity are the complex numbers that, when raised to a positive integer power n, equal 1. They are the solutions to the equation zn = 1, and they always form a perfect circle of n equally spaced points on the complex plane. This article explains what they are, how to find them, and why they matter in math and engineering.

Formula

The nth roots of unity are given by the formula:

zk = cos(2πk/n) + i·sin(2πk/n), for k = 0, 1, 2, …, n−1

Here, n is the degree (the power in zn = 1), k is the index that picks out a specific root, and i is the imaginary unit (√−1). The angle is measured in radians in the standard formula; the calculator above shows the angle in degrees for readability. This is Euler’s formula applied to the equation eiθ = cos θ + i sin θ. When θ = 2πk/n, raising both sides to the n-th power gives ei2πk = 1, which holds for any integer k.

Worked Example

Using the default values n = 5 and k = 2:

  • Angle in radians: 2π × 2 / 5 = 4π/5 ≈ 2.5133 rad
  • Angle in degrees: 360 × 2 / 5 = 144°
  • Real part: cos(144°) ≈ −0.8090
  • Imaginary part: sin(144°) ≈ 0.5878

So the root is z2 ≈ −0.8090 + 0.5878i. If you raise this to the 5th power, you get exactly 1 (up to rounding error). The calculator above gives the same result.

What Are Roots of Unity?

Roots of unity are the solutions to the polynomial equation xn − 1 = 0. For example, the 4th roots of unity solve x4 = 1. They are 1, −1, i, and −i. If you plot them on the complex plane (horizontal axis = real part, vertical = imaginary part), they form a square centered at the origin. For any n, the n roots are the vertices of a regular n-gon inscribed in the unit circle (circle of radius 1).

The root with k = 1 is called the primitive nth root of unity. It is the one that generates all others when you raise it to successive powers. For n = 5, the primitive root is ei2π/5 ≈ 0.3090 + 0.9511i. Its powers give the other four roots. If n is prime, every root except 1 is primitive.

How to Find Them

There are two common methods:

  1. Using Euler’s formula: Write z = eiθ. Then zn = einθ = 1. Since ei2πm = 1 for any integer m, set nθ = 2πm, so θ = 2πm/n. Let m = 0, 1, …, n−1 to get n distinct angles.
  2. Factoring the polynomial: For small n, factor xn − 1. For n = 3, x3 − 1 = (x − 1)(x2 + x + 1). The quadratic gives x = (−1 ± i√3)/2. These are the two complex cube roots of unity.

For n = 2, the roots are 1 and −1. For n = 1, the only root is 1. For n = 0, the equation is undefined (00 is not defined), so the calculator requires n ≥ 2.

Properties and Patterns

  • The sum of all nth roots of unity is always 0 (for n ≥ 2). Example: 1 + i + (−1) + (−i) = 0.
  • The product of all nth roots of unity is (−1)n+1. For n = 4, product = 1 × i × (−1) × (−i) = (−1)5 = −1, which matches.
  • The roots are closed under multiplication: multiplying any two roots gives another root.
  • The roots are symmetric about the real axis: if z is a root, then its complex conjugate z̄ is also a root.
  • For even n, −1 is always a root because (−1)n = 1 when n is even.

Why They Matter

Roots of unity appear in many areas:

  • Discrete Fourier Transform (DFT): The DFT uses the nth roots of unity as the basis for decomposing a signal into frequencies. The fast Fourier transform (FFT) algorithm exploits their symmetry to compute this quickly.
  • Polynomial factorization: They factor xn − 1 over the complex numbers, and their integer combinations give cyclotomic polynomials, which factor xn − 1 over the integers.
  • Geometry: They define regular polygons on the unit circle, which is used in computer graphics and robotics for rotation.
  • Number theory: They are central to Galois theory and the study of constructible polygons. A regular n-gon is constructible with a compass and straightedge only if n is a product of a power of 2 and distinct Fermat primes (3, 5, 17, 257, …).
  • Solving equations: They help solve any equation of the form xn = a, because the solutions are a1/n times each nth root of unity.

Common Mistakes and Misconceptions

One common mistake is thinking that the roots of unity are all real numbers. For n > 2, most are complex. Another is confusing the index k with the number of roots. For n = 5, k goes from 0 to 4, not 1 to 5. Using k = 5 gives the same angle as k = 0 (since 2π×5/5 = 2π), which is why we restrict k to 0…n−1.

A frequent error is mixing degrees and radians. The formula uses radians; if you plug degrees into a calculator set to radians, you get the wrong value. The calculator above shows degrees, but the formula section uses radians. Also, remember that the roots are on the unit circle, so their magnitude (distance from origin) is always 1. The real and imaginary parts are the cosine and sine of the angle, not the angle itself.

Another misconception: the primitive root is not unique for composite n. For n = 6, both ei2π/6 and ei2π×5/6 are primitive, because 1 and 5 are coprime to 6. The number of primitive nth roots is φ(n), Euler’s totient function. For n = 6, φ(6) = 2, which matches.

Frequently Asked Questions

What is the difference between a root of unity and a primitive root of unity? A root of unity is any solution to zn = 1. A primitive nth root is one that is not a root of unity of any smaller degree; it generates all the others when raised to powers. For example, −1 is a 4th root of unity, but it is not primitive because (−1)2 = 1, so it is also a 2nd root.

How do I find the cube roots of unity? Set n = 3. The roots are ei2πk/3 for k = 0, 1, 2. That gives 1, −1/2 + i√3/2, and −1/2 − i√3/2. These are often written as 1, ω, and ω2, where ω = ei2π/3.

Are roots of unity always on the unit circle? Yes, because their magnitude is |eiθ| = 1. The unit circle is the set of complex numbers with magnitude 1, so all roots lie on it.

Why do the roots sum to zero? The sum of the geometric series 1 + z + z2 + … + zn−1 = (1 − zn)/(1 − z). For a root z ≠ 1, zn = 1, so the numerator is zero, making the sum zero. The root z = 1 is excluded from this argument, but the sum including it is still zero for n ≥ 2 because the roots are symmetric.

Can I use the calculator for n = 1? The calculator requires n ≥ 2 because the equation z1 = 1 has only one root (1), and the sum property falls apart. For n = 1, the root is trivially 1.

What is the relationship to the FFT? The fast Fourier transform computes the DFT by evaluating a polynomial at the nth roots of unity. The roots’ symmetry allows the algorithm to reuse intermediate results, reducing the complexity from O(n2) to O(n log n).

Related

Formula used
in n | n (number of roots) | - | 5 | 2 | 100
in k | k (root index, 0 to n-1) | - | 2 | 0 | 99
out re | Real part | - | cos(2 * pi * k / n) | 4
out im | Imaginary part | - | sin(2 * pi * k / n) | 4
out ang | Angle (degrees) | ° | 360 * k / n | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More on this panel

The whole Numbers and Counting panel →