Let's consider a two-dimensional electric field $\textbf{E}=\textbf{E}(\mathbf x)$, where $\mathbf x\in \mathbb R^2$, and $\textbf{E}$ is a vector representing the direction and strength of the field at that point.
As a vector field, $\textbf{E}$ is the gradient of a scalar field $\phi(\mathbf x)$, the electric potential at point $\mathbf x$: $$\textbf{E}(\mathbf x)=\nabla\phi(\mathbf x). $$
As E is the gradient of a scalar field, the curl of $E$ should be zero.
Now let's bring in complex numbers. The input and output of $E(\mathbf x)$ are both two-dimensional vectors; therefore the input and output can be written as two complex numbers. So we can define that $E(z)$ as a complex-valued function defined on $\mathbb C$.
Since the curl of $\textbf{E}$ is zero, $\frac{\partial E_x}{\partial y}=\frac{\partial E_y}{\partial x}$. This is very similar to one of the Cauchy Riemann equations.
The Cauchy-Riemann equations are $$ u_x'=v_y'\\ v_x'=-u_y'. $$ More details about Cauchy-Riemann Equations.
Question:
I hope that $\textbf{E}(z)$ is analytic, but apparently, that's not necessarily the case. Are there any ways to change this a bit so that $\textbf{E}(z)$ is analytic? Can electric fields be studied using analytic functions?
This is not the type of thing I see in most textbooks, so it is very difficult to explain what I mean. Please make sure you understand what I mean first before leaving a comment or a vote. If I am not clear, please ask me to clarify it.
I don't think this is a duplicate: although there are many posts on PSE about complex numbers, they are often very broad and many of them are just about simple things such as expressing sine waves with complex exponentials.