# Electromagnetic waves - complex numbers

The solution for the wave equation for the electric field is generally: $$\vec{E} = E_0 e^{i(\vec{k}\cdot\vec{r} - \omega t)}$$ My question is about the complex part, why do we use complex numbers? Why isn't it described by a cosine function without an imaginary part? Is it only out of comfort, making phase shifts more easy to deal with? From a mathematical perspective, we can describe functions using Fourier analysis, constructing waves using sum of exponents with different frequencies, but how does that apply to a real world wave? It is something I generally struggle with, understanding the place complex numbers have in physics in different topics, but I see the imaginary part mainly deals with the phases and I was wondering if it is here for the same reason.

The electric field is actually a real quantity. The complex notation is just a mathematical trick, we use to simplify the calculations. This trick is fine as long as we are dealing with linear systems, where the fields are multiplied by scalar numbers or added to scalar numbers. Once we leave this regime and calculate e.g. intensities $$I\propto |E|^2$$, we should convert the electric field to a real number before doing the calculation. E.g. the plane wave $$E = E_0 e^{i(kx - wt)}$$ would yields $$|E|^2 = |E_0|^2$$ irrespectively of position and time, while $$|\Re\{E\}|^2 = |E_0|^2 \cos^2(kx - wt)$$ accounts for the oscillations.