Math Core

Module 1.2 · Algebra

Complex numbers and roots of unity

Complex numbers turn rotations into multiplication. That single fact makes huge powers easy to compute, turns regular polygons into polynomial equations, and lets you "filter" out every third or fourth term of a sum. AIME problems use all three ideas, often dressed up as problems about something else.

Polar form and De Moivre's theorem

Every nonzero complex number can be written as

z=r(cos⁡θ+isin⁡θ)=rcis⁡θ,z = r(\cos\theta + i\sin\theta) = r\operatorname{cis}\theta,

where r=∣z∣r = |z| is the distance from 00 and θ\theta is the angle from the positive real axis. When you multiply, lengths multiply and angles add:

r1cis⁡θ1⋅r2cis⁡θ2=r1r2cis⁡(θ1+θ2).r_1\operatorname{cis}\theta_1 \cdot r_2\operatorname{cis}\theta_2 = r_1r_2\operatorname{cis}(\theta_1 + \theta_2).

Repeating this gives De Moivre's theorem: (rcis⁡θ)n=rncis⁡(nθ)(r\operatorname{cis}\theta)^n = r^n\operatorname{cis}(n\theta). To raise a complex number to a large power, convert to polar form, multiply the angle by nn, and reduce it modulo 360∘360^\circ.

Two more facts you will use constantly:

  • zzˉ=∣z∣2z\bar z = |z|^2. If ∣z∣=1|z| = 1, then 1z=zˉ\dfrac{1}{z} = \bar z.
  • If z=cis⁡θz = \operatorname{cis}\theta, then z+1z=2cos⁡θz + \dfrac{1}{z} = 2\cos\theta and zn+1zn=2cos⁡(nθ)z^n + \dfrac{1}{z^n} = 2\cos(n\theta).

Roots of unity

Definition

Roots of unity

The nnth roots of unity are the nn solutions of zn=1z^n = 1:

1, ω, ω2, …, ωn−1,where ω=cis⁡360∘n.1, \ \omega, \ \omega^2, \ \dots, \ \omega^{n-1}, \qquad \text{where } \omega = \operatorname{cis}\frac{360^\circ}{n}.

They are the vertices of a regular nn-gon inscribed in the unit circle, with one vertex at 11.

Because they are exactly the roots of zn−1z^n - 1, you get a factorization

zn−1=(z−1)(z−ω)(z−ω2)⋯(z−ωn−1).z^n - 1 = (z - 1)(z - \omega)(z - \omega^2)\cdots(z - \omega^{n-1}).

Everything else follows from this and Vieta's formulas.

Three workhorse facts

Let ω=cis⁡360∘n\omega = \operatorname{cis}\dfrac{360^\circ}{n} with n≥2n \ge 2.

  1. Sum: 1+ω+ω2+⋯+ωn−1=01 + \omega + \omega^2 + \dots + \omega^{n-1} = 0. More generally ∑k=0n−1ωjk\displaystyle\sum_{k=0}^{n-1} \omega^{jk} equals nn if n∣jn \mid j and 00 otherwise.
  2. Product: ∏k=0n−1(c−ωk)=cn−1\displaystyle\prod_{k=0}^{n-1}(c - \omega^k) = c^n - 1 for any number cc. Dividing out c−1c - 1 and letting c→1c \to 1 gives ∏k=1n−1(1−ωk)=n\displaystyle\prod_{k=1}^{n-1}(1 - \omega^k) = n.
  3. Filter: if f(x)=∑akxkf(x) = \sum a_k x^k, then
∑n∣kak=1n∑j=0n−1f(ωj).\sum_{n \mid k} a_k = \frac{1}{n}\sum_{j=0}^{n-1} f(\omega^j).

Fact 1 is Vieta (the zn−1z^{n-1} coefficient of zn−1z^n - 1 is 00), or geometry (the vectors to the vertices of a regular polygon cancel). For jj not a multiple of nn, the numbers ωjk\omega^{jk} are again roots of unity summing to zero. Fact 3 follows from fact 1: in ∑jf(ωj)\sum_j f(\omega^j), the term akxka_kx^k contributes ak∑jωjka_k\sum_j \omega^{jk}, which is nakna_k when n∣kn \mid k and 00 otherwise.

Fact 2 has a geometric meaning: ∣1−ωk∣|1 - \omega^k| is the distance from vertex 11 to vertex ωk\omega^k. So in a regular nn-gon inscribed in a unit circle, the product of the distances from one vertex to all the others is nn.

Common mistake

When you use ∏k=0n−1(c−ωk)=cn−1\prod_{k=0}^{n-1}(c - \omega^k) = c^n - 1, the order matters: it is c−ωkc - \omega^k, not ωk−c\omega^k - c. Flipping all nn factors multiplies by (−1)n(-1)^n. For odd nn, ∏(c+ωk)=∏−(−c−ωk)=−((−c)n−1)=cn+1\prod(c + \omega^k) = \prod -(-c - \omega^k) = -\big((-c)^n - 1\big) = c^n + 1.

Worked examples

Worked example: A big power

Find the real part of (1+i3)10(1 + i\sqrt3)^{10}.

∣1+i3∣=2|1 + i\sqrt3| = 2 and the angle is 60∘60^\circ, so (1+i3)10=210cis⁡600∘=1024cis⁡240∘(1 + i\sqrt3)^{10} = 2^{10}\operatorname{cis}600^\circ = 1024\operatorname{cis}240^\circ. Since cos⁡240∘=−12\cos 240^\circ = -\dfrac12, the real part is −512-512.

Worked example: Using z + 1/z

A complex number zz satisfies z+1z=1z + \dfrac1z = 1. Find z100+1z100z^{100} + \dfrac{1}{z^{100}}.

Multiply by zz: z2−z+1=0z^2 - z + 1 = 0, so z=cis⁡(±60∘)z = \operatorname{cis}(\pm 60^\circ) and ∣z∣=1|z| = 1. Then z100+z−100=2cos⁡(6000∘)z^{100} + z^{-100} = 2\cos(6000^\circ). Since 6000=16⋅360+2406000 = 16 \cdot 360 + 240, this is 2cos⁡240∘=−12\cos 240^\circ = -1.

Worked example: The roots of unity filter

Compute (90)+(93)+(96)+(99)\dbinom90 + \dbinom93 + \dbinom96 + \dbinom99.

Use f(x)=(1+x)9f(x) = (1 + x)^9 and n=3n = 3, with ω=cis⁡120∘\omega = \operatorname{cis}120^\circ:

sum=f(1)+f(ω)+f(ω2)3.\text{sum} = \frac{f(1) + f(\omega) + f(\omega^2)}{3}.

f(1)=512f(1) = 512. Since 1+ω+ω2=01 + \omega + \omega^2 = 0, we have 1+ω=−ω2=cis⁡60∘1 + \omega = -\omega^2 = \operatorname{cis}60^\circ, so f(ω)=cis⁡540∘=−1f(\omega) = \operatorname{cis}540^\circ = -1. Likewise f(ω2)=f(ω)‾=−1f(\omega^2) = \overline{f(\omega)} = -1. The sum is 512−23=170\dfrac{512 - 2}{3} = 170. Check: 1+84+84+1=1701 + 84 + 84 + 1 = 170.

Worked example: Products over roots of unity

Let ω=cis⁡360∘5\omega = \operatorname{cis}\dfrac{360^\circ}{5}. Find (3−ω)(3−ω2)(3−ω3)(3−ω4)(3 - \omega)(3 - \omega^2)(3 - \omega^3)(3 - \omega^4).

Including k=0k = 0, the full product is ∏k=04(3−ωk)=35−1=242\prod_{k=0}^{4}(3 - \omega^k) = 3^5 - 1 = 242. The k=0k = 0 factor is 3−1=23 - 1 = 2, so the answer is 2422=121\dfrac{242}{2} = 121.

Tip

If a problem involves a sum or product over the vertices of a regular polygon, place the polygon's center at 00 and write the vertices as R ωkR\,\omega^k. Distances become ∣z−Rωk∣|z - R\omega^k|, and the facts above do the rest.

Practice

Practice 1

There is a real number kk with (1+i)18=ki(1 + i)^{18} = ki. Find kk.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 2

Let ω=cis⁡360∘7\omega = \operatorname{cis}\dfrac{360^\circ}{7}. Find ∏k=06(ωk+2)\displaystyle\prod_{k=0}^{6}\left(\omega^k + 2\right).

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

A regular 2020-gon is inscribed in a circle of radius 33. A point PP is at distance 44 from the center of the circle. Find the sum of the squares of the distances from PP to the 2020 vertices.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

The solutions of z12=236z^{12} = 2^{36} are the vertices of a convex polygon in the complex plane. Find the area of the polygon.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

A complex number zz satisfies z+1z=3z + \dfrac1z = \sqrt3. For how many integers nn with 1≤n≤9991 \le n \le 999 is zn+1zn=1z^n + \dfrac{1}{z^n} = 1?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

Let (1+x)20=a0+a1x+⋯+a20x20(1 + x)^{20} = a_0 + a_1x + \dots + a_{20}x^{20}. Find the remainder when a0+a4+a8+a12+a16+a20a_0 + a_4 + a_8 + a_{12} + a_{16} + a_{20} is divided by 10001000.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

Let ω=cis⁡360∘5\omega = \operatorname{cis}\dfrac{360^\circ}{5}. Then

∑k=0412−ωk=mn,\sum_{k=0}^{4}\frac{1}{2 - \omega^k} = \frac{m}{n},

where mm and nn are relatively prime positive integers. Find m+nm + n.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 8

Let ω=cis⁡360∘9\omega = \operatorname{cis}\dfrac{360^\circ}{9}. Find ∏k=08(ω2k+ωk+2)\displaystyle\prod_{k=0}^{8}\left(\omega^{2k} + \omega^k + 2\right).

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Real contest practice

  • 2018 AIME I, Problem 6: counting unit complex numbers for which a difference of huge powers is real.
  • 1996 AIME, Problem 11: the product of the roots of a degree-6 polynomial that lie in the upper half-plane, found by relating them to roots of unity.
  • 2024 AIME I, Problem 7: the largest possible real part of an expression in zz with ∣z∣=4|z| = 4, using polar form.