Is $f(z) = |z|$ holomorphic on $\mathbb{C}$? I am trying to refine my complex analysis skills and have come across a curious problem. It is as follows:
Determine whether the function $f(z) = |z|$ is holomorphic on $\mathbb{C}$.
I have tried to use the Cauchy-Riemann equations but am not sure how to proceed. Any help is appreciated. 
 A: To use the CR equations, we need to set up the functions $u, v:\Bbb R^2\to \Bbb R$ such that
$$
f(x + iy) = u(x, y) + iv(x, y)
$$
for real $x, y$. This isn't that difficult, as we already know that
$$
|x + iy| = \sqrt{x^2 + y^2}
$$
which means that 
$$
u(x, y) = \sqrt{x^2 + y^2}\\
v(x, y) = 0
$$
Now insert into the CR equations and see that you don't get equality.
A: More generally, if $f: \mathbb C \to \mathbb C$ is a holomorphic function such that $f(\mathbb C)\subseteq \mathbb R$, then $f$ is constant.
Indeed, the imaginary part of $f$ is zero and so the Cauchy–Riemann equations imply that the real part of $f$ has zero partial derivatives and so is constant.
Since $z \mapsto |z|$ is real but not constant, it cannot be holomorphic.
A: Your functions isn't even differentiable at $0$: if you restrict $z$ to the non-negative reals, you get $\lim_{z\to0}\frac{|z|}z=1$ and if you restrict $z$ to the non-positive reals, you get $\lim_{z\to0}\frac{|z|}z=-1$. It turns out that it is differentiable nowhere.
A: No, because $$|z|=\sqrt{z\bar z}$$ and a function $f(z)$ of complex variable $z$ is holomorphic only if $\frac{\partial f}{\partial \bar z}=0$
