# Plotting solutions of systems in complex plane

I'm interested in plotting solutions of systems of polynomials in the complex plane, in the following way.

Let $f_1,\ldots f_s$ be complex polynomials in variables $x_1,\ldots x_n$. I know how to find the solutions using a code like this

eqs = {x^2 + y^3 + 1 == 0, x + y^2 - 1 == 0}
pts = Solve[eqs, {x, y}]


But I'm having some trouble to plot the values of $x,y$ n the complex plane. I tried some naive thing like

ListPlot[pts]


but nothing works. I'm lost, any help is welcome, thanks.

• Get them using {x, y} /. % – Mahdi Apr 8 '15 at 3:19
• I forgot a little detail in my answer, sorry. It's corrected. – Integral Apr 8 '15 at 3:21
• A math problem: If you have ${x,y}$ as a point and $x$ and $y$ are complex, how does one show them on complex plane? – Mahdi Apr 8 '15 at 3:30
• $x$ is one point and $y$ is another, their are not considered as coordinates. – Integral Apr 8 '15 at 3:33
• – J. M. is in limbo Nov 21 '15 at 19:34

You have

eqs = {x^2 + y^3 + 1 == 0, x + y^2 - 1 == 0};
pts = Solve[eqs, {x, y}];


To get the data points and the plot:

data = {x, y} /. pts // Flatten;
ListPlot[{Re[#], Im[#]} & /@ data]

• I think it's perfect! – Integral Apr 8 '15 at 3:45
• Do you mind just explain a little (or recommend some reading) what #,&,/ and @ stands for? – Integral Apr 8 '15 at 3:47
• Thanks! /@ is shorthand for Map. It basically maps {Re[#], Im[#]} over all elements in data one by one. This page is really good to start! – Mahdi Apr 8 '15 at 3:53

Starting from version 10.1 you can use ReIm:

eqs = {x^2 + y^3 + 1 == 0, x + y^2 - 1 == 0};
pts = {x, y} /. Solve[eqs, {x, y}];

ListPlot[ReIm[pts]] • Or even ListPlot@ReIm@Values@Solve[eqs, {x, y}]. – Michael E2 Nov 21 '15 at 14:35
• @MichaelE2, hi, please let me know what do you think about this question : mathematica.stackexchange.com/questions/206901/… . Do you think it’s some how related? – S.S. Sep 26 '19 at 15:10
• I have Mathematica 9. – S.S. Sep 26 '19 at 15:12