z = 0 + 0i
Rendering…

About Complex Function Visualiser

A complex function f(z) takes a complex number z = x + iy as input and returns another complex number. Because both input and output are two-dimensional, a complete graph would require four spatial dimensions — so mathematicians use "domain colouring": the output value is represented by colour (hue encodes the argument, or angle, of f(z)) and brightness (encodes the modulus |f(z)|). This technique, pioneered by Frank Farris and popularised by Elias Wegert, reveals the global structure of a function at a glance: zeros appear as dark spots where all hues converge, poles as bright points with hues spiralling in reverse, and branch cuts as sharp colour discontinuities.

You can enter any expression in z (using standard notation for sin, exp, log, and arithmetic), pan and zoom the complex plane, and optionally overlay contour lines for constant modulus or constant argument. The visualiser handles multi-valued functions and lets you explore the Riemann sheet structure interactively.

Frequently Asked Questions

What is domain colouring?

Domain colouring maps each point z in the complex plane to a colour determined by f(z). The most common convention assigns hue = arg(f(z)) (red for 0°, yellow for 60°, green for 120°, cyan for 180°, blue for 240°, magenta for 300°) and brightness proportional to log|f(z)| so that each order of magnitude corresponds to one brightness cycle. This produces the distinctive "colour wheel" patterns around every zero and pole.

How do you identify a zero from the plot?

A zero of order n appears as a dark point where all hues meet and wind around exactly n times counterclockwise. The winding number — how many times the colour wheel completes as you circle the point — equals the order of the zero. A simple zero (n=1) shows one complete colour cycle; a double zero (n=2) shows two cycles, so the hues rotate twice before returning to the starting colour.

What does a pole look like in domain colouring?

A pole of order n appears as an extremely bright point where the hues wind clockwise n times (opposite to a zero). Near a simple pole the modulus grows without bound, so the brightness saturates to white, and the colour rotates once in the negative (clockwise) direction. Poles of higher order show multiple clockwise rotations of the hue wheel, making their order visually identifiable.

What is a branch cut, and why does it appear?

A branch cut is a line in the complex plane where a multi-valued function such as log(z) or z^(1/2) is made artificially single-valued by declaring one branch as the "principal value". In domain colouring it shows up as a sharp discontinuity in hue — colours jump abruptly from one value to its mirror across the cut. The conventional branch cut for log(z) runs along the negative real axis; the principal value of arg(z) lies in (-π, π].

What is the Cauchy-Riemann condition?

A complex function f = u + iv is complex-differentiable (holomorphic) at a point if and only if its real and imaginary parts satisfy ∂u/∂x = ∂v/∂y and ∂u/∂y = −∂v/∂x. This is the Cauchy-Riemann equation. In domain colouring, holomorphic regions are distinguished by smooth, conformally distorted colour patterns; non-analytic functions (like |z| or Re(z)) produce colour fields that violate the Cauchy-Riemann symmetry and look "torn".

What does the Riemann zeta function look like?

The Riemann zeta function ζ(s) has a single pole at s = 1 (a bright white point with clockwise hue rotation) and infinitely many zeros believed to lie on the critical line Re(s) = 1/2 (the Riemann Hypothesis). In domain colouring the zeros appear as dark points where hues converge counterclockwise. The first non-trivial zero is at s ≈ 0.5 + 14.135i — a striking dark spot visible when the plot is zoomed to that region.

What is conformal mapping?

A conformal map is a complex function that preserves angles locally — small shapes are rotated and scaled but not sheared. Any holomorphic function with a non-zero derivative is conformal. Engineers exploit this to transform complex fluid flow or electrostatics problems in irregular domains into simpler geometries: a flow around a cylinder can be mapped to uniform flow, and then mapped back, giving an exact analytic solution for the pressure distribution around an aerofoil.

What is the fundamental theorem of algebra in this context?

The fundamental theorem of algebra states that every non-constant polynomial of degree n has exactly n complex zeros (counted with multiplicity). In domain colouring, this means every degree-n polynomial plot must show exactly n dark points (zeros) where the hue winds counterclockwise, assuming the viewing window is large enough. Counting the winding provides a visual proof of the theorem for any specific polynomial you enter.

How are complex exponentials visualised?

The function e𝑧 = eẋ⋅e^(iy) has modulus eẋ (depends only on the real part) and argument y (depends only on the imaginary part). In domain colouring, horizontal stripes of equal brightness (constant modulus) run vertically, while the hue repeats every 2π in the vertical (imaginary) direction. The function has no zeros or poles in the finite plane — it is an entire function — but it has essential singularities at infinity.

What is the relationship between domain colouring and Newton fractals?

Newton's method for finding complex roots of a polynomial zⁿ − c = 0 assigns each starting point to the root it converges to, producing the Newton fractal. If domain colouring is used to colour convergence basins, the result is a richly structured fractal boundary (Julia set structure) between basins. This is one of the most striking visual applications of complex function theory, revealing that even simple root-finding is geometrically intricate.