Lesson 17 Electromagnetic Fields
Introduction
We have learned to describe free particles and interactions through the Lagrangian in ordinary space. Now the stage itself is spacetime, and the objects that live on it are fields. The goal of this lesson is to see how the familiar electromagnetic quantities—potentials, forces, conservation laws—reappear as tensorial structures once we insist that the laws look the same in every inertial frame. We begin with the free particle, then introduce the field that couples to it, and finally write the action whose variation yields Maxwell’s equations.
In ordinary mechanics the action of a free particle is the integral of the kinetic energy. In special relativity the natural action is proportional to the proper time along the world-line. For a particle of rest mass m the action between two events is
(17.1)
The Euler–Lagrange equation that follows from this action simply says that the four-acceleration vanishes as the particle moves on a straight world-line. When we introduce a potential that depends on position and velocity, the same variational principle continues to work; only the Lagrangian density changes.
An electromagnetic field exerts forces on charges and carries both energy and momentum. The Maxwell stress tensor encodes the momentum flux. In three-vector language its components are
(17.2)
The divergence of this tensor, together with the Poynting vector, accounts for the rate of change of mechanical momentum. In spacetime the same information is collected into a single symmetric tensor
.
Charge does not disappear. If ρ is the charge density and
the current density, the continuity equation
(17.3)
must hold in every frame. Written with the four-current
the same statement becomes the covariant conservation law
(17.4)
This is the first of Maxwell’s equations in tensor form; the others will follow from the existence of a potential.
A charge q moving with four-velocity
experiences the four-force
(17.5)
where
is the mixed electromagnetic field tensor. The spatial part of this equation is the familiar Lorentz force
the temporal part is the power delivered by the electric field. Because both sides transform as four-vectors, the equation is true in every inertial frame once it is true in one.
The total action of a system of particles and fields is the sum of three pieces, with the free-particle action already written, the interaction of the particles with the field, and the action of the field by itself. Variation with respect to the particle coordinates yields the Lorentz-force law; variation with respect to the field yields the inhomogeneous Maxwell equations.
A field is a geometric object assigned to every event. Its components in one frame determine its components in every other frame by the usual tensor transformation law. The electromagnetic field is not a pair of three-vectors; it is a single antisymmetric tensor of rank two.
For a particle in an electromagnetic field the Lagrangian that reproduces the Lorentz force is
(17.6)
The first term is the free-particle Lagrangian; the remaining terms couple the particle to the potentials.
The scalar potential φ is the time component of the four-potential. In the static case it reduces to the ordinary electrostatic potential, and the force on a charge is q E=-q ∇ φ.
The vector potential
supplies the spatial components. Its curl is the magnetic field,
. Together with φ it forms the four-potential
(17.7)
Once a four-potential exists, the field strength is obtained by exterior differentiation
(17.8)
The six independent components of this antisymmetric tensor are precisely the three components of
and the three components of
. Under a Lorentz transformation the electric and magnetic fields mix; the tensor
remains the same geometric object.
In the language of differential forms the same object is the electromagnetic 2-form
(17.9)
Its exterior derivative vanishes identically, dF=0, which is the homogeneous Maxwell equation. The inhomogeneous equation is expressed with the Hodge dual and the current 3-form.
In components the two Maxwell equations read
(17.10)
and
(17.11)
The first is equivalent to Gauss’s law and Ampère’s law with Maxwell’s correction; the second is equivalent to the absence of magnetic monopoles and Faraday’s law. Both are tensor equations, hence true in every inertial frame.
The potentials are not unique. If we replace
(17.12)
for an arbitrary function χ, the field tensor
is unchanged. This freedom is the gauge invariance of electromagnetism. Physical predictions depend only on
, never on a particular choice of potential.
The symmetric tensor that carries the energy and momentum of the field is
(17.13)
Its divergence equals the Lorentz force density exerted on the charges, so the total energy-momentum of particles plus field is conserved.
The Lagrangian density whose Euler–Lagrange equation is the inhomogeneous Maxwell equation is
(17.14)
Variation with respect to
immediately yields
. The homogeneous equation follows automatically from the existence of the potential.
More About Electromagnetic Fields
We work throughout in SI units.
An electric field
exerts a pressure on any surface that cuts across the field lines. The magnitude of that pressure, acting perpendicular to
, is simply
(17.15)
At the same time the field pulls along its own direction with an equal tension. The net effect is that field lines behave rather like stretched rubber bands: they repel one another sideways and attract one another end-to-end.
Exactly the same picture holds for a magnetic field
. The pressure perpendicular to the field and the tension parallel to it are both given by
(17.16)
Again the field lines push sideways and pull lengthwise.
These stresses—pressure across the field and tension along it—are completely summarized by a single geometric object, the electromagnetic stress tensor
(17.17)
The first term inside the brackets supplies the isotropic pressure; the tensor-product terms supply the directed tension. Once this tensor is known, the force on any small volume of matter (or on the field itself) follows at once from its divergence.
The Lorentz Force
The force exerted on a charged particle by the electromagnetic field is called the Lorentz force. In an inertial frame the non-relativistic expression is
(17.18)
where q is the charge of the particle,
and
are the electric and magnetic fields evaluated at the instantaneous location of the particle, and
is the particle’s velocity. The electric term is independent of velocity; the magnetic term is perpendicular to
and therefore does no work. Consequently the magnetic field changes the direction of the momentum but leaves the kinetic energy unchanged.
Figure 17.1: The Lorentz force. The electric contribution is parallel to
; the magnetic contribution is perpendicular to both
and
.
In the Lagrangian formulation the same force arises from the interaction term
, where φ and
are the scalar and vector potentials. The Euler–Lagrange equation then reproduces the Lorentz force once the fields are recovered from the potentials by the usual relations
and
. The canonical momentum is
(17.19)
so the kinetic momentum
differs from the canonical momentum by the vector-potential term. Hamilton’s equations on the cotangent bundle therefore generate the Lorentz force when the Hamiltonian is written in terms of the kinetic momentum.
In a uniform magnetic field the motion perpendicular to
is circular (or helical if there is a parallel velocity component). The cyclotron frequency is
and the radius of the orbit is the Larmor radius
. Because the magnetic force does no work, the speed is constant and the orbit is a closed circle in the plane orthogonal to
.
Figure 17.2: Helical motion in a uniform magnetic field. The parallel velocity is constant; the perpendicular motion is uniform circular motion at the cyclotron frequency.
When both electric and magnetic fields are present the guiding-center motion acquires an additional drift. For a uniform
perpendicular to a uniform
the drift velocity is
(17.20)
The particle still circles at the cyclotron frequency, but the center of the circle moves at
. The same drift appears in the Hamiltonian picture as a slow evolution of the canonical coordinates once the rapid cyclotron motion has been averaged.
In the relativistic regime the Lorentz force retains the same form when
is replaced by the relativistic velocity and the momentum by
. The four-force is
, where
is the electromagnetic field strength and
is the four-velocity. The corresponding relativistic Lagrangian is
(17.21)
and the Legendre transform again yields a Hamiltonian on the cotangent bundle whose Hamilton equations reproduce the relativistic Lorentz force. Phase-space volume is preserved, energy is conserved when the fields are static, and the geometric structures examined in the preceding sections—periodic orbits, invariant tori, and possible chaotic layers—apply directly to the motion of a charged particle in a prescribed electromagnetic field.
Thus the Lorentz force is the concrete realization, in classical electrodynamics, of the Hamiltonian vector field on
that was introduced in Lesson 15. The magnetic term supplies the symplectic contribution that curves trajectories without changing energy; the electric term supplies the gradient contribution that does change energy. Both are already contained in the single interaction term of the Lagrangian, and both reappear, unchanged in form, when the same particle is treated relativistically.
Conservation of Charge in Spacetime
We have already seen that the conservation of particles and of rest mass may be expressed by the vanishing divergence of a suitable four-current. The same geometric structure governs electric charge. The charge density and the three-current density are assembled into a single four-vector
, the charge-current four-vector (sometimes written
). Its time component
is the charge density measured in the given frame; its spatial components
are the components of the ordinary current density. Under a Lorentz transformation the four components mix exactly as the components of any other four-vector, so that the distinction between “charge density” and “current” is frame-dependent while the four-vector itself is not.
The flux of this four-vector through an oriented three-surface Σ measures the total charge that crosses the surface in the positive sense
(17.22)
When Σ is a spacelike slice the integral reduces to the ordinary total charge contained in the corresponding three-volume. When Σ is tilted or even partially timelike the same integral continues to count the net charge that has crossed the surface, now including the contributions that arrive through the sides.
Figure 17.3: The charge-current four-vector
. Its flux through an arbitrary three-surface Σ equals the net charge that crosses the surface.
Consider an arbitrary compact region
of spacetime whose boundary is a closed three-surface ∂V. Because charge is neither created nor destroyed, the total charge that enters the region must equal the total charge that leaves it. In other words the net flux through the closed boundary vanishes
(17.23)
(The orientation is the outward orientation induced by the four-volume.) This is the integral statement of local charge conservation in spacetime. It holds for every region, no matter how small or how shaped, and it is independent of any choice of coordinates or of any preferred time slicing.
By the four-dimensional divergence theorem the surface integral is equal to the integral of the divergence over the enclosed four-volume
(17.24)
Since the region is arbitrary the integrand itself must vanish
(17.25)
This is the differential form of the law. In a local inertial frame it reduces to the familiar continuity equation
(17.26)
but the covariant statement
makes no reference to a preferred time and remains valid in every coordinate system.
Figure 17.4: Integral conservation. The net flux of
through the closed boundary of any four-volume vanishes. The divergence theorem converts the statement into the local condition
.
The same conservation law is the source term in Maxwell’s equations. Once the electromagnetic field strength
is introduced, the inhomogeneous equation
(17.27)
is consistent with
, because the left-hand side is divergenceless whenever the fields satisfy the homogeneous Maxwell equations. Charge conservation is therefore preserved by the coupled system of particles (or fields) and the electromagnetic field.
In the Hamiltonian picture the same continuity equation reappears as the statement that the symplectic flow generated by the total Hamiltonian preserves the total charge. On the cotangent bundle of the configuration space of the charged fields (or of the charged particles) the charge is the Noether charge associated with the global U(1) symmetry; its conservation is therefore already contained in the general theory of symmetries developed in Lesson 15. The spacetime formulation merely makes that conservation law covariant and local.
Thus the integral and differential statements
(17.28)
are the precise spacetime expressions of the conservation of electric charge. They reduce to the elementary continuity equation in any local frame, they are preserved by the Lorentz force and by the Maxwell field equations, and they furnish the conserved Noether charge that appears in the Hamiltonian formulation of classical electrodynamics.
The Lorentz Force in Spacetime
The ordinary Lorentz force is written for the spatial momentum and for coordinate time. In spacetime the natural momentum is the four-momentum
and the natural parameter along the world-line is proper time τ. The relativistic equation of motion of a test particle of charge q is therefore
(17.29)
where
is the four-velocity. The electromagnetic field tensor
is the linear map that converts the four-velocity into the four-force (divided by q). In components, with the signature (+,-,-,-),
(17.30)
We could just as easily call it the electromagnetic field.
Figure 17.5: The electromagnetic field tensor converts the four-velocity into the four-force. Electric and magnetic fields are the projections of this single tensor.
We can expand the tensor in terms of basis 1-forms
(17.31)
Lowering an index with the Minkowski metric produces the covariant tensor
whose matrix is the negative of the electric-field entries in the first row and column. Both electric and magnetic fields are thereby recognized as different index projections of one and the same tensor: once a unit timelike vector
is chosen,
(17.32)
and the magnetic field,
(17.33)
the matrix representation for this is then
(17.34)
The Vector Potential
The field tensor is locally exact: there exists a 1-form potential
(17.35)
In a local inertial frame the familiar three-dimensional relations are recovered,
(17.36)
We can write, for a local frame
(17.37)
The potential is more fundamental than the sources in the sense that the field, and therefore the force on every charge, is completely determined once
is given; the charges and currents appear only when the field is coupled to matter.
The Electromagnetic 2-Form
The same tensor may be written as a differential 2-form
(17.38)
We can see how this 2-form works considering the magnetic field in direction 1,
.
There are two index combinations that produce
if we look at (17.34),
These are
.
We can then write this
(17.39)
Here
is the gradient of
and represents surfaces in a small interval in
. The same situation exists for
. The wedge product of these sets of surfaces forms a flux tube having a rectangular cross section. This structure is not yet a 2-form, we need more structure. The wedge product also determines the orientation of the flux tubes, and that is what makes it a 2-form. The 2-form F has a number of flux tubes equal to the value of
.
Figure 17.6: The term
represents a bundle of oriented flux tubes. The number of tubes crossing the coordinate rectangle equals
.
A system of flux tubes throughout spacetime needs many components to describe an entire electromagnetic field,
(17.40)
This structure of flux tubes and their locations are independent of the coordinate system we employ. The dual of this 2-form is
(17.41)
Maxwell’s Equations
We discussed Maxwell’s equations earlier, and I will now show how to write these in our new form. There are two new forms of the Maxwell equations. The first is
(17.42)
This can be written in component-free notation
(17.43)
The inhomogeneous equations relate the divergence of the field to the charge-current four-vector,
(17.44)
or, in component free notation,
(17.45)
An Aside on Contravariant Index for Partial Derivatives
The comma notation already in use places a partial derivative in a covariant slot
means
. When an expression requires the derivative index to be raised, the inverse Minkowski metric supplies the necessary conversion. We therefore write
(17.46)
The raised comma is simply an abbreviation; it does not introduce a new derivative operator. Because
is constant in inertial coordinates, the operation commutes with ordinary partial differentiation and preserves the tensorial character of the result.
Figure 17.7: Raising the derivative index. Contraction with the inverse metric
converts the covariant derivative slot into a contravariant one.
The same abbreviation applies to any tensor. In particular, the wave operator that appears in the Maxwell equations may be written
(17.47)
where the repeated index is summed. The notation therefore shortens expressions that mix covariant and contravariant derivatives without altering their geometric content. Once the convention is adopted, every subsequent formula that contains a raised comma is understood to include the appropriate factor of
.
The device is purely notational. It does not change the underlying partial derivative, nor does it replace the covariant derivative that will be needed when the background is no longer flat. In Minkowski spacetime, however, it keeps the component expressions compact while remaining completely equivalent to the explicit contraction with the inverse metric.
A Return to Maxwell’s Equations
Once the electromagnetic field is written in terms of the potential, the homogeneous Maxwell equations are satisfied identically. The inhomogeneous equations then become a condition on
alone. In components that condition reads
(17.48)
or, with the raised-comma notation introduced above,
(17.49)
(The parentheses denote symmetrization.) These are the equations that the potential must obey if the field tensor constructed from it is to be a solution of Maxwell’s equations with the given sources. In a local inertial frame, and after a choice of gauge, they reduce to the familiar inhomogeneous wave equations (or to Poisson’s equation in the static case).
Figure 17.8: From potential to sources. The field tensor is obtained by differentiation of
; its divergence must equal the charge-current four-vector.
The same relation may be viewed as a linear map from the space of 1-form potentials to the space of conserved currents. Because the left-hand side is divergenceless whenever the potential is sufficiently smooth, every solution automatically satisfies
. Thus charge conservation is not imposed separately; it is inherited from the structure of the equations that determine
.
In the static limit the time derivatives vanish and the spatial components of the equation reduce to
(17.50)
while the time component becomes the ordinary Poisson equation for the scalar potential. The full spacetime statement therefore unifies the static Poisson equations with the dynamical wave equations under a single tensorial condition. Gauge freedom remains., with any pure-gradient addition to
that preserves the chosen gauge leaves both
and the left-hand side unchanged.
The equation closes the logical circle that began with the Lorentz force. The force on a charged particle is determined by
; that tensor is determined by a potential
; and the potential is determined, up to gauge, by the charge-current that the particles themselves produce. The resulting system is consistent precisely when the potential satisfies the equation written above.
Gauge Transformations
The potentials that generate a given electromagnetic field are not unique. If H is any smooth scalar function, the simultaneous replacements
(17.51)
and
(17.52)
leave both
and
unchanged. In spacetime language the same freedom is the addition of a pure gradient,
(17.53)
Any two potentials related by such a replacement are said to differ by a gauge transformation. Because the field tensor
is built from antisymmetrized derivatives of
, it is invariant under the transformation, and therefore every observable constructed from
is likewise invariant.
Figure 17.9: Gauge equivalence. Adding the gradient of an arbitrary scalar H to the potential leaves the field tensor unaltered.
The residual freedom may be used to impose a convenient supplementary condition. The Lorentz gauge requires that the four-divergence of the potential vanish,
(17.54)
In a local inertial frame this is the single scalar equation
(17.55)
When the Lorentz gauge is adopted, the inhomogeneous Maxwell equations reduce to the decoupled wave equations
(17.56)
The gauge condition itself is preserved by any further transformation whose generating function satisfies the homogeneous wave equation
. Thus a limited gauge freedom remains even after the Lorentz condition has been imposed; it may be used, for example, to set one component of
to zero on a given initial surface.
Gauge transformations therefore simplify the differential equations without changing the physics. The choice of gauge is a choice of representative within an equivalence class of potentials, all of which produce the identical field and the identical Lorentz force. The Lorentz gauge is the representative best adapted to the causal structure of Minkowski spacetime, because it converts the coupled system for
into a set of ordinary wave equations sourced by the conserved current.
The Electromagnetic Stress-Energy Tensor
The energy, momentum and stresses stored in the electromagnetic field are collected in a single symmetric tensor
. In terms of the field strength it is given by
(17.57)
The first term is quadratic in the field; the second subtracts the appropriate trace so that the tensor is traceless in four dimensions (in the units employed here). Because
is gauge-invariant, so is
.
In a local inertial frame the components reduce to the familiar three-dimensional expressions. The time-time component is the energy density,
(17.58)
The mixed components are the Poynting flux (energy flow per unit area per unit time),
(17.59)
The purely spatial block is the Maxwell stress tensor,
(17.60)
which gives the momentum flux and the stresses exerted by the field.
Figure 17.10: Components of the electromagnetic stress-energy tensor in a local frame.
is the energy density,
the Poynting flux, and
the Maxwell stresses.
The divergence of this tensor equals the negative of the Lorentz force density exerted on the charges
(17.61)
Consequently the sum of the field stress-energy and the matter stress-energy is divergenceless. In integral form, the flux of
through the boundary of any four-volume equals the total four-momentum transferred to the charges inside that volume. Energy and momentum are therefore conserved for the combined system of field plus matter, even though each subsystem separately may exchange four-momentum with the other.
Figure 17.11: Local conservation. The flux of
out of any region equals the four-momentum delivered to the charges by the Lorentz force.
The same tensor appears as the source of the gravitational field in the Einstein equations once the electromagnetic contribution is included. In the present flat-space setting it already guarantees that the total four-momentum of an isolated system of charges and fields is constant, and that the energy flux measured by any inertial observer is given by the Poynting vector. Thus the stress-energy tensor completes the spacetime description of the electromagnetic field: it encodes how the field stores and transports energy and momentum, and how those quantities are exchanged with charged matter.
The Lagrangian
The spacetime formulation of the electromagnetic field fits directly into the variational framework of Lesson 15. The configuration variables are the components of the one-form potential
, and the field strength is recovered by exterior differentiation (17.35),
The action is the integral of a scalar Lagrangian density over an arbitrary four-volume V,
(17.62)
and the field equations follow from the requirement that the first variation of S vanish for every variation of
that is fixed on the boundary of V.
The Lagrangian density that reproduces Maxwell’s equations is
(17.63)
The first term is the pure-field contribution; the second couples the potential to a prescribed external current. Because
depends on the first derivatives of
, the Euler–Lagrange equation is of second order.
Figure 17.12: The electromagnetic Lagrangian density. The field strength is built from the potential; the action contains both the quadratic field term and the coupling to the current.
Varying with respect to the potential yields the two partial derivatives that enter the Euler–Lagrange equation
(17.64)
and
(17.65)
The resulting field equation is therefore
(17.66)
(The homogeneous equations are satisfied identically once
is expressed as the exterior derivative of
This is precisely the inhomogeneous Maxwell system written above. The same variational principle also produces the Lorentz force when the current is realized by the world-lines of charged particles, because the interaction term
then contributes the familiar
piece to each particle’s action.
Gauge invariance of the action follows at once, where the pure-field term depends only on
, while the interaction term changes by a total divergence when
(provided the current is conserved). Consequently every solution generated by the variational principle is defined only up to gauge, exactly as required by the earlier discussion of gauge transformations.
The Lagrangian therefore supplies the single scalar whose stationary points are the Maxwell equations, whose Noether charges include the conserved four-momentum carried by the stress-energy tensor, and whose coupling to matter reproduces the Lorentz force. All of the geometric structures introduced in the preceding subsections—field strength, potential, gauge freedom, and conservation laws—are thereby recovered from one variational principle.
Doing this Stuff in Mathematica
We begin by loading xAct.
We then load our manifold.
Note we do not load a metric. We can see that there is a tangent bundle for this manifold.
Recall the structure, the points in M form the base manifold and the tangent spaces for each point form the fibers.
We will begin this section with showing how to use diffeomorphisms in xAct. We will need our other manifold to map to.
We then define a mapping φ:M→N.
Not only does this define the mapping we assigned, but the inverse mapping, and the differentials. We can check to make sure the structure is what we want it to be.
and the inverse mapping,
With the differentials this is a diffeomorphism. It is that simple. We can define mappings to create links between manifolds, bundles, and other structures as we like.
We can perform a parametric differentiation on the scalar field C, we first define the field
then we write the parametric derivative, for a field defined as
. We then use the command OverDot to display the derivative.
We can also write the directional derivative with respect to some vector. We begin by defining our tangent vector,
The partial derivative for the scalar field C along the vector is
where
We can define a new vector field
The partial derivative for the vector field
along the vector is
We can establish a basis in a manifold using the DefBasis command
We understand a lot of this output now. We know that the parallel derivative is another name for the partial derivative. We know what the Christoffel symbols are.
We can display the 0 component basis.
| e |
|
We can write a name and display all of them.
We can also display the basis 1-forms.
We can write the Lie Bracket of the vectors
and
|
we can expand this
We can prove the Jacobi identity. We need to add a new vector field
So we begin,
We then canonicalize this.
Thus we have shown the Jacobi identity is true.
We have our mapping φ that we defined earlier. We can pushforward our vector
from T M to T N, we assign the index A to this new symbol.
|
We can see the details if we expand it out.
Likewise we can perform a pullback. Here we define a 1-form field on T N,
.
|
We can define the covariant derivative in xAct.
We now introduce a new tensor
,
We then apply the covariant derivative
| T |
|
Given the Christoffel symbol
is written
| Γ[▽] |
|
we can also write,
We can apply the Christoffel symbols to ex1.
Further Reading
Charles W. Misner, Kip S. Thorne, John Archibald Wheeler, (1973), Gravitation, W. H. Freeman and Company.
William L. Burke, (1985), Applied Differential Geometry, Cambridge University Press.
R. Aldrovandi, J.G. Pereira, (1995), An Introduction to Geometrical Physics. World Scientific Publishing Co.
Antonio Romano, Addolorata Marasco, (2018), Classical Mechanics with Mathematica, Springer International Publishing AG, part of Springer Nature, under the trade name Birkhäuser.
Elie Cartan, (1951), Geometry of Riemannian Spaces. Math Sci Press, translated by James Glazebrook with notes and appendices by R. Hermann in 1983.