Recently I became curious about functions defined from to and I asked myself following question:
How would the complex functions look like if we try to plot them?
Graphs of complex functions lie in , which can be identified in a natural way with , real four-dimensional space.
So I jumped to SageMath and plotted
sage: f(z) = z^2 sage: complex_plot(f, (-5, 5), (-5, 5))
Now this looked like an enigma to me. What do the colours stand for? As usual, there is an interesting entry about this on Wikipedia, Colour wheel graphs of complex functions.
I digged further and discovered that these are called “2D colour maps” and is one of many other ways of visualizing complex functions, like 3D models, 2D vector plots, 4D perspective projection, conformal maps…But what is the colour map? The colour map uses the HLS colour system (“hue-lightness-saturation”). HLS is a cylindrical-coordinate representations of points in an RGB color model. In cylinder, the angle around the central vertical axis corresponds to “hue”(i.e. shade of a colour) , the distance from the axis corresponds to “saturation”, and the distance along the axis corresponds to “lightness”. The hue represents the argument (also called phase angle) of the complex number z. The absolute value (also called magnitude or modulus) is given by the lightness of the colour. All colours of the colour map have the maximal saturation (with respect to the given lightness).
Positive real numbers always appear red. The primary colours appear at phase angles (green) and (blue). The subtractive colours yellow, cyan, and magenta have the phases , , and .
The poles of a complex function are white, the zeros are black.
Finally, to conclude [from : Visual quantum mechanics : selected topics with computer-generated animations of quantum-mechanical phenomena by Bernd Thaller.]
This colour map is obtained by a stereographic projection from the surface of the three-dimensional colour space (in the hue-lightness-saturation system) onto the complex plane.
An appropriately colored surface graphics or a density graphics can give a useful graphical representation of a complex valued function. Another example of complex valued function, a wave function, is given here:
For more such graphs, visit Bernd Thaller’s Gallery of complex functions .