Painting a function you cannot graph
A real function y = f(x) has a graph you can draw on paper: one input axis, one output axis. A complex function w = f(z) maps a 2-D input plane to a 2-D output plane, so its full graph would need four real dimensions — impossible to draw directly. Domain colouring solves this by keeping the domain as an ordinary 2-D picture and encoding the output f(z) as a colour at each point: the hue encodes the argument (phase angle) of f(z), and the brightness or a secondary pattern encodes its magnitude.
z = x + iy a point in the domain w = f(z) = u + iv the (complex) output hue = arg(w) = atan2(v, u) mapped around a colour wheel brightness = |w| = √(u² + v²) mapped to lightness (or log-scaled rings)
Reading the picture: zeros, poles, and the winding of colour
Because hue cycles once through the full colour wheel as arg(w) sweeps through 2π, every zero of f — a point where f(z) = 0 — appears as a point where all colours of the wheel meet, since the phase is undefined right at zero and spins through every value in an arbitrarily small neighbourhood around it. Count how many times the full colour cycle repeats as you circle a zero once and you read off its multiplicity directly from the picture: a simple zero shows the colours once, a double zero shows them twice, and so on. A pole — a point where f(z) blows up to infinity — looks like the same rainbow convergence point, but with brightness rushing to white or black instead of staying moderate, which is how the eye tells a zero from a pole at a glance even though both scramble every hue into one point.
Why the colours swirl the way they do
For f(z) = z, domain colouring is just the identity: colour equals angle from the origin, a plain colour wheel. For f(z) = z² the output angle is double the input angle (since arg(z²) = 2·arg(z)), so the colour wheel appears to wrap around the origin twice as you go once around it — the picture literally shows you the map's local winding number. This is the geometric content of conformal mapping: away from zeros and poles, a holomorphic (complex-differentiable) function preserves angles between intersecting curves, even though it can stretch and rotate them, and domain colouring makes that angle-preservation visible as smoothly varying, non-crossing colour bands rather than jagged discontinuities.
Branch cuts: where the picture is forced to tear
Some natural complex functions, like √z or log z, are not single-valued: going once around the origin multiplies √z by −1 (since arguments add as √(re^{iθ}) = √r·e^{iθ/2}, and θ → θ + 2π sends θ/2 → θ/2 + π), so the function does not return to its starting value after a full loop. To draw a well-defined picture, you have to make a branch cut — an artificial line the domain is forbidden to cross — which shows up in a domain-colouring plot as a sharp, visible discontinuity in colour across a chosen ray or curve, even though the underlying function is perfectly smooth on either side of the cut. The cut's location is a choice, not a property of the function itself; moving it moves the visible seam without changing any of the function's real analytic behaviour elsewhere.
Which functions reward a look
exp z is periodic in the imaginary direction (period 2πi), so its picture repeats in horizontal bands as you move up the imaginary axis. sin z and cos z are entire (no poles anywhere) but unbounded off the real axis, so their brightness grows rapidly away from the real line while their zeros sit exactly at the familiar real roots. 1/z has a single simple pole at the origin and nothing else, the cleanest possible picture of what a pole looks like. Rational functions like (z²−1)/(z²+1) show zeros and poles side by side, and the Riemann zeta function's domain-colouring plot is how the visual hunt for its nontrivial zeros — the heart of the still-unsolved Riemann hypothesis — is usually illustrated.
Frequently asked questions
What do the colours in a domain-colouring plot actually mean?
Hue encodes the phase (argument) of the complex output f(z), cycling once around a colour wheel as the phase sweeps through a full turn. Brightness (or a secondary ring/grid pattern) encodes the magnitude of f(z), so you can read off both pieces of complex output information from one flat picture.
Why do all the colours meet at certain points?
Those points are the zeros and poles of the function. Near a zero the output shrinks toward 0, whose phase is undefined, so every hue in the wheel appears in an arbitrarily small ring around it; near a pole the output blows up and the same rainbow convergence happens with brightness rushing to white instead.
Why does the picture have a sharp seam for functions like square root or logarithm?
Those functions are multi-valued — going once around the origin does not bring you back to the same output — so a well-defined single-valued picture requires an artificial branch cut, a line the plot cannot cross without a colour jump. The cut's position is a drawing choice, not a real feature of the function.
Try it live
Everything above runs in your browser — open Complex Functions and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.
▶ Open Complex Functions simulation