# How many degrees of freedom does an electromagnetic field have? How to correctly count them?

How many independent degrees of freedom does a most general classical electromagnetic field have in presence of sources? What is the correct way to count them? In terms of the components of the electric field $(E_x,E_y,E_z)$ and magnetic field $(B_x,B_y,B_z)$, there are 6 degrees of freedom. But they are not all independent due to relations of the form $$\frac{\partial\vec{B}}{\partial t}+\nabla\times\vec{E}=0, \qquad\nabla\cdot\vec{B}=0, \qquad \frac{\partial\rho}{\partial t}+\nabla\cdot\vec{j}=0.$$ Please help! I also have another question. Does the number of independent degrees of freedom describing an EM field decrease when we consider EM field in the vacuum? Instead of counting in terms of the independent components of $A^\mu$, can we count in terms of the components of $\vec{E}$ and $\vec{B}$?

EM field has infinity of degrees of freedom, because it takes functions, not numbers, to describe its state. You are probably interested in the least possible number of scalar functions of position in space that would contain all the information about state of EM field at some time.

Obviously, 6 functions (cartesian components of electric and magnetic field) would describe the state fully, but 6 is probably not the least number possible, because those 6 functions have to obey some universal constraints.

One way to answer this is to consider an initial value problem for EM field given sources in all space and time starting from the time $t_0$.

The initial field $(\mathbf E_0, \mathbf B_0)$ has to obey these 2 restricting conditions:

$$\nabla\cdot \mathbf E_0(\mathbf x) = \rho(\mathbf x,t_0)/\epsilon_0, ~(1)$$ $$\nabla\cdot \mathbf B_0(\mathbf x) = 0.~(2)$$ The sources are usually assumed to obey the following condition: $$\partial_t\rho + \nabla \cdot \mathbf j = 0.~(3)$$

There are 6 independent "equations of motion" that the fields as functions of time obey:

$$\partial_t \mathbf E = \nabla\times\mathbf B - \mu_0\mathbf j$$ $$\partial_t \mathbf B = -\nabla\times\mathbf E$$ These 6 equations with the above 3 conditions imply all of the Maxwell equations.

From these equations, only (1) and (2) restrict state of the field at single point of time. The continuity equation (3) does not (it only restricts evolution of the sources in time).

So, we have 2 equations for 6 functions of space. I think this means somehow we could replace those 6 functions with 4 functions, since 6-2=4.

For example, assuming $E_x, E_y, \rho$ are known functions of position, and assuming $E_z = 0$ at infinity, we can use the constraint (1) to express $E_z$:

$$E_z(x,y,z) = \int_{-\infty}^z \rho(x,y,z')/\epsilon_0 - \partial_xE_x(x,y,z') - \partial_yE_y(x,y,z') dz'.$$ So only two functions out of three are independent; the third can be found out from those two and the sources(which are assumed to be known).