COLLEGE PHYSICS • MAGNETIC FIELDS & ELECTROMAGNETISM

Magnetic Fields

Understanding the invisible vector fields that govern the motion of charged particles and underpin modern technology.

Historical Context & Motivation

The study of magnetic fields stretches back millennia, from the earliest observations of lodestone attracting iron to the sophisticated electromagnetic theory that underpins contemporary physics. Ancient Greek philosophers noted that certain stones found near the city of Magnesia in modern-day Turkey could attract iron filings, and Chinese navigators exploited this phenomenon in the magnetic compass as early as the eleventh century. Yet the leap from curiosity to quantitative science required centuries of painstaking experimentation, and it was not until the nineteenth century that physicists unified electricity and magnetism into a single coherent framework. Understanding this historical trajectory reveals why magnetic fields occupy such a central position in physics — they represent a paradigm shift from the idea of action at a distance to the modern concept of a field permeating space, mediating forces between charges and currents.

1269
Petrus Peregrinus — Epistola de Magnete
Petrus Peregrinus published the first systematic study of magnetism, identifying magnetic poles and demonstrating that like poles repel while opposite poles attract — a qualitative foundation for all future work.
1820
Ørsted's Discovery
Hans Christian Ørsted observed that a current-carrying wire deflected a nearby compass needle, establishing for the first time that electricity and magnetism are related — a landmark moment that launched classical electromagnetism.
1831
Faraday's Induction & Field Lines
Michael Faraday discovered electromagnetic induction and introduced the concept of 'lines of force,' providing the first geometric visualization of magnetic fields and shifting physics toward field-based thinking.
1865
Maxwell's Equations
James Clerk Maxwell unified electricity, magnetism, and optics into four elegant equations, predicting electromagnetic waves traveling at the speed of light and providing the complete classical theory of the magnetic field.
1905
Einstein's Special Relativity
Albert Einstein showed that electric and magnetic fields are two aspects of a single electromagnetic field tensor, with their relative magnitudes depending on the observer's reference frame.

This rich history raises several interconnected questions that this lesson addresses: What exactly is a magnetic field, and how do we describe it mathematically? How do magnetic fields exert forces on moving charges and current-carrying conductors? And how does the superposition principle allow us to compute the net field produced by complex current distributions? These are the foundational questions of magnetostatics, and mastering them is prerequisite to understanding electromagnetic induction, Maxwell's equations, and ultimately the nature of light.

Core Principles & Definitions

A magnetic field, denoted B, is a vector field that assigns a magnitude and direction to every point in space, characterizing the influence that moving charges, electric currents, and magnetized materials exert on their surroundings. Unlike the electric field, which acts on charges regardless of their state of motion, the magnetic field produces a force only on charges in motion. The SI unit of magnetic field strength is the tesla (T), where 1 T = 1 kg·s−2·A−1. The older CGS unit, the gauss (G), relates by 1 T = 10⁴ G; the Earth's surface field is roughly 25–65 μT (0.25–0.65 G). Understanding the following core principles is essential before diving into the mathematics.

1

The Magnetic Field Vector B

B is defined operationally through the Lorentz force on a test charge: F = qv × B. Its direction is perpendicular to both the velocity and the resulting force, and its magnitude is measured in teslas.
2

Sources of Magnetic Fields

Magnetic fields arise from three principal sources: moving charges (currents), intrinsic magnetic moments (spin), and time-varying electric fields. In magnetostatics we focus on steady currents.
3

Magnetic Field Lines

Field lines are continuous closed loops with no beginning or end, reflecting the fact that magnetic monopoles have never been observed. The tangent to a field line gives the direction of B, and the density of lines indicates its magnitude.
4

Superposition Principle

The net magnetic field at any point is the vector sum of the fields produced by each individual source. This linearity is the backbone of the Biot–Savart law and Ampère's law calculations.
5

Gauss's Law for Magnetism

The net magnetic flux through any closed surface is zero: ∮ B · dA = 0. This is one of Maxwell's equations and encodes the absence of magnetic monopoles — every field line that enters a closed surface must exit it.
KEY TAKEAWAY
Think of the magnetic field like a river current that only pushes objects that are themselves in motion. A stationary boat feels no drag, but as soon as it moves — especially perpendicular to the current — a sideways force deflects it. Similarly, a stationary charge sitting in a magnetic field experiences no magnetic force; the force appears only when the charge moves, and it acts perpendicular to both the velocity and the field, steering the charge into a curved path rather than speeding it up or slowing it down.

Visualizing Magnetic Fields

A powerful way to build intuition for magnetic fields is to examine the field-line patterns produced by common sources. The diagram below illustrates the magnetic field of a bar magnet (equivalently, a magnetic dipole) alongside the field created by a long straight current-carrying wire. Notice that the bar magnet's field lines emerge from the north pole and loop back into the south pole, forming continuous closed curves. The wire's field lines, by contrast, form concentric circles centered on the wire, with the direction given by the right-hand rule: point the thumb of your right hand in the direction of conventional current, and your curled fingers indicate the circulation direction of B.

Left: Magnetic field lines of a bar magnet emerge from the north pole (cyan arrows) and re-enter at the south pole (pink arrows), forming closed loops that pass through the interior of the magnet. Right: A long straight wire carrying current I (yellow dot, out of the page) produces concentric circular field lines (violet). The magnitude falls off as 1/r, and the direction follows the right-hand rule.

Several features of these diagrams deserve emphasis. First, the density of field lines in the bar-magnet diagram is greatest near the poles, reflecting the fact that the field magnitude is strongest there. Second, the field lines never cross — if they did, B would have two directions at that point, which is physically meaningless. Third, for the straight wire, the field magnitude decreases as 1/r, which is apparent from the increasing spacing of the concentric circles. This 1/r dependence contrasts with the 1/r² fall-off of the electric field from a point charge, and it arises because the wire is an extended, one-dimensional source rather than a zero-dimensional point source.

Mathematical Framework

The mathematical description of magnetic fields in the classical regime rests on two complementary formalisms: the Lorentz force law, which specifies how a given field acts on charges and currents, and the Biot–Savart law and Ampère's law, which specify how charges and currents produce the field. Together these equations fully describe magnetostatics — the regime of steady (time-independent) currents and fields.

LORENTZ FORCE LAW
F = qv × B
F = magnetic force (N), q = charge (C), v = velocity of the charge (m/s), B = magnetic field (T). The cross product means |F| = qvB sin θ, where θ is the angle between v and B. The force is always perpendicular to v, so it does zero work on the charge.
FORCE ON A CURRENT-CARRYING WIRE
F = IL × B
I = current (A), L = length vector along the wire in the direction of current (m). For a straight wire of length L in a uniform field: |F| = BIL sin θ.
BIOT–SAVART LAW
dB = (μ₀ / 4π) × (I dℓ × r̂) / r²
μ₀ = permeability of free space = 4π × 10−7 T·m/A, dℓ = infinitesimal current element, = unit vector from the current element to the field point, r = distance from element to field point. This is the magnetic analogue of Coulomb's law and is used when the geometry lacks sufficient symmetry for Ampère's law.
AMPÈRE'S LAW (INTEGRAL FORM)
∮ B · dℓ = μ₀ I_enc
The line integral of B around any closed Amperian loop equals μ₀ times the total current Ienc threading the loop. This law is most powerful for systems with high symmetry: infinite wires, solenoids, and toroids.
🔗 Connecting the Laws
The Biot–Savart law and Ampère's law are not independent — Ampère's law can be derived from the Biot–Savart law using the vector identity ∇ × B = μ₀J (the differential form). Use Ampère's law when symmetry allows you to pull B out of the integral; use the Biot–Savart law for arbitrary current geometries.

Magnetic Fields from Common Sources

Applying the Biot–Savart law or Ampère's law to standard geometries yields canonical results that appear throughout physics and engineering. The table below summarizes the most important cases, and the following diagram illustrates the field inside a solenoid — one of the most useful field-producing devices because it generates a nearly uniform field over its interior volume.

Standard magnetic field results for common current distributions
Source GeometryMagnetic Field ExpressionKey Features
Long straight wireB = μ₀I / (2πr)Concentric circles; falls off as 1/r; direction via right-hand rule
Circular loop (on axis)B = μ₀IR² / [2(R² + x²)3/2]Maximum at center (x = 0); resembles dipole field at large x
Infinite solenoidB = μ₀nI (inside)Uniform inside, ≈ 0 outside; n = turns per unit length
ToroidB = μ₀NI / (2πr) (inside)Confined to interior; N = total turns; B = 0 outside
Magnetic dipole (far field)B ∝ μ₀m / (4πr³)m = NIA (magnetic moment); falls off as 1/r³
Cross-section of an ideal solenoid with n turns per unit length carrying current I (amber coils). Inside, the magnetic field B (emerald arrows) is uniform and parallel to the axis. Outside, the field is negligibly small for an infinite solenoid. The violet dashed rectangle represents the Amperian loop used to derive B = μ₀nI via Ampère's law.

The derivation of the solenoid field via Ampère's law is elegant. Choose a rectangular Amperian loop whose long side of length ℓ runs inside the solenoid parallel to the axis, and whose return path lies outside where B ≈ 0. The line integral then reduces to Bℓ = μ₀(nℓ)I, giving B = μ₀nI. This result is remarkable because it is independent of the position inside the solenoid and independent of the solenoid's radius — the field depends only on the turn density n and the current I. Real solenoids of finite length deviate from this ideal near their ends, where fringe fields emerge, but the approximation holds well over the central region.

Worked Example — Charged Particle in a Uniform Magnetic Field

A proton (q = 1.60 × 10⁻¹⁹ C, m = 1.67 × 10⁻²⁷ kg) enters a region of uniform magnetic field B = 0.50 T directed in the +z direction. The proton's velocity is v = 2.0 × 10⁶ m/s entirely in the +x direction. Determine the radius of the circular orbit, the cyclotron frequency, and the period of revolution.

Proton Cyclotron Motion
1
Step 1 — Identify the PhysicsSince v ⊥ B (velocity in x̂, field in ẑ), the magnetic force F = qv × B is always perpendicular to v, producing uniform circular motion in the x–y plane. The magnetic force serves as the centripetal force: qvB = mv²/r.
2
Step 2 — Solve for the Cyclotron RadiusRearranging qvB = mv²/r gives r = mv / (qB). Substituting: r = (1.67 × 10⁻²⁷ kg)(2.0 × 10⁶ m/s) / [(1.60 × 10⁻¹⁹ C)(0.50 T)].
r = 0.042 m = 4.2 cm
3
Step 3 — Compute the Cyclotron FrequencyThe cyclotron (angular) frequency ω = v/r = qB/m. Note that ω is independent of v — faster particles orbit in larger circles but at the same frequency. ω = (1.60 × 10⁻¹⁹)(0.50) / (1.67 × 10⁻²⁷).
ω ≈ 4.79 × 10⁷ rad/s, or f = ω / (2π) ≈ 7.63 × 10⁶ Hz (7.63 MHz)
4
Step 4 — Determine the PeriodT = 2π / ω = 2πm / (qB). This again is independent of the speed — a key principle exploited in the design of cyclotron particle accelerators.
T ≈ 1.31 × 10⁻⁷ s ≈ 131 ns
5
Step 5 — Physical CheckThe proton traces a circle of radius 4.2 cm — small enough to fit within a laboratory magnet. The frequency is in the MHz range, consistent with RF frequencies used in NMR and cyclotron accelerators. The speed v = 2.0 × 10⁶ m/s is well below c, so the non-relativistic treatment is valid.

Electric vs. Magnetic Fields — Parallels and Distinctions

Students often find it helpful to compare the magnetic field side by side with the electric field, since many of the mathematical structures are analogous while the physical behaviors differ profoundly. The table below highlights these parallels and distinctions, which become even more meaningful once you encounter Maxwell's equations and special relativity.

Side-by-side comparison of electric and magnetic fields
PropertyElectric Field EMagnetic Field B
SourceElectric charges (static or moving)Moving charges (currents) and changing E fields
Acts onAll charges, regardless of motionOnly charges in motion (F = qv × B)
Force directionParallel (or anti-parallel) to EPerpendicular to both v and B
Work doneCan do positive or negative work; changes KEDoes zero work; changes direction only
Field linesBegin on + charges, end on − charges (open)Always closed loops (no monopoles)
Gauss's law∮ E · dA = Qenc / ε₀∮ B · dA = 0
SI unitV/m (volt per meter)T (tesla)
KEY TAKEAWAY
The electric field is like a slope on a hill — it pushes a ball (charge) downhill regardless of whether the ball is stationary or rolling. The magnetic field, by contrast, is like a Coriolis-type deflection: it only appears when you're moving, and it steers you sideways without speeding you up or slowing you down. This perpendicularity is why magnetic forces do no work and why charged particles in a pure magnetic field trace circles or helices at constant speed.

Connections to Advanced Electromagnetism

The magnetostatic framework presented in this lesson is the starting point for a much deeper theory. Adding time dependence leads to Faraday's law of induction (a changing magnetic flux induces an EMF) and Maxwell's displacement current correction to Ampère's law. Together, these four Maxwell's equations unify electricity, magnetism, and optics. Special relativity further reveals that E and B are components of a single electromagnetic field tensor Fᵘᵛ, and what one observer calls a purely electric force, another observer in a different reference frame may interpret as partly magnetic.

Magnetostatics vs. full electrodynamics
ConceptMagnetostatics (This Lesson)Full Electrodynamics (Next Steps)
Ampère's law∮ B · dℓ = μ₀Ienc∮ B · dℓ = μ₀Ienc + μ₀ε₀ dΦE/dt
Faraday's lawNot applicable (∂B/∂t = 0)∮ E · dℓ = −dΦB/dt
Field energyu = B² / (2μ₀) stored in fieldPoynting vector S = (1/μ₀)(E × B) describes energy flow
RelativityE and B treated as separate fieldsUnified in the electromagnetic tensor Fᵘᵛ

Looking ahead, the magnetic field also plays a pivotal role in quantum mechanics — orbital and spin magnetic moments of electrons determine atomic spectra and are the basis of magnetic resonance imaging (MRI). In condensed matter physics, the response of materials to applied B fields gives rise to phenomena ranging from diamagnetism and paramagnetism to the exotic quantum states of superconductors and topological insulators. Mastering the classical magnetic field concepts in this lesson prepares you for all of these advanced topics.

Practice Problems

PROBLEM 1CONCEPTUAL
A positive charge moves with velocity v in the +y direction through a region where B is uniform and directed in the +z direction. What is the direction of the magnetic force on the charge, and does this force change the particle's speed? Explain your reasoning in terms of the cross product and the work-energy theorem.
PROBLEM 2BASIC CALCULATION
A straight wire of length 0.30 m carries a current of 5.0 A perpendicular to a uniform magnetic field of 0.20 T. Calculate the magnitude of the force on the wire.
PROBLEM 3INTERMEDIATE
An electron (m = 9.11 × 10⁻³¹ kg, q = 1.60 × 10⁻¹⁹ C) moves at 3.0 × 10⁷ m/s in a plane perpendicular to a magnetic field and follows a circular path of radius 1.7 cm. Determine the magnitude of B and find the period of revolution.
PROBLEM 4APPLIED
A solenoid used in an MRI machine is 1.5 m long, has 12,000 turns, and carries a current of 120 A. (a) Calculate the magnetic field inside the solenoid. (b) What is the magnetic energy density u = B² / (2μ₀) stored in the field?
PROBLEM 5CRITICAL THINKING
A charged particle enters a region containing both a uniform electric field E = E₀ŷ and a uniform magnetic field B = B₀ẑ. Show that if the particle moves in the +x direction with velocity v = E₀ / B₀, it will pass through the region undeflected. Discuss the physical significance of this 'velocity selector' configuration and what happens for particles with speeds greater or less than v₀.

Lesson Summary

The magnetic field B is a vector field produced by moving charges and currents that exerts a force only on charges in motion via the Lorentz force law F = qv × B. Because this force is always perpendicular to the velocity, it does zero work and changes direction but not speed — a fundamental distinction from the electric force. The Biot–Savart law and Ampère's law provide complementary methods for computing B from known current distributions, with Ampère's law being most efficient for geometries possessing high symmetry such as long wires, solenoids (B = μ₀nI), and toroids.

Magnetic field lines form closed loops — a manifestation of Gauss's law for magnetism (∮ B · dA = 0) and the absence of magnetic monopoles. Charged particles moving perpendicular to a uniform B trace circular orbits with radius r = mv / (qB) and a cyclotron frequency ω = qB / m that is independent of speed. These principles underpin technologies from velocity selectors and mass spectrometers to MRI machines and particle accelerators, and they serve as the foundation for the full time-dependent theory of electrodynamics described by Maxwell's equations.

Varsity Tutors • College Physics • Magnetic Fields