Get AI summaries of any video or article — Sign up free
How (and why) to take a logarithm of an image thumbnail

How (and why) to take a logarithm of an image

3Blue1Brown·
6 min read

Based on 3Blue1Brown's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.

TL;DR

Escher’s “Print Gallery” loop can be recreated by applying a complex logarithm to a self-similar (Drosta) image, then rotating/scaling the resulting doubly periodic tiling, and finally applying an exponential.

Briefing

M.C. Escher’s “Print Gallery” (1956) works like a visual paradox: a viewer can walk a continuous loop while the scene “zooms” deeper and deeper, yet the local geometry stays recognizable. The core finding behind the piece’s construction is that the loop can be recreated by translating the artwork into complex-number geometry—specifically by taking a logarithm to convert a self-similar zoom into a doubly periodic tiling, then rotating/scaling that tiling, and finally applying an exponential to map it back into a warped, conformal scene.

The ambiguity at the center of Escher’s lithograph—where a blank circular region forces the viewer to decide what “space” they’re in—turns out not to be a random artistic flourish. It’s the natural consequence of how the nested “Drosta effect” zoom is encoded. Escher’s scene contains a picture inside a picture inside a picture, repeating at a fixed zoom factor; in the Print Gallery, the self-similar copy is 256 times smaller. The viewer’s gaze around the loop effectively performs that zoom implicitly, so the “where am I?” question collapses into a single geometric transition.

To unpack how this happens, the analysis referenced in the video traces Escher’s process through three steps. First comes a straightened, self-similar reference image: a man looking at a print that contains the same man looking again, ad infinitum. Second comes a warped grid—an engineered mesh warp—that tells the artist how to copy tiny square regions from the reference image into their new positions. The grid is chosen so that, locally, the bounded regions remain approximately squares rather than becoming general parallelograms. That local “square-preserving” behavior is the hallmark of conformal maps, a special class of transformations in complex analysis.

The mathematical bridge is that complex functions with derivatives behave like locally rigid motions plus scaling: at sufficiently small scales, they preserve angles and keep tiny shapes approximately square. This is why polynomials like z² and z³ look warped globally but conformal locally. The video then narrows in on two functions that do the heavy lifting for Escher’s effect: the complex exponential e^z and the complex logarithm log(z). Exponentials turn vertical lines into circles because increasing the imaginary part by 2π completes a full rotation. Logarithms reverse that unwrapping: circles become vertical lines, and because exponentials are many-to-one, the logarithm becomes naturally multi-valued—handled by periodic tiling.

For the Print Gallery’s nested zoom, the logarithm converts the Drosta zoom into a pattern that repeats both vertically (from rotational periodicity) and horizontally (from the zoom factor, since multiplying by 16 becomes shifting by log 16). After that, a carefully chosen rotation and scaling realigns a diagonal path in log-space so that, once exponentiated, it closes into Escher’s loop while matching the required 2π periodicity. The final exponential “unwarps” the tiling into the warped scene, and the conformal property ensures local recognizability even as the global geometry spirals inward.

In the end, the piece isn’t just a clever optical trick. It’s a meeting point between artistic constraints—Escher’s insistence on a rigid local rule like “little squares stay little squares”—and deep mathematics, where doubly periodic structures connect to elliptic functions and modern number theory. The result feels like a puzzle that fits perfectly, not because the solution was obvious, but because the underlying structures were universal enough to attract both an artist and a mathematician.

Cornell Notes

Escher’s “Print Gallery” can be reconstructed using complex analysis by chaining three operations: take a logarithm, rotate/scale the resulting pattern, then apply an exponential. The logarithm turns the artwork’s self-similar “Drosta” zoom into a doubly periodic tiling because exponentials relate rotation (period 2π) to vertical motion, while logarithms convert zoom scaling into horizontal shifts by log(zoom factor). The conformal nature of complex functions explains why local geometry stays recognizable: tiny regions remain approximately square under these transformations. With the right alignment in log-space, a path that represents the nested zoom closes into the self-contained loop seen in Escher’s lithograph.

Why does taking a complex logarithm of a self-similar image produce a repeating tiling pattern?

Because the complex exponential e^z maps vertical lines to circles: increasing the imaginary part by 2π rotates the output by one full turn, so many inputs share the same output. The logarithm reverses this unwrapping, turning circles back into vertical lines. For a Drosta image, zooming by a factor (like 16 or 256) corresponds to shifting by log of that factor, since log(16·w)=log(w)+log 16. That creates periodicity both vertically (from the 2π rotation) and horizontally (from the zoom factor), yielding a doubly periodic tiling in log-space.

What does “conformal” mean here, and why does it matter for Escher’s look?

A conformal map preserves angles and keeps tiny shapes approximately the same locally. In the video’s geometric intuition, complex functions with derivatives behave like “local scaling plus rotation”: when you zoom in enough around a point, the transformation becomes close to multiplying by a complex constant, which rotates and scales but does not distort shapes. That’s why Escher’s warped grid can keep bounded regions approximately square at small scales, making each local part of the scene recognizable even though the global image is dramatically warped.

How do exponentials and logarithms connect lines and circles in the complex plane?

Exponentials e^z turn vertical line segments into circles. Imaginary increments of 2π correspond to one full rotation, so points along a vertical line repeat in the output. The logarithm log(z) does the inverse: it unwraps circles into vertical lines. Because e^z is many-to-one, log(z) is naturally multi-valued; choosing a branch cut selects one “sheet,” but the underlying repetition still reflects the circle-to-line unwrapping.

What role does the warped grid (mesh warp) play in the artistic construction?

The grid is a practical mechanism for transferring imagery: start with an ordinary square grid on the reference self-similar image, then map each tiny square to its corresponding square in a warped grid. Neighboring squares follow the grid lines, so the scene’s scale changes automatically across the warped mesh. Escher’s key constraint is that the warped grid keeps tiny cells approximately square (right-angle intersections), which matches the conformal behavior expected from complex functions.

Why is the diagonal path in log-space important for closing the loop?

The loop closure depends on aligning a segment in log-space so that, after exponentiation, it becomes a vertical segment of height 2π—because e^z turns such a segment into a closed circle. The video emphasizes using a diagonal line in log-space that leverages both periodic directions of the doubly periodic tiling. This diagonal alignment ensures the endpoints correspond to the big and small self-similar copies (e.g., zoom factor 256) and that the exponential mapping closes the path into Escher’s self-contained loop.

How does the zoom factor (256) translate into logarithms?

Zooming by 256 corresponds to shifting by log 256 in log-space. Since exponentials convert addition into multiplication, the logarithm converts multiplication (scaling the image) into addition (shifting). The video notes that the relevant information can be contained in a rectangle of width log 16 and height 2π for the simpler example; shifting by log 16 repeatedly nests the self-similar annuli. For the Print Gallery’s deeper zoom, the same principle applies with the corresponding log(256) horizontal shift.

Review Questions

  1. How does the 2π periodicity of the complex exponential influence the structure of the logarithm image?
  2. Explain, using the conformal/local-scaling intuition, why tiny squares can remain approximately square under complex transformations even when the global picture is warped.
  3. What alignment condition must hold in log-space so that exponentiating produces a closed loop rather than an open curve?

Key Points

  1. 1

    Escher’s “Print Gallery” loop can be recreated by applying a complex logarithm to a self-similar (Drosta) image, then rotating/scaling the resulting doubly periodic tiling, and finally applying an exponential.

  2. 2

    The complex exponential e^z maps vertical lines to circles because increasing the imaginary part by 2π completes one full rotation in the output.

  3. 3

    The complex logarithm log(z) unwraps circles back into vertical lines, producing a multi-valued structure that manifests as periodic tiling.

  4. 4

    Complex functions behave conformally at small scales: locally they act like rotation plus scaling, so tiny regions remain approximately square rather than becoming general distorted parallelograms.

  5. 5

    Escher’s mesh warp can be understood as a grid transfer process whose success depends on choosing a warped grid that preserves local square geometry, matching conformal behavior.

  6. 6

    Doubly periodicity in log-space comes from two sources: vertical repetition from 2π rotation and horizontal repetition from the Drosta zoom factor via shifts by log(zoom).

  7. 7

    Loop closure requires aligning a path in log-space so that, after exponentiation, it becomes a 2π-tall vertical segment that maps to a closed circle.

Highlights

The “log then rotate/scale then exp” recipe turns a self-similar zoom into a self-contained loop by exploiting periodicity: 2π in the imaginary direction becomes closure after exponentiation.
Conformal maps explain Escher’s local recognizability: even when the scene warps globally, tiny cells stay approximately square because complex derivatives enforce local rotation-and-scaling behavior.
The doubly periodic tiling in log-space isn’t generic—it emerges from combining exponential rotation periodicity with the Drosta image’s zoom periodicity (shifts by log of the zoom factor).
Escher’s warped grid works like a mesh warp: copying tiny square regions from a reference image into a warped grid, with right-angle intersections chosen to keep local geometry undistorted.

Topics

  • M.C. Escher Print Gallery
  • Complex Logarithms
  • Conformal Maps
  • Mesh Warp
  • Complex Exponential

Mentioned

  • M.C. Escher
  • Hans Richter
  • Jacqueline Hofstra
  • De Smit
  • Lenstra