Escher's Print Gallery and the conformal mapping: part 1

math is beautiful

In 1956, the Dutch artist M. C. Escher made a lithograph, Print Gallery, which depicts a man standing in a gallery, viewing a print of a seaport that includes, among its buildings, the very gallery he is standing in. Such a picture-in-picture recursion is known as the Droste effect, named after the image on the tins and boxes of Droste Cocoa Powder around 1904.

What is different in Print Gallery is that the space is curved. In the lithograph, a row of Mediterranean-style buildings along a quay grows progressively larger, eventually extending beyond the frame and curving around to encompass both the gallery and the man inside it. As the viewer’s eye moves clockwise around the center, the scene continuously expands in scale. At the same time, the lines of the image bend, as though the center had been pulled outward with a twist of the wrist. At the very middle, Escher left a prominent circular region blank.

Hendrik Lenstra, a Dutch mathematician, was struck by a reprint of Print Gallery on the airline magazine, when he was taking a flight from New Jersey to Amsterdam. He studied the mathematical structure of the picture, with an additional aim of filling in the blank in the middle. Around 2022–2023, he wrote an article for the American Mathematical Society, titled “The Mathematical Structure of Escher’s Print Gallery,” explaining its connection to elliptic curves.

In this blog post, I will not repeat the language of number theory used by Lenstra; but rather, offer an exposition from a simpler angle of complex analysis. Both lead to the concept of conformal mapping, which is the essence that allows Escher to curve the Droste effect.


Conformal mapping

Denote by $z = x + iy \in \mathbb{C}$ a complex variable, where $x$ and $y$ are real. Let $U$ be an open subset of the complex plane $\mathbb{C}$. A complex-valued function $f : U \to \mathbb{C}$ is complex differentiable at $z_0 \in U$ if the limit $\lim_{z \to z_0} \frac{f(z) - f(z_0)}{z - z_0}$ exists. The function $f$ is called holomorphic, or analytic, on $U$ if $f$ is complex differentiable at every point in $U$. If $U$ is the entire complex plane $\mathbb{C}$, $f$ is also called entire. Unlike in the real case, if $f$ is complex differentiable, it is infinitely differentiable.

A mapping is called conformal if it preserves angles (but not necessarily lengths). For the complex case, this means at every point $z_0 \in U$, the angle between any two curves passing $z_0$, at $z_0$, is the same as the angle between the two mapped curves at $f(z_0)$.

A nice property of complex functions is that most of the commonly used ones are conformal. Formally, if $f$ is holomorphic and its derivative is nonzero everywhere on $U$, then $f$ is conformal. This could be easily shown by letting

\[f(z) = u(x,y) + iv(x,y),\]

where $u$ and $v$ are real-valued functions, and seeing the derivative formula

\[f'(z) = u_x + i v_x = v_y - i u_y,\]

which gives rise to the Cauchy–Riemann equations

\[u_x = v_y \quad\text{and}\quad v_x = -u_y.\]

To understand where angle-preserving comes from, we turn the complex plane to $\mathbb{R}^2$, and by abuse of notation, we write $\mathbf{z} = (x,y) \in \mathbb{R}^2$, $\mathbf{w} = (u,v) \in \mathbb{R}^2$, and $\mathbf{w} = f(\mathbf{z})$. That is, $f$ maps an open subset of $\mathbb{R}^2$ to another open subset of $\mathbb{R}^2$. By the Cauchy–Riemann equations, we see that the Jacobian

\[J = \begin{bmatrix} u_x & u_y \\ v_x & v_y \end{bmatrix} = \begin{bmatrix} u_x & -v_x \\ v_x & u_x \end{bmatrix}\]

is a scaling of a rotation matrix (the scaling factor is nothing but $\sqrt{u_x^2 + v_x^2} = \vert f’(z) \vert$). If the tangents of two curves crossing at $\mathbf{z}_0$ are $\mathbf{z}_0^1$ and $\mathbf{z}_0^2$, then the tangents of the two mapped curves crossing at $f(\mathbf{z}_0)$ are $J \mathbf{z}_0^1$ and $J \mathbf{z}_0^2$. Because the Jacobian is a rotation followed by scaling, the angle between $\mathbf{z}_0^1$ and $\mathbf{z}_0^2$ is identical to the angle between $J \mathbf{z}_0^1$ and $J \mathbf{z}_0^2$, as long as $J$ is nonzero.


Exponential and logarithm

Relevant to Escher’s artwork are the exponential and the logarithm. They are conformal mappings. We will use grids with right angles to visualize what they look like.

Let us start from the exponential. The following figure shows that the vertical grid lines are mapped to concentric circles, which is obvious, because $e^{x+iy} = e^x(\cos y + i\sin y)$ has a constant magnitude $e^x$ for the same $x$. Furthermore, the horizontal grid lines are mapped to radial lines, because $e^x(\cos y + i\sin y)$ has the same argument for all $x$ given the same $y$. Note that the circles and the radial lines intersect at $90^{\circ}$, demonstrating conformality.

One way to picture the exponential mapping is to imagine using your right hand to grasp a cylindrical-shape object, such as a cup. The hand forms a C shape, with the thumb and the index finger curved toward each other, creating a rounded gap. The thumb and the index finger indicate how a vertical line is bended, with the two ends eventually meeting with each other and forming a circle. The C-shape gesture morph the straight grid on the left to a curved grid on the right.

The logarithm is the inverse of the exponential and the mapping is illustrated below. Since the figure is read from right to left, we can use the same C-shape gesture to morph the left grid to the right one. There are three semi-circular “notches” in the left plot. Put your index figure inside the top notch and your thumb inside the bottom one. The curved grid is bended to a straight one when your thumb and index finger bend toward each other.


Escher’s Print Gallery can be made by composing three conformal mappings: first logarithm, then linear, and finally exponential:

\[z \to e^{c \ln z}, \quad\text{where}\quad c \in \mathbb{C}.\]

The overall mapping can be written more simply as $e^{c \ln z} = z^c$, but exposing the logarithm and the exponential facilitates geometric interpretation. Because the complex number $c$ can be written in the polar form $c = r e^{i\theta}$, a linear mapping with a complex coefficient $c$ is equivalent to a rotation by $\theta$ radian followed by a factor of $r$ scaling on the complex plane.

This rotation-and-scaling operation is the key to cause the effect of “extending beyond the frame and curving around,” for the scene to “continuously expands in scale” in Print Gallery. The effect can be best explained with the following flow chart. The essence is to exploit the branch cut of the logarithm along the negative axis, such that a point $a<0$ approached from above is mapped to the same location as is the point $a/2$ approached from below. Here, we say that the upper part of the negative axis is “shrunken” by a factor of 2.

Read the above figure counterclockwise from the top-right corner.

In the top-right plot, we color the negative axis with green and red, where the green is approached from above while the red is approached from below. We let $a=-4$ be the starting location of the green line and let $a/2=-2$ be the starting location of the red line.

In the top-left plot, the logarithmic mapping is applied on the straight grid. The green line starts from $\ln4 + i\pi$ and extends toward left infinitely, when its counterpart in the straight grid approaches the origin. On the other hand, the red line starts from $\ln2 - i\pi$ and it also extends toward left infinitely.

In the bottom-left plot, the rotation and scaling caused by $c$ makes the starting locations of the two lines align in the real part and differ by $i2\pi$ in the imaginary part.

Then, in the bottom-right plot, the exponential mapping makes the starting locations of green and red coincide. This is because the green and the red lines in the bottom-left plot are parallel to each other and differ by a vertical shift of $2\pi$. This causes the interesting effect that the green and red lines, originally different in length by a factor of 2x, now have the same length, as they entirely overlap with each other.

To decide $c$ in the mapping, we simply write

\[c (\ln|a| + i\pi) = c \left(\ln \frac{|a|}{2} + i\pi\right) + i2\pi, \quad\forall\,a<0\]

which leads to

\[c = \frac{i2\pi}{\ln2 + i2\pi}.\]

Controlling the shrinking factor

The above exposition shrinks the red line by a factor of 2 to coincide with the green line, for simplicity. Nothing prevents us from using a different factor, $\alpha$, as long as $\alpha$ is a positive real number. Correspondingly, $c$ becomes

\[c = \frac{i2\pi}{\ln\alpha + i2\pi}.\]

In fact, Lenstra concluded that Escher used a factor $\alpha = 256$ in his Print Gallery.

The following figure illustrates a few curved checkerboards (with finer resolutions toward the center) under different shrinking factors. Note that the larger the factor, the more curved near the center.




Enjoy Reading This Article?

Here are some more articles you might like to read next:

  • Counterintuitive properties of high-dimensional spaces
  • Some combinatorial graph problems that have an algebraic answer
  • Some facts about random orthonormal vectors and matrices
  • The exponential of ... everything?
  • How to get the sorted array and indices in Python without importing additional modules like Numpy