Interactive Educational Modules in
Scientific Computing

Twiddle Factors

This module illustrates the twiddle factors (i.e., complex roots of unity) that play a fundamental role in the discrete Fourier transform. For a given integer n, the nth root of unity is given by ωn = cos(2 πn) − i sin(2 πn) = e−2π in. For given choices of n, m, and k, the value of ωnmk is plotted in the complex plane.

The user selects values for n and m from the menus and clicks the plus and minus buttons to increment or decrement k. As k changes, the twiddle factor moves around the unit circle in jumps of equal size.

Reference: Michael T. Heath, Scientific Computing, An Introductory Survey, 2nd edition, McGraw-Hill, New York, 2002. See Section 12.1, especially Figure 12.1.

Developers: Evan VanderZee and Michael Heath