# Proving $|f(z)|$ is constant on the boundary of a domain implies $f$ is a constant function

Let $D \subset \mathbb{C}$ be a bounded domain and $f$ a function holomorphic in $D$ and continuous in its closure. Suppose that $|f(z)|$ is constant on the boundary of $D$ and that $f$ does not have zeroes in $D$. Prove that $f$ is a constant function.

I think that if I can prove that $f$ attains both its maximum and minimum values on the boundary, then the result follows from the maximum principle. But I've been unable to show this. Is this the right way to approach this problem? If so, how do I show this result? Thanks in advance!

-

Consider $\frac{1}{f(z)}$. $\phantom{}$
Hi Kevin, thanks but could you be more specific? I see $\frac{1}{f(z)}$ is also holomorphic on $D$ and continuous on its closure, and $\left|\frac{1}{f(z)}\right|$ is constant on the boundary of the unit disk, but how does this help with the problem? Sorry I'm missing the point here. – anegligibleperson Oct 28 '12 at 6:53
@anegligibleperson So $|1/f(z)|$ must have a maximum on the boundary of the disc. – WimC Oct 28 '12 at 7:45
@user123 The maximum of $f$ on the closure of $D$ is the maximum on the boundary by the maximum modulus principle, and because $\bar{D}$ is compact. Comsidering $g=1/f$, we see $g$ has the same property, and hence $f$ attains both its maximum and minimum on the boundary. Since $f$ is constant there, by the open mapping theorem, we have $f$ is constant. – anegligibleperson Dec 12 '15 at 15:21