Root of Unity

Author

Eric W. Weisstein
February 13, 2008

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Algebra/RootofUnity.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/RootofUnity.html.

©2008 Wolfram Research, Inc. except for portions noted otherwise

Examples

Table[x/.{ToRules[Roots[x^n==1,x]]},{n,5}]//ColumnForm//TraditionalForm

Table[x/.{ToRules[Reduce[x^n==1,x]]},{n,5}]//ColumnForm//TraditionalForm

Table[x/.{ToRules[Chop@NRoots[x^n==1,x]]},{n,5}]//ColumnForm//TraditionalForm

RootReduce/@Reduce[x^5==1,x]

RootReduce/@Roots[x^5==1,x]

Table[RootReduce[Root[#^5-1&,n]],{n,5}]

Plots

RootsofUnity[n_]:=Module[{p={Re[#],Im[#]}&/@(x/.{ToRules[Roots[x^n==1,x]]})},
{
{Red,Circle[{0,0},1]},
Line[Append[p,First[p]]],
{PointSize[.06],Point/@p}
}
]

Export[gifs<>"/rootsu.gif",Show/@Table[Graphics[RootsofUnity[n],AspectRatio->Automatic,
PlotRange->1.1{{-1,1},{-1,1}},
PlotLabel->TraditionalForm[StringReplace["roots of (x^n)=1","n"->ToString[n]]]
],{n,15}]
]//Timing

MakeBoxes[RootsOfUnity[n_],TraditionalForm]:=RowBox[{RowBox[{"roots"," ","of"," ",SuperscriptBox["x",MakeBoxes[n,TraditionalForm]]}],"==","1"}]

GraphicsGrid[Partition[Table[Graphics[RootsofUnity[n],AspectRatio->Automatic,PlotLabel->RootsOfUnity[n]],{n,10}],5],ImageSize->500]