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 l5_1.png exerted on a particle with charge q by an electric field l5_2.png is simply

l5_3.png

We can write the electric field intensity vector produced by a spatial charge distribution as

l5_4.png

Exercise 5.1: A point charge q is located at the origin. Write the electric field l5_5.png at a point l5_6.png. Then compute the field at l5_7.png m if l5_8.png C.

Since

l5_9.png

then

l5_10.png

We can then define the scalar potential

l5_11.png

so that

l5_12.png

Exercise 5.2: The electric potential due to a point charge is Φ(r)=−q/∣r∣ (in appropriate units).
    1) Show that l5_13.png.
    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,

l5_14.png

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 l5_15.png, where l5_16.png is the outward pointing surface normal vector.

l5_17.png

where θ represents the angle between l5_18.png and l5_19.png at the surface enclosing q

l5_20.png

This gives us the definition of the solid angle element l5_21.png, so

l5_22.png

When we consider a continuous charge distribution this becomes Gauss’s Law.

l5_23.png

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

l5_24.png

So the volume integrals must be equal

l5_25.png

Since the surfaces are arbitrary the integrands must be equal. This gives us the divergence of the electric field,

l5_26.png

This is also called the differential Coulomb law. We can encapsulate what we know about electric fields in terms of the scalar potential

l5_27.png

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 l5_28.png is a vector field that assigns a vector to every point in space. In tensor notation we can write its components as l5_29.png with respect to a basis l5_30.png, so

l5_31.png

The force on a test charge q is then

l5_32.png

Exercise 5.6: The electric field in a certain region has components l5_33.png, l5_34.png, l5_35.png. Write the force on a charge l5_36.png 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 Φ

l5_37.png

In tensor notation, we write Nabla using

l5_38.png

So

l5_39.png

In component form this is

l5_40.png

where the raised index on the derivative indicates the contravariant components.

Gauss’s law in tensor form becomes

l5_41.png

The fact that the electric field is conservative (its curl vanishes) is written

l5_42.png

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 l5_43.png, then the torque l5_44.png experienced by the dipole depends on the magnetic field l5_45.png

l5_46.png

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 l5_47.png is placed in a uniform magnetic field l5_48.png. Compute the torque l5_49.png. 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

l5_50.png

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 l5_51.png

l5_52.png

Experimentally, magnetic monopoles seem not to exist. We can write this

l5_53.png

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,

l5_54.png

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 l5_55.png.

It is natural to ask what the curl of the magnetic field might look like. If we write the current density as l5_56.png, then we can rewrite Ampère’s law,

l5_57.png

We can apply Stokes’s theorem,

l5_58.png

Since this is true for arbitrary surfaces, then the integrands are equal,

l5_59.png

These two equations — the divergence and curl of l5_60.png—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

l5_61.png

The magnetic field l5_62.png is a vector field that assigns a vector to every point in space. In tensor notation we can write its components as l5_63.png with respect to a basis l5_64.png, so

l5_65.png

The torque on a magnetic dipole l5_66.png is then

l5_67.png

Exercise 5.15:  A magnetic field has components l5_68.png, l5_69.png, l5_70.png (constant). A magnetic dipole has components l5_71.png, l5_72.png, l5_73.png. Compute the torque l5_74.png in tensor notation.

We can write the magnetic field in terms of the vector potential

l5_75.png

The absence of magnetic monopoles is expressed in tensor notation

l5_76.png

Ampère’s law in component form is

l5_77.png

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

l5_78.png

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 l5_79.png is changing at a rate l5_80.png T/s. Compute the induced emf using Faraday’s law.

In differential form this becomes

l5_81.png

or in tensor notation

l5_82.png

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

l5_83.png

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

l5_84.png

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 l5_85.png 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,

l5_86.png

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 l5_87.png.
    2) Use Ampère’s law with the displacement current to find the curl of l5_88.png.
    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,

l5_89.png

where l5_90.png 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

l5_91.png

so,

l5_92.png

Since we are considering arbitrary volumes the integrands are equal.

l5_93.png

We can rewrite this to get the continuity equation for charges,

l5_94.png

We can see how our collection of equations fails when we take the divergence of Ampère’s law,

l5_95.png

or

l5_96.png

We know that curl is divergenceless, so

l5_97.png

This is a clear violation of the continuity equation.

We make the correction by adding the displacement current term

l5_98.png

and that leads us to a revised form for Ampère’s law

l5_99.png

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

l5_100.png

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 l5_101.png and l5_102.png (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 l5_103.png and l5_104.png with respect to a basis l5_105.png we have Gauss’s law for electricity

l5_106.png

We have the condition for no magnetic monopoles

l5_107.png

We have Faraday’s law

l5_108.png

Then we have Ampère’s law with Maxwell’s displacement current

l5_109.png

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.

l5_110.png

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

l5_111.png

The full Lorentz force is therefore

l5_112.png

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.

l5_113.gif

l5_114.png

l5_115.png

l5_116.png

l5_117.png

l5_118.png

l5_119.png

l5_120.png

l5_121.png

l5_122.png

l5_123.png

l5_124.png

l5_125.png

l5_126.png

l5_127.png

l5_128.png

l5_129.png

l5_130.png

We then load our manifold, think of this as the blank canvas used for our system.

l5_131.png

We then define the metric

l5_132.png

We define the magnetic field.

l5_133.png

We define the vector potential.

l5_134.png

l5_135.png

The current density,

l5_136.png

We define the Levi-Civita symbol

l5_137.png

εδ
i j k

We can write the magnetic field in terms of the vector potential.

l5_138.png

l5_139.png

l5_140.png

Ampère’s law

l5_141.png

l5_142.png

Divergence-free condition

l5_143.png

l5_144.png

We decider to use cylindrical coordinates.

l5_145.png

We define a basis.

l5_146.png

The current density on an infinite wire along z with the total current i.

l5_147.png

l5_148.png

l5_149.png
l5_150.png
l5_151.png
i

The vector potential for a wire.

l5_152.png

l5_153.png

l5_154.png
l5_155.png
l5_156.png
i

We then compute the magnetic field components.

l5_157.png

l5_158.png

l5_159.png

l5_160.png

l5_161.png

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.

Created with the Wolfram Language