Derivative of a real function (the magnitude of a variable) w.r.t a complex variable Let $z=x+iy$ and let $f(z) = |z| = \sqrt{x^2+y^2}$. Is it possible to get a derivative of $f(z)$ w.r.t the complex variable, $z$? 
I know the Cauchy-Riemann equations are not satisfied, since $f(z)=u(x,y)+iv(x,y)\Rightarrow v(x,y)=0$ in my case, but I'm wondering if there's any approach I can take to go in a certain direction to minimize $f(z)$ in this case.
Thanks.
 A: Suppose that $x+iy\to a+ib$ along a line of slope $m=\frac{y-b}{x-a}$.
$$
\begin{align}
&\frac{\sqrt{x^2+y^2}-\sqrt{a^2+b^2}}{(x+iy)-(a+ib)}\\
&=\frac{x^2-a^2+y^2-b^2}{(x-a)+i(y-b)}\frac1{\sqrt{x^2+y^2}+\sqrt{a^2+b^2}}\\
&=\frac{(x+a)(x-a)+(y+b)(y-b)}{(x-a)+i(y-b)}\frac1{\sqrt{x^2+y^2}+\sqrt{a^2+b^2}}\\
&\to\frac{a+bm}{1+im}\frac1{\sqrt{a^2+b^2}}
\end{align}
$$
If $m=0$, this is $\dfrac{a}{\sqrt{a^2+b^2}}$
If $m\to\infty$, this is $-i\dfrac{b}{\sqrt{a^2+b^2}}$
Since these differ, the limit used to define a derivative does not exist.

However, we can look at $\frac{\partial}{\partial x}\sqrt{x^2+y^2}$ and $\frac{\partial}{\partial y}\sqrt{x^2+y^2}$ and find where they are both $0$ to attempt to find a minimum.
The condition in $\mathbb{R}^1$ for a minimum is that $\frac{\mathrm{d}^2}{\mathrm{d}x^2}f(x)\gt0$. In $\mathbb{R}^2$. The corresponding notion in $\mathbb{R}^2$ is that
$$
\begin{bmatrix}
\frac{\partial^2}{\partial x^2}f&\frac{\partial^2}{\partial x\partial y}f\\
\frac{\partial^2}{\partial y\partial x}f&\frac{\partial^2}{\partial y^2}f
\end{bmatrix}
$$
is positive definite.
