Complex gradient

Suppose \(f: {\mathbb{C}}^n \to {\mathbb{R}}\) is a real-valued function and \(x \in {\mathop{\bf int}}{\mathop{\bf dom}}f\). The gradient \(\nabla f(x)\) is an \(n \times 1\) matrix (a column vector), defined by \[\nabla f(x) = Df(x)^T = \left[ \begin{array}{c} \frac{\partial f}{\partial x_1}(x) \\ \vdots \\ \frac{\partial f}{\partial x_n}(x) \end{array} \right]. \nonumber\]

Chain rule

Let \(f : {\mathbb{C}}^n \to {\mathbb{C}}^m\) be differentiable at \(x \in {\mathop{\bf int}}{\mathop{\bf dom}}f\), and let \(g : {\mathbb{C}}^m \to {\mathbb{R}}\) be differentiable at \(f(x) \in {\mathop{\bf int}}{\mathop{\bf dom}}g\). Define the composite function \(h = g \circ f: {\mathbb{C}}^n \to {\mathbb{R}}\) by \(h(x) = g(f(x))\), with \({\mathop{\bf dom}}h = \{x \, | \, f(x) \in {\mathop{\bf dom}}g\}\). Then h is differentiable at \(x\), with derivative \[Dh(x) = Dg(f(x))Df(x),\] Taking the transpose of \(Dh(x) = Dg(f(x))Df(x)\) gives the gradient of \(h(x)\): \[\begin{aligned} \nabla h(x) &=& Dh(x)^T \nonumber\\ &=& (Dg(f(x))Df(x))^T \nonumber\\ &=& Df(x)^T Dg(f(x))^T \nonumber\\ &=& \nabla f(x) \nabla g(f(x)). \nonumber\end{aligned}\]

Suppose \(f : {\mathbb{C}}^n \to {\mathbb{C}}^m\) and \(x \in {\mathop{\bf int}}{\mathop{\bf dom}}f\). It follows that if \[f(x) = \left[ \begin{array}{c} f_1(x_1, \ldots, x_n) \\ \vdots \\ f_m(x_1, \ldots, x_n) \end{array} \right], \nonumber\] then the derivative of \(f\) at \(x\), denoted \(Df(x) \in {\mathbb{C}}^{m \times n}\), is given by \[\begin{aligned} Df(x) &=& \left[ \frac{\partial f}{\partial x_1}(x), \dots, \frac{\partial f}{\partial x_n}(x) \right] \nonumber\\ &=& \left[ \begin{array}{ccc} \frac{\partial f_1}{\partial x_1}(x_1, \ldots, x_n) & \cdots & \frac{\partial f_1}{\partial x_n}(x_1, \ldots, x_n) \\ \vdots & \ddots & \vdots \\ \frac{\partial f_m}{\partial x_1}(x_1, \ldots, x_n) & \cdots & \frac{\partial f_m}{\partial x_n}(x_1, \ldots, x_n) \\ \end{array} \right]. \nonumber\end{aligned}\]