← SnapRecaps

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

► 1,611,710 views ⏲ 44:52 Watch on YouTube ↗

Summary

Escher's Print Gallery hides a Droste effect—a 256-times smaller copy of itself—twisted into a finite loop, mathematically decoded via grid distortion to close the infinite zoom seamlessly.

Executive Summary

In this video essay, the presenter unpacks the mathematical mystery behind M.C. Escher’s Print Gallery, a lithograph famous for its impossible self-contained loop in which the viewer appears inside the artwork he is observing. The central challenge is the image’s empty, undefined center, which even AI cannot fill because the scene there is inherently contradictory. Building on the 2003 analysis by de Smet and Lenstra, the video explains Escher’s intuitive grasp of the Droste effect—a picture containing a 256-times-smaller copy of itself—and his breakthrough idea of twisting infinite self-nesting into a finite, circular composition. To visualize the reconstruction, the presenter uses a distorted grid that encodes repeated 4× scaling factors, then maps a straight reference image square-by-square into the warped network, allowing the infinite zoom to close perfectly without a seam. Ultimately, the film reveals that Escher deliberately used periodic, recognizable imagery at different scales and pre-existing graphic design techniques like network distortion, transforming a baffling visual puzzle into a deeply elegant and intentional masterpiece.

Key Points

  • ▶ 0:30 M.C. Escher's 1956 lithograph Print Gallery creates a self-contained visual loop, where a viewer in a gallery appears inside the picture he is looking at—Escher himself called it the strangest thing he had ever made.
  • ▶ 1:43 In 2003, mathematicians de Smet and Lenstra analyzed the piece's mind-boggling self-contained loop, and this video aims to visually deconstruct their analysis while making the insight feel discoverable.
  • ▶ 2:09 The central mystery is the empty center of the image: it seems to belong simultaneously to the village, the picture frame, and the exhibition itself, and even an AI diffusion model fails to fill it because that part of the scene is inherently undefined.
  • ▶ 3:02 The explanation is intentionally high-level and intuitive, postponing mathematical details to later.
  • ▶ 3:06 Escher's process is divided into three distinct steps.
  • ▶ 3:10 Step one begins with a rigid, straightforward version of the idea, showing a man looking at a picture, then a port, a town, a print gallery, and the same man again — establishing an infinitely nested, recursive scene.
  • ▶ 3:30 The section names the concept of a self-identical image—a picture containing a smaller copy of itself—as the Droste effect, after a cocoa company's branding.
  • ▶ 3:43 The Droste effect was a common marketing tactic for many early twentieth-century products, placing Escher’s work in a broader visual trend.
  • ▶ 3:48 Escher’s version goes deeper than typical examples: ▶ 3:54 the recursive likeness is 256 times smaller than the original, showing extreme mathematical self-similarity.
  • ▶ 4:03 Escher's genius was intuitive: he realized, without formal math, that an image nested within itself could be reshaped into a twisted loop.
  • ▶ 4:09 This insight turned infinite self-nesting into a finite, circular, twisted composition—the core conceptual leap behind the Droste effect.
  • ▶ 4:21 The straight, undistorted version of the image came from a reconstruction done in reverse from Escher's original work.
  • ▶ 4:33 This reconstruction was carried out with the help of Dutch artists Hans Richter and Jacqueline Hofstra.
  • ▶ 4:40 In a figurative sense, the rebuilding process involves taking the logarithm of the original work, an idea the narrator acknowledges sounds confusing before explaining it further.
  • ▶ 5:03 A simpler example uses a pancake-like creature and a framed house, with the inner scene only 16× smaller, so the whole zoom structure can be seen at once.
  • ▶ 5:25 The 16× inward zoom is distributed across the four corners by repeatedly enlarging the original by 2 and placing cut-outs into each corner, creating a rough skeleton.
  • ▶ 6:13 The key challenge is smoothly filling the gaps between the corner pieces so that a viewer looking around the image perceives a continuous, infinite zoom-in effect.
  • ▶ 6:30 The current simple approach "doesn't look very good" and fails to capture the smoothness and elegance of Escher's work.
  • ▶ 6:43 Browsing the Escher book at the Escher Museum in The Hague offers a "small glimpse" into how Escher structured his artwork.
  • ▶ 6:45 The next step will draw on this reference material to improve the reconstruction.
  • ▶ 7:00 The network shown is a slight mathematical modification of Escher’s original grid, making it nicer to generate while preserving the same idea.
  • ▶ 7:04 Escher’s Droste image uses a total scaling factor of 256, distributed across four corners — meaning each corner-to-corner step scales by 4.
  • ▶ 7:12 In the bottom right, the square’s bounding lines can be followed toward the bottom left, where they surround a square four times larger, visually confirming the corner-to-corner scaling factor of 4.
  • ▶ 7:31 Tracing boundary lines of squares reveals a consistent 4× size increase along the network, both toward the lower-left and upward.
  • ▶ 7:41 The grid encodes a repeated 4× scaling factor in both directions, not an isolated effect.
  • ▶ 7:51 This inherent scaling from a particular angle is a key component for constructing the intended effect.
  • ▶ 7:55 A modified grid with a factor-of-two magnification between angles is used, following the same general idea as the previously discussed grid.
  • ▶ 8:19 To create the Escher effect, a regular grid over the original image is mapped square-by-square onto the distorted grid, with adjacent squares kept adjacent to define exactly where each image piece goes.
  • ▶ 8:52 The distorted grid lines diverge by a factor of two, which automatically doubles the scene's scale along that axis—this built-in expansion creates the self-similar, magnified effect and makes the task easier by turning it into localized copying.
  • ▶ 9:29 The distorted grid makes copying each small square almost automatic and convenient, guiding the reconstruction.
  • [9:34–9:39] Running the automatic copying process through a full cycle closes beautifully at the initial position, with no visible break or mismatch.
  • ▶ 9:44 Clean closure requires the original image to be self-similar when enlarged by a factor of 16.
  • ▶ 9:49 The reconstruction successfully recreates the overall visual effect and offers a deeper appreciation of Escher's deliberate artistic choices.
  • ▶ 9:59 Escher intentionally selected different types of images at different scales, such as prints on a wall or blocks of houses in a town.
  • ▶ 10:14 Periodic, repeating elements were essential because they helped the average viewer understand the image's intended meaning.
  • ▶ 10:20 A straight reference image combined with a distorted grid is used to generate the final distorted scene.
  • ▶ 10:24 This method is a common graphic design process called network distortion, which Escher used in other works before the Droste effect.
  • ▶ 10:36 The logic for converting a study’s magnification into a loop is abstracted into the network, raising the question of where the network came from.
  • ▶ 10:48 Naively attempting linear scaling of everything from one angle to the next immediately leads to a contradiction.
  • ▶ 11:01 Conflicting pressures arise because a square wants to expand in one direction from the right-side zoom and in another direction from upward shrinking, demonstrated at 11:06.
  • ▶ 11:17 Escher resolves this tension by curving all the grid lines, alleviating the competing pressures and creating the distorted grid.
  • ▶ 11:23 A crucial constraint guides the distorted grid: the small squares remain actual squares, not arbitrary four-sided shapes.
  • ▶ 11:44 This property almost never holds in typical grid distortions, where intersections are not right angles and cells become parallelograms.
  • ▶ 12:01 Having true squares reduces confusion when copying from the original grid, making this constraint a deliberate and desirable design choice.
  • ▶ 12:14 The grid-like network in Escher’s print is defined by a consistent geometric property: all lines intersect at right angles.
  • ▶ 12:19 At a sufficiently small scale, the enclosed regions form almost perfect squares, keeping local areas relatively undistorted.
  • ▶ 12:26 This global distortion combined with local regularity makes every part of the image easy to identify and understand.
  • ▶ 12:42 The story takes a turning point, introducing the mathematical core of the section.
  • ▶ 12:45 A key idea is a function mapping a 2D space to another 2D space where small squares remain almost square; this special property is called a harmonic transform.
  • ▶ 12:55 Harmonic transforms are closely tied to complex-valued functions, connecting geometry with complex analysis.
  • ▶ 13:05 The video shifts away from the art-class context into mathematics, signaling a deliberate focus on foundational concepts.
  • ▶ 13:17 The plan is laid out: a quick review of complex numbers and functions, then building intuition for complex logarithms.
  • ▶ 13:30 After the complex logarithms groundwork, the lesson will return to a new approach for recreating the effect in M.C. Escher's print gallery.
  • ▶ 13:39 Complex numbers are introduced as a two-dimensional counterpart to the one-dimensional real number line.
  • ▶ 13:49 The imaginary unit (i) is defined as (\sqrt{-1}), and complex numbers combine a real number with a real multiple of (i).
  • ▶ 14:04 The variable (z) denotes a general complex number, and the goal is to study functions of (z).
  • ▶ 14:43 Multiplying by a general complex constant combines both magnification and rotation simultaneously (e.g. (2z) magnifies by 2, (iz) rotates by 90 degrees).
  • ▶ 15:03 The entire transformation is fully determined by tracking two points: (0) stays fixed, while (1) maps to the constant (c), revealing the exact magnification and rotation.
  • ▶ 15:15 Multiplying by a constant preserves shapes — any shape (like a square) may be enlarged or rotated, but never distorted or deformed.
  • ▶ 15:29 Moving to functions like z → z² shows a sharp contrast with constant multiplication: globally, grid lines bend and twist, so the overall shape is no longer preserved.
  • ▶ 16:05 Despite the global distortion, the key insight is local: small squares in the input remain almost squares under z² and z³, meaning the function preserves angles locally.
  • ▶ 16:43 This local angle congruence is a limit property—the smaller the input square, the closer the output comes to being a perfect square—and it holds for virtually any complex function, not just polynomials.
  • ▶ 17:18 Complex numbers are of very great importance—not just a convenience, but the key to why complex functions differ from generic real-valued functions.
  • ▶ 17:20 Avoid treating the 2D plane merely as pairs of real numbers (x, y); random real-coordinate functions produce messy transformations.
  • ▶ 17:32 Generic real functions of x and y typically compress and distort the small grid squares, whereas complex functions preserve local squareness and angles.
  • ▶ 17:43 Under a compound/complex function, the image of a small square often becomes a parallelogram, yet it still counts as a square in the local, transformed sense.
  • ▶ 17:55 The reason small squares stay squares is tied directly to calculus: it is exactly what it means for a function to have a derivative, which guarantees linear, local behavior (rotation+scale).
  • ▶ 18:04 Analogous to real functions: zooming in on a graph makes it look like a straight line, with Δf/Δx approaching a constant—the derivative—just as complex functions locally preserve shapes.
  • ▶ 18:29 Real functions can be viewed as transformations—input points move to output values on a second number line—rather than as graphs.
  • ▶ 18:45 Under this transformation, equally spaced inputs do not stay equally spaced in output, revealing that the function’s rate of change is generally not constant.
  • ▶ 18:59 Locally, as you zoom in, the transformation behaves almost exactly like uniform scaling: a tiny patch of input points is mapped to a patch that is stretched by a single constant factor around the corresponding output.
  • ▶ 19:31 Complex functions are best understood as transformations of the complex plane.
  • ▶ 19:50 The derivative means local behavior approaches a constant rate of change, so small input squares can be copied to the output and roughly matched to the grid.
  • ▶ 20:07 This matching is done by multiplying the patch by a complex constant, which rotates and scales it—preserving the square shape.
  • ▶ 20:32 Conformal maps are very restrictive and extremely rare compared to the vast space of continuous two-dimensional transformations.
  • ▶ 20:47 Despite their rarity, speaking the language of complex numbers makes it almost effortless to create entire families of conformal maps.
  • ▶ 20:53 The only requirement is that the complex functions must have derivatives—this condition is what guarantees the conformal property.
  • ▶ 21:04 The print-fair story is reframed in a completely new way.
  • ▶ 21:11 The core question becomes whether a carefully designed composite function can make zooming around the inputs look like walking in a loop between the outputs.
  • ▶ 21:11 This shifts the challenge from literal visual description to constructing a composite function that turns local input explorations into cyclical output transitions.
  • ▶ 21:22 Building a larger toolkit of familiar functions and understanding their behavior with complex inputs is essential before tackling more advanced ideas.
  • ▶ 21:36 The focus narrows to two core functions for the rest of the journey: (e^z) and the natural logarithm.
  • ▶ 21:49 The narrator frames the upcoming study with a memorable motivation: “Everyone deserves at least once in their life to experience the pleasure of understanding complex logarithms.”
  • ▶ 21:55 Reviewing the real exponential function is useful groundwork before moving to complex inputs.
  • ▶ 22:17 For real inputs, e^0 = 1, and each increase of the input by 1 multiplies the output by e, causing rapid growth.
  • ▶ 22:41 A key property is that real-valued inputs always produce positive outputs, contrasting with what will happen for complex inputs.
  • ▶ 22:45 Expanding from real to complex inputs and outputs reveals that increasing the imaginary part of the input causes the output to rotate around a circle.
  • ▶ 23:13 The exponential function e^z is special because when the input increases at 1 unit per second, the output moves around its circle at exactly 1 radian per second.
  • ▶ 23:30 Increasing the imaginary part by exactly 2π produces exactly one complete cycle, making e^z the natural choice for complex analysis.
  • ▶ 23:38 Vertical line segments of height exactly 2π each map to one complete circle because the imaginary part controls the output angle, giving a full 360° rotation.
  • ▶ 23:49 The vertical segments are equally spaced so the real part increases by 1 between consecutive segments, causing the resulting circles to differ by a constant scaling factor of e.
  • ▶ 23:49 This creates a nested family of circles, each one larger than the previous by the same multiplicative ratio.
  • ▶ 24:04 The same input-to-output transformation framing used for (z^2) is applied to (e^z): every point moves from input space to its output location.
  • ▶ 24:11 To visualize (e^z), a specific patch of the input grid is selected for transformation.
  • ▶ 24:15 Moving each square of that patch to its corresponding output position shows how (e^z) deforms the grid.
  • ▶ 24:24 Vertical lines in the input space transform into concentric circles in the output space—a key mental model for understanding the function.
  • ▶ 24:37 Imagine rolling the z-plane into a tube so vertical lines become circles, each with circumference 2π, then pressing the tube down onto the output plane.
  • ▶ 25:09 Regardless of the visualization, internalize the essential idea: vertical lines turn into circles.
  • ▶ 25:16 The exponential function is many-to-one: different inputs can produce the same output.
  • ▶ 25:24 On any vertical line, inputs spaced (2\pi) apart all merge into a single output point, as the line twists into a circle.
  • ▶ 25:35 This collapsing of infinitely repeating inputs is key to understanding the logarithm as the exponential's inverse.
  • ▶ 25:57 Exponential functions are a key component because they turn lines into circles.
  • ▶ 26:02 The natural logarithm is introduced as the inverse of the exponential function.
  • ▶ 26:06 The logarithm's core role is to unwind circles back into lines, reversing the exponential effect.
  • ▶ 26:12 The speaker proposes a visual thought experiment: coloring the nodal level with a self-nested, Droste-style image—like a π creature appearing in a picture of a house, with the same creature living inside that house.
  • ▶ 26:28 The discussion signals that “the time has finally come” to address the core question directly.
  • ▶ 26:32 The central question is stated explicitly: “What does it mean to take the natural logarithm of an image?” followed by a pause at ▶ 26:36 for reflection.
  • ▶ 26:38 The natural logarithm visually undoes the exponential for circular patterns: any circle in an image unfolds into a vertical line segment of height .
  • ▶ 26:55 A circle exactly (e) times smaller unfolds into a line segment of the same height, but shifted one unit to the left on the transformed grid.
  • ▶ 27:06 A family of concentric, shrinking loops maps to parallel vertical line segments—each with height and positioned progressively further left as the circles get smaller.
  • ▶ 27:24 Moving leftward in the z-plane produces a repetitive, dizzying image, revealing a new direction of repetition.
  • ▶ 27:43 The imaginary-part range 0 to 2π is arbitrary; increasing z by another 2π simply traces the same circle on the right, inviting repetition along perpendicular lines.
  • ▶ 28:13 The same repetition works in reverse—decreasing the imaginary part sends the value around the same circle again, reinforcing the periodic nature of the imaginary component.
  • ▶ 28:27 The coloring rule assigns each point in the left-hand plane the color of its corresponding value e^z on the right, creating a direct visual map between the two planes.
  • ▶ 28:40 The repeated "π creatures" show that e^z is many-to-one: multiple left points map to the same right point, so the inverse natural logarithm behaves as a multi-valued function.
  • ▶ 29:06 In practice, a branch cut is often chosen to force a single logarithm output, but for Escher's work the multi-valued view is kept: every right point corresponds to an infinite repeating sequence of left points spaced vertically by 2π.
  • ▶ 29:42 A recurring pattern appears when moving left in the image, and the narrator emphasizes this self-similarity is unusual and “something completely different” from typical pictures.
  • ▶ 29:51 The image is self-similar: it looks the same when zoomed in by a certain factor, containing a scaled copy of itself, which makes the recurrence especially visible.
  • ▶ 30:00 Exponentials convert addition into multiplication, and logarithms convert multiplication into addition; for example, multiplying by 16 becomes a shift to the right by ln(16), so scaling in the original image becomes translation in the logarithmic image.
  • ▶ 30:45 A rectangle in the log image that is log 16 wide and 2π high captures all information, and shifting it left by log 16 produces an exact 16-times-smaller copy of the ring.
  • ▶ 31:07 Repeating this shift infinitely creates the infinite interlocking zoom pattern; the log image and the original image can extend indefinitely to the right with no maximum radius.
  • ▶ 31:47 The log image is periodic in two ways: vertically from rotational periodicity, and horizontally from the self-repeating zoom—this dual periodicity is the key feature for the final transformation.
  • ▶ 32:20 The speaker pauses after dense material to introduce the sponsor: 3b1b talent, a virtual job fair being trialed that year.
  • ▶ 32:33 The fair connects viewers who enjoy learning about technical topics like complex logarithms with teams that value curiosity and technical thinking.
  • ▶ 32:47 Viewers looking for a new job can explore 3b1b.co/talent, which features interviews, puzzles, and technical challenges that reveal each team's culture.
  • ▶ 33:29 The construction is shown as a three-step overall function: take a logarithm to create double periodic tiling, rotate and enlarge the pattern, then apply an exponential function with a specific modification.
  • ▶ 34:08 The key goal is to connect the large creature to the smaller self-similar version (magnified by 16 inward) by turning the line between them into a closed loop in the final space.
  • ▶ 34:50 Instead of the original horizontal line, the construction uses a slanted line connecting copies in the logarithm image—leveraging its two-directional periodicity—which is then carried through the exponential step.
  • ▶ 35:19 A new downward component in the logarithm image introduces clockwise rotation to the path, helping turn it into a loop.
  • ▶ 35:39 The line segment must be adjusted to end perfectly vertical with a height of 2π, using e^z to transform it into a circle.
  • ▶ 35:53 Multiplying by a constant achieves the needed rotation and scaling, while keeping the large "pi creature" fixed as an artistic constraint.
  • ▶ 36:08 The method shifts from rotating around the origin to keeping a specific point fixed in the logarithm image, named z₀, while updating the formula for rotation and scale.
  • ▶ 36:28 The main remaining task is choosing the constant c; the explanation shows it in its own complex plane to reveal how different choices affect transformation.
  • ▶ 36:54 Different values of c cause varied scaling and rotation, producing kaleidoscope-like images, and the process is framed as a search for the exact value that makes the final picture align.
  • ▶ 37:09 The reconstructed Escher effect is achieved once the constant is adjusted, producing a central opening reminiscent of Escher’s original artwork.
  • ▶ 37:21 That central opening is completely fabricated—the mathematical output actually fills the region with an inwardly repetitive spiral pattern.
  • ▶ 37:33 The twisted tiling extends across the entire plane, and after exponentiation it fills everything except zero, so the apparent hole is only a visual artifact.
  • ▶ 37:43 Convert the original image into a logarithmic field as the foundational intermediate step.
  • ▶ 37:46 Rotate and scale within the logarithmic domain to realign image components.
  • ▶ 37:46 Apply exponentiation to transform back and produce the final completed image.
  • ▶ 38:06 Escher’s actual example is placed on a composite plane with the infinite scaling endpoint at zero, then processed through logarithm, rotation/scaling, and (e^z).
  • ▶ 38:25 Because Escher’s image uses a much deeper approximation with a scale factor of 256, the repeating tiles extend over a wider portion of the nodal plane.
  • ▶ 39:08 Framing the process with complex functions leaves no gap in the middle, preserving and completing the looping self-reference of Escher’s final image.
  • ▶ 39:27 The entire logarithm-then-multiply-then-exponentiate process collapses into a simple complex power: (e^{c \log z} = z^c).
  • ▶ 39:40 Including a displacement factor adds a constant to the result, giving the compact form (z^c + d).
  • ▶ 39:44 A seemingly involved multi-stage transformation compresses into a surprisingly simple mathematical expression.
  • ▶ 39:54 Using only horizontal lines in the transformation does not produce the desired result.
  • ▶ 39:58 This failed attempt effectively just rotates everything 90 degrees and changes the scale.
  • ▶ 40:05 Although the rotated/rescaled output is interesting, it is not what we want for the intended logarithmic/Escher-like construction.
  • ▶ 40:17 The narrator presents a high-level comparison between two conceptual approaches to the artwork.
  • ▶ 40:17 One view frames the image through logarithmic rotation, while Escher’s method was a more intuitive, step-by-step distortion of a distorted network.
  • ▶ 40:17 These approaches feel “completely different” even though they describe the same visual result, offering a distinct way of seeing and reasoning about the piece.
  • ▶ 40:38 The same function is applied to a regular square grid, but a network denser near the inside is needed so the pattern remains congruent under transformation.
  • ▶ 40:54 Applying the logarithm to the adjusted network produces curved tiling; after rotating and exponentiating, the result closely matches Escher’s piece.
  • ▶ 41:10 The angular congruence property, which keeps small squares roughly square in the final result, is the side effect that justified the use of complex numbers.
  • ▶ 41:39 You do not need to understand derivatives or logarithms to enjoy Escher's art; mathematical knowledge is not a prerequisite for artistic appreciation.
  • ▶ 41:42 Understanding the underlying mathematics adds extra value, granting you something more beyond basic enjoyment.
  • ▶ 41:47 This understanding gives you the ability to do something further, though the full explanation is cut off in this section.
  • ▶ 41:55 Escher's art unites two threads: recurring concepts like representing infinity in limited space, and strict aesthetic rules such as "small squares remain small squares" in distorted grids.
  • ▶ 42:18 Combining these drives makes Escher's works feel like puzzle solutions—yet puzzles whose solutions are not even clearly defined.
  • ▶ 42:29 The structures Escher intuitively chose often hide deep mathematics, such as compound functions describing the piece, without being consciously mathematical in origin.
  • ▶ 42:57 The method relies on a double periodic pattern in the complex plane, repeating in two separate directions.
  • ▶ 43:08 Functions with this double periodicity are called elliptic functions.
  • ▶ 43:15 The scientists De Smet and Linestra are number theorists, and elliptic functions play a prominent role in modern number theory—bridging to other areas of mathematics.
  • ▶ 43:55 Grant identifies the emotional appeal of Escher's work as "the feeling that things fit perfectly in place."
  • ▶ 44:03 He clarifies it's not merely puzzle-solving satisfaction, but appreciation of the creative genius required to imagine the puzzle.
  • ▶ 44:12 He parallels this with mathematics, noting artists and mathematicians are drawn to the same structures for different reasons, suggesting something universal underlying both.

Video Sections

  • ▶ 0:00 The Art Mystery and the Central Question (0:00 - 3:02) - - Opens with Escher’s art, mathematicians’ fascination, and the question of what belongs in the middle.
  • ▶ 3:02 Droste Effect and Rebuilding the Grid (3:02 - 13:05) - - Describes Escher’s three-step process and the grid-copying/distortion method used to reconstruct the image backwards.
  • ▶ 13:05 Complex Analysis Detour: Numbers to Conformal Maps (13:05 - 21:22) - - Gives a rapid course in complex numbers, derivatives, local scaling, and conformal maps.
  • ▶ 21:22 Exponential, Logarithm, and the Completed Picture (21:22 - 44:24) - - Shows how e^z and ln z create the periodic repetition that finishes Escher’s reconstruction.

Exact Transcript

Load the full timestamped transcript on demand and click any time to jump in the video.