Complex Functions and Domain Colouring: Visualising the Invisible
A complex function maps one pair of numbers to another, living in a four-dimensional space that defies direct plotting. Domain colouring is an elegant solution: encode the output as a colour and paint the input plane. Suddenly poles become rosettes of cycling hues, zeros collapse to darkness, branch cuts appear as colour cliffs, and the Riemann zeta function's critical zeros glow like beads on a line. This article explains the mathematics behind the technique and explores what it reveals about some of the most profound functions in mathematics.
1. Complex Numbers and Functions
A complex number z = x + iy combines a real part x and an imaginary part y, where i = √(−1). Its polar form z = r eiθ = r(cosθ + i sinθ) expresses the same information as modulus r = |z| = √(x² + y²) and argument θ = arg(z) = arctan(y/x). Euler's formula eiθ = cosθ + i sinθ unifies trigonometry and exponential growth in a single equation and underlies all of domain colouring.
Complex functions are far richer than their real counterparts. A function of a real variable can only grow, shrink, or oscillate; a complex function rotates, stretches, contracts, and folds the plane in patterns controlled by its analytic structure. The derivative f'(z) = limh→0(f(z+h) − f(z))/h must be the same regardless of the direction of approach in the complex plane — a far stronger requirement than real differentiability, leading to the Cauchy–Riemann equations and, ultimately, to remarkably rigid geometric behaviour.
2. The Domain Colouring Method
Domain colouring, introduced by Frank Farris and popularised by Hans Lundmark and Elias Wegert, converts each output value f(z) into a colour. The canonical scheme uses HSV (hue, saturation, value):
The logarithmic brightness contours are key. Because |f(z)| can range from 0 to ∞, a linear brightness scale would show only a tiny fraction of the structure. Taking log|w| and applying a sinusoidal modulation produces rings of alternating brightness that count the order of magnitude of the modulus, much as contour lines count altitude. Each complete brightness cycle represents a factor of e (≈ 2.718) in modulus.
Enhanced domain colouring (Wegert's “phase portraits”) sometimes uses only the argument, discarding modulus entirely, to produce the purest possible view of phase structure. Phase portraits are particularly striking for functions with many zeros and poles, such as the Riemann zeta function, where the zeros align in a row on the critical line like beads on a wire.
3. Poles, Zeros, and Winding Numbers
The most important features of a complex function are its zeros and poles. Domain colouring makes them immediately visible without computation.
The residue theorem is the crowning result of this structure. For a meromorphic function with poles at zk inside a simple closed contour C, the contour integral equals 2πi times the sum of residues. In domain colouring terms, the integral “counts” the net winding of the output colour as we trace C. This geometric interpretation makes the otherwise abstract theorem visually obvious: if you walk along C and the output colour winds once anticlockwise, there must be exactly one more zero than pole inside.
4. Conformal Mapping and Analytic Continuation
Holomorphic functions (complex-differentiable everywhere in a domain) are conformal where their derivative is non-zero: they preserve angles between curves, though they stretch and rotate local neighbourhoods.
Analytic continuation is one of the most remarkable facts in mathematics: a function known on an arbitrarily small open set is uniquely determined everywhere it can be analytically extended. This rigidity has no parallel in real analysis — a real smooth function can be modified on a compact set without affecting its behaviour outside. For complex functions, the entire global structure is encoded in any small patch, a property that makes complex analysis extraordinarily powerful in number theory, physics, and engineering.
5. Special Functions: Gamma, Zeta, and Elliptic
Domain colouring transforms abstract special functions into vivid images that immediately reveal their structure.
The Riemann Hypothesis is the most famous unsolved problem in mathematics: are all non-trivial zeros of ζ(s) on the line Re(s) = 1/2? Domain colouring of ζ near the critical strip makes this visually intuitive — the colour-meeting dark points appear to march precisely along the vertical line, forming a sequence that encodes the distribution of prime numbers via the explicit formula ψ(x) = x − Σρ xρ/ρ − log(2π) − ½ log(1 − x−2).
6. Real-World Applications
Complex analysis and domain colouring are not purely aesthetic pursuits; they underpin engineering, physics, and computation in fundamental ways.
- Aerofoil design: The Joukowski transformation w = z + 1/z maps a family of near-circles to aerofoil shapes. Solving potential flow around a cylinder (analytically tractable) and applying the conformal map yields the exact lift and pressure distribution for the aerofoil, without numerical simulation. Modern CFD codes still use conformal mapping to generate structured grids around wing sections.
- Signal processing: The bilinear transform w = (z − 1)/(z + 1) maps the unit circle in the z-plane to the imaginary axis in the s-plane (the boundary between stable and unstable systems). It is the standard technique for converting analogue IIR filter designs (Butterworth, Chebyshev) to digital filters, preserving the frequency-domain shape while mapping the infinite frequency range to the finite [−π, π] interval.
- Electrostatics and heat conduction: Solutions to Laplace's equation in two dimensions are real parts of holomorphic functions. The Schwarz–Christoffel mapping transforms complicated electrode or conductor geometries to simple half-planes where the potential is trivially found, then maps the solution back. Domain colouring of the potential + stream function (as a complex function) immediately shows equipotential lines and field lines.
- Quantum mechanics: The scattering matrix S(E) in quantum mechanics has poles at bound-state energies and resonances. Domain colouring of S as a function of complex energy E maps the pole structure directly onto colour rosettes. The Argand diagram of S-matrix elements traces circles in the complex plane, a consequence of unitarity, visible as circular colour contours.
- Fractals and iteration: The Mandelbrot set, Julia sets, and Newton fractals all emerge from iterating complex functions. Domain colouring of the escape time (coloured by the argument of the final iterate) produces the smooth, richly coloured fractal images familiar from mathematics visualisation, revealing the self-similar structure of the Julia set boundary.
Frequently Asked Questions
Why can we not simply plot a complex function as a 3D surface?
A complex function f: ℂ → ℂ takes a 2D input (the complex plane) and produces a 2D output (another complex plane). To graph it faithfully we would need four real dimensions — two for the input, two for the output — which is impossible to display directly. Common partial solutions include: graphing only |f(z)| as a height above the input plane (losing argument information), graphing only arg(f(z)) (losing modulus), or — best of all — using domain colouring to encode both simultaneously in a single 2D image.
What does it mean for a complex function to be “analytic”?
A function is analytic (or holomorphic) at a point if it is complex-differentiable in some open neighbourhood of that point. This is a far stronger condition than real differentiability: it implies the function equals its Taylor series, is infinitely differentiable, satisfies the Cauchy–Riemann equations, has harmonic real and imaginary parts, and is conformal wherever its derivative is non-zero. In domain colouring, analytic regions show smooth, continuous colour variation; isolated singularities stand out as colour-cycling anomalies.
How does domain colouring reveal branch cuts?
Branch cuts are lines along which a multivalued function must be made single-valued by choosing one branch, introducing a discontinuity. In domain colouring, they appear as sharp lines where the hue jumps abruptly, typically by half the colour wheel (a sudden shift from one colour to its complement). For √z with the standard branch cut along the negative real axis, the colour jumps from cyan to red across the negative axis, reflecting the jump in argument of √z from −π/2 to +π/2 as one crosses the cut.