Why: A holomorphic function with constant magnitude must be constant.

How can I prove the following assertion?

Let $f$ be a holomorphic function such that $|f|$ is a constant. Then $f$ is constant.

Edit: The more elementary the proof, the better. I’m working my way through a complex analysis workbook, and by this exercise, the only substantial thing covered has been the Cauchy-Riemann equations.

Solutions Collecting From Web of "Why: A holomorphic function with constant magnitude must be constant."

Let $f(z) = u(x,y) + iv(x,y)$, where $u(x,y),v(x,y) \in \mathbb{R}$. We then have that $$\lvert f \rvert^2 = u(x,y)^2 + v(x,y)^2 = \text{constant}$$
Hence, $$\frac{\partial (u^2 + v^2) }{\partial x} = 0 = \frac{\partial (u^2 + v^2) }{\partial y}$$
This implies $$u \frac{\partial u}{\partial x} + v \frac{\partial v}{\partial x} = 0 = u \frac{\partial u}{\partial y} + v \frac{\partial v}{\partial y}$$
Making use of the Cauchy-Riemann equations, we get $$u \frac{\partial v}{\partial y} + v \frac{\partial v}{\partial x} = 0 = -u \frac{\partial v}{\partial x} + v \frac{\partial v}{\partial y}$$
Multiply the left equation by $u$ and the right equation by $v$ and add them up to get
$$(u^2 + v^2) \frac{\partial v}{\partial y} = 0$$
If $u^2+v^2 = 0$, then $f=0$ throughout the domain since $\lvert f \rvert = \text{constant}$.
If $u^2+v^2 \neq 0$, then $\dfrac{\partial v}{\partial y}=0$ which also gives us $\dfrac{\partial v}{\partial x}=0$. Now by Cauchy-Riemann, we also get that $\dfrac{\partial u}{\partial x}=\dfrac{\partial u}{\partial y}=0$. Hence, $f'(z) = 0$ which gives us that $f$ is constant.

Also if $f(z)$ happens to be entire, then the conclusion immediately follows from Liouville’s theorem.

If $|f|$ is constant, then the image of $f$ is a subset of a circle in $\mathbb{C}$. Apply the Open Mapping Theorem.

Pete’s answer is quite sufficient, but I’ll add another one which applies to more general maps (namely, complex-valued harmonic). Write $f=u+iv$, where $u$ and $v$ are real harmonic functions. As an exercise with the chain rule, verify the identity
$$\Delta(u^2+v^2)=2|\nabla u|^2+2|\nabla v|^2$$
Conclude that if $u^2+v^2$ is constant, then so are $u$ and $v$.

Another way: if $f(z_0) = u_0$ and $f'(z_0) = p \ne 0$, consider the directional derivative of $|f(z)|^2 = f(z) \overline{f(z)}$ at $z_0$ in the direction of some complex number $q$, i.e.
$$ \eqalign{\frac{d}{dt} \left(f(z_0 + tq) \overline{f(z_0 + tq)}\right) &= f(z_0 + tq) \overline{\frac{d}{dt} f(z_0 + t q)} + \overline{f(z_0 + tq)} \frac{d}{dt} f(z_0 + t q) \cr
&= f(z_0 + t q) \overline{ q f'(z_0 + t q)} + \overline{f(z_0 + tq)} q f'(z_0 + t q)\cr}$$
At $t=0$ this would be $u_0 \overline{q p} + \overline{u_0} q p = 2 \text{Re}(u_0 \overline{qp})$. If $u_0 \ne 0$ and $p \ne 0$, choose $q = u_0/p$ and this is $2 |u_0|^2 > 0$. But that’s impossible if $|f(z_0)|^2$ is to be constant. So either $u_0 = 0$ (and then $|f(z)| = 0$ so $f(z) = 0$ everywhere) or $f'(z) = 0$ everywhere, and that implies $f$ is constant.

This follows from the Maximum Modulus Theorem. However, the proof that comes to mind of the Maximum Modulus Theorem using the Cauchy Integral Formula actually uses this fact, so that might be circular.

To prove this special case of the Maximum Modulus Theorem, Pete L. Clark has already mentioned that the Open Mapping Theorem applies.

An alternative is to use the Cauchy-Riemann equations. If $f(z)=f(x+iy)=u(x,y)+iv(x,y)$, by hypothesis there exists a constant $r\geq 0$ such that $u^2+v^2 = r^2$. It follows that $uu_x+vv_x=0$ and $uu_y+vv_y=0$. You also have $u_x=v_y$ and $u_y=-v_x$. A little algebraic manipulation yields $u(u_x^2+v_x^2)=v(u_x^2+v_x^2)=0$. Assuming $r\neq 0$, $u$ and $v$ are never simultaneously $0$, so it follows that $u_x^2+v_x^2\equiv 0$, which implies that $u_x=v_y=0$ and $v_x=-u_y=0$. Therefore $f$ is constant.

Another way to use the Cauchy-Riemann equations is to first map the circle $|z|=r$ into the real axis, either using a Möbius tranformation, or using logarithms. E.g., consider $g\circ f$, where $g(z)=i\dfrac{1+\frac{z}{r}}{1-\frac{z}{r}}$. (Such maps won’t be defined on the entire circle, but it is enough to show that $f$ is locally constant.)