PHYSICS 2 • MAGNETISM

Magnetic Field: Solenoid — Compute magnetic field of a solenoid (ideal)

Applying Ampère's law to a tightly wound coil reveals a remarkably uniform interior magnetic field.

Historical Context & Motivation

The relationship between electricity and magnetism was one of the great unifying discoveries of nineteenth-century physics. When Hans Christian Ørsted demonstrated in 1820 that an electric current deflects a compass needle, it became clear that moving charges produce magnetic fields. Scientists immediately sought to shape and amplify those fields for practical use, and the solenoid — a helical coil of wire carrying a steady current — emerged as the most elegant solution. Understanding the magnetic field inside an ideal solenoid is not only a cornerstone of electromagnetic theory but also the foundation for devices ranging from MRI magnets to particle accelerators.

1820
Ørsted's Discovery
Hans Christian Ørsted observes that a current-carrying wire deflects a nearby compass needle, establishing that electric currents produce magnetic fields and igniting intensive research across Europe.
1820
Ampère's Circuital Insights
André-Marie Ampère rapidly develops the mathematical relationship between enclosed currents and the circulation of the magnetic field, laying the groundwork for what we now call Ampère's law.
1831
Faraday's Induction Experiments
Michael Faraday discovers electromagnetic induction using solenoid coils, demonstrating that a changing magnetic flux through a loop induces an electromotive force and underscoring the solenoid's importance in both creating and detecting fields.
1864
Maxwell's Equations
James Clerk Maxwell synthesizes all electromagnetic phenomena into four elegant equations, within which Ampère's law (with Maxwell's displacement-current correction) provides the formal basis for computing the solenoid field.
1911–Present
Superconducting Solenoids
The discovery of superconductivity enables loss-free solenoids producing extremely strong, stable magnetic fields used in MRI scanners, fusion reactors, and high-energy particle colliders like the LHC.

The central question this lesson addresses is deceptively simple: given a long, tightly wound solenoid carrying a steady current, what is the magnetic field inside and outside it, and how do we derive that result rigorously from Ampère's law? Answering this question will demonstrate both the power of symmetry arguments in physics and the practical importance of the ideal solenoid approximation.

Core Principles & Definitions

Before diving into the derivation, it is essential to establish the key physical ideas and idealizations that make the solenoid calculation tractable. A real solenoid is a finite helix of wire, but the ideal solenoid is an abstraction in which the coil is infinitely long and wound so tightly that each turn can be treated as a circular current loop. Under these conditions, symmetry arguments dramatically simplify the problem.

1

Ideal Solenoid Assumptions

The solenoid is infinitely long (or equivalently, we are far from its ends) and wound with closely spaced turns so that the pitch angle of the helix is negligible. The field is perfectly uniform inside and zero outside.
2

Turn Density n

The quantity n = N / L represents the number of turns per unit length. It is the single geometric parameter that determines the interior field strength, independent of the solenoid's cross-sectional shape.
3

Ampère's Law (Integral Form)

The closed line integral of B · dl around any closed Amperian loop equals μ₀ times the total enclosed current Ienc. Choosing the right loop exploits the solenoid's symmetry.
4

Symmetry of B Inside

Translational symmetry along the axis and rotational symmetry about it guarantee that B inside is uniform, axial, and independent of position — it has only a ẑ component that depends on none of the spatial coordinates.
5

Field Outside = 0

For an infinite solenoid, Ampère's law with an appropriately chosen loop outside the solenoid encloses no net current, and symmetry shows the external field vanishes identically — a surprising and powerful result.
KEY TAKEAWAY
Think of an ideal solenoid like a perfectly insulated pipe for magnetic field lines: the field is strong and uniform inside the pipe, but essentially nothing leaks out through the walls. Just as the water pressure inside a long, straight pipe is the same everywhere along its length, the magnetic field inside an ideal solenoid is the same at every interior point, regardless of radial or axial position.

Visual Explanation — Solenoid Geometry & Field Lines

The diagram shows a longitudinal cross-section of an ideal solenoid. The upper row of ⊗ symbols and lower row of ⊙ symbols represent wire turns carrying current I in opposite directions through the top and bottom walls. Cyan arrows represent the uniform internal field B pointing to the right, while the labels outside confirm that B ≈ 0 in the exterior region of an ideal solenoid.

In the diagram above, the solenoid is oriented horizontally with its axis running left to right. The ⊗ symbols along the top represent current flowing into the page, while the ⊙ symbols along the bottom represent current emerging from the page — these are the two visible cross-sections of the same helical wire as it wraps around the cylindrical form. The critical observation is that the field lines inside are parallel, equally spaced, and purely axial, which encodes the uniformity of the interior field. Outside the solenoid, contributions from adjacent turns cancel almost perfectly, leaving essentially no external field. This cancellation becomes exact in the limit of an infinitely long, tightly wound coil — the ideal solenoid approximation.

Mathematical Framework — Deriving B via Ampère's Law

The derivation of the magnetic field inside an ideal solenoid is a showcase for the power of Ampère's law combined with symmetry reasoning. We begin by stating the law in its integral form, then choose an Amperian loop that exploits the solenoid's geometry to reduce the problem to simple algebra.

AMPÈRE'S LAW (INTEGRAL FORM)
∮ B⃗ · dl⃗ = μ₀ I_enc
The closed line integral of B⃗ around any closed path equals the permeability of free space μ₀ = 4π × 10⁻⁷ T·m/A multiplied by the total current Ienc threading through the loop.

Choosing the Amperian Loop

We choose a rectangular Amperian loop with one long side (length l) running along the interior of the solenoid parallel to the axis, the opposite long side running outside the solenoid, and two short sides connecting them perpendicular to the axis. Because B is purely axial inside and zero outside, only the interior segment contributes to the line integral. The two perpendicular segments contribute nothing because B ⊥ dl along those paths, and the outside segment contributes nothing because B = 0 there.

Therefore the left-hand side of Ampère's law reduces to B × l. The enclosed current equals the current through each turn, I, multiplied by the number of turns threaded by the loop. If the turn density is n = N/L, then the number of turns in length l is n l, giving Ienc = n l I.

AMPÈRE'S LAW APPLIED TO SOLENOID
B · l = μ₀ · (n l) · I
The factor l cancels from both sides, confirming that B is independent of the length of the Amperian loop — a hallmark of the uniform interior field.
MAGNETIC FIELD INSIDE AN IDEAL SOLENOID
B = μ₀ n I
where B is the magnitude of the uniform interior field (in tesla), μ₀ = 4π × 10⁻⁷ T·m/A is the permeability of free space, n = N/L is the number of turns per unit length (turns/m), and I is the current in each turn (in amperes).
EQUIVALENT FORM USING TOTAL TURNS
B = μ₀ (N / L) I
This form is convenient when you know the total number of turns N and the total length L of the solenoid.
💡 Why the cross-sectional area doesn't appear
A common point of confusion: the solenoid's radius or cross-sectional area does not appear in B = μ₀nI. The interior field strength depends only on the turn density and current — not on how wide or narrow the solenoid is. However, the magnetic flux Φ = BA does depend on cross-sectional area A, which is critical for induction calculations.

Detailed Breakdown — The Amperian Rectangle

The gold rectangle is the Amperian loop used in the derivation. Side 1 (interior, length l) is the only side contributing to the integral because B is parallel to dl there. Sides 2 and 4 are perpendicular to B (B · dl = 0), and Side 3 lies outside where B = 0. The shaded region contains the n·l turns threaded by the loop.

Evaluating Each Side of the Loop

Contribution of each segment of the Amperian rectangle
SegmentDirection of dl⃗Value of B⃗ · dl⃗Reason
Side 1 (interior)Parallel to axis (ẑ direction)B · lB is uniform and parallel to dl along the entire segment
Side 2 (right, radial)Perpendicular to axis (radially outward)0B is axial; B ⊥ dl → dot product vanishes
Side 3 (exterior)Anti-parallel to axis (−ẑ direction)0B = 0 outside an ideal solenoid
Side 4 (left, radial)Perpendicular to axis (radially inward)0B is axial; B ⊥ dl → dot product vanishes

Summing the four segments, the total line integral is simply B × l. The number of turns enclosed by the loop is n × l, each carrying current I, so Ienc = nIl. Setting B · l = μ₀ · n · I · l and canceling l from both sides immediately yields the result B = μ₀nI. The cancellation of l is physically significant: it confirms that the field does not depend on how long or short our sampling loop is, which is consistent with the field being truly uniform everywhere inside.

Worked Example — MRI Solenoid

Let us compute the magnetic field inside a solenoid representative of a clinical MRI magnet. A solenoid has a total of 15,000 turns wound over a length of 2.0 m and carries a current of 120 A. We wish to find the magnitude of the interior magnetic field.

Computing B Inside an MRI-Style Solenoid
1
Step 1 — Identify Given ValuesTotal number of turns: N = 15,000. Length of solenoid: L = 2.0 m. Current per turn: I = 120 A. Permeability of free space: μ₀ = 4π × 10⁻⁷ T·m/A.
2
Step 2 — Compute the Turn DensityThe turn density is n = N / L = 15,000 / 2.0 m = 7,500 turns/m.
n = 7,500 turns/m
3
Step 3 — Apply the Ideal Solenoid FormulaUsing B = μ₀nI, substitute the values: B = (4π × 10⁻⁷ T·m/A)(7,500 turns/m)(120 A).
4
Step 4 — Evaluate the Numerical ProductFirst, compute μ₀ × n = (4π × 10⁻⁷)(7,500) = 4π × 7,500 × 10⁻⁷ = 30,000π × 10⁻⁷ = 3.0π × 10⁻³ ≈ 9.425 × 10⁻³ T/A. Then multiply by I: B = (9.425 × 10⁻³ T/A)(120 A) ≈ 1.131 T.
B ≈ 1.13 T
5
Step 5 — Interpret the ResultThe interior field is approximately 1.13 T, which is on the order of clinical MRI field strengths (typically 1.5 T or 3.0 T). A real MRI magnet uses superconducting wire to maintain such large currents without resistive losses, and the finite length introduces small fringe-field corrections near the ends. The ideal solenoid formula provides an excellent first approximation.

Ideal vs. Real Solenoid — Strengths & Limitations

The ideal solenoid model is extraordinarily useful, but it is important to understand where it succeeds and where finite-length and finite-winding effects cause deviations. The table below contrasts the idealized model with the behavior of a real laboratory or engineering solenoid.

Comparison of ideal and real solenoid characteristics
FeatureIdeal SolenoidReal (Finite) Solenoid
Interior field uniformityPerfectly uniform everywhere insideApproximately uniform near the center; decreases toward the ends
Field at the endsNot applicable (infinite length)B ≈ μ₀nI / 2 at each open end (half the central value)
Exterior fieldIdentically zeroNon-zero but weak; resembles a bar magnet's dipole field at large distances
Dependence on cross-sectionNone — any shape gives the same BSlight dependence near ends due to fringe effects
Helical pitchZero (turns are perfectly planar rings)Finite pitch introduces a small longitudinal current and a weak azimuthal B component
Applicability criterionL → ∞Excellent when L ≫ diameter and far from the ends (central ~80 %)
ENGINEERING INSIGHT
In engineering practice, a solenoid whose length is at least ten times its diameter can be treated as 'ideal' over the central 80 % of its length with errors below a few percent. This rule of thumb is analogous to treating a parallel-plate capacitor as ideal when the plate separation is much smaller than the plate dimensions — the fringe fields exist but are geometrically confined to a small fraction of the volume of interest.

Connections to Advanced Electromagnetic Theory

The ideal solenoid is a gateway to several advanced topics in electromagnetism. It provides the simplest concrete setting for understanding magnetic flux, inductance, and the behavior of magnetic fields in magnetic materials. The table below shows how the basic solenoid result connects to these more advanced concepts.

Extensions of the ideal solenoid result to advanced topics
ConceptRelation to Solenoid FieldKey Formula
Magnetic Flux (Φ)The uniform B inside allows straightforward computation of flux through the cross-section, critical for Faraday's law.Φ = BA = μ₀nIA
Self-Inductance (L)The total flux linkage NΦ divided by I gives the inductance of the solenoid, fundamental to AC circuits and energy storage.L = μ₀n²AL (= μ₀N²A/L)
Stored EnergyThe energy density of the magnetic field, u = B²/(2μ₀), integrated over the solenoid volume, gives total stored energy.U = ½LI² = B²AL/(2μ₀)
Solenoid with CoreInserting a material with relative permeability μᵣ multiplies the field by μᵣ, dramatically enhancing B in ferromagnetic cores.B = μ₀μᵣnI

These extensions illustrate why the ideal solenoid is far more than an academic exercise. The derivation of B = μ₀nI is the first step toward understanding transformers, inductors, electromagnets, and the magnetic energy that plays a central role in circuits, plasma physics, and astrophysical phenomena. In a course on advanced electrodynamics, you will encounter the vector potential A⃗ of a solenoid, which is non-zero outside the solenoid even though B = 0 there — a subtlety with deep implications for quantum mechanics (the Aharonov–Bohm effect).

Practice Problems

PROBLEM 1CONCEPTUAL
A student claims that doubling the cross-sectional radius of a solenoid while keeping the turn density n and current I constant will double the interior magnetic field. Is this correct? Explain your reasoning, and comment on what quantity does change when the radius is doubled.
PROBLEM 2BASIC CALCULATION
A solenoid of length 0.50 m has 800 turns and carries a current of 3.0 A. Calculate the magnitude of the magnetic field inside the solenoid. Use μ₀ = 4π × 10⁻⁷ T·m/A.
PROBLEM 3INTERMEDIATE
An ideal solenoid with 2,400 turns and length 0.60 m must produce an interior magnetic field of exactly 0.025 T. What current must flow through the wire? Additionally, if the solenoid has a circular cross-section with diameter 4.0 cm, determine the total magnetic flux through the interior.
PROBLEM 4APPLIED
A research team is designing a superconducting solenoid for a particle physics experiment. The solenoid must be 4.0 m long, produce a 5.0 T field, and use wire wound with a turn density of 2,500 turns/m. (a) What current is required? (b) If the solenoid has a circular bore of radius 0.80 m, calculate the self-inductance and the total magnetic energy stored.
PROBLEM 5CRITICAL THINKING
Using Ampère's law, prove that the magnetic field outside an infinitely long ideal solenoid is zero. Your proof should clearly state the symmetry arguments that constrain the possible direction and spatial dependence of B outside the solenoid, and explain which Amperian loop you choose and why.

Lesson Summary

An ideal solenoid is an infinitely long, tightly wound coil that produces a perfectly uniform magnetic field inside and zero field outside. By applying Ampère's law to a carefully chosen rectangular Amperian loop — with one side inside the solenoid parallel to the axis, one side outside, and two perpendicular connecting sides — we showed that the line integral reduces to B × l on the interior side only, while the enclosed current is nIl, yielding the fundamental result B = μ₀nI.

This result depends only on the turn density n (turns per unit length) and the current I — not on the solenoid's radius or cross-sectional shape. The formula connects directly to magnetic flux (Φ = BA), self-inductance (L = μ₀n²AL), and magnetic energy storage (U = ½LI²), making it one of the most foundational results in electromagnetism and a cornerstone for understanding real devices from MRI magnets to particle accelerators.

Varsity Tutors • Physics 2 • Magnetic Field: Solenoid — Compute magnetic field of a solenoid (ideal)