7
$\begingroup$

I want to know the exact method of plotting complex function used by human, computer, and whatever who can do mathematics. For example how should I plot this : $w = u+iv$ , $z = x+iy$ , $w= f(z)= z^2$ I'm completely confused imagining the complex functions and I want to know how you would imagine such functions and do mathematics with it. Thanks in advance

$\endgroup$
12
  • $\begingroup$ Do you understand that you can't plot functions from $\mathbb R^2$ to $\mathbb R^2$? $\endgroup$
    – Git Gud
    Dec 28, 2013 at 19:47
  • $\begingroup$ No, you mean it's not possible to plot such function? $\endgroup$
    – FreeMind
    Dec 28, 2013 at 19:47
  • $\begingroup$ Yes, it isn't possible to plot such functions in the traditional sense of 'plot'. $\endgroup$
    – Git Gud
    Dec 28, 2013 at 19:49
  • 2
    $\begingroup$ @MrWho You can't plot from $\mathbb R^2$ to $\mathbb R^2$ for the reason mathematics2x2life gives in his answer. See this link for a different way of plotting functions. $\endgroup$
    – Git Gud
    Dec 28, 2013 at 19:53
  • 2
    $\begingroup$ Does this answer your question? What free tools can I use to plot complex functions on the complex plane? $\endgroup$ Apr 3, 2022 at 17:35

4 Answers 4

5
$\begingroup$

You don't plot these. To plot them would require $2$ axes to plot the real and imaginary components of the inputs and they it would require another $2$ axes to plot the real and imaginary components of the outputs, totaling $4$ axes. However, we are unable to plot in $4$-dimensions in our $3$ dimensional world. So we must make a choice: plot the imaginary part of the output or the real part of the output. For example, take the function $f(z)=z^2$. Then we have $$ f(2+i)=(2+i)^2=4+4i-1=3+4i $$ We could then plot the imaginary part of the output, $4i$. So this would be the same as plotting the point $(2,1,4)$ in $\mathbb{R}^3$.

NOTE. This isn't the only thing we could plot. For example, another common choice is to plot the absolute value of the output. In our example above, we would have $f(2+i)=3+4i$. Then we know that $|3+4i|=\sqrt{25}=5$. So we would plot the point $(2,1,5)$. It all depends on the choice of the final variable to plot while the $2$ first axes are almost always the real and imaginary components of the input, respectively.

$\endgroup$
6
  • $\begingroup$ What's the problem? Couldn't we plot (2,1,4) in the R^3?! $\endgroup$
    – FreeMind
    Dec 28, 2013 at 19:55
  • $\begingroup$ Yes, we could and we do. That's the point. We can plot that but we cannot plot the point $(2,1,3,4)$ which would be needed to properly visualize the output of $f(2+i)$ in my example. $\endgroup$ Dec 28, 2013 at 19:57
  • $\begingroup$ Plotting complex function is still hard for me to grasp! $\endgroup$
    – FreeMind
    Dec 31, 2013 at 21:01
  • 2
    $\begingroup$ It should be given that it is humanly impossible to do as it needs to be done, as I explained. Moreover, it's not that important in Complex Analysis as even if we do plot, it is a computer program that does the work for us. More important to learn the theory like the Cauchy-Goursat Theorem, Residue Theorem, Cauchy Integral Formula, etc. $\endgroup$ Dec 31, 2013 at 23:23
  • 1
    $\begingroup$ However, I want to have geometric imagination of what I'm really doing, if you know any article or something which has explained plotting clearly please let me know. $\endgroup$
    – FreeMind
    Jan 1, 2014 at 10:31
4
$\begingroup$

I just wanted to point out that I wrote a Python package, cplot, that makes plotting complex-valued functions fairly simple. It combines domain coloring and contour lines for constant arg/abs. e.g., for $\sin(z)/z$:

import cplot
import numpy as np


def f(z):
    return np.sin(z) / z


plt = cplot.plot(f, (-7.0, +7.0, 400), (-7.0, +7.0, 400))
plt.show()

enter image description here

$\endgroup$
2
$\begingroup$

You can plot such functions! Look at https://people.math.osu.edu/fowler.291/phase/

for instance. The color at a point tells you the phase of the image of that point. To see what the base "phase chart" is, just plot the identity function $z$.

If you wanted phase and modulus info, you could do a 3D plot colored by phase. I did that too using webGL and cannot find it now. Will update this later when I do...

$\endgroup$
0
$\begingroup$

Like Steven Gubkin says, coloring by phase can give you excellent geometric intuitions. I put together this Python code while I was taking complex analysis, let me know what you think: https://github.com/seaplant3/complex-plotting

It uses contours (like an elevation map) to show magnitude, I found that was the easiest way to keep everything visible.

$\endgroup$
3
  • $\begingroup$ While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review $\endgroup$
    – TheSimpliFire
    Jan 22, 2018 at 7:49
  • $\begingroup$ What 'essential parts of the answer' are missing? $\endgroup$
    – seaplant
    Jan 22, 2018 at 8:12
  • 1
    $\begingroup$ Your relevant Python code, in case the link changes/goes down. $\endgroup$
    – TheSimpliFire
    Jan 22, 2018 at 18:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .