Let $f:\mathbb{C}^N\rightarrow\mathbb{R}$ such that $f(x) = \langle Ax - b, M(Ax-b)\rangle$, where $\langle\cdot,\cdot\rangle$ represents the complex dot product and $M$ is a positive semidefinite Hermitian symmetric matrix. That is, $f(x) = (Ax-b)^\ast M (Ax-b)$, where $\cdot^\ast$ represents conjugate transpose. Here, $A\in\mathbb{C}^{M\times N}$ and $b\in\mathbb{C}^M$
I'd like to find $x^\star$ that minimizes $f$. To do so, I think I can find the gradient of $f$ and set it equal to $0$. So then, what is the gradient of $f$?
I see that $f(x)=x^\ast A^\ast M A x - x^\ast A^\ast M b - b^\ast M A x + b^\ast M b$.
I also see that $x^\ast A^\ast M b = \text{conjugate}(b^\ast M A x)$.
I do not know what to do from here.
The function $f$ does have a gradient (or a Frechet derivative) if we view $\mathbb C^n$ as a vector space over $\mathbb R$, endowed with the inner product $$ \langle x, y \rangle = \text{Re}(x^* y). $$ Notice that if $A \in \mathbb C^{m \times n}$ and $A^*$ is the conjugate transpose of $A$ then $$ \langle z, Ax \rangle = \langle A^* z, x \rangle $$ for all $x \in \mathbb C^n, z \in \mathbb C^m$.
Suppose that $A \in \mathbb C^{m \times n}$, $b \in \mathbb C^n$, and assume that $M \in \mathbb C^{m \times m}$ is Hermitian positive definite. Define $f: \mathbb C^n \to \mathbb R$ by $$ f(x) = \langle Ax - b, M(Ax - b) \rangle $$ for all $x \in \mathbb C^m$. If $\Delta x \in C^m$ is small then \begin{align} f(x + \Delta x) &= f(x) + \langle A \Delta x, M(Ax - b) \rangle + \langle Ax - b, MA \Delta x \rangle + \underbrace{\langle A \Delta x, MA \Delta x \rangle}_{\text{negligible}} \\ &\approx f(x) + \langle A \Delta x, M(Ax - b) \rangle + \langle Ax - b, MA \Delta x \rangle \\ &= f(x) + 2 \langle A^* M(Ax - b), \Delta x \rangle. \end{align} Comparing this with the equation $$ f(x + \Delta x) \approx f(x) + \langle \nabla f(x), \Delta x \rangle, $$ we discover that $$ \nabla f(x) = 2A^* M(Ax - b). $$
To minimize $f(x)$, we set its gradient equal to $0$: $$ 2A^*(M(Ax - b)) = 0 \implies x = (A^* M A)^{-1} A^* Mb $$ (assuming $A^* M A$ is invertible).
So, there is no need to split our vectors and matrices into real and imaginary parts if they are naturally viewed as having entries in $\mathbb C$ (as often happens in MRI reconstruction problems).