# Plotting Complex Numbers as “Arrows” on the Complex Plane

Given the following complex numbers (defined as the values of two functions f and g defined only on the points 0 and 1):

f := (1 + 0 I)
f := 0.5 E^(I \[Pi]/4)
g := (0 + 1 I)
g := 2 E^(I (\[Pi]/2 + \[Pi]/2 + \[Pi]/2))


is there a way to plot each of f, f, g, and g as "arrow vectors" on the complex plane? Something analogous to the following: except that (i) each of the complex numbers is labeled f, f, g, g and (ii) the two f complex numbers are colored green while the two g complex numbers are colored blue.

• There are many posts on plotting complex numbers, e.g. Plotting complex numbers as an Argand Diagram. And there are many posts on plotting arrows (see e.g. this). If you read both your question will be slightly simpler to answer. – Artes Jun 10 at 17:07

You can use ComplexListPlot as follows:

data = Join[Thread[{0, f /@ {0, 1}}], Thread[{0, g /@ {0, 1}}]];
colors = {Red, Green, Blue, Orange};

clp1 = ComplexListPlot[data,
PlotStyle -> (Directive[Arrowheads[Large], AbsoluteThickness, #] & /@ colors),
Joined -> True, Mesh -> All, AxesLabel -> {"Re", "Im"},
AxesOrigin -> {-.3, 0}, PlotRange -> All] /. {Point -> Nothing, Line -> Arrow};

clp2 = ComplexListPlot[Join[Callout[f @ #, HoldForm[f @ #]] & /@ {0, 1},
Callout[g @ #, HoldForm[g @ #]] & /@ {0, 1}]] /. Point -> Nothing;

Show[clp1, clp2] • This is great. Is there a way to specify a color for each of the arrows? – George Jun 10 at 22:26
• @George, you can try something like PlotStyle -> (Directive[Arrowheads[Large], AbsolutePointSize, AbsoluteThickness, #]&/@ {Red, Green, Blue, Orange}) – kglr Jun 10 at 22:35
• Last question: is there a way to add the labels "f", "f", etc to the arrows, and expand the axis so that all arrows are guaranteed to be visible? – George Jun 10 at 22:51
• @George, please see the update. – kglr Jun 10 at 23:13