Complex Functions

Explore elementary complex functions with stunning domain coloring visualizations

Visualizing Complex Functions

Complex functions map the complex plane to itself: f: ℂ → ℂ. Unlike real functions that we can graph as curves, complex functions need a different visualization technique.

Enter domain coloring: we encode the output using color! The hue represents the phase (argument) and the brightness represents the magnitude. This creates stunning visualizations that reveal the structure of complex functions.

Demo 1: Function Explorer with Domain Coloring

Input any complex function and watch it come alive with domain coloring! Color hue shows the phase (argument), while brightness shows the magnitude. Zeros appear black, poles appear white.

f(z) = z²
Squaring doubles angles and squares magnitudes
Color Guide:
Zeros (|f(z)| = 0)
Poles (|f(z)| → ∞)
Hue (color) = arg(f(z)) • Brightness = log(1 + |f(z)|)

🎨 How to Read Domain Coloring:

Each point in the plot represents an input value z. The color at that point shows the output f(z):

  • Color hue (red, yellow, green, etc.) shows the phase/argument of f(z)
  • Brightness (light vs dark) shows the magnitude of f(z)
  • Black regions are zeros where f(z) = 0
  • White regions are poles where f(z) → ∞

Notice how colors cycle around zeros and poles, revealing the function's structure!

Demo 2: Elementary Functions Gallery

Explore the most important complex functions: exponential, trigonometric, logarithm, and power functions. Each has unique and beautiful structure revealed by domain coloring.

Click any function to see it in detail:

📚 Elementary Functions:

These are the fundamental building blocks of complex analysis. Each has unique properties revealed by domain coloring. Notice patterns like:

  • Zeros appear as black points where colors converge
  • Poles appear as white points where colors radiate
  • Colors cycling around a point indicate the winding number

Demo 3: Polynomial Root Finder

Find and visualize all roots of a polynomial. The Fundamental Theorem of Algebra guarantees that a degree-n polynomial has exactly n roots (counting multiplicity) in the complex plane.

p(z) = z² - 1
Two real roots: ±1
Degree: 2 • Roots: 2

Domain Coloring of p(z)

Black points show zeros where p(z) = 0

Roots in the Complex Plane

Orange points show the 2 roots

All Roots (Cartesian Form):

Root 1:1.000
Root 2:-1.000

📐 Fundamental Theorem of Algebra:

Every non-constant polynomial of degree n has exactly n roots in the complex numbers (counting multiplicity). This is why complex numbers are called algebraically closed!

Example: The polynomial z² - 1 has degree 2, so it must have exactly 2 roots.

🎨 Domain Coloring Insight:

Notice how colors cycle around each zero in the domain coloring plot. The number of times colors wrap around indicates the multiplicity of the root. Simple roots have colors wrapping once.

Demo 4: Branch Cuts & Multi-valued Functions

Functions like log(z) and √z are multi-valued - they have multiple possible outputs for each input. We use branch cuts to make them single-valued. See the discontinuity along the negative real axis!

Natural Logarithm: f(z) = log(z)
The inverse of the exponential function
Branch Cut: Negative real axis (θ = π)

Domain Coloring - Notice the Discontinuity!

The sharp color discontinuity along the negative real axis is the branch cut

🔍 What You're Seeing:

Look carefully at the negative real axis (left side of the plot). Notice the sharp discontinuity where colors abruptly jump from one value to another.

This discontinuity is the branch cut - a line where we artificially make the function single-valued.

🌀 Why Multi-valued?

The logarithm is multi-valued because ez is periodic with period 2πi. This means:

log(z) = log|z| + i·arg(z) + 2πik for any integer k

We choose the principal branch where -π < arg(z) ≤ π, creating a discontinuity at arg(z) = π (the negative real axis).

⚠️ Branch Cuts Are Necessary:

Without branch cuts, these functions would be discontinuous everywhere (technically, they wouldn't be functions at all!). The branch cut is a trade-off: we accept one line of discontinuity to have a single-valued function everywhere else.

Advanced: The full picture involves Riemann surfaces, where multi-valued functions become single-valued on a multi-sheeted surface!

🎨 Beautiful Mathematics!

You've discovered the power of domain coloring! You now understand:

  • How to visualize complex functions using color
  • The structure of elementary functions (exp, sin, log)
  • How to find polynomial roots in the complex plane
  • Why branch cuts are necessary for multi-valued functions

Next: We'll explore complex differentiability and the Cauchy-Riemann equations!