PHYS-381 · Lesson 1 of 12 · 22 min

Why electromagnetic theory: fields as the language of physics

Introductory electricity and magnetism teaches a set of rules: Coulomb's law for the force between charges, Gauss's law for symmetric charge distributions, the Biot–Savart law for the field of a wire, and a handful of circuit laws. This course rebuilds the same subject on a single foundation. Electric and magnetic phenomena are described by fields, functions that assign a vector to every point of space, and the laws of electromagnetism become differential equations that those fields obey. With the tools of vector calculus, the scattered rules of first year turn out to be consequences of a few compact statements, and problems that looked impossible, such as the field of a charge near a conductor or inside a dielectric, become routine. This first lesson explains why the field picture matters, previews the structure of the theory, and sets out what the course covers.

From action at a distance to fields

When Charles-Augustin de Coulomb measured the force between charged spheres with a torsion balance in 1785, he found the inverse-square law

\[\mathbf{F} = \frac{1}{4\pi\varepsilon_0}\frac{q Q}{\mathscr{r}^2}\,\hat{\boldsymbol{\mathscr{r}}},\]

where \(\boldsymbol{\mathscr{r}} = \mathbf{r} - \mathbf{r}'\) is the separation vector from the source charge \(Q\) at \(\mathbf{r}'\) to the test charge \(q\) at \(\mathbf{r}\), and \(\mathscr{r}\) is its length. This course follows the common practice of using a script letter for the separation vector, because it appears in nearly every formula and must not be confused with the position vector \(\mathbf{r}\). Read literally, Coulomb's law describes action at a distance: one charge pushes on another across empty space, instantly. Newton's law of gravity has the same form, and Newton himself thought action at a distance absurd, but for a century and a half it worked.

Michael Faraday, who had little mathematics but great physical intuition, pictured the space around charges and magnets as filled with lines of force. In his view a charge creates a condition in the space around it, and another charge responds to the condition where it sits. James Clerk Maxwell turned Faraday's lines into mathematics in the 1860s, and his Treatise on Electricity and Magnetism of 1873 established the field as a physical object in its own right. We define the electric field by the force on a small test charge:

\[\mathbf{E}(\mathbf{r}) = \lim_{q \to 0}\frac{\mathbf{F}}{q}, \qquad \mathbf{E}(\mathbf{r}) = \frac{1}{4\pi\varepsilon_0}\frac{Q}{\mathscr{r}^2}\,\hat{\boldsymbol{\mathscr{r}}}\ \ \text{for a point charge.}\]

At first the field looks like bookkeeping, a way of dividing the force by \(q\). Three facts show that it is more. First, changes in the field travel at a finite speed: if a charge is suddenly moved, a distant charge feels nothing until a disturbance travelling at the speed of light arrives. During that interval momentum and energy are stored in the field itself, not in either charge. Second, light is an electromagnetic field with no charges nearby at all. Third, the field carries energy, momentum and angular momentum, which can be measured: radiation pressure pushes solar sails, and laser beams can rotate microscopic particles. Fields are as real as matter.

Superposition

The single most important experimental fact about electric fields is the principle of superposition: the field produced by several charges is the vector sum of the fields each would produce alone. Nothing in logic requires this. Two charges could in principle modify each other's fields, as two waves in a nonlinear medium do. But to the accuracy of every classical measurement, and to extremely high accuracy even in quantum electrodynamics at ordinary field strengths, superposition holds. For a set of point charges,

\[\mathbf{E}(\mathbf{r}) = \frac{1}{4\pi\varepsilon_0}\sum_{i=1}^{n}\frac{q_i}{\mathscr{r}_i^2}\,\hat{\boldsymbol{\mathscr{r}}}_i,\]

and for a continuous distribution of charge with volume density \(\rho(\mathbf{r}')\), the sum becomes an integral over the source points,

\[\mathbf{E}(\mathbf{r}) = \frac{1}{4\pi\varepsilon_0}\int \frac{\rho(\mathbf{r}')}{\mathscr{r}^2}\,\hat{\boldsymbol{\mathscr{r}}}\,d\tau'.\]

Here \(d\tau'\) is a volume element at the source point. Line charges with density \(\lambda\) and surface charges with density \(\sigma\) are handled the same way with \(\lambda\,dl'\) or \(\sigma\,da'\) in place of \(\rho\,d\tau'\). In principle this integral answers every question in electrostatics. In practice it is often hard to evaluate, and the art of the subject lies in finding easier routes: Gauss's law, the potential, boundary-value methods and multipole expansions. Superposition underlies all of them, because it makes the field equations linear.

Why electricity dominates the world we see

The program below starts with a comparison that explains why electromagnetism, not gravity, governs chemistry, materials and life. It computes the ratio of the electric attraction between an electron and a proton to their gravitational attraction. Both forces fall off as the inverse square of distance, so the ratio does not depend on how far apart they are. It then uses superposition to find the field at the origin due to three point charges, and finally checks a remarkable relation that Maxwell discovered: the constants of electrostatics and magnetostatics combine to give the speed of light.

The electric-to-gravitational force ratio, superposition of three point fields, and the speed of light from the field constants
import math
k = 8.9875517923e9          # Coulomb constant 1/(4 pi eps0), N m^2/C^2
G = 6.67430e-11             # gravitational constant
e, m_e, m_p = 1.602176634e-19, 9.1093837e-31, 1.67262192e-27
eps0 = 8.8541878188e-12; mu0 = 1.25663706212e-6

# 1. How much stronger is electricity than gravity?
ratio = (k * e * e) / (G * m_e * m_p)
print(f"electric/gravitational force, electron and proton: {ratio:.3e}")

# 2. Superposition: field of three point charges at the origin
charges = [(+2e-9, (0.10, 0.00)), (-3e-9, (0.00, 0.20)), (+1e-9, (-0.15, -0.05))]
Ex = Ey = 0.0
for q, (x, y) in charges:
    rx, ry = -x, -y                 # separation vector from charge to field point
    r = math.hypot(rx, ry)
    Ex += k * q * rx / r**3
    Ey += k * q * ry / r**3
print(f"E at origin = ({Ex:.1f}, {Ey:.1f}) N/C, magnitude {math.hypot(Ex, Ey):.1f} N/C, "
      f"direction {math.degrees(math.atan2(Ey, Ex)):.1f} deg")

# 3. Maxwell's consistency check: 1/sqrt(eps0 mu0) is the speed of light
print(f"1/sqrt(eps0 mu0) = {1 / math.sqrt(eps0 * mu0):.6e} m/s")
Output
electric/gravitational force, electron and proton: 2.269e+39
E at origin = (-1456.5, 787.8) N/C, magnitude 1655.8 N/C, direction 151.6 deg
1/sqrt(eps0 mu0) = 2.997925e+08 m/s

The ratio is about \(2.3 \times 10^{39}\). Gravity is irrelevant inside atoms; it matters on astronomical scales only because matter is almost perfectly neutral, so that the huge electric forces cancel. A teaspoon of water contains about \(10^{24}\) electrons and a matching number of protons. If one part in a billion of the electrons were removed from two such teaspoons a metre apart, the repulsion between them would exceed the weight of a large truck. The superposition example shows the method that will recur throughout the course: compute each separation vector, scale it by \(q/\mathscr{r}^3\), and add the components. The field at the origin, about 1660 N/C pointing up and to the left, is dominated by the negative charge 20 cm away and the positive charge 10 cm away. The final line gives \(1/\sqrt{\varepsilon_0\mu_0} = 2.998 \times 10^8\) m/s, the speed of light.

Maxwell's equations: a preview

The whole of classical electromagnetism is summarized in four differential equations for the fields \(\mathbf{E}\) and \(\mathbf{B}\), together with the Lorentz force law that says how the fields act on charges. In vacuum, with charge density \(\rho\) and current density \(\mathbf{J}\) as sources, they read

\[\nabla\cdot\mathbf{E} = \frac{\rho}{\varepsilon_0}, \qquad \nabla\cdot\mathbf{B} = 0, \qquad \nabla\times\mathbf{E} = -\frac{\partial \mathbf{B}}{\partial t}, \qquad \nabla\times\mathbf{B} = \mu_0\mathbf{J} + \mu_0\varepsilon_0\frac{\partial\mathbf{E}}{\partial t},\]
\[\mathbf{F} = q\,(\mathbf{E} + \mathbf{v}\times\mathbf{B}).\]

This course treats the static case, in which nothing changes with time. Then the equations split into two independent pairs. Electrostatics is governed by \(\nabla\cdot\mathbf{E} = \rho/\varepsilon_0\) and \(\nabla\times\mathbf{E} = \mathbf{0}\); magnetostatics by \(\nabla\cdot\mathbf{B} = 0\) and \(\nabla\times\mathbf{B} = \mu_0\mathbf{J}\). The divergence equations say what kind of source each field has: electric field lines begin and end on charges, while magnetic field lines never begin or end at all. The curl equations say how the fields circulate: a static electric field has no circulation, and a magnetic field circulates around currents. The sequel, PHYS-382, restores the time derivatives, which couple the two fields together and produce electromagnetic waves.

Each equation has an integral form that you met in first year. Integrating the divergence of \(\mathbf{E}\) over a volume and using the divergence theorem gives Gauss's law; integrating the curl of \(\mathbf{B}\) over a surface and using Stokes' theorem gives Ampère's law. The differential and integral forms say the same thing, but the differential form is local: it relates the field at a point to the sources at that same point. Local laws are the natural language of physics after relativity, because no influence travels instantaneously.

The units and constants

This course uses SI units throughout. Charge is measured in coulombs, and since the 2019 redefinition of the SI the elementary charge is fixed exactly at \(e = 1.602\,176\,634 \times 10^{-19}\) C. The permittivity of free space \(\varepsilon_0 \approx 8.854 \times 10^{-12}\ \text{C}^2/(\text{N}\,\text{m}^2)\) and the permeability \(\mu_0 \approx 1.256\,637 \times 10^{-6}\ \text{N/A}^2\) are now measured quantities, related by \(\varepsilon_0\mu_0 = 1/c^2\) with \(c\) exact. Before 2019, \(\mu_0\) was defined to be exactly \(4\pi \times 10^{-7}\) N/A\(^2\), and the present value agrees with that to about one part in ten billion, so the old value is entirely adequate for this course. Many advanced texts use Gaussian units, in which \(4\pi\varepsilon_0\) is replaced by 1 and the magnetic field has the same units as the electric field. The physics is identical; only the bookkeeping differs, and formulas can be converted with a table.

How this course is organized

The course has three parts. Lessons 2 and 3 sharpen the mathematical tools: gradient, divergence, curl and the integral theorems, then curvilinear coordinates and the Dirac delta function, which lets point charges live comfortably inside differential equations. Lessons 4 to 9 develop electrostatics: Gauss's law and the field, the potential and electrostatic energy, conductors and capacitance, Laplace's equation with uniqueness and the method of images, separation of variables and the multipole expansion, and finally electric fields in matter, where polarization leads to the displacement field. Lessons 10 to 12 develop magnetostatics: the Lorentz force, the Biot–Savart law and Ampère's law, the vector potential and magnetic boundary conditions, and a capstone on magnetic materials and their applications, from transformer cores to the superconducting magnets of MRI scanners.

Every lesson includes runnable Python that uses only the standard library. The programs check analytic results numerically, so that you can see a theorem such as Gauss's law hold to five decimal places, and they introduce numerical methods, such as relaxation for Laplace's equation, that are how real field problems are solved in engineering practice. The prerequisites are the first-year electricity and magnetism course and multivariable calculus. If the divergence theorem or a surface integral feels rusty, lesson 2 reviews them in the form we need.

Worked problem

Field of two charges on an axis

A charge \(q_1 = +4\) nC sits at \(x = 0\) and a charge \(q_2 = -1\) nC sits at \(x = 0.30\) m. Find the point on the x axis where the electric field is zero.

Show solution
  1. Between the charges both fields point in the \(+x\) direction (away from the positive charge, toward the negative one), so they cannot cancel there.
  2. To the left of \(q_1\) the larger charge is closer, so its field always wins. The zero must lie to the right of \(q_2\), at some \(x > 0.30\) m.
  3. There the fields have opposite directions. Setting their magnitudes equal: \(\dfrac{4}{x^2} = \dfrac{1}{(x - 0.30)^2}\), so \(2(x - 0.30) = x\), giving \(x = 0.60\) m.
  4. Check: at 0.60 m, \(k \cdot 4\,\text{nC}/0.36 = k \cdot 1\,\text{nC}/0.09\); both equal \(k \times 11.1\) nC/m\(^2\).

Answer: The field vanishes at \(x = 0.60\) m, beyond the weaker charge.

Common mistakes

  • MistakeUsing the position vector \(\mathbf{r}\) where the separation vector \(\boldsymbol{\mathscr{r}} = \mathbf{r} - \mathbf{r}'\) belongs.

    InsteadCoulomb's law depends on the vector from source to field point; always form \(\mathbf{r} - \mathbf{r}'\) first.

  • MistakeAdding the magnitudes of fields from several charges.

    InsteadFields are vectors; add components, as the program does.

  • MistakeThinking of the field as a mere calculational device.

    InsteadFields carry energy and momentum and propagate at finite speed; they are physical.

  • MistakeAssuming gravity matters in atomic or molecular problems.

    InsteadThe electric force is about \(10^{39}\) times stronger between an electron and a proton.

  • MistakeMixing Gaussian and SI formulas from different textbooks.

    InsteadCheck for factors of \(4\pi\varepsilon_0\) and \(c\) before combining results.

Summary and key terms

  • The electric field is defined as force per unit test charge and is a physical entity carrying energy and momentum.
  • Superposition makes the field equations linear: fields of separate sources add as vectors.
  • For continuous charge, \(\mathbf{E} = \frac{1}{4\pi\varepsilon_0}\int \rho\,\hat{\boldsymbol{\mathscr{r}}}/\mathscr{r}^2\,d\tau'\).
  • Maxwell's equations state the divergence and curl of \(\mathbf{E}\) and \(\mathbf{B}\); in statics they split into separate electric and magnetic pairs.
  • \(1/\sqrt{\varepsilon_0\mu_0}\) equals the speed of light, a hint that light is an electromagnetic wave.
  • The electric force between elementary particles exceeds gravity by about 39 orders of magnitude.
field
A function assigning a vector (or scalar) to every point of space.
separation vector
The vector from a source point to the field point, r - r'.
superposition
The principle that fields from separate sources add as vectors.
electrostatics
The study of fields produced by charges at rest.
magnetostatics
The study of fields produced by steady currents.
Lorentz force
The force q(E + v x B) on a charge moving through electric and magnetic fields.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. Two protons are 1.0 fm apart inside a nucleus. Find the electric repulsion between them.

    Show answer

    \(F = 8.99 \times 10^9 \times (1.60 \times 10^{-19})^2/(10^{-15})^2 = 230\) N, an enormous force on a particle of mass \(1.67 \times 10^{-27}\) kg; the strong nuclear force must exceed it.

  2. A charge of 3.0 nC sits at the origin. Find the field vector at \((0.3, 0.4, 0)\) m.

    Show answer

    \(\mathscr{r} = 0.5\) m, \(E = 8.99 \times 10^9 \times 3 \times 10^{-9}/0.25 = 108\) N/C along \((0.6, 0.8, 0)\): \(\mathbf{E} = (64.7, 86.3, 0)\) N/C.

  3. Show that the ratio of electric to gravitational force between two protons is about \(1.2 \times 10^{36}\).

    Show answer

    \(\dfrac{ke^2}{Gm_p^2} = \dfrac{8.99 \times 10^9 \times 2.57 \times 10^{-38}}{6.67 \times 10^{-11} \times 2.80 \times 10^{-54}} = 1.24 \times 10^{36}\).

  4. Which of Maxwell's equations says there are no magnetic charges?

    Show answer

    \(\nabla\cdot\mathbf{B} = 0\): magnetic field lines have no sources or sinks.

  5. A thin rod along the x axis from 0 to \(L\) carries uniform charge density \(\lambda\). Write the integral for the field at \(x = -d\).

    Show answer

    \(E_x = -\dfrac{1}{4\pi\varepsilon_0}\displaystyle\int_0^L \frac{\lambda\,dx'}{(x' + d)^2} = -\frac{\lambda}{4\pi\varepsilon_0}\Big(\frac{1}{d} - \frac{1}{L + d}\Big)\), pointing in \(-x\) for positive \(\lambda\).

  6. Compute \(1/\sqrt{\varepsilon_0\mu_0}\) using \(\mu_0 = 4\pi \times 10^{-7}\) and \(\varepsilon_0 = 8.854 \times 10^{-12}\).

    Show answer

    \(\varepsilon_0\mu_0 = 1.1127 \times 10^{-17}\) s\(^2\)/m\(^2\), so the speed is \(2.998 \times 10^8\) m/s.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz