## Three-point test for being holomorphic

This is a marvelous exercise in complex analysis; I heard it from Steffen Rohde but don’t remember the original source.

Let ${D=\{z\in \mathbb C\colon |z|<1\}}$. Suppose that a function ${f\colon D\rightarrow D}$ satisfies the following property: for every three points ${z_1,z_2,z_3\in D}$ there exists a holomorphic function ${g\colon D\rightarrow D}$ such that ${f(z_k)=g(z_k)}$ for ${k=1,2,3}$. Prove that ${f}$ is holomorphic.

No solution here, just some remarks.

• The domain does not matter, because holomorphicity is a local property.
• The codomain matters: ${D}$ cannot be replaced by ${\mathbb C}$. Indeed, for any function ${f\colon D\rightarrow\mathbb C}$ and any finite set ${z_1,\dots, z_n\in D}$ there is a holomorphic function that agrees with ${f}$ at ${z_1, \dots, z_n}$ — namely, an interpolating polynomial.
• Two points ${z_1,z_2}$ would not be enough. For example, ${f(z)=\mathrm{Re}\,z}$ passes the two-point test but is not holomorphic.

Perhaps the last item is not immediately obvious. Given two points ${z_1,z_2\in D}$, let ${x_k=\mathrm{Re}\,z_k}$. The hyperbolic distance ${\rho}$ between ${z_1}$ and ${z_2}$ is the infimum of $\int_\gamma \frac{1}{1-|z|^2}$ taken over all curves ${\gamma}$ connecting ${z_1}$ to ${z_2}$. Projecting ${\gamma}$ onto the real axis, we obtain a parametrized curve ${\tilde \gamma}$ connecting ${x_1}$ to ${x_2}$. $\displaystyle \int_{\tilde \gamma} \frac{1}{1-|z|^2} = \int_{\tilde \gamma} \frac{1}{1-|\mathrm{Re}\,z|^2}\le \int_{\gamma} \frac{1}{1-|\mathrm{Re}\,z|^2}\le \int_\gamma \frac{1}{1-|z|^2}$
it follows that ${\rho(x_1,x_2)\le \rho(z_1,z_2)}$. That is, ${f}$ is a nonexpanding map in the hyperbolic metric of the disk.
We can assume that ${x_1\le x_2}$. There is a Möbius map ${\phi}$ such that ${\phi(z_1)=x_1}$; moreover, we can arrange that ${\phi(z_2)}$ is a real number greater than ${x_1}$, by applying a hyperbolic rotation about ${x_1}$. Since ${\phi}$ is a hyperbolic isometry, ${\rho(x_1,\phi(z_2))\ge \rho(x_1,x_2)}$, which implies ${\phi(z_2)\ge x_2}$. Let ${\lambda(z)=x_1+(z-x_1)\dfrac{x_2-x_1}{\phi(z_2)-x_1}}$; this is a Euclidean homothety such that ${\lambda(x_1)=x_1}$ and ${\lambda(\phi(z_2))= x_2}$. By convexity of ${D}$, ${\lambda(D)\subset D}$. The map ${g=\lambda\circ \phi}$ achieves ${g(z_k)=x_k}$ for ${k=1,2}$.
The preceding can be immediately generalized: ${f}$ passes the two-point test if and only if it is a nonexpanding map in the hyperbolic metric. Such maps need not be differentiable even in the real-variable sense.