PHYSICS 2 • MAGNETISM

Magnetic Field: Straight Wire — Compute magnetic field from long straight wires (Biot–Savart/Ampère)

Two powerful methods to determine the magnetic field created by current-carrying conductors.

Historical Context & Motivation

The relationship between electricity and magnetism was unknown before the nineteenth century; electric currents and magnetic compasses were studied as completely separate phenomena. The pivotal moment came in 1820 when the Danish physicist Hans Christian Ørsted noticed that a compass needle deflected when placed near a wire carrying an electric current, revealing that moving charges generate magnetic fields. Within months of this startling discovery, French physicist André-Marie Ampère formulated a quantitative law relating the circulation of the magnetic field to the enclosed current, while Jean-Baptiste Biot and Félix Savart independently derived a law that gives the magnetic field contribution from an infinitesimal current element. Together, these two approaches — the Biot–Savart law and Ampère's law — form the twin pillars for computing magnetic fields from steady currents, and they remain indispensable tools in electromagnetism courses and engineering practice.

1820
Ørsted's Discovery
Ørsted demonstrates that a current-carrying wire deflects a nearby compass needle, establishing the first link between electricity and magnetism.
1820
Biot–Savart Law
Biot and Savart quantify the magnetic field produced by an infinitesimal current element, laying the foundation for field calculations from arbitrary conductor geometries.
1826
Ampère's Circuital Law
Ampère publishes his circuital relation, connecting the line integral of the magnetic field around a closed loop to the net enclosed current — a prototype of one of Maxwell's equations.
1865
Maxwell's Unification
James Clerk Maxwell absorbs Ampère's law (with an added displacement-current term) into his four equations, completing the classical theory of electromagnetism.

The central question this lesson addresses is deceptively simple: given a long, straight wire carrying a steady current I, what is the magnitude and direction of the magnetic field B at a perpendicular distance r from the wire? We will derive the answer using both the Biot–Savart law and Ampère's law, compare the two strategies, and build the geometric intuition necessary to tackle more complex configurations.

Core Principles & Definitions

Before diving into calculations, it is essential to establish the physical principles that underpin both the Biot–Savart law and Ampère's law. The magnetic field produced by a steady current is a vector field that permeates the space around the conductor. Unlike the electric field of a point charge, which radiates outward in all directions, the magnetic field lines form closed loops that encircle the current. Understanding the geometry of these loops and the mathematical tools that describe them is the key to mastering this topic.

1

Biot–Savart Law

Gives the differential contribution dB to the magnetic field from an infinitesimal current element I dl. It is the magnetic analogue of Coulomb's law and works for any geometry.
2

Ampère's Law

States that the closed line integral of B · dl around any Amperian loop equals μ₀ times the enclosed current. Most powerful when high symmetry simplifies the integral.
3

Right-Hand Rule

Point the thumb of your right hand in the direction of conventional current; your fingers curl in the direction of the magnetic field lines. This determines B's direction at every point.
4

Superposition

The total magnetic field at any point is the vector sum of the fields produced by each current element or each separate wire. This allows extension from a single wire to multi-wire configurations.
KEY TAKEAWAY
Think of the Biot–Savart law as a precision scalpel: it works everywhere but requires careful integration. Ampère's law is more like an express lane on the highway — it gets you to the answer almost instantly, but only when the geometry has enough symmetry (infinite straight wire, infinite solenoid, toroid) to pull B out of the integral. Knowing when to use each method is as important as knowing the formulas themselves.

Visual Explanation — Field Around a Straight Wire

Cross-sectional view of the magnetic field around a long straight wire carrying current I directed out of the page. The concentric dashed circles represent field lines at increasing radii r1, r2, r3. Notice that the spacing between circles increases, reflecting the 1/r fall-off of the field magnitude.

The diagram above presents the end-on (cross-sectional) view of a long straight wire. The current I flows out of the page, indicated by the dot symbol (think of the tip of an arrow approaching you). The magnetic field lines form concentric circles centered on the wire, and their direction — counterclockwise here — is determined by the right-hand rule. A critical geometric observation is that B is everywhere tangent to these circles and its magnitude is constant along any single circle of radius r. This azimuthal symmetry is precisely what makes Ampère's law so efficient for this geometry: the integral ∮ B · dl around one of these circles immediately factors into B(2πr).

Mathematical Framework

Derivation via the Biot–Savart Law

The Biot–Savart law expresses the infinitesimal magnetic field dB produced at a field point P by a tiny current element I dl located at a source point on the wire. To obtain the total field from an infinitely long straight wire, one integrates over all current elements from −∞ to +∞ along the wire.

BIOT–SAVART LAW (DIFFERENTIAL FORM)
dB = (μ₀ / 4π) × (I dl × r̂) / r²
μ₀ = 4π × 10⁻⁷ T·m/A (permeability of free space); I = current; dl = infinitesimal length element along wire; = unit vector from source to field point; r = distance from source to field point.

Place the wire along the z-axis and the field point P at perpendicular distance s from the wire in the xy-plane. Parametrise the source position as z' so that dl = dz' ẑ. The displacement vector from the source element to P has magnitude r = √(s² + z'²), and the cross product |dz' ẑ × r̂| = s dz' / (s² + z'²)^(1/2). Substituting into the Biot–Savart expression and integrating z' from −∞ to +∞ yields the standard integral ∫ dz' / (s² + z'²)^(3/2) = 2 / s². After simplification, the result is the well-known formula for the magnitude of B.

MAGNETIC FIELD — INFINITE STRAIGHT WIRE (BIOT–SAVART RESULT)
B = μ₀I / (2πr)
B = magnitude of magnetic field (T); I = current (A); r = perpendicular distance from wire (m). Direction: tangent to the concentric circle at the field point, determined by the right-hand rule.

Derivation via Ampère's Law

Ampère's law provides the same result with far less algebra when the geometry possesses sufficient symmetry. For an infinitely long straight wire, the magnetic field has only an azimuthal component that is constant on any circle concentric with the wire. Choose an Amperian loop — a circle of radius r in a plane perpendicular to the wire, centered on the wire. Along this loop, B is parallel to dl everywhere and has constant magnitude, so the line integral simplifies immediately.

AMPÈRE'S LAW
∮ B · dl = μ₀ I_enc
The closed integral is taken around any Amperian loop. Ienc is the net current threading through the loop. For the circular loop: B(2πr) = μ₀I, giving B = μ₀I / (2πr).
💡 Why Do Both Methods Give the Same Answer?
The Biot–Savart law and Ampère's law are not independent postulates — Ampère's law can be derived from the Biot–Savart law using vector calculus (specifically, taking the curl of B and applying Stokes' theorem). They encode the same physics; the difference is purely in the mathematical route to the answer.

Detailed Geometry — Biot–Savart Integration Setup

The most common challenge students encounter with the Biot–Savart derivation is setting up the geometry correctly. The diagram below shows a side view of the infinite wire, a single current element at position z' on the wire, and the field point P at perpendicular distance s. All angles, vectors, and distances are labelled to make the integration transparent.

Side-view geometry for the Biot–Savart integration. The wire lies along the z-axis carrying current I upward. A current element at position z' produces a field contribution dB at point P that is perpendicular to the plane defined by the wire and P. The angle θ and distance r = √(s² + z'²) vary as the integration runs from −∞ to +∞.

The crucial trigonometric substitution is z' = s tan φ, which transforms the integral into one over the angle φ from −π/2 to +π/2. After evaluating, the factors of 4π cancel neatly against the prefactor, leaving the familiar result B = μ₀I / (2πs). For a finite wire segment subtending angles θ₁ and θ₂ at the field point, the result generalises to B = (μ₀I / 4πs)(cos θ₁ − cos θ₂), which reduces to the infinite-wire formula when θ₁ → 0 and θ₂ → π.

FINITE STRAIGHT WIRE (GENERAL FORM)
B = (μ₀I / 4πs)(cos θ₁ − cos θ₂)
θ₁ and θ₂ are the angles measured from the perpendicular (at point P) to the lines connecting P to each end of the wire segment. For an infinite wire, θ₁ → 0 and θ₂ → π, so cos θ₁ − cos θ₂ = 1 − (−1) = 2, recovering B = μ₀I / (2πs).

Worked Example

Magnetic Field from Two Parallel Wires
1
Step 1 — Problem StatementTwo long, straight, parallel wires are separated by a distance d = 0.20 m. Wire 1 carries a current I1 = 5.0 A to the right, and Wire 2 carries I2 = 3.0 A to the left. Find the net magnetic field at point P, located midway between the wires.
2
Step 2 — Identify the GeometryPoint P is at a perpendicular distance r = d/2 = 0.10 m from each wire. We need to compute B1 and B2 at P using B = μ₀I / (2πr) and then apply superposition.
3
Step 3 — Compute Individual FieldsB₁ = μ₀I₁ / (2πr) = (4π × 10⁻⁷ T·m/A)(5.0 A) / (2π × 0.10 m) = (2.0 × 10⁻⁶) / (0.6283) = 1.0 × 10⁻⁵ T = 10 μT. Similarly, B₂ = μ₀I₂ / (2πr) = (4π × 10⁻⁷)(3.0) / (2π × 0.10) = 6.0 × 10⁻⁶ T = 6.0 μT.
B₁ = 10 μT, B₂ = 6.0 μT
4
Step 4 — Determine Directions (Right-Hand Rule)For Wire 1 (current to the right), the right-hand rule gives B1 directed into the page at P (above the wire) and out of the page below. At the midpoint (above Wire 1), B1 points into the page. For Wire 2 (current to the left, positioned above P), the right-hand rule also gives B2 into the page at P. Both fields point in the same direction.
5
Step 5 — SuperposeSince both fields point into the page, the magnitudes add: B_net = B₁ + B₂ = 10 μT + 6.0 μT = 16 μT, directed into the page.
B_net = 16 μT, into the page
⚠️ Common Pitfall
When currents flow in opposite directions, the fields at the midpoint add (both into or both out of the page). When currents flow in the same direction, the fields at the midpoint subtract (they point in opposite directions). Always sketch the field directions before combining magnitudes!

Biot–Savart vs. Ampère's Law — When to Use Which

Students frequently ask which method to use on an exam. The answer depends almost entirely on the symmetry of the current distribution. The table below provides a concise decision guide. In general, attempt Ampère's law first whenever the geometry allows you to identify a loop on which B is constant and parallel (or perpendicular) to dl; resort to Biot–Savart when no such loop exists.

Comparison of Biot–Savart and Ampère's law approaches
FeatureBiot–Savart LawAmpère's Law
ApplicabilityAny steady-current geometryHigh-symmetry geometries only
Mathematical effortRequires integration over entire current distributionAlgebraic after choosing the correct Amperian loop
Ideal geometriesFinite segments, curved arcs, arbitrary loopsInfinite straight wire, infinite solenoid, toroid, coaxial cable
Analogy to electrostaticsCoulomb's law (sum field from each element)Gauss's law (exploit symmetry to bypass integration)
Direction informationCross product gives direction automaticallyDirection inferred from symmetry + right-hand rule
KEY TAKEAWAY
The Biot–Savart law is to magnetostatics what Coulomb's law is to electrostatics: universally valid but often computationally demanding. Ampère's law is the magnetic counterpart of Gauss's law: elegant and efficient, but only when the symmetry of the current configuration allows you to pull B out of the line integral. In an engineering context, choosing the right tool is half the battle.

Connection to Advanced Electromagnetic Theory

The infinite-straight-wire result is not merely an isolated formula — it is a gateway to several more advanced topics. When Maxwell extended Ampère's law to include the displacement current term (ε₀ ∂E/∂t), the law became valid for time-varying fields as well, ultimately leading to the prediction of electromagnetic waves. In differential form, Ampère–Maxwell's equation reads ∇ × B = μ₀J + μ₀ε₀ ∂E/∂t. The steady-state version (∇ × B = μ₀J) is precisely what we used in integral form in this lesson.

From the straight wire to Maxwell's equations
ConceptThis LessonAdvanced Extension
Current typeSteady (DC) current in wiresTime-varying currents, displacement current
Law formIntegral form: ∮ B · dl = μ₀I_encDifferential form: ∇ × B = μ₀J + μ₀ε₀ ∂E/∂t
GeometryInfinite straight wireSolenoids, toroids, coaxial cables, waveguides
ApplicationsForce between parallel wires, definition of the ampereElectromagnetic wave propagation, antenna design, transformer theory

Historically, the force per unit length between two parallel current-carrying wires, F/L = μ₀I₁I₂ / (2πd), served as the basis for the SI definition of the ampere until 2019 when it was redefined in terms of the elementary charge. The straight-wire magnetic field formula thus sits at the intersection of fundamental physics and metrology. As you proceed to study solenoids and Faraday's law, the intuitions you build here — circling field lines, the 1/r dependence, the role of symmetry in simplifying calculations — will transfer directly.

Practice Problems

PROBLEM 1CONCEPTUAL
A long straight wire carries a steady current I. If you double the distance from the wire, how does the magnetic field magnitude change? Explain why this 1/r dependence differs from the 1/r² dependence of a point charge's electric field.
PROBLEM 2BASIC CALCULATION
A long straight wire carries a current of 8.0 A. Calculate the magnitude of the magnetic field at a perpendicular distance of 0.050 m from the wire. Use μ₀ = 4π × 10⁻⁷ T·m/A.
PROBLEM 3INTERMEDIATE
Two long parallel wires are 0.30 m apart. Wire A carries 10 A northward and Wire B carries 10 A southward. Find the magnetic field (magnitude and direction) at a point P that lies in the plane of the wires, 0.10 m from Wire A and 0.20 m from Wire B.
PROBLEM 4APPLIED
A high-voltage DC transmission line carries 500 A and must be routed past a hospital where sensitive MRI equipment requires the ambient field perturbation to remain below 0.5 μT. What is the minimum perpendicular distance the transmission line must be placed from the MRI suite?
PROBLEM 5CRITICAL THINKING
Using the Biot–Savart law result for a finite straight wire, B = (μ₀I/4πs)(cos θ₁ − cos θ₂), show that in the limit where the wire extends from z' = −L/2 to z' = +L/2 and the field point is at perpendicular distance s, the expression approaches μ₀I/(2πs) as L → ∞. Discuss the physical meaning of this limit and under what conditions the infinite-wire approximation breaks down.

Lesson Summary

A long, straight wire carrying a steady current I creates a magnetic field whose field lines form concentric circles around the wire. The magnitude of this field is given by B = μ₀I / (2πr), where r is the perpendicular distance from the wire. This result can be derived two ways: the Biot–Savart law integrates contributions from every infinitesimal current element along the wire, while Ampère's law exploits the cylindrical symmetry to bypass the integration entirely by choosing a circular Amperian loop.

The direction of B is always determined by the right-hand rule: point your thumb along the current and your fingers curl in the direction of the field. For systems of multiple wires, superposition dictates that you compute the field from each wire independently and sum them as vectors. The finite-wire generalisation, B = (μ₀I/4πs)(cos θ₁ − cos θ₂), reduces to the infinite-wire formula in the appropriate limit. This foundational result connects forward to solenoids, toroids, electromagnetic induction, and ultimately Maxwell's equations.

Varsity Tutors • Physics 2 • Magnetic Field: Straight Wire — Compute magnetic field from long straight wires (Biot–Savart/Ampère)