Complex Analysis

Domain coloring


Complex phase portraits

A way to visualize complex functions $f:\mathbb{C}\to\mathbb{C}$ is using phase-portraits. A complex number can be assigned a color according to its argument/phase. Positive numbers are colored red; negative numbers are colored in cyan and numbers with a non-zero imaginary part are colored as in Figure 1, which shows a phase portrait for the function $f(z)=z$.

phase portrait for z
Figure 1: Phase portrait of $f(z)=z$.

In his book Visual Complex Functions, Elias Wegert employs phase portraits with contour lines of phase and modulus (enhanced phase portraits) for the study of the theory of complex functions. See for example Figures 2 and 3 for the function $f(z)=z$.

phase portrait for z
Figure 2: Contour lines of phase.
phase portrait for z
Figure 3: Contour lines of modulus.

With the use of enhanced phase portraits, roots and poles of a complex function $f(z)$ can be easily spotted at the points where all colors meet. Figures 4 and 5 show the enhanced phase portrait of the functions $$f(z)=z \quad \text{and}\quad g(z)=1/z,$$ respectively. Observe the contrast between the level curves of modulus in each case.

phase portrait for z
Figure 4: Root at $z=0$.
phase portrait for z
Figure 5: Pole at $z=0$.

Consider now the function \begin{eqnarray}\label{eq1} f(z)=\frac{z-1}{z^2+z+1} \end{eqnarray} which has a root at $z_0=1$ and two poles at $$z_{1}=\frac{-1 + \sqrt{3}\,i}{2} \quad \text{and} \quad z_{2}=\frac{-1 - \sqrt{3}\,i}{2}.$$

Figure 6 shows the enhanced portrait of (\ref{eq1}) with level curves of the modulus. Notice the behaviour of the level curves of the modulus around the root (right side) and the poles (left side). Can you see the difference?

(z-1)(z^2+z+1)
Figure 6: Plot of $f(z)=(z-1)/(z^2+z+1)$ with level curves of the modulus.

Explore complex functions

Use the applet below to explore enhanced phase portraits of complex functions. Variables accessible in the freely editable formula are \[\text{z, A, B, C, D, a, b, c, d}\] where $\text{a, b, c}$ and $\text{d}$ depend on the position of the colored complex points $\text{A, B, C}$ and $\text{D}$, respectively. The dependence is \[\text{ a=z-A, b=z-B, c=z-C, d=z-D.} \] Here $z$ is the location in the image. The parameter $\text{'e'}$ is a real scalar that can be adjusted between $-1$ and $1$. Finally, the functions are plotted on the region \([-4,4]\times [-4,4]\).

Phase
Modulus
Re/Im components
Chessboard
Webcam

f(z) =

You can also select one function of the following list:


Sorry, the applet is not supported for small screens. Rotate your device to landscape. Or resize your window so it's more wide than tall.



Warning!

If we do not impose additional restrictions, like continuity or differentiability, the isochromatic sets of complex functions can be arbitrary - but this is not so for analytic functions, which are the objects of prime interest in this text.

In fact, analytic functions are (almost) uniquely determined by their (pure) phase portraits, but this is not so for general functions. For example, the functions $f$ (analytic) and $g$ (not analytic) defined by \begin{eqnarray}\label{example} f(z)=\frac{z-1}{z^2+z+1}, \qquad g(z)=(z-1)\left(\overline{z}^2+\overline{z}+1\right) \end{eqnarray} have the same phase (except at their zeros and poles) though they are completely different.

Since pure phase portraits do not always display enough information for exploring general complex functions, I recommend the use of their enhanced versions with contour lines of modulus and phase in such cases. Figure 7 shows two such portraits of the functions $f$ (left) and $g$ (right) defined in (\ref{example}).


Figure 7: Enhanced phase portraits of $f$ (left) and $g$ (right). Drag slider.

Sorry, the applet is not supported for small screens. Rotate your device to landscape. Or resize your window so it's more wide than tall.

A notable distinction between the two portraits is the shape of the tiles. In the left picture most of them are almost squares and have right-angled corners. In contrast, many tiles in the portrait of $g$ are prolate and their angles differ significantly from $\pi/2$ - at some points the contour lines of modulus and phase are even mutually tangent.

If you want to learn more details about the code for visualizing complex functions, then follow the link to access the online tutorial: Live Coding



Note: The applet for exploring complex functions was written by Aaron Montag based on the work of J├╝rgen Richter-Gebert using CindyJS. The source code can be found at GitHub.

NEXT: The Complex Power Function