Chapter 32
32 min read
Section 275 of 353

Electromagnetic Waves

Maxwell's Equations

Learning Objectives

After completing this section, you will be able to:

  1. Derive the wave equation for electromagnetic waves from Maxwell's equations
  2. Explain how Maxwell predicted electromagnetic waves and identified light as an EM phenomenon
  3. Describe the relationship between electric and magnetic fields in an EM wave
  4. Calculate the speed of electromagnetic waves from fundamental constants
  5. Understand the electromagnetic spectrum and how different wavelengths are used
  6. Connect electromagnetic wave theory to modern applications in communications and computing
Why This Matters: Maxwell's prediction of electromagnetic waves is considered one of the greatest achievements in physics. It unified electricity, magnetism, and optics, predicted radio waves before they were discovered, and laid the foundation for all modern wireless technology, from WiFi to MRI machines.

The Greatest Prediction in Physics

In 1865, James Clerk Maxwell achieved something extraordinary. By carefully analyzing four equations describing electric and magnetic phenomena, he made a prediction that would transform our understanding of the universe: electromagnetic waves should exist, and they should travel at approximately 3×1083 \times 10^8 meters per second.

This speed matched the known speed of light almost exactly. Maxwell boldly concluded:

"We can scarcely avoid the inference that light consists in the transverse undulations of the same medium which is the cause of electric and magnetic phenomena."
— James Clerk Maxwell, 1865

In other words: light is an electromagnetic wave. This single insight unified three previously separate branches of physics: electricity, magnetism, and optics. It also predicted the existence of electromagnetic waves at other frequencies—radio waves, microwaves, X-rays—decades before they were discovered.

Before MaxwellAfter Maxwell
Electricity and magnetism were related but separateUnified into electromagnetism
Light was a mysterious phenomenonLight is an electromagnetic wave
No explanation for light's constant speedSpeed determined by ε₀ and μ₀
Radio waves unknownPredicted (confirmed by Hertz, 1887)

Deriving the Wave Equation

Maxwell's Key Insight

The key to Maxwell's discovery lies in the coupling between electric and magnetic fields:

  • Faraday's Law: A changing magnetic field creates an electric field: ×E=Bt\nabla \times \mathbf{E} = -\frac{\partial \mathbf{B}}{\partial t}
  • Ampere-Maxwell Law: A changing electric field creates a magnetic field: ×B=μ0ε0Et\nabla \times \mathbf{B} = \mu_0 \varepsilon_0 \frac{\partial \mathbf{E}}{\partial t}

This mutual dependence creates a beautiful feedback loop: a changing E creates a changing B, which creates a changing E, and so on. This self-sustaining oscillation can propagate through space—it's an electromagnetic wave!

The Displacement Current: Maxwell's crucial contribution was adding the term μ0ε0Et\mu_0 \varepsilon_0 \frac{\partial \mathbf{E}}{\partial t} to Ampere's law. This "displacement current" was needed for mathematical consistency (conservation of charge) and is what makes electromagnetic wave propagation possible.

Step-by-Step Derivation

Let's derive the wave equation. Click each step below to see the mathematical details:

Deriving the Wave Equation from Maxwell's Equations

Click each step to expand the derivation. This derivation shows how Maxwell's equations predict electromagnetic waves traveling at the speed of light - one of the greatest discoveries in physics.

×E=Bt\nabla \times \mathbf{E} = -\frac{\partial \mathbf{B}}{\partial t}

Faraday's law tells us that a changing magnetic field creates a circulating electric field. The curl of E equals the negative rate of change of B. This is the mathematical expression of electromagnetic induction.

Maxwell's Great Unification

By deriving the wave equation from electromagnetic theory and finding that the wave speed equals the measured speed of light, Maxwell unified electricity, magnetism, and optics into a single theory. He wrote: "We can scarcely avoid the inference that light consists in the transverse undulations of the same medium which is the cause of electric and magnetic phenomena."

The Wave Equation Form

The derivation yields the electromagnetic wave equation:

2E=μ0ε02Et2\nabla^2 \mathbf{E} = \mu_0 \varepsilon_0 \frac{\partial^2 \mathbf{E}}{\partial t^2}

Comparing with the standard wave equation 2f=1v22ft2\nabla^2 f = \frac{1}{v^2} \frac{\partial^2 f}{\partial t^2}, we identify the wave speed:

v=1μ0ε0v = \frac{1}{\sqrt{\mu_0 \varepsilon_0}}


The Speed of Light Emerges

Maxwell calculated this speed using the measured values of the fundamental constants:

  • Permittivity of free space: ε0=8.854×1012\varepsilon_0 = 8.854 \times 10^{-12} F/m
  • Permeability of free space: μ0=4π×107\mu_0 = 4\pi \times 10^{-7} T·m/A

Plugging in these values:

c=1(4π×107)(8.854×1012)=2.998×108 m/sc = \frac{1}{\sqrt{(4\pi \times 10^{-7})(8.854 \times 10^{-12})}} = 2.998 \times 10^8 \text{ m/s}

The Stunning Result: This matched the measured speed of light to within experimental error! Maxwell had proven that light is an electromagnetic phenomenon. The speed of light is not a separate constant of nature—it emerges from the properties of electricity and magnetism.

This result is so fundamental that the speed of light is now defined to be exactly c=299,792,458c = 299,792,458 m/s, and the meter is defined in terms of c.


Properties of Electromagnetic Waves

Transverse Nature

Electromagnetic waves are transverse waves: the oscillating electric and magnetic fields are perpendicular to the direction of wave propagation.

For a wave traveling in the x-direction:

  • The electric field oscillates in the y-direction (or any direction perpendicular to x)
  • The magnetic field oscillates in the z-direction (perpendicular to both E and the propagation direction)
  • E, B, and the propagation direction form a right-handed coordinate system

E and B Relationship

The electric and magnetic fields in an EM wave are intimately connected:

  1. Perpendicular orientation: E and B are always perpendicular to each other
  2. In phase: They reach their maximum and minimum values at the same time and place
  3. Magnitude relationship: E=cB|\mathbf{E}| = c|\mathbf{B}|

For a plane wave traveling in the +x direction:

E=E0sin(kxωt)y^,B=E0csin(kxωt)z^\mathbf{E} = E_0 \sin(kx - \omega t)\hat{\mathbf{y}}, \quad \mathbf{B} = \frac{E_0}{c} \sin(kx - \omega t)\hat{\mathbf{z}}

where k=2π/λk = 2\pi/\lambda is the wave number and ω=2πf\omega = 2\pi f is the angular frequency.


Visualizing Electromagnetic Waves

Use the interactive visualization below to explore electromagnetic wave propagation. Observe how the electric field (orange) and magnetic field (cyan) oscillate perpendicular to each other and to the direction of propagation:

Electromagnetic Wave Propagation

2.00 units
1.00
40%

Key Observations:

  • • The electric field (E) and magnetic field (B) oscillate perpendicular to each other
  • • Both fields are perpendicular to the direction of wave propagation (transverse wave)
  • • E and B are in phase - they reach maximum and minimum values together
  • • The wave travels at speed c = \u03BB \u00B7 f (wavelength times frequency)
Experiment: Try adjusting the wavelength slider. Notice that as wavelength increases, the wave appears more stretched out. The fundamental relationship c=fλc = f \cdot \lambda means that longer wavelengths correspond to lower frequencies (since c is constant).

The Electromagnetic Spectrum

All electromagnetic waves are fundamentally the same phenomenon—oscillating electric and magnetic fields propagating at speed c. What distinguishes different types of EM radiation is their frequency (or equivalently, wavelength).

Click on different regions of the spectrum below to learn about their properties and applications:

The Electromagnetic Spectrum

Long WavelengthLow Energy|High EnergyShort Wavelength
Wavelength← increases
increases →Frequency & Energy

Visible Light

Wavelength: 400 - 700 nm
Frequency: 430 - 750 THz

The only portion of the EM spectrum detectable by human eyes. Contains all colors from violet (shortest) to red (longest wavelength).

Applications:
VisionPhotographyLasersFiber Optic CommunicationDisplays
c = f · λ
All EM waves travel at the same speed
E = h · f
Energy is proportional to frequency
c ≈ 3×10&sup8; m/s
Speed of light in vacuum

The relationships between wavelength, frequency, and energy are:

  • Wave relationship: c=fλc = f \cdot \lambda (all EM waves travel at the same speed)
  • Quantum energy: E=hfE = hf (higher frequency means higher photon energy)
  • Combined: E=hcλE = \frac{hc}{\lambda} (shorter wavelength means higher energy)

Energy and Momentum

Electromagnetic waves carry both energy and momentum. The energy density (energy per unit volume) in an EM wave is:

u=12ε0E2+12μ0B2=ε0E2u = \frac{1}{2}\varepsilon_0 E^2 + \frac{1}{2\mu_0}B^2 = \varepsilon_0 E^2

The energy flows in the direction of propagation. The Poynting vector gives the power per unit area:

S=1μ0E×B\mathbf{S} = \frac{1}{\mu_0} \mathbf{E} \times \mathbf{B}

The average intensity (power per unit area) for a sinusoidal wave is:

I=S=12cε0E02I = \langle S \rangle = \frac{1}{2} c \varepsilon_0 E_0^2

Radiation Pressure: Since EM waves carry momentum, they exert pressure when absorbed or reflected. Though tiny for everyday light, this effect is used in "solar sails" for spacecraft propulsion and must be accounted for in precision experiments.

Applications

Communications

The prediction and discovery of electromagnetic waves revolutionized human communication:

TechnologyFrequency RangeApplication
AM Radio530 kHz - 1.7 MHzVoice and music broadcasting
FM Radio88 - 108 MHzHigh-fidelity audio
WiFi2.4 & 5 GHzWireless internet
5G Cellular600 MHz - 39 GHzMobile communications
Fiber Optics~193 THz (infrared)High-bandwidth data transmission
Satellite1-40 GHzGPS, television, internet

Modern Technology

Maxwell's equations underpin virtually all modern technology:

  • Medical Imaging: MRI uses radio waves and magnetic fields to image soft tissue
  • Radar: Uses microwave reflection for aircraft detection and weather monitoring
  • Microwave Ovens: 2.45 GHz waves excite water molecules, heating food
  • Remote Sensing: Satellites use various EM frequencies to study Earth
  • Spectroscopy: Identifying materials by their EM absorption/emission

Connection to Machine Learning

Understanding electromagnetic waves has deep connections to modern machine learning and scientific computing:

  1. Signal Processing: The Fourier transform, essential for analyzing EM signals, is fundamental to audio/image ML models
  2. Computer Vision: Cameras capture visible EM waves; understanding light physics improves image models
  3. Physics-Informed Neural Networks (PINNs): Neural networks that solve Maxwell's equations for electromagnetic design
  4. Wireless AI: ML optimizes antenna arrays, channel estimation, and 5G/6G networks
  5. Computational Electromagnetics: Deep learning accelerates simulations of EM wave propagation
Modern Applications: Companies like NVIDIA use neural networks to solve Maxwell's equations for electromagnetic compatibility (EMC) testing, reducing simulation time from hours to seconds. Understanding the underlying physics helps design better AI architectures for these tasks.

Numerical Simulation of EM Waves

The Finite-Difference Time-Domain (FDTD) method is the most widely used technique for simulating electromagnetic wave propagation. It directly discretizes Maxwell's equations on a grid:

FDTD Simulation of Electromagnetic Waves
🐍em_wave_fdtd.py
1FDTD Method

The Finite-Difference Time-Domain method is the most common numerical technique for solving Maxwell's equations. It discretizes space and time to simulate wave propagation.

6Speed of Light

The speed of light c = 3 x 10^8 m/s emerges naturally from Maxwell's equations as c = 1/sqrt(mu_0 * eps_0). This is the speed at which all electromagnetic waves travel in vacuum.

7Permittivity

The permittivity of free space eps_0 measures how easily electric fields can be established in vacuum. It appears in Gauss's law for electricity.

8Permeability

The permeability of free space mu_0 measures how easily magnetic fields can be established in vacuum. It appears in Ampere's law.

12CFL Condition

The Courant-Friedrichs-Lewy condition ensures numerical stability. The time step must satisfy dt <= dx/(2c) to prevent the numerical solution from becoming unstable.

16Electric Field Array

The electric field E is discretized on a 1D grid. In 3D, we would have E_x, E_y, E_z components.

17Magnetic Field Array

The magnetic field H (related to B by H = B/mu_0) is also discretized. E and H are staggered in space by half a grid cell (Yee lattice).

25Yee Algorithm

The Yee algorithm updates H using the spatial derivative of E, directly implementing Faraday&apos;s law: curl(E) = -dB/dt. The staggered grid enables second-order accuracy.

26H-field Update

This implements dH/dt = (1/mu) * dE/dx, which comes from Faraday&apos;s law. The finite difference approximates the spatial derivative of E.

29E-field Update

This implements dE/dt = (1/eps) * dH/dx, which comes from Ampere-Maxwell&apos;s law. Together with the H update, this creates the self-sustaining wave.

32Gaussian Source

A Gaussian pulse is a common source because it has a smooth spectrum. The pulse excites a range of frequencies and propagates outward as an EM wave.

35Boundary Conditions

Simple absorbing boundary conditions prevent reflections from the domain edges. More sophisticated methods (PML) are used in production simulations.

39Verification

The computed wave speed from mu_0 and eps_0 matches the speed of light exactly, verifying Maxwell&apos;s profound discovery that light is an electromagnetic wave.

31 lines without explanation
1import numpy as np
2import matplotlib.pyplot as plt
3
4# FDTD Simulation of 1D Electromagnetic Wave
5# Solving: dE/dt = (1/eps) * dH/dx and dH/dt = (1/mu) * dE/dx
6
7# Physical constants
8c = 3e8  # Speed of light in vacuum
9eps_0 = 8.854e-12  # Permittivity of free space
10mu_0 = 4 * np.pi * 1e-7  # Permeability of free space
11
12# Simulation parameters
13nx = 500  # Number of spatial points
14dx = 1e-9  # Spatial step (1 nm)
15dt = dx / (2 * c)  # Time step (CFL condition)
16nt = 1000  # Number of time steps
17
18# Initialize fields
19E = np.zeros(nx)  # Electric field
20H = np.zeros(nx)  # Magnetic field
21
22# Source parameters (Gaussian pulse)
23source_pos = nx // 4
24pulse_width = 30
25t0 = pulse_width * 3
26
27# Main FDTD loop using Yee algorithm
28for n in range(nt):
29    # Update H field (staggered in space and time)
30    H[:-1] = H[:-1] + (dt / (mu_0 * dx)) * (E[1:] - E[:-1])
31
32    # Update E field
33    E[1:] = E[1:] + (dt / (eps_0 * dx)) * (H[1:] - H[:-1])
34
35    # Add source (Gaussian pulse)
36    E[source_pos] += np.exp(-((n - t0) / pulse_width) ** 2)
37
38    # Absorbing boundary conditions (simple)
39    E[0] = E[1]
40    E[-1] = E[-2]
41
42# The wave propagates at speed c = 1/sqrt(mu_0 * eps_0)
43print(f"Wave speed: {1/np.sqrt(mu_0 * eps_0):.2e} m/s")
44print(f"Speed of light: {c:.2e} m/s")

The FDTD method demonstrates how the wave equation emerges naturally from Maxwell's coupled differential equations. When you run this simulation, you'll see a Gaussian pulse of electromagnetic radiation propagating outward at exactly the speed of light.


Summary

In this section, we have explored one of the most profound discoveries in physics:

  • Maxwell's equations predict electromagnetic waves traveling at speed c=1/μ0ε0c = 1/\sqrt{\mu_0 \varepsilon_0}
  • The calculated speed equals the measured speed of light, proving light is an EM wave
  • EM waves are transverse: E and B oscillate perpendicular to propagation direction
  • E and B are perpendicular to each other, in phase, with E=cB|E| = c|B|
  • The electromagnetic spectrum spans from radio waves to gamma rays, all traveling at c
  • EM waves carry energy and momentum, described by the Poynting vector
  • This discovery unified electricity, magnetism, and optics into one theory
Maxwell's Legacy: Maxwell's equations are often called the second great unification in physics (after Newton unified celestial and terrestrial mechanics). Einstein called Maxwell's work "the most profound and the most fruitful that physics has experienced since the time of Newton." Every radio, TV, phone, computer, and MRI machine operates according to these equations.

Knowledge Check

Test your understanding of electromagnetic waves with this quiz:

Knowledge Check

Question 1 of 8

What fundamental relationship allows us to derive the wave equation from Maxwell&apos;s equations?

Loading comments...