Complex functions · w = f(z)

Domain coloring

Domain coloring draws a complex function by painting each point z with a colour that stands for the value f(z): the hue shows its argument and the brightness its modulus.

Domain coloring in this visualization

A complex function w=f(z)w = f(z) takes a point of one plane to a point of another, so its graph would need four dimensions. Domain coloring keeps only the plane of zz and paints every point there with a colour that stands for the value f(z)f(z). The hue is the argument of the value: in the default colour wheel, positive real numbers are red, and the colours run once round the wheel as the angle goes once round. The brightness is the modulus: values near 0 are dark, values with modulus near 1 have the wheel’s own colours, and large values are light. The inset is that key: the ww-plane squeezed into a disc, each point painted its own colour, with 0 in the middle and ∞ at the rim.

A zero is where all the colours meet in a dark point, a pole where they meet in a light one. Near a zero aa of order mm, the function behaves like c (z−a)mc\,(z-a)^m, so its argument is about arg⁡c+marg⁡(z−a)\arg c + m\arg(z-a). Going once anticlockwise round a small circle that encloses only aa, the colours run through the wheel mm times, in the wheel’s own order. Near a pole of order nn, the function is like c (z−b)−nc\,(z-b)^{-n}, and the colours run round nn times the other way.

The red key walks the loop once and counts how many times the colour turns, forwards minus backwards. For a rational function

f(z)=c (z−a1)m1⋯(z−b1)n1⋯,arg⁡f=arg⁡c+∑miarg⁡(z−ai)−∑njarg⁡(z−bj).f(z) = c\,\frac{(z-a_1)^{m_1}\cdots}{(z-b_1)^{n_1}\cdots},\qquad \arg f = \arg c + \sum m_i \arg(z-a_i) - \sum n_j \arg(z-b_j).

Arguments add when numbers multiply. Along the loop, each arg⁡(z−a)\arg(z-a) gains one full turn if aa is inside and comes back to where it started if aa is outside. So the colour turns as many times as there are zeros inside, minus the poles inside, each counted with its order. This is the argument principle; it holds for any function that is analytic inside and on the loop apart from poles inside it, with no zero or pole on the loop itself. A zero and a pole inside together give no turn at all.

Things to notice

  • At 0, e1/ze^{1/z} has an essential singularity, which is neither a zero nor a pole: near it every colour except the two ends appears infinitely often, and the argument principle does not apply.
  • A colour jump can occur along a cut of a function such as z\sqrt z or log⁡z\log z, where a choice of branch was made; the functions here are single-valued and continuous away from their singularities, so there is no branch cut. Colours meet at zeros and poles and repeat ever more densely near the essential singularity.
  • With phase lines on, they cross the modulus rings at right angles wherever ff is finite, nonzero and f′≠0f' \ne 0: the two families are the level curves of the real and imaginary parts of log⁡f\log f. At a critical point the grid breaks down.

Related