Conformal Maps

AI authored to showcase ironpad capabilities.

Introduction

A conformal map is a function that preserves angles between curves at every point where it is defined. In complex analysis, any holomorphic (complex-differentiable) function f(z) is conformal wherever its derivative f'(z) \neq 0.

What "Angle-Preserving" Means

If two curves cross at a point z_0 forming angle \theta, their images under f cross at f(z_0) at the same angle \theta. The curves may be stretched, compressed, or bent, but the angle at each intersection is preserved.

The word to hold onto is locally. Zoom far enough into any point and a conformal map stops looking like a warp: it becomes a rotation composed with a uniform scaling. Both preserve angles, so the composition does too, and that is the entire theorem in one breath. The rest of this notebook is watching that local fact play out globally, as the rotation angle and scale factor drift from point to point and a straight grid bends into parabolas, polar webs, and (eventually) an airfoil.

Why Holomorphic Implies Conformal

A holomorphic function f acts locally like multiplication by f'(z_0), which is a nonzero complex number. Concretely, for a small displacement h,

f(z_0 + h) \approx f(z_0) + f'(z_0) \, h

Multiplying by a complex number r e^{i\alpha} scales by r and rotates by \alpha; neither operation changes the angle between two vectors. The load-bearing detail is that r and \alpha are the same for every direction h points: steps east and north get the same rotation and the same stretch, so the angle between them survives the trip. When f'(z_0) = 0, the linear term vanishes, the local behavior is degenerate, and angles can be multiplied (e.g., f(z) = z^2 doubles angles at the origin).

This Notebook

Each visualization below shows:

  • Left panel: A rectangular grid in the input domain (horizontal lines in warm colors, vertical lines in cool colors)
  • Right panel: The same grid after transformation by f(z)

Horizontal and vertical lines meet at 90° in the input. Under a conformal map, the transformed curves, even though they may be warped, still cross at 90° everywhere f'(z) \neq 0.

The Cauchy-Riemann Equations, Visually

The rotate-plus-scale claim is worth one more level of detail. Split f into real and imaginary parts, f(x + iy) = u(x, y) + i \, v(x, y), and forget complex numbers for a moment: this is a map from \mathbb{R}^2 to \mathbb{R}^2, and its local behavior is a 2 \times 2 Jacobian:

J = \begin{pmatrix} u_x & u_y \\ v_x & v_y \end{pmatrix}

A generic Jacobian has 4 independent entries and can shear a tiny square into a parallelogram, stretch one axis 3x more than the other, or flip orientation. None of those preserve angles. Complex differentiability outlaws all of them. The Cauchy-Riemann equations

u_x = v_y, \qquad u_y = -v_x

cut the 4 degrees of freedom down to 2 and force the Jacobian into one specific shape:

J = \begin{pmatrix} a & -b \\ b & a \end{pmatrix} = r \begin{pmatrix} \cos\alpha & -\sin\alpha \\ \sin\alpha & \cos\alpha \end{pmatrix}, \qquad r = \sqrt{a^2 + b^2}

That is a rotation by \alpha composed with a uniform scaling by r: precisely the two angle-preserving linear maps and nothing else. "Holomorphic" is precisely the statement that the local linearization is multiplication by the complex number a + bi = f'(z).

For a mental model of what fails without the constraint: conjugation, which is smooth everywhere as a real map and holomorphic nowhere.

// Not a real cell: this map is anti-conformal, not conformal.
// Its Jacobian is (1, 0 / 0, -1), a reflection. u_x = 1 but v_y = -1,
// so Cauchy-Riemann fails at every single point.
let conj = |re: f64, im: f64| (re, -im);

A reflection preserves the magnitude of angles but flips their orientation: a counterclockwise 30° crossing comes out clockwise. Maps like this are called anti-conformal; every picture in this notebook comes from the conformal kind.

The claim is also checkable numerically. The cell below takes f(z) = z^2 at z_0 = 1 + i, where f'(z_0) = 2 + 2i: every tiny displacement should scale by |2 + 2i| = 2\sqrt{2} \approx 2.8284 and rotate by 45°, regardless of direction. Four directions, one prediction:

Derivative as Rotate + Scale

How to Read the Pictures

Every figure below is the same experiment run on a different function. The left panel shows a rectangular grid: 11 horizontal lines in warm colors (dark red at the bottom fading to yellow at the top), 11 vertical lines in cool colors (blue on the left fading to cyan on the right), 121 intersections, every crossing exactly 90°. The right panel is what f does to that grid. Two habits make the pictures legible.

Look at crossings, not curves. The grid lines themselves bend, sometimes sharply. That is allowed; conformality promises nothing about curvature, which is a global effect. Its promise is local: wherever a warm curve meets a cool curve in the right panel, the tangent directions at the crossing are perpendicular, everywhere except where f' = 0.

Think checkerboard, not lines. The grid chops the input domain into small squares. A conformal map sends each tiny square to a tiny square: rotated, scaled, but never sheared into a lozenge or squashed into a brick. Distant squares can land at wildly different sizes and orientations (that is the global warping doing its work), but each individual square keeps its square-ness. This is the sharpest visual test available: any region of the right panel where the little quadrilaterals stop looking square is either a critical point or a rendering artifact.

Scaling and Rotation: f(z) = az, a = 2e^{i\pi/4}

The simplest conformal map: multiplication by a constant a = 2e^{i\pi/4}.

  • Geometric effect: Every point is scaled by |a| = 2 (distances double) and rotated by \arg(a) = \pi/4 = 45\degree.
  • Derivative: f'(z) = a \neq 0 everywhere, so the map is conformal on the entire plane.
  • Grid behavior: Straight lines stay straight. The grid is uniformly scaled and rotated: a rigid similarity transformation. Angles are trivially preserved because the transformation is linear.

This is the "base case": every holomorphic function looks like this locally (at non-critical points).

The picture is almost boring, and that is the point: magnify any figure below around any point z_0 and you will find a small copy of this exact transformation with a = f'(z_0).

f(z) = az

Squaring: f(z) = z^2

  • Geometric effect: Squares the modulus (|z|^2) and doubles the argument (2\arg z). Circles centered at the origin map to circles; rays from the origin map to rays at double the angle.
  • Derivative: f'(z) = 2z, which vanishes at z = 0. Conformality breaks down at the origin; angles there are doubled rather than preserved.
  • Grid behavior: Horizontal and vertical lines map to parabolas. Away from the origin, these parabolas still cross at right angles. Near the origin, the grid lines pinch together and the angle-doubling is visible.

The right panel shows the characteristic parabolic grid of z^2. The transformed curves still meet at 90° everywhere except at the image of the origin.

After the figure, a numeric check: the next cell sends two rays 40° apart through z^2, anchored first at regular points and then at the origin. The finite-difference measurement returns 40° to three decimals away from the origin, and exactly 80° at it: f'(0) = 0 doing precisely what the linearization predicts.

f(z) = z^2
Angle Doubling at the Critical Point

Exponential: f(z) = e^z

  • Geometric effect: e^{x+iy} = e^x(\cos y + i\sin y). Horizontal lines (constant y) map to rays from the origin at angle y. Vertical lines (constant x) map to circles of radius e^x. The rectangular grid becomes a polar grid.
  • Derivative: f'(z) = e^z \neq 0 for all z, so the map is conformal everywhere.
  • Domain: We use [-2, 2] \times [-\pi, \pi] so the imaginary axis covers one full period.

The right panel shows the classic rectangular-to-polar transformation. Every intersection in the polar grid maintains a perfect 90° crossing: rays and circles are always perpendicular.

Keep this map in mind: it is one half of the exp/log pair behind the Mercator projection at the end of the notebook.

f(z) = e^z

Logarithm: f(z) = \ln(z) (principal branch)

  • Geometric effect: The inverse of the exponential. \ln(z) = \ln|z| + i\arg(z). Circles centered at the origin map to vertical lines, and rays from the origin map to horizontal lines. A polar grid becomes rectangular, the exact reverse of e^z.
  • Derivative: f'(z) = 1/z, which is nonzero for all z \neq 0. Conformal everywhere except the origin.
  • Branch cut: The principal branch has a discontinuity along the negative real axis. We restrict the domain to [0.2, 3] \times [-2.5, 2.5] (right half-plane) to avoid the branch cut and the singularity at z = 0.

The output grid is nearly rectangular: the logarithm "straightens" the radial structure of the input domain.

Cartography hides here in plain sight: up to the stereographic step that flattens the globe, the Mercator projection is exactly this map. More on that at the end.

f(z) = ln(z)

Complex Sine: f(z) = \sin(z)

  • Geometric effect: \sin(x + iy) = \sin(x)\cosh(y) + i\cos(x)\sinh(y). Vertical lines (constant x) map to hyperbolas, and horizontal lines (constant y) map to ellipses. These conic sections share foci at \pm 1 on the real axis.
  • Derivative: f'(z) = \cos(z), which vanishes at z = \pm\pi/2 + n\pi. Conformality breaks down at these critical points.
  • Domain: [-\pi, \pi] \times [-2, 2] covers one full period in the real direction.

The output shows the confocal ellipse/hyperbola grid. Near z = \pm\pi/2 (where \cos(z) = 0), the grid lines pinch together and angles are distorted.

If you have met confocal elliptic coordinates in an electrostatics course, this figure is where they come from.

f(z) = sin(z)

Möbius Transformation: f(z) = \frac{z - 1}{z + 1}

Möbius transformations (linear fractional transformations) are the most important conformal maps in complex analysis. They map circles and lines to circles and lines.

  • Geometric effect: This particular Möbius map sends z = 1 \mapsto 0, z = -1 \mapsto \infty, and z = 0 \mapsto -1. It maps the right half-plane to the unit disk.
  • Derivative: f'(z) = \frac{2}{(z+1)^2}, which is nonzero for all z \neq -1. Conformal everywhere except the pole.
  • Key property: Möbius transformations are the only bijective conformal maps of the Riemann sphere to itself.

Near z = -1 (the pole), grid lines blow up to infinity. The percentile-based scaling prevents these outliers from dominating the visualization. The transformed grid lines curve but always maintain 90° crossings.

Two more properties worth knowing:

  • Three points determine the map. A Möbius transformation is pinned down completely by where it sends any three points. Need the upper half-plane mapped onto the unit disk? Pick three boundary points, choose their targets, done.
  • They compose like matrices. f(z) = \frac{az+b}{cz+d} corresponds to \begin{pmatrix} a & b \\ c & d \end{pmatrix}, and composition is matrix multiplication; Möbius maps form a group.

The circles-to-circles claim is strong enough to deserve a test. Two cells down, we push 360 points of several circles through the map, fit a circle to just 3 of the image points, and measure how far the other 357 stray from it. The answer lands at machine epsilon.

f(z) = (z-1)/(z+1)
Circles Map to Circles

The Joukowski Map: f(z) = z + \frac{1}{z}

This is the map that connected complex analysis to aeronautics. The Joukowski transformation takes the exterior of a circle to the exterior of a wing-shaped curve, and it earned its keep in the early 1900s by turning "flow around an airfoil", which nobody could solve directly, into "flow around a cylinder", which every textbook could.

The mechanics:

  • The unit circle |z| = 1 maps to the segment [-2, 2] on the real axis: the circle collapses flat, because f(e^{i\theta}) = 2\cos\theta.
  • A circle slightly larger than the unit circle, offset so it still passes through z = 1, maps to a closed curve with a rounded nose on one end and a sharp cusp on the other: an airfoil profile.
  • The cusp appears because f'(z) = 1 - 1/z^2 vanishes at z = \pm 1. The point z = 1 sits on our circle, so conformality fails exactly there, and the smooth circle acquires a sharp trailing edge. A critical point, placed deliberately, doing useful work.

The cell below draws the offset circle (warm) and the unit circle (cool) on the left, and their images on the right: the airfoil and the flat segment it wraps around. Move the circle's center and the airfoil changes camber and thickness; this two-parameter family was a practical wing catalog for early aerodynamicists. The closing section puts that to work: flow solutions transfer through conformal maps, so solving the cylinder solves the wing.

f(z) = z + 1/z

Where Conformal Maps Earn Their Keep

The airfoil is the celebrated case, but the same trick pays out anywhere the physics reduces to Laplace's equation, \nabla^2 \phi = 0, because harmonic functions stay harmonic under conformal maps. That single invariance turns hard geometry into easy geometry.

Fluid flow. Ideal (incompressible, irrotational) flow has a velocity potential satisfying Laplace's equation. Solving it around a cylinder is a textbook exercise; solving it around a wing directly is not. The Joukowski program: solve around the cylinder, apply the conformal map, and the streamlines, pressure field, and circulation transfer intact. The Kutta-Joukowski theorem then reads lift straight off the circulation. Early aerodynamics ran on this pipeline for decades before numerical solvers existed.

Cartography. The Mercator projection is a conformal map from the sphere (minus the poles) to the plane, and its construction is literally two maps from this notebook: stereographic projection followed by the complex logarithm. Conformality is why navigators kept it for 400+ years: a constant compass bearing becomes a straight line on the chart, so plotting a course is drawing a line and reading one angle. The cost is the standard trade: angles preserved, areas not. Greenland renders around 14x its true relative size, and the poles are pushed to infinity, exactly like the branch behavior of \ln(z). No flat map of a sphere keeps both; conformal projections pick the currency navigation cares about.

Electrostatics and heat. Same equation, same trick: potentials in charge-free regions and steady-state temperatures are harmonic, so an awkward capacitor or heat-sink cross-section gets mapped onto a strip or a disk, solved there, and mapped back. The confocal ellipse grid from the \sin(z) figure is precisely the field pattern around a charged flat strip.

The through-line is the fact from the top of the notebook. A conformal map is invisible up close: rotate, scale, nothing else. Physics that only cares about local angles and harmonic structure cannot tell the original domain from the mapped one, so you get to solve every problem in whichever domain makes it trivial.