# Classical electromagnetism and special relativity

The theory of special relativity plays an important role in the modern theory of classical electromagnetism. It gives formulas for how electromagnetic objects, in particular the electric and magnetic fields, are altered under a Lorentz transformation from one inertial frame of reference to another. It sheds light on the relationship between electricity and magnetism, showing that frame of reference determines if an observation follows electric or magnetic laws. It motivates a compact and convenient notation for the laws of electromagnetism, namely the "manifestly covariant" tensor form.
Maxwell's equations, when they were first stated in their complete form in 1865, would turn out to be compatible with special relativity. Moreover, the apparent coincidences in which the same effect was observed due to different physical phenomena by two different observers would be shown to be not coincidental in the least by special relativity. In fact, half of Einstein's 1905 first paper on special relativity, "On the Electrodynamics of Moving Bodies", explains how to transform Maxwell's equations.

## Transformation of the fields between inertial frames
### E and B fields

This equation considers two inertial frames. The primed frame is moving relative to the unprimed frame at velocity v. Fields defined in the primed frame are indicated by primes, and fields defined in the unprimed frame lack primes. The field components parallel to the velocity v are denoted by E$_∥$ and B$_∥$ while the field components perpendicular to v are denoted as E$_⟂$ and B$_⟂$. In these two frames moving at relative velocity v, the E-fields and B-fields are related by:
    ${\begin{aligned}\mathbf {E_{\parallel }} '&=\mathbf {E_{\parallel }} \\\mathbf {B_{\parallel }} '&=\mathbf {B_{\parallel }} \\\mathbf {E_{\bot }} '&=\gamma \left(\mathbf {E} _{\bot }+\mathbf {v} \times \mathbf {B} \right)\\\mathbf {B_{\bot }} '&=\gamma \left(\mathbf {B} _{\bot }-{\frac {1}{c^{2}}}\mathbf {v} \times \mathbf {E} \right)\end{aligned}}$
where
    $\gamma \ {\overset {\underset {\mathrm {def} }}{=}}\ {\frac {1}{\sqrt {1-v^{2}/c^{2}}}}$
is called the Lorentz factor and c is the speed of light in free space. Lorentz factor (γ) is the same in both systems. The inverse transformations are the same except for the substitution v → −v.
An equivalent, alternative expression is:
    ${\begin{aligned}\mathbf {E} '&=\gamma \left(\mathbf {E} +\mathbf {v} \times \mathbf {B} \right)-\left({\gamma -1}\right)(\mathbf {E} \cdot \mathbf {\hat {v}} )\mathbf {\hat {v}} \\\mathbf {B} '&=\gamma \left(\mathbf {B} -{\frac {\mathbf {v} \times \mathbf {E} }{c^{2}}}\right)-\left({\gamma -1}\right)(\mathbf {B} \cdot \mathbf {\hat {v}} )\mathbf {\hat {v}} \end{aligned}}$
where $\textstyle \mathbf {\hat {v}} ={\frac {\mathbf {v} }{\Vert \mathbf {v} \Vert }}$ is the velocity unit vector. With previous notations, one actually has $(\mathbf {E} \cdot \mathbf {\hat {v}} )\mathbf {\hat {v}} =\mathbf {E} _{\parallel }$ and $(\mathbf {B} \cdot \mathbf {\hat {v}} )\mathbf {\hat {v}} =\mathbf {B} _{\parallel }$.
Component by component, for relative motion along the x-axis v = (v, 0, 0), this works out to be the following:
    ${\begin{aligned}E'_{x}&=E_{x}&\qquad B'_{x}&=B_{x}\\E'_{y}&=\gamma \left(E_{y}-vB_{z}\right)&B'_{y}&=\gamma \left(B_{y}+{\frac {v}{c^{2}}}E_{z}\right)\\E'_{z}&=\gamma \left(E_{z}+vB_{y}\right)&B'_{z}&=\gamma \left(B_{z}-{\frac {v}{c^{2}}}E_{y}\right).\\\end{aligned}}$
If one of the fields is zero in one frame of reference, that doesn't necessarily mean it is zero in all other frames of reference. This can be seen by, for instance, making the unprimed electric field zero in the transformation to the primed electric field. In this case, depending on the orientation of the magnetic field, the primed system could see an electric field, even though there is none in the unprimed system.
This does not mean two completely different sets of events are seen in the two frames, but that the same sequence of events is described in two different ways (see § Moving magnet and conductor problem below).
If a particle of charge q moves with velocity u with respect to frame S, then the Lorentz force in frame S is:
    $\mathbf {F} =q\mathbf {E} +q\mathbf {u} \times \mathbf {B}$
In frame S′, the Lorentz force is:
    $\mathbf {F'} =q\mathbf {E'} +q\mathbf {u'} \times \mathbf {B'}$
A derivation for the transformation of the Lorentz force for the particular case u = 0 is given here. A more general one can be seen here.
The transformations in this form can be made more compact by introducing the electromagnetic tensor (defined below), which is a covariant tensor.

### D and H fields

For the electric displacement D and magnetic field strength H, using the constitutive relations and the result for c$^2$:
    $\mathbf {D} =\epsilon _{0}\mathbf {E} \,,\quad \mathbf {B} =\mu _{0}\mathbf {H} \,,\quad c^{2}={\frac {1}{\epsilon _{0}\mu _{0}}}\,,$
gives
    ${\begin{aligned}\mathbf {D} '&=\gamma \left(\mathbf {D} +{\frac {1}{c^{2}}}\mathbf {v} \times \mathbf {H} \right)+(1-\gamma )(\mathbf {D} \cdot \mathbf {\hat {v}} )\mathbf {\hat {v}} \\\mathbf {H} '&=\gamma \left(\mathbf {H} -\mathbf {v} \times \mathbf {D} \right)+(1-\gamma )(\mathbf {H} \cdot \mathbf {\hat {v}} )\mathbf {\hat {v}} \end{aligned}}$
Analogously for E and B, the D and H form the electromagnetic displacement tensor.

### φ and A fields

An alternative simpler transformation of the EM field uses the electromagnetic potentials – the electric potential φ and magnetic potential A:
    ${\begin{aligned}\varphi '&=\gamma \left(\varphi -vA_{\parallel }\right)\\A_{\parallel }'&=\gamma \left(A_{\parallel }-{\frac {v\varphi }{c^{2}}}\right)\\A_{\bot }'&=A_{\bot }\end{aligned}}$
where A$_∥$ is the component of A that is parallel to the direction of relative velocity between frames v, and A$_⟂$ is the perpendicular component. These transparently resemble the characteristic form of other Lorentz transformations (like time-position and energy-momentum), while the transformations of E and B above are slightly more complicated. The components can be collected together as:
    ${\begin{aligned}\mathbf {A} '&=\mathbf {A} -{\frac {\gamma \varphi }{c^{2}}}\mathbf {v} +\left(\gamma -1\right)\left(\mathbf {A} \cdot \mathbf {\hat {v}} \right)\mathbf {\hat {v}} \\\varphi '&=\gamma \left(\varphi -\mathbf {A} \cdot \mathbf {v} \right)\end{aligned}}$

### ρ and J fields

Analogously for the charge density ρ and current density J,
    ${\begin{aligned}J_{\parallel }'&=\gamma \left(J_{\parallel }-v\rho \right)\\\rho '&=\gamma \left(\rho -{\frac {v}{c^{2}}}J_{\parallel }\right)\\J_{\bot }'&=J_{\bot }\end{aligned}}$
Collecting components together:
    ${\begin{aligned}\mathbf {J} '&=\mathbf {J} -\gamma \rho \mathbf {v} +\left(\gamma -1\right)\left(\mathbf {J} \cdot \mathbf {\hat {v}} \right)\mathbf {\hat {v}} \\\rho '&=\gamma \left(\rho -{\frac {\mathbf {J} \cdot \mathbf {v} }{c^{2}}}\right)\end{aligned}}$

### Non-relativistic approximations

For speeds v ≪ c, the relativistic factor γ ≈ 1, which yields:
    ${\begin{aligned}\mathbf {E} '&\approx \mathbf {E} +\mathbf {v} \times \mathbf {B} \\\mathbf {B} '&\approx \mathbf {B} -{\frac {1}{c^{2}}}\mathbf {v} \times \mathbf {E} \\\mathbf {J} '&\approx \mathbf {J} -\rho \mathbf {v} \\\rho '&\approx \rho -{\frac {1}{c^{2}}}\mathbf {J} \cdot \mathbf {v} \end{aligned}}$
so that there is no need to distinguish between the spatial and temporal coordinates in Maxwell's equations.

## Relationship between electricity and magnetism

   One part of the force between moving charges we call the magnetic force. It is really one aspect of an electrical effect.

### Deriving magnetism from electric laws

The chosen reference frame determines whether an electromagnetic phenomenon is viewed as an electric or magnetic effect or a combination of the two. Authors usually derive magnetism from electrostatics when special relativity and charge invariance are taken into account. The Feynman Lectures on Physics (vol. 2, ch. 13–6) uses this method to derive the magnetic force on charge in parallel motion next to a current-carrying wire. See also Haskell and Landau.
If the charge instead moves perpendicular to a current-carrying wire, electrostatics cannot be used to derive the magnetic force. In this case, it can instead be derived by considering the relativistic compression of the electric field due to the motion of the charges in the wire.

### Fields intermix in different frames

The above transformation rules show that the electric field in one frame contributes to the magnetic field in another frame, and vice versa. This is often described by saying that the electric field and magnetic field are two interrelated aspects of a single object, called the electromagnetic field. Indeed, the entire electromagnetic field can be represented in a single rank-2 tensor called the electromagnetic tensor; see below.

### Moving magnet and conductor problem

A famous example of the intermixing of electric and magnetic phenomena in different frames of reference is called the "moving magnet and conductor problem", cited by Einstein in his 1905 paper on special relativity.
If a conductor moves with a constant velocity through the field of a stationary magnet, eddy currents will be produced due to a magnetic force on the electrons in the conductor. In the rest frame of the conductor, on the other hand, the magnet will be moving and the conductor stationary. Classical electromagnetic theory predicts that precisely the same microscopic eddy currents will be produced, but they will be due to an electric force.

## Covariant formulation in vacuum

The laws and mathematical objects in classical electromagnetism can be written in a form which is manifestly covariant. Here, this is only done so for vacuum (or for the microscopic Maxwell equations, not using macroscopic descriptions of materials such as electric permittivity), and uses SI units.
This section uses Einstein notation, including Einstein summation convention. See also Ricci calculus for a summary of tensor index notations, and raising and lowering indices for definition of superscript and subscript indices, and how to switch between them. The Minkowski metric tensor η here has metric signature (+ − − −).

### Field tensor and 4-current

The above relativistic transformations suggest the electric and magnetic fields are coupled together, in a mathematical object with 6 components: an antisymmetric second-rank tensor, or a bivector. This is called the electromagnetic field tensor, usually written as F$^{μν}$. In matrix form:
    $F^{\mu \nu }={\begin{pmatrix}0&-E_{x}/c&-E_{y}/c&-E_{z}/c\\E_{x}/c&0&-B_{z}&B_{y}\\E_{y}/c&B_{z}&0&-B_{x}\\E_{z}/c&-B_{y}&B_{x}&0\end{pmatrix}}$
where c the speed of light; in natural units c = 1.
There is another way of merging the electric and magnetic fields into an antisymmetric tensor, by replacing E/c → B and B → −E/c, to get its Hodge dual G$^{μν}$.
    $G^{\mu \nu }={\begin{pmatrix}0&-B_{x}&-B_{y}&-B_{z}\\B_{x}&0&E_{z}/c&-E_{y}/c\\B_{y}&-E_{z}/c&0&E_{x}/c\\B_{z}&E_{y}/c&-E_{x}/c&0\end{pmatrix}}$
In the context of special relativity, both of these transform according to the Lorentz transformation according to
    $F^{\alpha '\beta '}=\Lambda ^{\alpha '}_{\mu }\Lambda ^{\beta '}_{\nu }F^{\mu \nu }$,
where Λ$^{α′}$$_ν$ is the Lorentz transformation tensor for a change from one reference frame to another. The same tensor is used twice in the summation.
The charge and current density, the sources of the fields, also combine into the four-vector
    $J^{\alpha }=\left(c\rho ,J_{x},J_{y},J_{z}\right)$
called the four-current.

### Maxwell's equations in tensor form

Using these tensors, Maxwell's equations reduce to:
${\begin{aligned}{\frac {\partial F^{\alpha \beta }}{\partial x^{\alpha }}}&=\mu _{0}J^{\beta }\\[3pt]{\frac {\partial G^{\alpha \beta }}{\partial x^{\alpha }}}&=0\end{aligned}}$
where the partial derivatives may be written in various ways, see 4-gradient. The first equation listed above corresponds to both Gauss's Law (for β = 0) and the Ampère-Maxwell Law (for β = 1, 2, 3). The second equation corresponds to the two remaining equations, Gauss's law for magnetism (for β = 0) and Faraday's Law (for β = 1, 2, 3).
These tensor equations are manifestly covariant, meaning they can be seen to be covariant by the index positions. This short form of Maxwell's equations illustrates an idea shared amongst some physicists, namely that the laws of physics take on a simpler form when written using tensors.
By lowering the indices on F$^{αβ}$ to obtain F$_{αβ}$:
    $F_{\alpha \beta }=\eta _{\alpha \lambda }\eta _{\beta \mu }F^{\lambda \mu }$
the second equation can be written in terms of F$_{αβ}$ as:
    $\varepsilon ^{\delta \alpha \beta \gamma }{\dfrac {\partial F_{\beta \gamma }}{\partial x^{\alpha }}}={\dfrac {\partial F_{\alpha \beta }}{\partial x^{\gamma }}}+{\dfrac {\partial F_{\gamma \alpha }}{\partial x^{\beta }}}+{\dfrac {\partial F_{\beta \gamma }}{\partial x^{\alpha }}}=0$
where ε$^{δαβγ}$ is the contravariant Levi-Civita symbol. Notice the cyclic permutation of indices in this equation: α → β → γ → α from each term to the next.
Another covariant electromagnetic object is the electromagnetic stress-energy tensor, a covariant rank-2 tensor which includes the Poynting vector, Maxwell stress tensor, and electromagnetic energy density.

### 4-potential

The EM field tensor can also be written
    $F^{\alpha \beta }={\frac {\partial A^{\beta }}{\partial x_{\alpha }}}-{\frac {\partial A^{\alpha }}{\partial x_{\beta }}}\,,$
where
    $A^{\alpha }=\left({\frac {\varphi }{c}},A_{x},A_{y},A_{z}\right)\,,$
is the four-potential and
    $x_{\alpha }=(ct,-x,-y,-z)$
is the four-position.
Using the 4-potential in the Lorenz gauge, an alternative manifestly-covariant formulation can be found in a single equation (a generalization of an equation due to Bernhard Riemann by Arnold Sommerfeld, known as the Riemann–Sommerfeld equation, or the covariant form of the Maxwell equations):
$\Box A^{\mu }=\mu _{0}J^{\mu }$
where $\Box$ is the d'Alembertian operator, or four-Laplacian.