In the derivation of the Rayleigh-Jeans law, using the Equipartition theorem the number of modes per unit frequency per unit volume is multiplied by $kT$, which implies each electromagnetic resonant mode has two degrees of freedom.

I've considered them being the amplitude of the electric field and the amplitude of the magnetic field, but they're both proportional in a vacuum.

I've also considered it being the two possible polarizations of each mode, but that is already accounted for when the modes are being counted.

  • $\begingroup$ Are you sure it's already accounted for? $\endgroup$ Mar 23, 2018 at 23:19

2 Answers 2


This is a nice question, glossed over in many textbooks! Let's start with the electromagnetic field Hamiltonian, $$H \sim \frac12 \left(E^2 + B^2\right).$$ Naively one would say that $\mathbf{E}$ and $\mathbf{B}$ are the two degrees of freedom, giving the factor of two. But as you noted, this isn't correct. The fields $\mathbf{E}$ and $\mathbf{B}$ are not conjugate phase space variables, so the reasoning does not go through in analogy to the harmonic oscillator $$H \sim \frac12 \left(p^2 + \omega^2 x^2 \right).$$ Indeed $\mathbf{E}$ and $\mathbf{B}$ are instead proportional, as you noted. Another indication something is wrong is that there should be an $\omega^2$ in front of one of the terms.

A mode of the electromagnetic field really is analogous to a harmonic oscillator, but the argument requires more care. We note that $\mathbf{E}$ is the conjugate momentum to $\mathbf{A}$, and rewrite the Hamiltonian in terms of these variables. We use $\mathbf{B} = \nabla \times \mathbf{A}$ and work in Coulomb gauge $\nabla \cdot \mathbf{A} = 0$, which removes one of the polarizations. Dropping all constants, integrating by parts, and using $\omega^2 = k^2$, we find $$H \sim \frac12 (E^2 + \omega^2 A^2).$$ This is indeed a harmonic oscillator, giving the desired factor of $2$.

  • $\begingroup$ Amazing answer but, how do we go about proving $E$ is $A $'s conjugate momentun? $\endgroup$ Mar 24, 2018 at 13:44
  • $\begingroup$ @user140323 I recommend starting from the Lagrangian, $\mathcal{L} = - \frac14 F_{\mu\nu} F^{\mu\nu}$, where it is unambiguous that $A^\mu$ is the 'generalized position'. You can then show $\mathbf{E}$ is the conjugate momentum to $\mathbf{A}$ by direct differentiation. It's trickier starting from the "Hamiltonian" $E^2 + B^2$ because it's not in the right variables -- but I suppose you can reverse-engineer it by demanding Maxwell's equations are Hamilton's equations. $\endgroup$
    – knzhou
    Mar 24, 2018 at 14:28
  • $\begingroup$ Also, possible pitfall: there is no conjugate momentum for $A^0$ because electromagnetism is weird. I went around this issue by going straight to Coulomb gauge. $\endgroup$
    – knzhou
    Mar 24, 2018 at 14:29

The classical equipartition theorem for a one-dimensional harmonic oscillators gives a mean kinetic energy of $\frac{k}{2}$ and a mean potential energy $\frac{k}{2}$ so that the total mean energy is $k$. Analogously, the electromagnetic modes can be considered as harmonic oscillators which have a total mean energy (kinetic and potential) of $k$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.