Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand, Chinese Proverb

A complex function $f(z)$ maps $z = x + iy \in \mathbb{C}$ to another complex number. For example: $f(z) = z^2 = (x + iy)^2 = x^2 - y^2 + 2ixy, f(z) = \frac{1}{z}, f(z) = \sqrt{z^2 + 7}$.
A contour is a continuous, piecewise-smooth curve defined parametrically as: $z(t) = x(t) + iy(t), \quad a \leq t \leq b$.
Definition (Smooth Contour Integral). Let ᵞ be a smooth contour (a continuously differentiable path in the complex plane), $\gamma: [a, b] \to \mathbb{C}$. Let $f: \gamma^* \to \mathbb{C}$ be a continuous complex-valued function defined on the trace $\gamma^*$ of the contour (i.e. along the image of $\gamma$). Then, the contour integral of f along $\gamma$ is defined as $\int_{\gamma} f(z)dz := \int_{a}^{b} f(\gamma(t)) \gamma^{'}(t)dt$.

Deformation of Contours. If two contours $\gamma_1$ and $\gamma_2 $ are homotopic (i.e., one can be continuously deformed into the other without crossing any singularities of f) in a domain where f(z) is analytic, then: $\int_{\gamma_1} f(z)dz = \int_{\gamma_2} f(z)dz.$
Fundamental Theorem of Calculus for Contours. Suppose $\gamma$ is a contour (piecewise smooth path) from a to b, f is defined on a domain D containing $\gamma^*$ (the image of $\gamma$) and admits a primitive (antiderivative) F on D (i.e., $F'(z) = f(z)$), then $\int_{\gamma} f(z)dz = F(\gamma(b)) - F(\gamma(a))$. In particular, if $\gamma$ is a closed contour (i.e., $\gamma(a)=\gamma(b)$), this integral evaluates to zero, $\int_{\gamma} f(z)dz = 0.$
Estimation Theorem or the Triangle Inequality for Integrals. The triangle inequality for integrals in complex analysis states thatfor any continuous complex function $f:[a,b] \to \mathbb{C}$ on a closed real interval [a,b] (f(t) = u(t) + iv(t), t a real parameter), the following holds: $∣\int_a^b f(t)dt| \leq \int_a^b |f(t)|dt$.
Estimation Lemma (ML Inequality) for contour integrals. For any continuous complex function $f:[a,b] \to \mathbb{C}$ on a closed real interval [a,b] (f(z) = u(x, y) + iv(x, y)) with f bounded by some constant M along the entire contour, |f(z)| ≤ M for all $z \in \gamma^*$ (the image/trace of the contour in the complex plane), the following holds: $∣\int_\gamma f(z)dz| \leq M \cdot l(\gamma)$ where l(γ) is the arc length of the contour γ given by $\int_a^b |\gamma^{'}(t)|dt = \int_a^b \sqrt{x'(t)^2 + y'(t)^2} \text{ where } \gamma(t) = x(t) + iy(t)$.
Jordan’s curve theorem. Any simple closed curve (a continuous loop in the plane that does not intersect itself) separates the plane into two disjoint connected regions: one interior (bounded) and one exterior (unbounded). The curve itself is the boundary of both regions. In other words, it partitions the plane into exactly three disjoint sets:
Cauchy’s theorem (Classical “Green’s theorem” version). Let $\Omega \subset \mathbb{C}$ be an open domain. Suppose f = u + iv is analytic in $\Omega$ and its partial derivatives ( $u_x,u_y,v_x,v_y$) are continuous in $\Omega$. If $\gamma$ is a positively oriented, piecewise-smooth $C^1$, simple closed contour with $\gamma^* \cup \operatorname{Int}(\gamma) \subset \Omega$ (its path and interior both lie inside Ω), then $\oint_{\gamma} f(z)dz = 0.$
Cauchy’s Theorem (Cauchy–Goursat). This is the more powerful version, as it removes the need for continuous partial derivatives. If f is analytic in an open set containing a simple closed contour γ and its interior $\gamma^*\cup\operatorname{Int}(\gamma)$, then $\oint_{\gamma} f(z)dz = 0$.
Definition. A domain in complex analysis is a nonempty open (for every point $z_0$ in the set, there exists some radius r > 0 such that the open disk $D(z_0, r) = \{z : |z - z_0| < r\}$ is entirely contained in the set) connected (the set cannot be split into two disjoint nonempty open subsets) subset of $\mathbb{C}$.
Definition. A domain (an open, connected set) is simply connected if it has no holes (a “nice,” solid region). You can’t draw a closed loop inside it that circles around a point that is not in the domain. More formally, every simple closed curve (a loop that doesn't cross itself) within the domain can be continuously shrunk to a single point without ever leaving the domain.
Examples: the entire complex plane, $\mathbb{C}$; any disk (e.g., $\{z \in \mathbb{C} : |z| < 1\}$); a half-plane (e.g., the right half-plane $\{z \in \mathbb{C} : \text{Re}(z) > 0\}$); the interior of any simple closed curve (like a square or a circle).
Definition. A domain is multiply connected if it is not simply connected, i.e., it has at least one “hole.”. More formally, there exists at least one simple closed curve in the domain that cannot be continuously shrunk to a single point while staying within the domain. The curve will get stuck around a hole.
Examples: An annulus (a ring, the region between two circles), like $\{z \in \mathbb{C} : 1 < |z| < 3\}$ (any loop that winds around 0, e.g., the circle |z| = 2, cannot be shrunk to a point while staying within the domain); a punctured disk, like $\{z \in \mathbb{C} : 0 < |z| < 1\}$ (a disk with the center point removed). This has one hole (a “puncture”); the complex plane with several points removed, e.g., $\mathbb{C} \setminus \{0, 1\}$
Cauchy’s Theorem for simply connected domains. If a function f is analytic (a function that is complex-differentiable at every point within a domain, i.e., well-behaved and smooth, with no sharp corners, breaks, or singularities like division by zero) throughout a simply simple connected domain D then $\oint_C f(z)dz = 0$ for every closed contour C lying in D.
A simply simple connected domain D has no holes, every simple closed contour C lying entirely in D can be shrunk to a point without any part of it ever leaving the domain, e.g., the entire complex plane $\mathbb{C}$, the interior of a circle, and the upper half-plane. Counterexamples: an annulus (a disk with a smaller disk removed from its center), or the complex plane with the origin removed $D = \mathbb{C} \setminus \{0\}$.
Proof.
Case 1. If C is a simple close contour (a path that starts and ends at the same point but never crosses itself, e.g, a circle, an ellipse, or a distorted rectangle) lying entirely within the simply connected domain D.
Because D is simply connected (it has no holes), and the curve C lies completely within D, the entire region bounded by C (its interior) must also lie completely within D. There is no “hole” in D that the interior of C could possibly contain.
Recall, the Cauchy-Goursat theorem. If a function f is analytic at all points interior to and on a simple closed contour, then the integral of f around that contour is zero.
Since all conditions of the Cauchy-Goursat theorem are met, we can directly apply its conclusion: $\oint_C f(z)dz = 0$
Case 2. If C is closed but self-intersecting contour, meaning a path that starts and ends at the same point but crosses itself a finite number of times, e.g., a figure-eight.
The core idea is to show that the integral over the complex path is just the sum of the integrals over a set of simple closed paths. We can then apply the result from Case 1 to each simple path.
Let’s consider a figure-eight contour, which intersects itself once at a point $A$. This contour can be viewed as two separate simple closed loops, let’s call them $C_1$ (the left loop) and $C_2$ (the right loop). The original contour $C$ traverses these loops. For example, it might traverse $C_1$ counter-clockwise and then $C_2$ counter-clockwise.
Let the path segment that is shared during the intersection be denoted by the line from $A$ to $B$ (in reality, the intersection might just be a single point). When we calculate the integral over the full contour $C$, we travel along this shared segment in one direction for the first loop and in the opposite direction for the second loop, so the integrals over the shared path cancel out (a fundamental property of contour integrals is that reversing the direction of integration negates the value) and the integral over the entire self-intersecting contour $C$ is the sum of integrals over the simple loops $C_1$ and $C_2: \oint_C f(z)dz = \oint_{C_1} f(z)dz + \oint_{C_2} f(z)dz =[\text{ Case 1 }] 0 + 0 = 0.$
This logic can be extended to a contour $C$ with any finite number of intersections. It can always be decomposed into a finite number of simple closed contours ($C_1, C_2, \ldots, C_n$), and the integral over $C$ will be the sum of the integrals over each $C_k$. Since every individual integral is zero, according to the Cauchy-Goursat theorem, the total sum is zero: $\oint_C f(z)dz = \sum_{k=1}^n \oint_{C_k} f(z)dz = 0$
