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. 
 A: Suppose that $|f|\equiv k$ for some $k\in[0,+\infty)$.

*

*If $k=0$, then $f\equiv0$.

*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$.

A: 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.
