Part 3 · Chapter 29

Magnetic Fields Due to Currents

In the last chapter a magnetic field was something a charge felt. Now we ask where the field comes from, and the answer is the deep companion to everything before: a current makes a magnetic field. This chapter builds that field two ways — adding up the contribution of every current element with the Biot–Savart law \(d\vec{B} = \dfrac{\mu_0}{4\pi}\dfrac{i\,d\vec{s}\times\hat{r}}{r^{2}}\), and, where the symmetry is kind, sidestepping the integral entirely with Ampère's law \(\oint\vec{B}\cdot d\vec{s} = \mu_0 i_{\text{enc}}\). Along the way we find the field of a straight wire, the force that lets two currents push and pull on each other, the solenoid, the toroid, and the current loop reborn as a magnetic dipole.

Fundamentals of Physics Prof. Mithun Mondal Reading time ≈ 60 min
i What you'll learn
  • The Biot–Savart law \(d\vec{B} = \dfrac{\mu_0}{4\pi}\dfrac{i\,d\vec{s}\times\hat{r}}{r^{2}}\), which gives the field of a single current element, and the permeability constant \(\mu_0 = 4\pi\times10^{-7}\,\mathrm{T\cdot m/A}\).
  • The field of a long straight wire, \(B = \dfrac{\mu_0 i}{2\pi R}\), with its circular field lines, and the field at the center of a circular arc, \(B = \dfrac{\mu_0 i\phi}{4\pi R}\).
  • The force between two parallel currents \(F = \dfrac{\mu_0 i_a i_b L}{2\pi d}\) — parallel currents attract, antiparallel currents repel.
  • Ampère's law \(\oint\vec{B}\cdot d\vec{s} = \mu_0 i_{\text{enc}}\) and how a well-chosen amperian loop delivers \(\vec{B}\) with almost no calculation.
  • The solenoid \(B = \mu_0 n i\), the toroid \(B = \dfrac{\mu_0 N i}{2\pi r}\), and a current coil as a magnetic dipole with axial field \(\vec{B}(z) = \dfrac{\mu_0}{2\pi}\dfrac{\vec{\mu}}{z^{3}}\).
Section 29-1

What Is Physics?

The previous chapter answered half a question. We learned that a magnetic field exerts a force on a moving charge and on a current — but we quietly assumed the field was simply there, supplied by some unseen magnet. Now we close the loop. One of the great unifications in physics is the discovery, by Oersted in 1820, that an electric current deflects a nearby compass needle: a current produces a magnetic field. Charge at rest makes only an electric field; charge in motion makes a magnetic field as well.

This is the working principle of every electromagnet, every transformer, every solenoid valve and relay, and the read/write heads that once filled hard drives. The physics is to compute the field a given arrangement of currents produces; the engineering is to shape those currents to put the field exactly where it is wanted. We have two tools for the computation, and the whole chapter is the story of choosing wisely between them.

Section 29-2

The Biot–Savart Law

To find the field of a complicated current we do what we always do with fields: chop the source into infinitesimal pieces, find the field of one piece, and add. The piece here is a current-length element \(i\,d\vec{s}\) — a tiny segment \(d\vec{s}\) of wire pointing along the current, carrying current \(i\). The field it produces at a point a distance \(r\) away, in the direction of the unit vector \(\hat{r}\), is given by the Biot–Savart law.

The Biot–Savart law
\[ d\vec{B} = \frac{\mu_0}{4\pi}\,\frac{i\,d\vec{s}\times\hat{r}}{r^{2}}, \qquad dB = \frac{\mu_0}{4\pi}\,\frac{i\,ds\,\sin\theta}{r^{2}} \]
Here \(\theta\) is the angle between \(d\vec{s}\) and \(\hat{r}\). The cross product fixes the direction: \(d\vec{B}\) is perpendicular to both the current element and the line to the point. Note the inverse-square falloff in \(r\), just like Coulomb's law — but here the field wraps around the current rather than pointing away from it.
The permeability constant
\[ \mu_0 = 4\pi\times10^{-7}\,\mathrm{T\cdot m/A} \approx 1.26\times10^{-6}\,\mathrm{T\cdot m/A} \]
The constant \(\mu_0\) plays the same role for magnetism that \(\varepsilon_0\) plays for electricity. The factor of \(\mu_0/4\pi\) here mirrors the \(1/4\pi\varepsilon_0\) of Coulomb's law — the same bookkeeping of constants, transplanted into the magnetic world.
📐
The field curls around the current
Because of the cross product, magnetic field lines from a current form closed loops encircling the current — never starting or ending on it.

This is the structural opposite of the electric field, whose lines spray straight out from charge. Grip the wire with your right hand, thumb along the current; your fingers curl the way \(\vec{B}\) points. Every result in this chapter is, at bottom, this one picture applied to a particular shape of wire.

Section 29-3

Magnetic Field of a Long Straight Wire

Integrate the Biot–Savart law along a long, straight wire and a clean result drops out. Every element along the wire contributes a \(d\vec{B}\) pointing the same way at the field point (into or out of the page, depending on the side), so the magnitudes simply add. The integral \(\int ds\,\sin\theta/r^{2}\) evaluates to \(2/R\) for an infinitely long wire.

Field of a long straight wire
\[ B = \frac{\mu_0 i}{2\pi R} \]
\(R\) is the perpendicular distance from the wire. The field falls off as \(1/R\) — slower than a point charge's \(1/r^{2}\) — and the lines are concentric circles around the wire. For a semi-infinite wire that begins at the foot of the perpendicular and runs off to infinity, the result is exactly half: \(B = \dfrac{\mu_0 i}{4\pi R}\).
How big is this, really? A wire carrying 100 A — a hefty current — produces a field of only about \(2\times10^{-4}\,\mathrm{T}\) at 10 cm, just twice Earth's surface field. Single straight wires make feeble fields; the way to a strong field is not more current but more turns of wire stacked together, which is exactly why solenoids and electromagnets exist.
Section 29-4

Field Due to a Current in a Circular Arc

Bend the wire into an arc of radius \(R\) subtending angle \(\phi\) (in radians) at its center, and ask for the field at that center. Now every element \(d\vec{s}\) is perpendicular to its \(\hat{r}\) (so \(\sin\theta = 1\)) and sits at the same distance \(R\). The Biot–Savart integral collapses to a simple product.

Field at the center of a circular arc
\[ B = \frac{\mu_0 i\,\phi}{4\pi R} \]
For a full circle, \(\phi = 2\pi\) and this becomes \(B = \dfrac{\mu_0 i}{2R}\) at the center of a single loop. The straight sections of a wire that point directly toward or away from the center contribute nothing, because there \(d\vec{s}\) is parallel to \(\hat{r}\) and the cross product vanishes.
Section 29-5

Force Between Two Parallel Currents

Two parallel wires each make a field, and each then sits in the other's field — so they exert forces on each other. Wire \(a\) bathes wire \(b\) in a field \(B_a = \mu_0 i_a/2\pi d\); wire \(b\) then feels the force on a current-carrying wire from Chapter 28, \(F = i_b L B_a\). Combining gives a force per unit length that depends only on the two currents and their separation.

Force between parallel currents
\[ F = \frac{\mu_0\,i_a\,i_b\,L}{2\pi d}, \qquad \frac{F}{L} = \frac{\mu_0\,i_a\,i_b}{2\pi d} \]
\(d\) is the distance between the wires and \(L\) the length considered. Apply the right-hand rule twice and the direction follows: currents in the same direction attract; currents in opposite directions repel — the reverse of the rule for electric charges, and a fact worth memorizing on its own.
Why this force once defined the ampere. Because it depends only on geometry and \(\mu_0\), this force was for decades the legal definition of the ampere: the current that, in two long parallel wires 1 m apart, produces a force of exactly \(2\times10^{-7}\,\mathrm{N}\) per metre. The 2019 SI redefinition fixed the elementary charge instead, but the physics is unchanged — two currents talk to each other through their fields.
Section 29-6

Ampère's Law

Adding up Biot–Savart contributions is honest but laborious. When the field has enough symmetry, Ampère's law gives the same answer with almost no work — it is the magnetic counterpart of Gauss' law. It relates the field summed around a closed loop (an amperian loop) to the current threading that loop.

Ampère's law
\[ \oint \vec{B}\cdot d\vec{s} = \mu_0\,i_{\text{enc}} \]
The line integral of \(\vec{B}\) around any closed loop equals \(\mu_0\) times the net current passing through the loop. Currents outside the loop contribute nothing to the integral (though they still affect \(\vec{B}\) point by point). Use a right-hand rule for the sign of \(i_{\text{enc}}\): curl your fingers along the chosen direction of integration, and currents along your thumb count as positive.

The art is choosing the loop so that \(\vec{B}\) is either constant and parallel to \(d\vec{s}\) (making the integral just \(B\) times a length) or perpendicular to it (making the contribution zero). For a long straight wire, a circular loop of radius \(R\) centered on the wire does exactly this and instantly recovers \(B = \mu_0 i/2\pi R\). The law also lets us look inside a wire.

Field inside a long straight wire (uniform current)
\[ B = \left(\frac{\mu_0 i}{2\pi R_{\text{wire}}^{2}}\right) r \qquad (r \le R_{\text{wire}}) \]
Inside the wire the amperian loop encloses only the fraction of current it surrounds, \(i_{\text{enc}} = i\,(r^{2}/R_{\text{wire}}^{2})\), so the field grows linearly from zero at the center, peaks at the surface, and then falls as \(1/r\) outside. A neat, fully solvable profile that Biot–Savart would make painful.
Section 29-7

Solenoids and Toroids

A solenoid is a long helix of wire — a stack of many circular loops whose fields reinforce inside and cancel outside. For an ideal (long, tightly wound) solenoid the interior field is uniform and the exterior field is essentially zero. A rectangular amperian loop, with one side inside and parallel to the axis, turns Ampère's law into a one-line result.

Field inside an ideal solenoid
\[ B = \mu_0 n i \]
\(n = N/L\) is the number of turns per unit length. Remarkably, \(B\) does not depend on the solenoid's diameter or on where inside you measure — the field is uniform. This is how you build a region of controlled, uniform magnetic field, the magnetic analog of the parallel-plate capacitor.

Bend a solenoid around into a doughnut and join its ends and you have a toroid. The field is now confined entirely within the ring and circles around it, varying with the radius \(r\) from the toroid's center.

Field inside a toroid
\[ B = \frac{\mu_0 N i}{2\pi r} \]
\(N\) is the total number of turns. Unlike the solenoid, the toroid's field is not uniform — it falls as \(1/r\) across the bore — and it is essentially zero everywhere outside. Toroidal coils are prized exactly because they keep their field locked inside.
Section 29-8

A Current-Carrying Coil as a Magnetic Dipole

In Chapter 28 a current loop in a field behaved like a magnetic dipole — it felt a torque \(\vec{\tau} = \vec{\mu}\times\vec{B}\). Now we see the other half of the duality: a current loop also produces a dipole field, identical in form to that of a bar magnet. Far out along the loop's central axis, the Biot–Savart law gives a field that falls as the cube of the distance.

Axial field of a current loop
\[ B(z) = \frac{\mu_0 i R^{2}}{2\,(R^{2}+z^{2})^{3/2}} \;\xrightarrow{\;z\gg R\;}\; \vec{B}(z) = \frac{\mu_0}{2\pi}\,\frac{\vec{\mu}}{z^{3}} \]
With dipole moment \(\mu = NiA\) (from Chapter 28), the far field on axis is \(\vec{B} = (\mu_0/2\pi)\vec{\mu}/z^{3}\) — the magnetic twin of the electric dipole's \(1/z^{3}\) field. The loop both responds to a field as a dipole and creates one; the two faces of the same object.
📐
The dipole, twice over
A current loop is the fundamental magnetic dipole: it feels a torque \(\vec{\tau} = \vec{\mu}\times\vec{B}\) in an external field and generates a dipole field \(\propto \mu/z^{3}\) of its own.

This single object — loop, coil, bar magnet, spinning electron, planet Earth — unifies Chapters 28 and 29. To feel and to make a magnetic field are, for a dipole, the same physics read in two directions.

Worked Examples

Putting It to Work

1 Field near a long straight wire

Problem. A long straight wire carries 25 A. Find the magnitude of the magnetic field 3.0 cm from the wire, and state the direction of the field lines.

Solution. Use \(B = \mu_0 i/2\pi R\) with \(R = 0.030\,\mathrm{m}\).

B = μ₀i / 2πR
\[ B = \frac{(4\pi\times10^{-7})(25)}{2\pi(0.030)} = \frac{(2\times10^{-7})(25)}{0.030} \approx 1.7\times10^{-4}\,\mathrm{T} \]

The lines are circles centered on the wire; grip it with the right hand, thumb along the current, and the fingers give the circulation. The strength, \(\sim1.7\) gauss, is comparable to Earth's field — a single wire is a weak magnet.

2 Net field from two parallel wires

Problem. Two long parallel wires 8.0 cm apart carry equal currents of 30 A in opposite directions. Find the magnitude of the net field at the midpoint between them.

Solution. Each wire is 4.0 cm from the midpoint. With opposite currents, the two fields at the midpoint point the same way, so they add.

B = 2 × (μ₀i / 2πR)
\[ B = 2\times\frac{(2\times10^{-7})(30)}{0.040} = 2\times(1.5\times10^{-4}) = 3.0\times10^{-4}\,\mathrm{T} \]

Had the currents been in the same direction, the two contributions at the midpoint would oppose and cancel exactly — the field there would be zero. Direction is everything.

3 Field at the center of an arc

Problem. A wire carries 12 A and is bent into a \(120^\circ\) arc of radius 4.0 cm, the rest of the wire running radially to and from the center. Find the field at the center of the arc.

Solution. The radial straight pieces contribute nothing (\(d\vec{s}\parallel\hat{r}\)). Use \(B = \mu_0 i\phi/4\pi R\) with \(\phi = 120^\circ = 2\pi/3\) rad.

B = μ₀iφ / 4πR
\[ B = \frac{(10^{-7})(12)(2\pi/3)}{0.040} = \frac{(10^{-7})(12)(2.09)}{0.040} \approx 6.3\times10^{-5}\,\mathrm{T} \]

A full circle (\(\phi = 2\pi\)) would give three times this, \(B = \mu_0 i/2R \approx 1.9\times10^{-4}\,\mathrm{T}\) — the arc carries its fair share of the loop's field.

4 Force between two power lines

Problem. Two parallel wires 20 cm apart each carry 50 A in the same direction. Find the force per metre between them, and say whether it is attractive or repulsive.

Solution. Use \(F/L = \mu_0 i_a i_b / 2\pi d\) with \(d = 0.20\,\mathrm{m}\).

F/L = μ₀ iₐ i_b / 2πd
\[ \frac{F}{L} = \frac{(2\times10^{-7})(50)(50)}{0.20} = 2.5\times10^{-3}\,\mathrm{N/m} \]

Same-direction currents attract, so the wires are pulled together at 2.5 mN per metre. It seems small, but over long spans and in fault conditions these forces are large enough to wrench busbars apart — switchgear is braced against exactly this.

5 Field inside a solenoid

Problem. A solenoid 25 cm long is wound with 1200 turns and carries 3.5 A. Find the magnetic field near its center.

Solution. Find the turns per unit length \(n = N/L\), then apply \(B = \mu_0 n i\).

n = N/L; B = μ₀ n i
\[ n = \frac{1200}{0.25} = 4800\,\mathrm{m^{-1}}, \qquad B = (4\pi\times10^{-7})(4800)(3.5) \approx 2.1\times10^{-2}\,\mathrm{T} \]

About 21 mT — more than a hundred times the single-wire field of Example 1 at the same current scale. Stacking turns, not raising current, is how you build a strong field.

Review

Chapter Summary

Biot–Savart law

\(d\vec{B} = \dfrac{\mu_0}{4\pi}\dfrac{i\,d\vec{s}\times\hat{r}}{r^{2}}\); field curls around the current. \(\mu_0 = 4\pi\times10^{-7}\,\mathrm{T\cdot m/A}\).

Straight wire

\(B = \dfrac{\mu_0 i}{2\pi R}\), circular field lines; falls off as \(1/R\).

Circular arc

At the center, \(B = \dfrac{\mu_0 i\phi}{4\pi R}\); full loop gives \(B = \dfrac{\mu_0 i}{2R}\).

Parallel currents

\(\dfrac{F}{L} = \dfrac{\mu_0 i_a i_b}{2\pi d}\); same direction attract, opposite repel.

Ampère's law

\(\oint\vec{B}\cdot d\vec{s} = \mu_0 i_{\text{enc}}\); choose the loop to exploit symmetry.

Inside a wire

\(B = \dfrac{\mu_0 i}{2\pi R_{\text{wire}}^{2}}\,r\); grows linearly to the surface, then \(1/r\).

Solenoid & toroid

Solenoid \(B = \mu_0 n i\) (uniform); toroid \(B = \dfrac{\mu_0 N i}{2\pi r}\).

Coil as dipole

Axial far field \(\vec{B} = \dfrac{\mu_0}{2\pi}\dfrac{\vec{\mu}}{z^{3}}\), with \(\mu = NiA\).

Practice

Problems

Take \(\mu_0 = 4\pi\times10^{-7}\,\mathrm{T\cdot m/A}\) throughout, and remember the convenient shortcut \(\mu_0/2\pi = 2\times10^{-7}\,\mathrm{T\cdot m/A}\). Before computing, decide which tool fits: high symmetry (straight wire, solenoid, toroid, inside a wire) calls for Ampère's law; an arc, a finite segment, or a point off-axis calls for Biot–Savart. Use the right-hand rule for every direction, and add field contributions as vectors.

  1. A long straight wire carries 4.0 A. At what distance from the wire is the magnetic field equal to Earth's surface field, about \(5.0\times10^{-5}\,\mathrm{T}\)?
  2. Two long parallel wires 12 cm apart carry currents of 10 A and 25 A in the same direction. Find the magnitude of the net field (a) midway between them and (b) 4.0 cm from the 10 A wire, on the line joining them.
  3. A wire is bent into a single circular loop of radius 8.0 cm carrying 1.5 A. Find the magnetic field (a) at the center of the loop and (b) on the axis, 10 cm from the center.
  4. A length of wire carrying 6.0 A is bent into a \(90^\circ\) arc of radius 5.0 cm, with the remaining sections running radially. Find the field at the center of the arc.
  5. Two parallel wires 5.0 cm apart carry 15 A and 22 A in opposite directions. Find the force per unit length between them and state whether it is attractive or repulsive.
  6. Three long parallel wires lie in a plane, each 4.0 cm from the next, all carrying 8.0 A in the same direction. Find the net force per metre on the central wire.
  7. A long cylindrical wire of radius 2.0 mm carries 30 A spread uniformly over its cross section. Find the magnetic field (a) at the surface, (b) at 1.0 mm from the axis, and (c) at 6.0 mm from the axis.
  8. An ideal solenoid is 40 cm long with 800 turns carrying 2.5 A. Find (a) the turns per metre and (b) the interior field. (c) What current would double the field?
  9. A toroid of 1500 turns has an inner radius of 12 cm and an outer radius of 16 cm, carrying 4.0 A. Find the field along the inner radius and along the outer radius.
  10. A circular coil of 60 turns and radius 3.0 cm carries 0.50 A. (a) Find its magnetic dipole moment. (b) Find the axial field 20 cm from the center using the dipole approximation, and comment on its validity.
  11. Use Ampère's law with a circular loop to recover the field of a long straight wire, \(B = \mu_0 i/2\pi R\), and explain why a square loop of the same perimeter would not simplify the integral.
  12. A coaxial cable carries current \(i\) out along the inner conductor and back along the outer shell. Using Ampère's law, find the field (a) between the conductors and (b) outside the cable, and explain the result.
Tip: three habits keep current-field problems clean. First, choose your tool before you compute — Ampère's law for the symmetric cases (straight wire, inside a wire, solenoid, toroid, coax) and Biot–Savart for arcs, segments, and off-axis points. Second, with Ampère's law, draw the amperian loop so that \(\vec{B}\) is either parallel to \(d\vec{s}\) and constant (then \(\oint\vec{B}\cdot d\vec{s} = B\times\text{length}\)) or perpendicular (then it contributes nothing), and count only the current enclosed. Third, when several wires act at once, find each field separately, fix its direction with the right-hand rule, and add the contributions as vectors — and never forget that for parallel currents, like directions attract while opposite directions repel.