Is $|z|^2$ complex differentiable? I think I am a bit confused about the definition of (complex) differentiability. Yes, I know that's stupid, but I am hoping that someone could clear it up for me. I know that the definition of (complex) differentiability is when $\lim\limits_{h\to 0}{f(z+h)-f(z)\over h}$ exists.
So, is $|z|^2$ considered differentiable? What I think is it is only differentiable at $z=0$ since at any other point if we take $f(z+h)-f(z)\over h$  as $h\to 0$ along a contour line of $|z|^2$ then the limit is $0$ whereas if we take a path say perpendicular to the contour lines, the "gradient" wouldn't be $0$, right? But then if this is true then all complex functions that are "not flat" would not be differentiable, so I must be wrong. Could someone kindly explain to me what is going on? Sorry for my stupidity!
 A: Try what happens if you take $f(z) = |z|^2 = z\overline{z}$ in the definition of differentiability. You get $\frac{(z+h)\overline{(z+h)} - z\overline{z}}{h}$ which simplifies to $z\frac{\overline{h}}{h} + \overline{z} + \overline{h}$. Now, the last term $\overline{h}$ has the same absolute value as $h$ does, so it will tend to zero, when h goes to zero. So the only possible problem here would be $\frac{\overline{h}}{h}$ in the first term. This is the same as $(\frac{|h|}{h})^2$. But we can write every $h$ uniquely in the form $r e^{i\phi}$, so the fraction $\frac{|h|}{h}$ simplifies to $e^{-2 i \phi}$, where $\phi$ is determined by $h$. So, no matter how close to zero $h$ gets, $(\frac{|h|}{h})^2$ will describe a whole unit circle in the plane and thus in can't possibly have a limit as $h\to 0$, so the function is not complex-differentiable at any point, except indeed at the point $z=0$, where the first term is $0 \frac{\overline{h}}{h}$ and thus equal to zero. (I hope this helps.)
Complex differentiability is quite a strong condition, so many not-so-ugly functions are in fact not complex differentiable.
A: The function $z\mapsto|z|^2$ is not the typical "complex function" that aspires to be analytic, because it is real-valued to begin with. The latter fact makes it possible to talk about contour-lines, while a truly complex function $f:\ {\mathbb C}\to{\mathbb C}$ has no contour lines: The solutions to an equation of the form $f(z)=w_0\in{\mathbb C}$ typically form a set of isolated points in the $z$-plane.
Any "complex function" $$f:\quad {\mathbb C}\to{\mathbb C}, \qquad z\mapsto w:=f(z)$$ can be viewed as a vector-valued function $${\bf f}:\quad{\mathbb R}^2\to{\mathbb R}^2\ , \qquad{\bf z}\mapsto{\bf w}={\bf f}({\bf z})$$ resp. as a pair of functions 
$$(x,y)\ \mapsto \bigl(u(x,y),v(x,y)\bigr)$$ 
via the identifications ${\bf z}:=(x,y)=x+iy=:z$, and similarly for ${\bf w}$. The Jacobian 
$$J_{\bf f}({\bf z}_0) =\left[\matrix{u_x(x_0,y_0) & u_y(x_0,y_0) \cr 
v_x(x_0,y_0) & v_y(x_0,y_0) \cr}\right]$$
of such an ${\bf f}$ at a given point ${\bf z}_0=(x_0,y_0)$ can be any $(2\times2)$-matrix and describes a certain linear map from the tangent space at ${\bf z}_0$ to the tangent space at ${\bf w}_0={\bf f}({\bf z}_0)$.
When such a function $f$ resp. ${\bf f}$ is analytic then the Jacobian of ${\bf f}$ at a point ${\bf z}_0$ can no longer be an arbitrary matrix. The fact that one has an approximation of the sort
$$f(z_0+h)-f(z_0)= C\ h + o(|h|)\qquad (h\to 0\in{\mathbb C})$$ for some complex factor $C=:f'(z_0)\in{\mathbb C}$ implies that $J_{\bf f}({\bf z}_0)$ is a matrix of the form
$$\left[\matrix{A&-B\cr B & A\cr}\right]\ .$$
Geometrically this means that ${\bf f}'({\bf z}_0)$ is a (proper) similarity with stretching factor $\sqrt{A^2+B^2}$ and turning angle $\phi:=\arg(A,B)$. The $A$ and $B$ appearing in this matrix are related to $f'(z_0)$ via $f'(z_0)=A+iB$.
For an analytic function $f$ these facts must be true not only at a single point $z_0$ in the domain of $f$  but for all points $z_0$  in the domain of $f$. This is expressed in the so-called Cauchy-Riemann differential equations $u_x=v_y$, $u_y=-v_x$.
