“How (and why) to take a logarithm of an image” — 3Blue1Brown
Note: a parallel assessment of this same video exists at
2026-04-20-3blue1brown-how-and-why-to-take-a-logarithm-of-an-image.md, filed under the watch date. This entry is filed under the upload date for chronological consistency with the source.
Why this is in the vault
Filed as the strongest visual instance in the corpus of the concepts/coordinate-change-as-core-move pattern — log/exp moving multiplicative structure into additive space. Two operational threads pull on it: (1) it is the rigorous justification for a “log-transform first, then chart” mode in XmR when MAC encounters heteroskedastic series, and (2) it underwrites linear-regression detrending for compounding metrics in MAC dashboards. Cross-filed with the parallel watch-date entry to keep both upload-date and watch-date chronology intact for the longitudinal coordinate-change evidence chain.
Episode summary
Grant Sanderson reverse-engineers M.C. Escher’s 1956 lithograph “Print Gallery” (Prentententoonstelling) — the recursive image of a man looking at a picture that contains the gallery that contains the man. Building on the De Smit and Lenstra (2003) analysis, he shows the distortion Escher arrived at by hand is formally the action of a complex-logarithm-then-rotate-then-exponentiate sandwich: a conformal map that turns a Droste-effect mise en abyme into a self-similar spiral. The video doubles as a 25-minute crash course in complex exponentials and logarithms, with the punchline that the “blank spot” Escher left in the center is a topological inevitability — the fixed point of the recursive zoom — not an artistic compromise.
Key arguments / segments
- [00:00] Cold open: art-room framing, Escher’s lithograph as a puzzle whose center is ambiguous from every direction (top-right looks like village, left like frame, bottom like gallery)
- [03:00] Three-step Droste-to-loop construction: unwrapped self-similar reference image → distorted grid → mesh-warp transfer of pixels block by block
- [07:00] The hidden constraint Escher imposed without naming: the small squares of his distorted grid stay (approximately) square — i.e. the warp is a conformal map
- [12:30] Definition of conformal: a 2D-to-2D function where infinitesimal squares stay square; this is unusually rare among general 2D warps but happens automatically for any differentiable complex-valued function
- [13:00] Mini complex-analysis crash course: multiplying by a complex constant rotates and scales; z² and z³ are conformal because they have complex derivatives
- [21:30] e^z as a transformation: vertical lines of height 2pi map to circles; horizontal strips map to annuli; output is invariant under shifts of 2pi in the imaginary direction (non-injective)
- [26:00] The complex logarithm as inverse: takes a Droste-image and unrolls each annulus into a vertical strip of height 2pi; the result is a wallpaper that is doubly periodic (vertically because of e^z’s multivalued inverse, horizontally because the source image is self-similar under zoom)
- [33:00] The Escher recipe in three operations: log → rotate-and-scale by a chosen complex constant c → exp. Choosing c so the wallpaper’s vertical period aligns along a diagonal produces the spiral effect; choosing it for horizontal alignment produces the boring symmetric warp
- [37:00] The “hole” at center is artificial — the function output naturally fills it with its own infinite spiral; nothing exists exactly at zero because exp never outputs zero
- [38:00] Walkthrough on Escher’s original 256x scaling factor (vs Grant’s pedagogical 16x M. Pi example)
- [39:00] The whole sandwich algebraically simplifies to z → z^c for a complex exponent c — but the simplified form hides the geometric content
- [42:00] Closing: Escher’s career-long pull toward “infinity in finite space” plus the implicit aesthetic constraint (small squares stay square) jointly produce works whose underlying structure is genuine deep math (elliptic functions, complex analysis, number theory pathways via De Smit and Lenstra)
Notable claims
- The distortion in Escher’s “Print Gallery” is mathematically equivalent to applying the complex logarithm, a complex rotation/scale, and the complex exponential in sequence — this is a theorem from De Smit and Lenstra 2003, not an analogy
- Conformal maps preserve local shape (small squares stay small squares) even while globally distorting — this property emerges automatically from any differentiable complex function and is the reason the eye perceives Escher’s warp as “curvy but locally coherent”
- The blank spot at the lithograph’s center is an analytical necessity (fixed point of the recursive zoom), not an artistic choice — diffusion models cannot fill it because there is one and only one consistent completion, and it is itself a continuation of the same spiral
- Doubly-periodic complex functions are called elliptic functions and play a structural role in modern number theory; this is plausibly why two arithmeticians (De Smit, Lenstra) noticed the structure first
- The same operation — log to convert multiplication into addition, do work in the additive coordinate system, then exp back — is the canonical example of “coordinate change as core problem-solving move”
- Mesh-warp (graphic-design technique of transferring an image cell-by-cell from a reference grid to a distorted grid) is the artist’s manual analog of a conformal map; Escher used it for many works, not just Print Gallery
Mapping against Ray Data Co
Strong mapping — this video is a fresh, vivid instance of the concepts/coordinate-change-as-core-move pattern that the vault already crystallizes. The doc explicitly cites this video as one of the six instances (“the complex logarithm takes Escher’s recursive self-referential distortion and unwraps it into a flat strip with a fixed point at the blank spot. The log takes a multiplicative structure and makes it additive. That is the same move a data engineer makes log-transforming a skewed price series, and it is the same move SVD makes axis-aligning correlated features”).
Three load-bearing bridges to operational work:
-
XmR / process-behavior charts and detrending. Wheeler’s chapter on data transformations argues that log-scale charts are appropriate when the underlying process is multiplicative (errors compound proportionally, not additively). The video gives the visual intuition for why this works: log moves you from a multiplicative coordinate system into an additive one, where linear methods (control limits set as mean ± 3·MR-bar) are correctly calibrated. For ../04-tooling/xmr-charts/README, this is the rigorous justification for a “log-transform first, then chart” mode for ratio-distributed metrics like response times, prices, or error rates. Practically: when MAC dashboards encounter a series whose moving range scales with the level (heteroskedastic), the right move is not to widen the limits — it is to chart log(x) and reason in additive space.
-
Linear regression detrending in MAC. When a series has compounding growth (revenue, cumulative users, anything with a fixed-percent growth rate), regressing the level against time gives biased residuals that fan out. Regressing log(level) against time recovers the constant-growth-rate residuals and gives honest deviations. Same coordinate-change move. The video makes this concrete: applying log to “an image with a 16x scale-similarity” turns the recursion into a horizontal translation. Applied to a revenue chart, log turns a “compounded 10%/quarter” series into a straight line whose slope is the growth rate and whose residuals are interpretable as percent surprises.
-
concepts/binary-decision-around-continuous-probability. Weaker bridge but real: the binary-decision concept is about not collapsing a continuous quantity (probability, severity, revenue impact) into a yes/no until you must. The video’s analog is “don’t collapse the multivalued log to a single branch until your downstream operation requires it” — Grant explicitly says, for the Escher application, it’s actually more useful to keep log as multivalued, because the periodicity of the multivalued output is the structure being exploited. The general lesson: premature flattening of a richer structure (continuous → binary; multivalued → single-valued) destroys the information that solves the problem.
The video does not surface a new generalizable pattern beyond what coordinate-change-as-core-move already captures, but it is the strongest visual demonstration in the corpus of why log/exp specifically is so often the right coordinate change for compounding systems.
Related
- 2026-04-20-3blue1brown-how-and-why-to-take-a-logarithm-of-an-image — parallel assessment of the same video filed under watch date
- concepts/coordinate-change-as-core-move — vault concept this video instantiates
- concepts/binary-decision-around-continuous-probability — adjacent “don’t flatten richer structure prematurely” pattern
- ../04-tooling/xmr-charts/README — XmR tooling that should grow a log-transform mode for multiplicative series
- 2026-03-27-3blue1brown-eschers-print-gallery — the 102-second teaser that pointed to this full video
- 2026-04-20-3blue1brown-but-what-is-a-laplace-transform / 2026-04-20-3blue1brown-why-laplace-transforms-are-so-useful — same coordinate-change move, different transform pair