Skip to content

Complex Analysis

Analytic functions, conformal maps, and the residue theorem — calculus where every derivative is a rotation

1. Why complex numbers?

Here is a puzzle that real calculus cannot answer. The function is perfectly smooth for every real x, yet its Taylor series around 0 stops working at |x| = 1. And the integral has no elementary antiderivative, yet it equals exactly π/e. Both answers are invisible on the real line and almost obvious in the complex plane.

A complex number z = x + iy is just a point in the plane, but multiplication gives it a superpower: multiplying by z = reiθ scales by r and rotates by θ. That is the same “rotate and scale” family of matrices you met in the Linear Algebra lesson, written as a single number.

Polar form & Euler’s formula

Engineers meet this everywhere: phasors in AC circuits, the poles of a transfer function, the exponentials inside Fourier and Laplace transforms, 2D fluid and electric fields. This chapter explains why complex functions behave so much more nicely than real ones.

Try it

What does multiplying by do to the point (2, 1)? Compute and describe it geometrically.

2. Functions as maps — and as colours

A real function has a graph. A complex function f takes a point of the plane to a point of the plane, so its graph would live in four dimensions. Instead we colour the input plane: give each z a hue equal to the direction of f(z), and brighten or darken it with the size of f(z). Zeros and poles then jump out as points where all the colours meet.

Walk once around a small loop (dashed) and watch the output curve on the right. Around a zero of order n the output winds n times counter-clockwise; around a pole of order n it winds n times clockwise. Count the colour cycles and you have counted the zeros and poles — that is the argument principle.

Argument principle (winding form)
Try it

Look at the colours around the origin for . How many times does the colour wheel repeat, and in which direction?

3. Analytic functions & the Cauchy–Riemann equations

The derivative looks identical to the real one — but now the increment h is a complex number, so it can approach zero from any direction in the plane. For the limit to exist, all those directions must agree.

Complex derivative

Now make the agreement precise. Write f = u + iv and approach z₀ along the real axis (h = t), then along the imaginary axis (h = it):

Both must be the same complex number, so the real and imaginary parts match. These are the Cauchy–Riemann equations:

Cauchy–Riemann

A function that is complex differentiable at every point of an open region is called analytic (or holomorphic) there. Differentiate the CR equations once more and the real and imaginary parts each satisfy Laplace’s equation — the same steady-state equation from the PDE chapter:

Real and imaginary parts are harmonic

Worked example: which of z², e^z and z̄ are analytic?

f = z². Here z² = (x² − y²) + i(2xy), so u = x² − y², v = 2xy. Then ux = 2x = vy and uy = −2y = −vx. Both CR equations hold everywhere: analytic.

f = eᶻ. With u = eˣcos y and v = eˣsin y: ux = eˣcos y = vy and uy = −eˣsin y = −vx. Analytic everywhere, and f′ = ux + ivx = eᶻ.

f = z̄ = x − iy. Here u = x, v = −y, so ux = 1 but vy = −1. The first CR equation fails at every point: nowhere analytic — exactly what the animation showed.

Try it

Is analytic anywhere? Check the CR equations.

4. Conformal maps: every derivative is a rotation

Since f′(z₀) is a single complex number, near z₀ the function behaves like a straight multiplication:

Local picture

Multiplying by f′(z₀) rotates by φ and scales by |f′(z₀)|, the same for every direction. So a tiny shape keeps its shape, and the angle between any two curves is preserved. Such maps are called conformal. Scrub the story below and watch the yellow square: whatever the map does to the grid, the square only turns and grows.

Worked example: where does 1/z send a circle?

Take the circle |z − 1| = 1, which passes through the origin. Under w = 1/z, the points z = 2, 1 + i and 1 − i go to w = 1/2, (1 − i)/2 and (1 + i)/2 — all with real part 1/2.

So the whole circle becomes the vertical line Re w = 1/2. The circle passed through the pole at 0, which is sent to infinity: a circle through the pole turns into a line. (A circle not through 0 stays a circle.)

Try it

At which points is not conformal, and what happens to angles there?

5. Contour integrals & Cauchy’s theorem

To integrate along a curve C, parametrize it as z(t) and substitute — the chain rule supplies the dz:

Contour integral

The most important example: around the unit circle z = eit (so dz = ieitdt), the integral of zⁿ is ∫ i·ei(n+1)t dt over [0, 2π]. That is 0 for every integer n except n = −1, where the integrand is the constant i:

The one integral to remember

Cauchy’s theorem: if f is analytic everywhere inside and on a closed loop C, then ∮C f dz = 0. Break the integral into real and imaginary parts, apply Green’s theorem (from the Multivariable Calculus chapter), and the Cauchy–Riemann equations make everything cancel. Its sibling is the integral formula:

Cauchy’s integral formula

The values of f inside the loop are completely determined by its values on the loop. Differentiating under the integral shows f is infinitely differentiable, and it explains the opening puzzle: a Taylor series converges in the largest disk that avoids the singularities. For 1/(1 + x²) the singularities are z = ±i, at distance 1 from the origin — so the radius of convergence is exactly 1.

Worked example: why “analytic” is not optional

Integrate z and z̄ around the unit circle, with z = eit:

z̄ has no singularity anywhere, yet its integral is not zero — because it is not analytic. In general ∮ z̄ dz = 2i × (area enclosed), a first hint of Green’s theorem hiding in the complex plane.

Try it

Evaluate and .

6. Residues: turning hard integrals into algebra

Near an isolated singularity a, a function has a Laurent series — a Taylor series that also allows negative powers. Integrating term by term, every power vanishes around a small loop except the 1/(z − a) term, by the one integral from the last section. Its coefficient is the residue:

Laurent series & residue
Residue theorem

You rarely expand a Laurent series. For a simple pole and for a pole of order m, use:

Computing residues

If f = g/h with h(a) = 0 and h′(a) ≠ 0, the simple-pole residue is just g(a)/h′(a).

Real integrals by closing the contour

To compute ∫ f(x) dx over the whole real line, close the line with a big semicircle in the upper half-plane. If f decays faster than 1/|z|, the arc contributes nothing as R → ∞, and the real integral equals 2πi times the sum of residues in the upper half-plane. Watch it happen for 1/(1 + x²):

Worked example 1: ∫ dx/(1+x²) = π

The poles of 1/(1 + z²) = 1/((z − i)(z + i)) are ±i. Only z = i is in the upper half-plane, with residue . Therefore

Check with the real antiderivative: [arctan x] from −∞ to ∞ = π/2 − (−π/2) = π ✓.

Worked example 2: a double pole, ∫ dx/(1+x²)² = π/2

Now z = i is a pole of order 2: f = 1/((z − i)²(z + i)²). Use the order-2 formula with g(z) = (z + i)⁻²:

Worked example 3: ∫ cos x/(1+x²) dx = π/e

Use eiz/(1 + z²), whose real part on the real axis is cos x/(1 + x²). In the upper half-plane eiz decays, so the arc still vanishes (Jordan’s lemma). The residue at z = i is:

The imaginary part, ∫ sin x/(1 + x²) dx, is zero by symmetry. This is also the Fourier transform of 1/(1 + t²) from the Fourier chapter: πe−|ω| at ω = 1.

Worked example 4: a trigonometric integral, ∫₀^2π dθ/(2 + cos θ)

Put z = eiθ: then dθ = dz/(iz) and cos θ = (z + 1/z)/2, turning the integral into a loop around |z| = 1:

The roots of z² + 4z + 1 are −2 ± √3. Only z₊ = −2 + √3 ≈ −0.27 lies inside the unit circle, and its residue is 2/(i(z₊ − z₋)) = 2/(2√3 i) = 1/(√3 i). Hence

Try it

Find the residue of at z = 0, then evaluate .

7. Practice & where it shows up

Worked example: inverse Laplace transform by residues

The Bromwich formula writes f(t) as a contour integral of F(s)est; closing to the left collects the poles of F. For F(s) = 1/((s + 1)(s + 2)):

That matches what partial fractions give in the Laplace chapter: each pole at s = −a contributes a term e−at. Poles in the left half-plane decay — which is exactly stability.

Try it: radius of convergence

Without computing any coefficients, what is the radius of convergence of the Taylor series of about z = 0?

Inverting Laplace transforms

The Bromwich integral is a contour integral: f(t) is the sum of the residues of F(s)eˢᵗ at the poles of F. Partial fractions are the same idea in disguise.

Fluid flow & electrostatics

A 2D potential flow or electric field is the real part of an analytic function; conformal maps reshape a hard domain (an airfoil) into an easy one (a circle).

Stability of systems

Poles of a transfer function decide stability. Counting them inside a contour is the argument principle — the basis of the Nyquist criterion.

Hard real integrals & sums

Integrals over the whole real line, trigonometric integrals, and even infinite series like Σ1/n² can be evaluated with residues.

8. Resources

This chapter follows MIT 18.04 (complex variables) and the complex-analysis block of 18.075. Orloff’s 18.04 notes are free and especially good on residues; the 3Blue1Brown videos show analytic functions as moving pictures.

Site soundtrack