Line integrals in the complex plane

A complex function can be evaluated pointwise, but the next natural question is how to integrate it along a path winding through the plane. That question — the complex line (contour) integral — is the single construction that unlocks Cauchy's Integral Theorem, Cauchy's Integral Formula, and residue calculus later in Unit 5 of MA10001. It sits right after differentiability, analyticity, and the Cauchy-Riemann equations, and it needs nothing beyond parametrizing a curve z(t)=x(t)+iy(t)z(t)=x(t)+iy(t) and evaluating an ordinary real definite integral. This is not the vector-calculus line integral of a vector field — that machinery is out of scope here. Instead a contour integral is built entirely from real integrals of real and imaginary parts, and its most famous instance, ∮∣z∣=1dz/z=2πi\oint_{|z|=1}dz/z = 2\pi i, is the seed of everything that follows in the unit.

The core insight

The contour integral ∫Cf(z) dz\int_C f(z)\,dz is defined by substituting a parametrization z(t)z(t) into ff and multiplying by z′(t) dtz'(t)\,dt, turning it into an ordinary real definite integral over t∈[a,b]t\in[a,b].

The core idea

Let CC be a piecewise-smooth curve in C\mathbb{C}, parametrized as z(t)=x(t)+iy(t)z(t) = x(t) + iy(t) for t∈[a,b]t\in[a,b], with z(a)z(a) the starting point and z(b)z(b) the ending point. For f(z)=u(x,y)+iv(x,y)f(z) = u(x,y) + iv(x,y) continuous on CC, the complex line integral is

∫Cf(z) dz=∫abf(z(t)) z′(t) dt,\int_C f(z)\, dz = \int_a^b f\big(z(t)\big)\, z'(t)\, dt,

where: z′(t)=x′(t)+iy′(t)z'(t) = x'(t) + iy'(t) is the tangent velocity of the parametrization, and the right-hand side is computed by ordinary real-variable calculus once f(z(t))z′(t)f(z(t))z'(t) is expanded into a single complex-valued function of the real variable tt. Expanding into real and imaginary parts shows the same integral can be written as a pair of real line integrals,

∫Cf(z) dz=∫C(u dx−v dy)+i∫C(v dx+u dy),\int_C f(z)\,dz = \int_C (u\,dx - v\,dy) + i\int_C (v\,dx + u\,dy),

but in practice the parametrization route ∫abf(z(t))z′(t) dt\int_a^b f(z(t))z'(t)\,dt is the standard computational tool, and it is the one used throughout this article. Three properties, inherited directly from the ordinary real integral, are used constantly: linearity, ∫C[αf+βg] dz=α∫Cf dz+β∫Cg dz\int_C[\alpha f + \beta g]\,dz = \alpha\int_C f\,dz + \beta\int_C g\,dz; orientation reversal, ∫−Cf dz=−∫Cf dz\int_{-C} f\,dz = -\int_C f\,dz, where −C-C is CC traversed backwards; and additivity over sub-arcs, ∫Cf dz=∫C1f dz+∫C2f dz\int_C f\,dz = \int_{C_1} f\,dz + \int_{C_2} f\,dz when C=C1+C2C = C_1 + C_2. A fourth tool, the ML-inequality, bounds the integral without computing it: if ∣f(z)∣≤M|f(z)|\le M on CC and CC has length LL, then

∣∫Cf(z) dz∣≤ML.\left|\int_C f(z)\,dz\right| \le ML.

It follows from bounding ∣f(z(t))z′(t)∣|f(z(t))z'(t)| pointwise and applying the triangle inequality for integrals, and it is the standard device for showing a contour integral vanishes in a limit — a technique reused heavily once residue calculus evaluates real integrals via contours later in the unit. A crucial early fact is that ∫Cf(z) dz\int_C f(z)\,dz can genuinely depend on the path CC joining two fixed endpoints, not just on the endpoints themselves — path-independence is a special property tied to analyticity, and it is developed fully in the very next topic, Cauchy's Integral Theorem.

Figure
A curve C in the complex plane parametrized by z of t from a to b showing the tangent vector z prime of t at a sample point
Parametrizing a contour C by z(t), t in [a,b] Re(z) Im(z) z(a) z(b) z(t) z'(t)
Derivation AReducing a contour integral to a real definite integral

The goal is to show, starting only from the definition of ∫Cf(z) dz\int_C f(z)\,dz as a limit of Riemann-type sums along CC, that once a parametrization z(t)z(t) of CC is chosen, the contour integral collapses exactly to the ordinary real definite integral ∫abf(z(t))z′(t) dt\int_a^b f(z(t))z'(t)\,dt, which is what makes every contour integral computable with first-year calculus.

Step 1. Partition the curve. Choose points z0=z(a),z1,…,zn=z(b)z_0=z(a), z_1, \dots, z_n=z(b) along CC, corresponding to a partition a=t0<t1<⋯<tn=ba=t_0<t_1<\dots<t_n=b of the parameter interval, and pick a sample point ζk\zeta_k on the sub-arc between zk−1z_{k-1} and zkz_k. The defining Riemann sum for the contour integral is ∑k=1nf(ζk)(zk−zk−1)\sum_{k=1}^n f(\zeta_k)(z_k - z_{k-1}).

Step 2. Rewrite each increment using the parametrization. Since zk=z(tk)z_k = z(t_k), the mean value theorem applied separately to x(t)x(t) and y(t)y(t) gives zk−zk−1≈z′(tk)(tk−tk−1)z_k - z_{k-1} \approx z'(t_k)(t_k - t_{k-1}) for a fine partition, because z′(t)=x′(t)+iy′(t)z'(t) = x'(t)+iy'(t) is exactly the rate at which the point z(t)z(t) moves as tt increases.

Step 3. Substitute back into the sum. Writing ζk=z(τk)\zeta_k = z(\tau_k) for some τk\tau_k in the kk-th sub-interval, the sum becomes ∑k=1nf(z(τk)) z′(τk) (tk−tk−1)\sum_{k=1}^n f(z(\tau_k))\,z'(\tau_k)\,(t_k - t_{k-1}), which is precisely a Riemann sum for the ordinary real-variable function g(t)=f(z(t))z′(t)g(t) = f(z(t))z'(t) over [a,b][a,b].

Step 4. Take the limit. As the partition is refined, the left side converges to ∫Cf(z) dz\int_C f(z)\,dz by definition, and the right side converges to ∫abf(z(t))z′(t) dt\int_a^b f(z(t))z'(t)\,dt because g(t)g(t) is continuous (a continuous ff composed with the continuous, piecewise-smooth z(t)z(t), times the piecewise-continuous z′(t)z'(t)). Equating the two limits gives ∫Cf(z) dz=∫abf(z(t))z′(t) dt\int_C f(z)\,dz = \int_a^b f(z(t))z'(t)\,dt, exactly the working formula used in every computation below.

Worked example

Problem. Evaluate ∫Cz2 dz\displaystyle\int_C z^2\, dz where CC is the straight-line segment from z=0z=0 to z=1+iz=1+i, and separately evaluate ∮C1z dz\displaystyle\oint_C \frac{1}{z}\,dz where CC is the unit circle ∣z∣=1|z|=1 traversed once counter-clockwise.

Step 1. Parametrize the segment as z(t)=t(1+i)z(t) = t(1+i), t∈[0,1]t\in[0,1], so z(0)=0z(0)=0, z(1)=1+iz(1)=1+i, and z′(t)=1+iz'(t)=1+i. Then z(t)2=t2(1+i)2=t2(2i)=2it2z(t)^2 = t^2(1+i)^2 = t^2(2i) = 2it^2, since (1+i)2=1+2i−1=2i(1+i)^2 = 1+2i-1 = 2i.

Step 2. Apply the reduction formula from the derivation: ∫Cz2 dz=∫012it2⋅(1+i) dt=2i(1+i)∫01t2 dt=2i(1+i)⋅13=2i(1+i)3=2i−23=−23+23i\int_C z^2\,dz = \int_0^1 2it^2\cdot(1+i)\,dt = 2i(1+i)\int_0^1 t^2\,dt = 2i(1+i)\cdot\tfrac13 = \tfrac{2i(1+i)}{3} = \tfrac{2i-2}{3} = -\tfrac23 + \tfrac23 i.

Step 3. Sanity-check using the antiderivative. Because z2z^2 is analytic everywhere, this integral can also be computed as [z33]01+i=(1+i)33\left[\tfrac{z^3}{3}\right]_0^{1+i} = \tfrac{(1+i)^3}{3}, and (1+i)3=(1+i)(2i)=2i−2(1+i)^3=(1+i)(2i)=2i-2, giving the same −23+23i-\tfrac23+\tfrac23 i — consistent with z2z^2 possessing an antiderivative on all of C\mathbb{C}.

Step 4. Now the circle: parametrize CC by z(t)=eitz(t)=e^{it}, t∈[0,2π]t\in[0,2\pi], so z′(t)=ieitz'(t)=ie^{it}, and 1z(t)⋅z′(t)=ieiteit=i\tfrac{1}{z(t)}\cdot z'(t) = \tfrac{ie^{it}}{e^{it}} = i, a constant. So ∮C1z dz=∫02πi dt=2πi\oint_C \tfrac1z\,dz = \int_0^{2\pi} i\,dt = 2\pi i.

The answers are: ∫Cz2 dz=−23+23i\int_C z^2\,dz = -\dfrac23+\dfrac23 i on the segment to 1+i1+i, and ∮∣z∣=1dzz=2πi\displaystyle\oint_{|z|=1}\dfrac{dz}{z}=2\pi i.

Competitive stretch

Bound ∣∫Cz2 dz∣\left|\int_C z^2\,dz\right| for the same segment using only the ML-inequality, without computing the integral. On CC, ∣z∣≤2|z|\le\sqrt2 (the farthest point is 1+i1+i), so ∣f(z)∣=∣z∣2≤M=2|f(z)|=|z|^2\le M=2; the segment has length L=∣1+i∣=2L=|1+i|=\sqrt2. The ML-inequality gives ∣∫Cz2 dz∣≤ML=22≈2.83\left|\int_C z^2\,dz\right|\le ML = 2\sqrt2 \approx 2.83. Checking against the exact value: ∣−23+23i∣=232≈0.94\left|-\tfrac23+\tfrac23 i\right| = \tfrac23\sqrt2 \approx 0.94, comfortably below the bound — as it must be, since ML only ever gives an upper estimate, never the exact answer.

Common traps

  • Treating dzdz like dxdx. Always substitute z(t)z(t) into ff and multiply by z′(t) dtz'(t)\,dt, never just dtdt — dropping z′(t)z'(t) is the single most common arithmetic slip.
  • Assuming every contour integral is path-independent. The unit-circle example shows a non-analytic-at-a-point integrand giving a nonzero closed-loop integral; path-independence is guaranteed only under Cauchy's Integral Theorem's hypotheses, covered next.
  • Sign errors from orientation. Reversing the direction of traversal flips the sign of the whole integral; fix and state the direction (usually counter-clockwise for closed contours) before parametrizing.
  • Misusing ML as an equality. The ML-inequality gives only an upper bound ∣∫Cf dz∣≤ML|\int_C f\,dz|\le ML, useful for showing an integral is small or vanishes in a limit — never for computing the exact value, as the competitive stretch above makes explicit.

Ask the tutor: if parametrizing curves other than straight segments and full circles (semicircular arcs, quarter-arcs, or paths made of several joined pieces) feels unfamiliar, ask the AI tutor to walk through a few more contour setups before moving on to Cauchy's Integral Theorem.

Why does the contour integral of 1/z around the unit circle come out to 2 pi i instead of zero?

Because 1/z1/z is not analytic at z=0z=0, which lies inside the circle CC encloses. Cauchy's Integral Theorem (the next topic) guarantees a contour integral is zero only when the integrand is analytic everywhere inside and on CC — that hypothesis fails here precisely at the enclosed singularity. The nonzero value 2πi2\pi i is not a fluke; it is the first instance of residue calculus, where the residue of 1/z1/z at z=0z=0 is 11 and the integral equals 2πi2\pi i times that residue.

Do I always have to parametrize a curve before integrating, or are there shortcuts?

Parametrization is the universal method and the one this article relies on, but when the integrand is analytic on a simply connected region containing CC, you can instead use an antiderivative and evaluate it at the endpoints, exactly as the sanity-check for ∫Cz2 dz\int_C z^2\,dz did with z33\tfrac{z^3}{3}. That shortcut only works when an antiderivative exists, which is not guaranteed in general — 1/z1/z near z=0z=0 is the standard counterexample, so parametrization remains the fallback that always works.

What is the difference between this and the line integral of a vector field from vector calculus?

They look similar but are built differently. The vector-calculus line integral integrates a vector field's component along a curve using dot products, and it is explicitly out of scope for this course. The complex contour integral instead multiplies the complex function value f(z(t))f(z(t)) by the complex tangent z′(t)z'(t), and both pieces are complex numbers — the result mixes real and imaginary parts through complex multiplication, not a dot product. They can be related through the real-and-imaginary-part decomposition shown in the core idea section, but you should treat the contour integral as its own self-contained construction for this unit.

Before this

Where this leads