Lesson 5 Electromagnetic Fields
You have spent the previous lessons building a solid foundation in classical mechanics and the language of tensors. Now we turn to one of the most beautiful and far-reaching discoveries in physics: the unified theory of electricity and magnetism.
In this lesson we explore the electric field and the magnetic field as separate entities, then see how they are intimately connected through electromagnetic induction. We will introduce the full electromagnetic field and learn how to describe it using the elegant language of tensors. Finally, we will express the Lorentz force — the force on a charged particle in an electromagnetic field — in tensor form.
This lesson marks a major step forward. The ideas you meet here not only explain everyday phenomena such as light, motors, and generators, but also prepare you for the deeper geometric structure of spacetime that you will encounter in general relativity. The electromagnetic field is the first example of a true tensor field in physics, and mastering it will give you powerful tools for the rest of your studies.
The Electric Field
You have already seen how a charged particle responds to its environment. The force
exerted on a particle with charge q by an electric field
is simply
We can write the electric field intensity vector produced by a spatial charge distribution as
Exercise 5.1: A point charge q is located at the origin. Write the electric field
at a point
. Then compute the field at
m if
C.
Since
then
We can then define the scalar potential
so that
Exercise 5.2: The electric potential due to a point charge is Φ(r)=−q/∣r∣ (in appropriate units).
1) Show that
.
2) Explain physically why the negative sign is necessary.
This can be called the generalized Coulomb law. We can see that the scalar potential is the really important quantity here. By vector analysis, the electric field is the potential gradient, so its curl vanishes,
We can determine the divergence of the electric field by applying the Gauss divergence theorem. To get there we begin by considering the flux of the electric field through some surface element
, where
is the outward pointing surface normal vector.
where θ represents the angle between
and
at the surface enclosing q
This gives us the definition of the solid angle element
, so
When we consider a continuous charge distribution this becomes Gauss’s Law.
Exercise 5.3: Use Gauss’s law to find the electric field inside and outside a uniformly charged spherical shell of total charge Q and radius R. Compare your result with the point-charge case.
We can rewrite the left-hand side of this by applying the divergence theorem
So the volume integrals must be equal
Since the surfaces are arbitrary the integrands must be equal. This gives us the divergence of the electric field,
This is also called the differential Coulomb law. We can encapsulate what we know about electric fields in terms of the scalar potential
Recall from Lesson 3 that this is also called Poisson’s equation.
Exercise 5.4: For a uniform charge density ρ inside a sphere of radius R, solve Poisson’s equation to find the potential inside the sphere. (Assume Φ=0
at infinity.)
Exercise 5.5: Reflect on the deep connection between the integral and differential forms of Gauss’s law. Why is it useful to have both versions? Give an example from physics where one form is much easier to use than the other.
Electric Fields in the Language of Tensors
You have already seen how the electric field can be described using the familiar language of vectors. Now we can express the same physical ideas using the more powerful and general language of tensors. This allows us to write the field in a way that is independent of any particular coordinate system and prepares us for the full electromagnetic field tensor later.
The electric field
is a vector field that assigns a vector to every point in space. In tensor notation we can write its components as
with respect to a basis
, so
The force on a test charge q is then
Exercise 5.6: The electric field in a certain region has components
,
,
. Write the force on a charge
C at the point (1, 2, 0). Compute the divergence of this field and interpret the result.
The electric field can also be derived from a scalar potential Φ
In tensor notation, we write Nabla using
So
In component form this is
where the raised index on the derivative indicates the contravariant components.
Gauss’s law in tensor form becomes
The fact that the electric field is conservative (its curl vanishes) is written
Exercise 5.7: Show this to be true.
Using the language of tensors, all these familiar equations become compact and manifestly coordinate-independent. This makes it much easier to change coordinate systems and sets the stage for the full electromagnetic field tensor, where electric and magnetic fields are united into a single geometric object.
Exercise 5.8: Reflect on how expressing the electric field in tensor notation makes it easier to change coordinate systems. Why is this an advantage over ordinary vector notation? Give an example from electrostatics where this flexibility is important.
The Magnetic Field
You can discover the presence of a magnetic field by watching the effects of two magnets near each other. Suppose you have a magnetic dipole
, then the torque
experienced by the dipole depends on the magnetic field
Note that we can use this to define the magnetic field. If one of our magnets is a small needle, it will align in the direction of the magnetic field. By the definition of the vector product in terms of angle, the torque will disappear when the needle is parallel to the field.
Exercise 5.9: A magnetic dipole
is placed in a uniform magnetic field
. Compute the torque
. What does the direction of the torque tell you physically?
Exercise 5.10: A small compass needle (modeled as a magnetic dipole) is placed in a magnetic field.
1) In what direction will the needle align?
2) Why does the torque vanish when the needle is parallel to the field?
The magnetic field produced by a steady current can be calculated using the Biot-Savart law. For a current element I dℓ the contribution to the magnetic field at a point is
This is the magnetic analog of Coulomb’s law for the electric field. Integrating over the entire current distribution gives the total magnetic field. This law makes clear that magnetic fields are produced by moving charges and that the field lines form closed loops.
Just as the electric field can be derived from a scalar potential Φ, the magnetic field can be derived from a vector potential
Experimentally, magnetic monopoles seem not to exist. We can write this
Exercise 5.11: Explain why this prevent magnetic monopoles.
An experimentally derived relationship exists between the magnetic field, the surface element, the speed of light, and the current flowing through a wire producing the magnetic field,
This is called Ampère’s law.
Exercise 5.12: Use Ampère’s law in integral form to find the magnetic field around a long straight wire carrying current I. Compare your result with the differential form
.
It is natural to ask what the curl of the magnetic field might look like. If we write the current density as
, then we can rewrite Ampère’s law,
We can apply Stokes’s theorem,
Since this is true for arbitrary surfaces, then the integrands are equal,
These two equations — the divergence and curl of
—together with the corresponding equations for the electric field, form the foundation of classical electromagnetism. You will see how they are beautifully united when we introduce the electromagnetic field tensor.
Exercise 5.13: Show that the differential form of Ampère’s law follows from the integral form using Stokes’s theorem. Why is it useful to have both forms?
Exercise 5.14: Reflect on the deep difference between electric and magnetic fields: one has sources (charges) while the other does not (no monopoles). How does this distinction affect the mathematical structure of the two fields?
The Magnetic Field in the Language of Tensors
You have already seen how the magnetic field can be described using the familiar language of vectors. Now we can express the same physical ideas using the more powerful and general language of tensors. This allows us to write the field in a way that is independent of any particular coordinate system and prepares us for the full electromagnetic field tensor.
The Biot-Savart law in tensor notation is
The magnetic field
is a vector field that assigns a vector to every point in space. In tensor notation we can write its components as
with respect to a basis
, so
The torque on a magnetic dipole
is then
Exercise 5.15: A magnetic field has components
,
,
(constant). A magnetic dipole has components
,
,
. Compute the torque
in tensor notation.
We can write the magnetic field in terms of the vector potential
The absence of magnetic monopoles is expressed in tensor notation
Ampère’s law in component form is
Using the language of tensors, all these familiar equations become compact and manifestly coordinate-independent. This makes it much easier to change coordinate systems and sets the stage for the full electromagnetic field tensor, where electric and magnetic fields are united into a single geometric object.
Electromagnetic Induction
You have seen how electric and magnetic fields can be derived from potentials. Nature has a beautiful symmetry: a changing magnetic field can produce an electric field, and a changing electric field can produce a magnetic field. This mutual generation is the heart of electromagnetic induction.
The fundamental observation is that a time-varying magnetic field induces an electric field. The integral form of this law is
This is Faraday’s law of induction. The line integral on the left is the electromotive force around a closed loop, and the right-hand side is the negative rate of change of magnetic flux through the surface bounded by the loop.
Exercise 5.16: A magnetic field through a loop of area A=0.5
is changing at a rate
T/s. Compute the induced emf using Faraday’s law.
In differential form this becomes
or in tensor notation
A changing electric field similarly induces a magnetic field, completing the pair of equations that describe how electric and magnetic fields sustain each other. Together they explain the propagation of electromagnetic waves—including light—at the speed of light.
Exercise 5.17: Show that the differential form (5.39) follows from the integral form of Faraday’s law (5.38) using Stokes’s theorem.
When a changing current flows through a circuit, it produces a changing magnetic field (and therefore a changing vector potential) that induces an electromotive force in the same circuit. This is called self-inductance. The induced emf is proportional to the rate of change of current
where L is the self-inductance of the circuit. The negative sign reflects Lenz’s law that states, “That the induced current opposes the change that produced it.”
Exercise 5.18: A changing current in a long solenoid produces a changing magnetic field.
1) Use Faraday’s law to explain why an emf is induced in a nearby loop.
2) What does Lenz’s law tell you about the direction of the induced current?
Exercise 5.19: The self-inductance of a coil is L=0.1 H. If the current changes at a rate dI/dt=10 A/s, compute the induced emf. Explain the negative sign using Lenz’s law.
When two circuits are near each other, a changing current in one can induce an emf in the other. This is called mutual inductance. The induced emf in the second circuit is
where M is the mutual inductance between the two circuits.
Exercise 5.20: Two coils have mutual inductance M=0.05 H. If the current in the first coil changes at
A/s, compute the induced emf in the second coil.
This remarkable interconnection shows that electricity and magnetism are not separate phenomena but two aspects of a single unified field. The language of tensors allows us to express these relationships in a compact, coordinate-independent way that reveals their deep geometric structure.
Exercise 5.21: Reflect on the symmetry between electric and magnetic fields in induction. Why is it remarkable that a changing magnetic field produces an electric field and vice versa?
The Electromagnetic Field
We now collect all four of the equations we have,
James Clerk Maxwell noticed a problem. There is another equation that must be satisfied. To find it we begin by considering that charge in electromagnetism acts like mass does in mechanics. As such it cannot be created nor destroyed. We call this charge conservation.
Exercise 5.22: A region of space has charge density ρ.
1) Use Gauss’s law to find the divergence of
.
2) Use Ampère’s law with the displacement current to find the curl of
.
3) What do these equations tell you about the sources of electric and magnetic fields?
We begin this quest by applying Gauss’s divergence theorem to the current,
where
represents the flux of current through a surface element, and hence the rate of loss of charge from the volume bounded by that surface. We can rewrite this as a time derivative
so,
Since we are considering arbitrary volumes the integrands are equal.
We can rewrite this to get the continuity equation for charges,
We can see how our collection of equations fails when we take the divergence of Ampère’s law,
or
We know that curl is divergenceless, so
This is a clear violation of the continuity equation.
We make the correction by adding the displacement current term
and that leads us to a revised form for Ampère’s law
Exercise 5.23: Explain in your own words why Maxwell needed to add the displacement current term to Ampère’s law. What problem did it solve?
With this we can view the masterpiece
We call this collection of equations Maxwell’s equations and they govern the behavior of electromagnetic field where we can specify the charges and currents.
Exercise 5.24: Write the four Maxwell’s equations in both integral and differential form. Then show that the continuity equation (5.47) follows from them.
Exercise 5.25: Show that Maxwell’s equations have a certain symmetry between
and
(in vacuum, with no charges or currents). What does this symmetry suggest about the nature of light?
Exercise 5.26: Reflect on why Maxwell’s equations are considered one of the greatest achievements in physics. How do they unify electricity, magnetism, and light? What does it mean that they are written in terms of fields rather than action-at-a-distance forces?
The Electromagnetic Field in the Language of Tensors
You have already seen how the electric field and the magnetic field can be expressed using tensor notation. Now we can combine them into the complete set of equations that govern the electromagnetic field.
In tensor notation Maxwell’s equations become remarkably compact. Using the components
and
with respect to a basis
we have Gauss’s law for electricity
We have the condition for no magnetic monopoles
We have Faraday’s law
Then we have Ampère’s law with Maxwell’s displacement current
These four equations, written in component form with the Levi-Civita symbol for the curls, completely describe the classical electromagnetic field in terms of tensors. They are coordinate-independent in their structure and make the symmetry between electricity and magnetism manifest.
Together with the Lorentz force law, they form the foundation of classical electromagnetism. The tensor formulation prepares us for the even more elegant unification that appears when we introduce the full electromagnetic field tensor in special relativity.
The Lorentz Force Law
You have seen how a charged particle responds to an electric field and how a moving charge responds to a magnetic field. The complete expression that combines both effects is known as the Lorentz force law.
The first term is the familiar electric force. The second term is the magnetic force, which is always perpendicular to both the velocity and the magnetic field. This perpendicularity means the magnetic force does no work on the particle—it only changes the direction of motion, not the speed.
In tensor notation using the Levi-Civita symbol the magnetic part is
The full Lorentz force is therefore
This single law governs the motion of charged particles in electromagnetic fields. It is the bridge between the field equations (Maxwell’s equations) and the actual motion of matter. Together with Maxwell’s equations, the Lorentz force law gives us a complete classical description of electromagnetism.
Doing this Stuff in Mathematica
We begin by loading xAct.
We then load our manifold, think of this as the blank canvas used for our system.
We then define the metric
We define the magnetic field.
We define the vector potential.
The current density,
We define the Levi-Civita symbol
| εδ |
|
We can write the magnetic field in terms of the vector potential.
Ampère’s law
Divergence-free condition
We decider to use cylindrical coordinates.
We define a basis.
The current density on an infinite wire along z with the total current i.
|
The vector potential for a wire.
|
We then compute the magnetic field components.
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.