# If $f$ is analytic then $|f|$ is not constant unless $f$ is constant

Let $f$ be analytic in a domain (open connected set of the domain of definition) (that is, every point of that domain is such that $f'$ exists in that point and also in a neighborhood of radius $r>0$ of that point). Show that his absolute value $|f|$ can't be constant unless $f$ is constant too.

Firstly, I'm a little confused about the statement. I must prove $|f|$ is constant $\Rightarrow f$ is constant?

Assuming that's what I must show, here's my attempt: if $f$ and $\overline{f}$ are both analytic then $f$ is constant so if $f$ is not constant and $f$ is analytic we have that $\overline{f}$ is not analytic at some point $p$. But $|f| = \sqrt{f\overline{f}}$ so $|f|$ is also not analytic at the point $p$ so it can't be constant because constant functions are analytics at all points of their domain.

Is my attempt correct? Thanks in advance.

• I mean, one direction is trivial. If $f$ is constant then certainly taking its absolute value will not change anything and $|f|$ is still constant. For the other direction, what theorems do you know? The maximum principle for example? Liouville's theorem?
– Luke
Oct 2 '17 at 12:30
• I know what I used in my attempt and also that if $f=u+iv$ is analytic then $-v+iu$ is analytic too Oct 2 '17 at 13:11
• How do you get from the non-analyticity of $\overline{f}$ to that of $\sqrt{f\overline{f}}$? Different approach: If $\lvert f\rvert \equiv 0$, it's trivial that $f \equiv 0$. If $\lvert f\rvert \neq 0$, look at the analytic [assuming $\lvert f\rvert$ constant] function $\frac{\lvert f\rvert^2}{f}$. Oct 2 '17 at 13:22

Suppose that $$|f|\equiv k$$ for some $$k\in[0,+\infty)$$.
1. If $$k=0$$, then $$f\equiv0$$.
2. Otherwise, the image of $$f$$ is contained in the circle centered at $$0$$ with radius $$k$$. Such a set contains no open non-empty subset of $$\mathbb C$$. But, if $$f$$ was not constant, then by the open mapping theorem, its image would be an open (and obviously non-empty) subset of $$\mathbb C$$.
Observe that $|f|^2=u^2+v^2$, where $f(x,y)=u(x,y)+iv(x,y)$. If $|f(z)|^2=0$ for some $z \in \Omega$, we are done. Therefore consider $|f|^2 \neq 0$. Differeniate $|f|^2$ with respect to $x$ and $y$. Since $|f|^2$ is constant, we get by Cauchy-Riemann that $$0=2uu_x+2vv_x=2uu_x-2vu_y$$ $$0=2uu_y+2vv_y=2 u u_y+2vu_x$$ Rewriting it in matrix form with the matrix $M$ gives: $$2 \begin{bmatrix} u & -v \\ v & u \end{bmatrix} \begin{bmatrix} u_x \\ u_y \end{bmatrix}= \begin{bmatrix} 0 \\ 0 \end{bmatrix}$$ Then, observe that $det(M)=|f|^2\neq0$. There, in order for the linear equation system to be statisfied, it is required that $u_x=u_y=0$. Therefore, $Re(f)$ is constant. Therefore $f$ is constant.