Roots of Unity
For , the -th roots of unity are the complex solutions of .
They are given by for .
Equivalently, these are the equally spaced points on the unit circle.
Let and . Define points on the unit circle by for . Let be the length of the polygonal chain through : .
Then and .
How to use the applet
- Move the slider to choose how many roots of unity are displayed.
- The blue points are the -th roots of unity
- The blue polygon connects the points in order, showing that the roots form a regular -gon inscribed in the unit circle.
- The roots are equally spaced: the angle between consecutive roots is .
- Increasing makes the polygon look closer and closer to the circle (this is the geometric idea behind approximating circular quantities by polygons).
- Hold Shift + scroll to zoom
- Hold Shift + drag to move
- Points shaped like <> act as sliders
Description
Reference: Lecture Notes Calculus 1 ( May22,2022 ) Figure 5.5 page 89
This applet visualizes the -th roots of unity, i.e. the solutions of .
For a chosen integer (slider nSlider), the points
for
are displayed on the unit circle as equally spaced points, and the blue polygon connects them to emphasize
that the roots of unity form a regular -gon inscribed in the unit circle.
In the code, the roots are created as points on the unit circle with coordinates
, using the expressions
Math.cos((TAU * k) / n) and Math.sin((TAU * k) / n) (with TAU = 2 * Math.PI).
Concretely, the applet creates an array of points roots.
const roots: JXG.Point[] = [];
for (let k = 0; k < MAX_N; k++) {
roots.push(
createPoint(
board,
[
() => Math.cos((TAU * k) / Math.floor(nSlider.Value())),
() => Math.sin((TAU * k) / Math.floor(nSlider.Value())),
],
{
...
},
...
)
);
}