Imagine you are watching a satellite orbit the Earth. From your vantage point at the centre, the satellite traces a closed path in the sky. After one full orbit, it has gone around you exactly once. But what if the orbit is more complicated — perhaps the satellite weaves in and out, crossing its own path, doubling back? How many times has it truly gone around you? This question, deceptively simple to ask, leads to one of the most fundamental invariants in complex analysis: the *winding number*.
The winding number formalises the intuitive notion of "how many times a closed curve encircles a point." Its power becomes apparent when you realise that this purely topological-looking quantity is computable via a contour integral, and that its value governs which functions can be integrated over which contours, whether a given point lies inside or outside a curve, and — through the argument principle — how many zeros and poles a meromorphic function has inside a region. The winding number is the invisible integer that organises all of residue theory.
[example: A Figure-Eight Does Not Enclose Points Uniformly]
Consider the figure-eight curve $\gamma: [0, 2\pi] \to \mathbb{C}$ given by $\gamma(t) = \sin(t) + i\sin(2t)/2$. This curve crosses itself at the origin and traces two loops, one traversed counterclockwise and one clockwise. A point inside the upper loop, say $z_0 = 0.3i$, is encircled once counterclockwise. A point inside the lower loop, say $z_1 = -0.3i$, is encircled once clockwise — that is, with winding number $-1$. But the origin itself, through which the curve passes, is neither strictly inside nor outside either loop in the naive sense.
This example already shows that "inside" and "outside" are not binary concepts for general closed curves. Different points can be surrounded different numbers of times, and the sign carries meaning: counterclockwise is positive, clockwise is negative.
To verify: as $t$ increases from $0$ to $\pi$, the curve $\gamma$ traces the upper loop counterclockwise. For $z_0 = 0.3i$, the vector $\gamma(t) - z_0$ starts pointing roughly rightward, rotates counterclockwise through a full turn, and returns to its starting direction — one full positive rotation, so $n(\gamma, 0.3i) = +1$. As $t$ increases from $\pi$ to $2\pi$, the curve traces the lower loop clockwise. For $z_1 = -0.3i$, the vector $\gamma(t) - z_1$ rotates clockwise through a full turn, giving $n(\gamma, -0.3i) = -1$. Neither loop winds around the other loop's interior point, so the outside of each loop contributes zero net rotation.
[/example]
## Definition
Before giving the formal definition, let us think about what we need to measure. Given a closed curve $\gamma$ and a point $z_0$ not on $\gamma$, we want to count the net number of times $\gamma$ winds around $z_0$. The key idea is to track the argument of $\gamma(t) - z_0$ as $t$ runs from the start to the end of $\gamma$. Since $\gamma$ is closed, this argument returns to its starting value modulo $2\pi$, and the integer multiple of $2\pi$ that it has accumulated is the winding number.
To make this rigorous, we use the contour integral. The expression $\frac{1}{z - z_0}$ is holomorphic away from $z_0$, and its integral over a closed curve detects how many times that curve goes around $z_0$ — this is precisely what the residue theorem will later tell us, but we can define the winding number directly from the integral without invoking residues.
[definition: Winding Number]
Let $\gamma: [a, b] \to \mathbb{C}$ be a piecewise $C^1$ closed curve, so that $\gamma(a) = \gamma(b)$. Let $z_0 \in \mathbb{C} \setminus \operatorname{im}(\gamma)$. The **winding number** of $\gamma$ around $z_0$ is the integer
\begin{align*}
n(\gamma, z_0) &= \frac{1}{2\pi i} \oint_\gamma \frac{dz}{z - z_0}.
\end{align*}
[/definition]
That $n(\gamma, z_0)$ is always an integer requires proof. Writing $\gamma(t) - z_0 = r(t) e^{i\theta(t)}$ for a continuous choice of argument $\theta(t)$, the integral becomes
\begin{align*}
\frac{1}{2\pi i} \int_a^b \frac{\gamma'(t)}{\gamma(t) - z_0}\, dt &= \frac{1}{2\pi i} \int_a^b \left(\frac{r'(t)}{r(t)} + i\theta'(t)\right) dt \\
&= \frac{1}{2\pi i}\left[\log r(t)\right]_a^b + \frac{\theta(b) - \theta(a)}{2\pi}.
\end{align*}
Since $\gamma$ is closed, $r(a) = r(b)$, so the first term vanishes. The second term is $(\theta(b) - \theta(a))/(2\pi)$, which counts the net number of full rotations of the argument. This is an integer because the curve is closed and the argument returns to the same value modulo $2\pi$.
[remark: Orientation Convention]
Throughout this page, curves are traversed with their specified orientation. The standard orientation for a circle is counterclockwise, which gives winding number $+1$ for points in the interior. Reversing the curve — writing $-\gamma$ for the curve traversed in the opposite direction — negates the winding number: $n(-\gamma, z_0) = -n(\gamma, z_0)$.
[/remark]
The simplest and most important case to compute directly is the unit circle: it confirms that the integral definition matches the intuitive count of one full revolution.
[example: Winding Number of a Circle]
Let $\gamma_r: [0, 2\pi] \to \mathbb{C}$ be the circle of radius $r > 0$ centred at $a \in \mathbb{C}$, parametrised counterclockwise:
\begin{align*}
\gamma_r(t) &= a + r e^{it}, \quad t \in [0, 2\pi].
\end{align*}
For $z_0 = a$ (the centre), we compute:
\begin{align*}
n(\gamma_r, a) &= \frac{1}{2\pi i} \oint_{\gamma_r} \frac{dz}{z - a} = \frac{1}{2\pi i} \int_0^{2\pi} \frac{i r e^{it}}{r e^{it}}\, dt = \frac{1}{2\pi i} \int_0^{2\pi} i\, dt = \frac{1}{2\pi i} \cdot 2\pi i = 1.
\end{align*}
For $z_0$ with $|z_0 - a| > r$ (outside the circle), the function $\frac{1}{z - z_0}$ is holomorphic on the closed disk $\overline{B}(a, r)$, so by Cauchy's theorem the integral is zero: $n(\gamma_r, z_0) = 0$.
These two computations — winding number $1$ inside, winding number $0$ outside — are the prototype for the general theory.
[/example]
## Topological Nature of the Winding Number
The winding number is not just an analytic quantity — it is a topological invariant of the pair $(\gamma, z_0)$. This means it does not change under deformations of the curve that avoid the point $z_0$. Understanding why this is so explains why the winding number is such a robust concept.
The key topological fact is that the function $z_0 \mapsto n(\gamma, z_0)$ is locally constant on $\mathbb{C} \setminus \operatorname{im}(\gamma)$. This is what allows us to speak of the winding number of a curve around a *region*, not just a single point.
[quotetheorem:3360]
This theorem formalises the idea that winding number changes only when the point crosses the curve. Within a connected region of the complement, every point sees the same net encircling behavior. The unbounded component is the outside region: points very far away are not enclosed by the curve, so their winding number is zero throughout that whole outside component.
[illustration:winding-number-local-constancy]
[explanation: Why the Outside Region Has Winding Number Zero]
The vanishing result for the unbounded component is worth dwelling on because it captures the ordinary meaning of "outside." If $z_0$ is very far from the curve $\gamma$, then from the perspective of $z_0$ the curve looks tiny and cannot surround it. Local constancy then propagates that outside value across the entire unbounded component of the complement. Thus winding number separates the plane into regions labelled by integers, with the far-away region always labelled $0$.
[/explanation]
The invariance of the winding number under homotopy is the deeper topological statement. Local constancy tells us what happens when the point moves; now we need the corresponding statement for when the curve itself moves. Two closed curves are *homotopic relative to $z_0$* if one can be continuously deformed into the other without passing through $z_0$. The next theorem says that this deformation cannot change the integer winding count, so winding number becomes a genuine invariant of the curve's homotopy class in the punctured plane.
[quotetheorem:3361]
This theorem explains why the winding number is the correct invariant for classifying closed curves in $\mathbb{C} \setminus \{z_0\}$. The map that sends a closed curve $\gamma$ to its winding number $n(\gamma, z_0)$ descends to a well-defined homomorphism from the fundamental group of $\mathbb{C} \setminus \{z_0\}$ to $\mathbb{Z}$, and homotopy invariance is what makes this well-defined. Whether this map is an isomorphism — that is, whether every integer arises as a winding number and whether two curves with the same winding number must be homotopic — is a separate structural fact about the topology of the punctured plane.
## Winding Number and Cauchy's Integral Formula
The winding number's analytic power crystallises in its role as the coefficient in Cauchy's integral formula. The standard version of the formula — for a point inside a disk bounded by a circle — is just a special case of a much more general statement where the "inside" is precisely captured by the winding number.
When a function $f: \Omega \to \mathbb{C}$ is holomorphic on an open set $\Omega$, and $\gamma$ is a closed curve in $\Omega$ whose winding number around every point outside $\Omega$ is zero, then $\gamma$ behaves, for integration purposes, as if it bounds a region inside $\Omega$. In the theorem statement, $\gamma^*$ denotes the image traced out by the curve $\gamma$, so points in $\Omega \setminus \gamma^*$ are points of the domain not lying on the contour itself. The general form of Cauchy's integral formula reflects this:
[quotetheorem:3362]
The condition that $n(\gamma, z_0) = 0$ for all $z_0 \notin \Omega$ is called the *homological condition*: it says that $\gamma$ does not wind around any singularity or point outside the domain. When this condition holds, $\gamma$ is said to be *homologous to zero* in $\Omega$, written $\gamma \sim 0$ in $\Omega$.
[remark: The Classical Formula as a Special Case]
When $\Omega$ is the open disk $B(a, r)$ and $\gamma$ is the circle $\partial B(a, \rho)$ for $\rho < r$, traversed counterclockwise, then $n(\gamma, a) = 1$ and the general formula reduces to
\begin{align*}
f(a) &= \frac{1}{2\pi i} \oint_\gamma \frac{f(z)}{z - a}\, dz,
\end{align*}
which is the classical Cauchy integral formula. The winding number $n(\gamma, a) = 1$ is what produces the denominator $1$ on the left side.
[/remark]
This generalization matters because real analysis is full of non-simply-connected domains — annuli, domains with holes, multiply-connected regions — where the naive Cauchy formula fails. In an annulus $\{z : r < |z| < R\}$, a curve can wind around the inner hole without leaving the domain. The general Cauchy formula, phrased in terms of winding numbers, handles all these cases uniformly.
## The Argument Principle
The most spectacular application of the winding number is the argument principle, which connects the winding number of the image of a curve to the number of zeros and poles of a meromorphic function inside that curve. This connection between analysis (zeros and poles) and topology (winding numbers) is one of the deepest results in the subject.
The setup: let $f: \Omega \to \mathbb{C}$ be meromorphic on an open set $\Omega$, and let $\gamma$ be a piecewise $C^1$ closed curve in $\Omega$ that avoids the zeros and poles of $f$. As $z$ traverses $\gamma$, the image $f(z)$ traces a closed curve $f \circ \gamma$ in $\mathbb{C} \setminus \{0\}$. How many times does $f \circ \gamma$ wind around the origin?
[quotetheorem:3359]
When $\gamma$ is a simple closed curve traversed counterclockwise — so $n(\gamma, a)$ is either $0$ or $1$ for each point $a$ — the formula simplifies to
\begin{align*}
n(f \circ \gamma, 0) &= Z - P,
\end{align*}
where $Z$ is the number of zeros of $f$ inside $\gamma$ (counted with multiplicity) and $P$ is the number of poles (counted with multiplicity). The winding number of the image curve around the origin is the net count of zeros minus poles.
[explanation: Why the Argument Principle is Called the Argument Principle]
The name comes from tracking the *argument* (the angle) of $f(z)$ as $z$ traverses $\gamma$. The winding number $n(f \circ \gamma, 0)$ counts how many full $2\pi$ rotations the argument of $f$ accumulates:
\begin{align*}
n(f \circ \gamma, 0) &= \frac{1}{2\pi} \cdot \Delta_\gamma \arg(f),
\end{align*}
where $\Delta_\gamma \arg(f)$ denotes the total change in argument of $f$ as $z$ traverses $\gamma$. Near a zero of order $m$, the function $f(z) \approx c(z-a)^m$ contributes $m$ full counterclockwise rotations to the argument; near a pole of order $m$, it contributes $m$ full clockwise rotations. These contributions sum to $Z - P$.
The logarithmic derivative is the analytic device that makes this geometric picture computable. It converts multiplicative behavior of $f$ near zeros and poles into additive contributions to a contour integral. The argument principle packages those local contributions into one global integer: the winding number of the image curve around the origin.
[/explanation]
The argument principle becomes a practical counting tool when combined with a concrete polynomial. The following example shows how to track the winding number of the image curve directly, reading off the zero count with no further work.
[example: Counting Zeros of a Polynomial on a Circle]
Let $f(z) = z^3 + 2z^2 - 1$. We count how many zeros of $f$ lie inside the circle $|z| = 2$. By the argument principle,
\begin{align*}
n(f \circ \gamma, 0) &= \frac{1}{2\pi i} \oint_\gamma \frac{f'(z)}{f(z)}\, dz = \frac{1}{2\pi i} \oint_\gamma \frac{3z^2 + 4z}{z^3 + 2z^2 - 1}\, dz,
\end{align*}
where $\gamma(t) = 2e^{it}$, $t \in [0, 2\pi]$. Rather than computing the integral directly, we track the argument of $f(2e^{it})$ as $t$ runs from $0$ to $2\pi$.
At $t = 0$: $f(2) = 8 + 8 - 1 = 15$, with argument $0$.
At $t = \pi/2$: $f(2i) = (2i)^3 + 2(2i)^2 - 1 = -8i - 8 - 1 = -9 - 8i$, with argument $\approx -2.42$ (third quadrant).
At $t = \pi$: $f(-2) = -8 + 8 - 1 = -1$, with argument $\pi$.
At $t = 3\pi/2$: $f(-2i) = (-2i)^3 + 2(-2i)^2 - 1 = 8i - 8 - 1 = -9 + 8i$, with argument $\approx 2.42$ (second quadrant).
At $t = 2\pi$: $f(2) = 15$, with argument $0$ again.
Following the argument continuously: it starts at $0$, decreases through the third quadrant, crosses $-\pi$ near $t = \pi$, continues decreasing through the second quadrant (from $+\pi$ side after crossing), and returns to $0$ having completed three full clockwise... let us be careful. The argument goes $0 \to \approx -2.42 \to -\pi$ (approaching from below) then jumps to $+\pi$ and continues to $\approx +2.42 \to 2\pi$ then wraps back to $0$. The total accumulated change is $+2\pi \cdot 3$: the image curve winds three times counterclockwise around the origin.
Therefore $n(f \circ \gamma, 0) = 3$, and $f$ has exactly three zeros inside $|z| = 2$ (counted with multiplicity). Since $f$ is a degree-three polynomial, all three of its zeros lie in the disk $|z| < 2$. We can verify this is consistent: $f(0) = -1 < 0$ and $f(1) = 1 + 2 - 1 = 2 > 0$, so there is a real zero between $0$ and $1$. Near $z = -1$: $f(-1) = -1 + 2 - 1 = 0$ exactly, so $z = -1$ is a zero. Factoring: $f(z) = (z+1)(z^2 + z - 1)$, with $z^2 + z - 1 = 0$ giving $z = (-1 \pm \sqrt{5})/2$. The roots are $z = -1$, $z \approx 0.618$, and $z \approx -1.618$ — all with modulus less than $2$, confirming the argument principle count.
[/example]
## Rouché's Theorem
The argument principle implies a remarkable result that lets us count zeros by comparison with a simpler function. The idea: if one function dominates another on a curve, the total winding numbers of their sum and the dominating function around the origin are the same.
To see why this should be true geometrically: if $|h(z)| < |g(z)|$ on $\gamma$, then $f = g + h$ never points in the opposite direction from $g$. The image curve $f \circ \gamma$ is a perturbation of $g \circ \gamma$ that never crosses the origin, so the two curves have the same winding number around zero.
[quotetheorem:357]
The geometric intuition behind Rouché's theorem is worth sitting with before the computation: if $h$ is strictly dominated by $f$ on the curve, the perturbation $g = f + h$ cannot swing the image past the origin, so no zeros are created or destroyed. A clean application demonstrates the theorem in action.
[example: Zeros of a Perturbed Polynomial by Rouché]
Let $g(z) = z^5 + 3z + 1$. We count the zeros of $g$ inside the circle $|z| = 2$.
On $|z| = 2$, take $f(z) = z^5$ (the dominant term). Then $h(z) = g(z) - f(z) = 3z + 1$. We verify the Rouché condition:
\begin{align*}
|h(z)| &= |3z + 1| \le 3|z| + 1 = 3(2) + 1 = 7.
\end{align*}
\begin{align*}
|f(z)| &= |z^5| = 2^5 = 32.
\end{align*}
Since $7 < 32$, the condition $|h(z)| < |f(z)|$ holds on $|z| = 2$. By Rouché's theorem, $g$ and $f(z) = z^5$ have the same number of zeros inside $|z| = 2$. The function $z^5$ has exactly $5$ zeros at the origin (with multiplicity $5$), so $g(z) = z^5 + 3z + 1$ has exactly $5$ zeros inside $|z| = 2$.
Now count the zeros inside $|z| = 1$. On $|z| = 1$, take $f(z) = 3z$ and $h(z) = z^5 + 1$:
\begin{align*}
|h(z)| &= |z^5 + 1| \le |z|^5 + 1 = 1 + 1 = 2.
\end{align*}
\begin{align*}
|f(z)| &= 3|z| = 3.
\end{align*}
Since $2 < 3$, Rouché applies: $g$ has the same number of zeros inside $|z| = 1$ as $f(z) = 3z$, which has exactly $1$ zero (at the origin). So $g$ has exactly $1$ zero inside the unit disk and $4$ zeros in the annulus $1 < |z| < 2$.
[/example]
## Winding Number and Simply Connected Domains
The examples so far have all taken place on open sets where Cauchy's theorem applied without qualification: disks, the whole plane, explicitly described regions. But what is the essential geometric property that makes Cauchy's theorem work? Is it that the domain is convex? Star-shaped? Something weaker? To see what can fail, consider the punctured plane $\mathbb{C} \setminus \{0\}$. The function $f(z) = 1/z$ is holomorphic there, yet the circle $\gamma(t) = e^{it}$ satisfies $\oint_\gamma dz/z = 2\pi i \neq 0$, and $1/z$ has no antiderivative on $\mathbb{C} \setminus \{0\}$. The culprit is the hole at the origin: the circle winds around it once, and that single nonzero winding number is precisely what prevents Cauchy's theorem from applying. Any domain with such a hole — a region that a curve can encircle while staying inside the domain — will suffer the same failure. The concept of simple connectivity isolates exactly this obstruction.
[definition: Simply Connected Domain]
An open connected set $\Omega \subset \mathbb{C}$ is **simply connected** if every piecewise $C^1$ closed curve $\gamma$ in $\Omega$ satisfies $n(\gamma, z_0) = 0$ for all $z_0 \in \mathbb{C} \setminus \Omega$.
[/definition]
This is the analytic definition. The topological definition — that $\pi_1(\Omega) = \{e\}$, meaning every loop is contractible — is equivalent for open subsets of $\mathbb{C}$, but the winding number formulation is more immediately useful for analysis.
The significance of simple connectivity is that it removes the winding obstruction entirely. In a simply connected domain, closed curves cannot trap a missing point outside the domain, so the integral of a holomorphic function around any closed curve should vanish. The next theorem records the analytic payoff: simple connectivity is exactly the common setting where Cauchy's theorem and global antiderivatives require no extra homological hypotheses.
[quotetheorem:344]
The connection to winding numbers is direct: in a simply connected domain, every closed curve $\gamma$ has $n(\gamma, z_0) = 0$ for all $z_0 \notin \Omega$. This means $\gamma$ is homologous to zero in $\Omega$, and the general Cauchy theorem applies.
[example: Failure in Doubly Connected Domains]
The function $f(z) = 1/z$ is holomorphic on the punctured plane $\mathbb{C} \setminus \{0\}$, which is *not* simply connected. The circle $\gamma(t) = e^{it}$, $t \in [0, 2\pi]$, winds once around the origin:
\begin{align*}
\oint_\gamma \frac{dz}{z} &= 2\pi i \neq 0.
\end{align*}
No antiderivative of $1/z$ exists on all of $\mathbb{C} \setminus \{0\}$: any branch of $\log z$ is discontinuous somewhere on every circle around the origin. The failure of Cauchy's theorem here is not accidental — it is precisely because $n(\gamma, 0) = 1 \neq 0$ and $0 \notin \mathbb{C} \setminus \{0\}$ means the winding number condition fails.
In the slit plane $\mathbb{C} \setminus (-\infty, 0]$, which *is* simply connected, the principal branch of $\log z$ is a well-defined antiderivative of $1/z$, and Cauchy's theorem applies to any closed curve inside this domain.
[/example]
The winding-number language also distinguishes two related ideas: contractibility and null-homology. Contractibility asks whether a loop can be shrunk to a point; null-homology asks whether the loop has no net winding against closed holomorphic $1$-forms. For contour integration, the homological condition is the one Cauchy's theorem sees. The next theorem characterises that condition exactly in terms of winding numbers around points outside the domain.
[quotetheorem:3363]
This claim captures why winding numbers are the right invariant for contour integration in planar domains. A curve is invisible to all closed holomorphic $1$-forms precisely when it has zero winding number around every point outside the domain. That is the exact condition needed for the homological versions of Cauchy's theorem and the general Cauchy integral formula.
## References
Lars V. Ahlfors, *Complex Analysis* (1979).
John B. Conway, *Functions of One Complex Variable I* (1978).
Elias M. Stein and Rami Shakarchi, *Complex Analysis* (2003).
Walter Rudin, *Real and Complex Analysis* (1987).