# Plotting Complex Roots of Unity [duplicate]

Possible Duplicate:
Finding real roots of negative numbers (for example, $\sqrt$3${-8}$)

I am trying to make Mathematica plot the cube roots of $27i$ and graph them, so that I can include them in my $\LaTeX$ed homework. How can I do this?

## marked as duplicate by rm -rf♦, Verbeia, Oleksandr R., J. M. is away♦Sep 22 '12 at 2:43

From @belisarius

pts = ({Re@#, Im@#} & /@ (x /. Solve[x^3 == 27 I]))


Styling:

Show[ContourPlot[Abs[(x + I y)^3 - 27 I], {x, -4, 4}, {y, -4, 4}, Contours -> 15],
Graphics[{{Style[Text[#, #], 17] & /@ #}, {Opacity[.5], Orange,
Thickness[.01], Arrow[{{0, 0}, #}] & /@ #}, {Red,
PointSize[.02], Point@#}}, Axes -> True, Frame -> True,
PlotRangePadding -> 1, AspectRatio -> Automatic] &@pts]


Show[ContourPlot[Arg[(x + I y)^3 - 27 I], {x, -4, 4}, {y, -4, 4},
Contours -> 15, ColorFunction -> "Rainbow"],
Graphics[{{Style[Text[#, #], 17] & /@ #}, {Opacity[.5], Orange,
Thickness[.01], Arrow[{{0, 0}, #}] & /@ #}, {Red,
PointSize[.02], Point@#}}, Axes -> True, Frame -> True,
PlotRangePadding -> 1, AspectRatio -> Automatic] &@pts]


• Since the question's title is "Plotting Complex Roots of Unity", here's a variation of your code that plots the roots of unity up to degree 32, with different point sizes: pts = Table[{Re@#, Im@#} & /@ (x /. Solve[x^n == 1]), {n, 1, 32}]; ListPlot[pts, { AspectRatio -> 1, PlotRangePadding -> 1/8, PlotStyle -> PointSize /@ (0.1/Length@# & /@ pts)}] !Roots of Unity – Mauro Lacy Dec 31 '18 at 13:58