Deriving $E=mc^2$ from relativity and the Maxwell equations I've heard that Einstein derived $E=mc^2$ from applying the relativity principle to the Maxwell equations. Is this true? If so, could someone derive it and show me how this is and why it's true?
 A: This is sort-of true.
Maxwell’s equations tell us that electromagnetic waves have momentum. This was confirmed experimentally. But electromagnetic waves have no mass and so this momentum cannot be defined by the classical momentum $$\vec{p}=m\vec{v}\tag 1$$
Maxwell’s equations lead to the fact that electromagnetic waves (in vacuum) travel the same speed $c$ which appears in the energy-mass relation $$E=mc^2$$
But the important point here is that Maxwell’s electromagnetism shows that the right expression for the linear momentum of an electromagnetic wave had to be expressed in terms of energy, and not mass. That is, the (magnitude of linear momentum, while the direction of the linear momentum is obtained by the Pointing vector) linear momentum of an electromagnetic wave is given by $$p=\frac{E}{c}\tag 2$$
From there,  one popular method to derive the mass-energy equivalence relation  is to consider an isolated system containing two objects mass $m$ (one emitting a photon and the other absorbing it), and that one object emits a pulse of light, and due to conservation of momentum (meaning we equate equations (1) and (2)) we get $$mv=\frac{E}{c}$$ so that $$v=\frac{E}{mc}$$
I will point you to this physics stackexchange post here for the rest of the derivation from this point on. The point here is that the linear momentum of an electromagnetic wave was consistent with Maxwell's equations, which can be used for  the derivation of the Einstein relation above .
