23.1: Magnetic Field Due to a Current

Physics: A Foundation for Scientists and Engineers · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    Read aloud

    How

    Speed: 1×
    Light up
    Highlight

    Symbols: Mulberry Symbols, © 2018–2026 Steve Lee, CC BY-SA 4.0 (licence, the set), the site's own copies.

    From LibreTexts, under CC BY 4.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    23.1: Magnetic Field Due to a Current
    Two views of the magnetic field of a long straight wire carrying current I.
    Figure 23.1. The magnetic field of a long straight wire. (a) The field lines are circles around the wire, their direction given by the right-hand rule. (b) Seen along the wire, with the current out of the page, the field circles counterclockwise and weakens with distance.
    Figure descriptionTwo views of the magnetic field of a long straight wire carrying current I. Panel a, a perspective view: a vertical wire carries current I upward. Two circular field lines, drawn as ellipses in perspective, loop around the wire at different heights; arrows show that the field circles counterclockwise when seen from above. Panel b, a view looking along the wire, with the current coming out of the page, shown as a dot in a circle: three concentric circular field lines surround the wire, with arrows showing counterclockwise circulation, and field vectors B tangent to the circles, shorter on the outer circles.

    Oersted’s compass showed that a current in a long straight wire produces a magnetic field that circles the wire (Figure 23.1). The field lines are circles centered on the wire, in planes perpendicular to it. Their direction is given by a right-hand rule: grasp the wire with your right hand, thumb pointing along the current, and your fingers curl in the direction of \(\vec{B}\). The field is strongest near the wire and weakens with distance.

    The Biot–Savart law. To calculate the field, we proceed as we did for continuous charge distributions in Chapter 16: divide the current into small pieces, find the field of each, and add. A short length \(d\vec{s}\) of wire carrying current \(I\), pointing in the direction of the current, is called a current element. Biot and Savart found experimentally that its contribution to the field at a point a distance \(r\) away, in the direction of the unit vector \(\hat{r}\) from the element to the point, is

    Key Equation: 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}. \tag{23.1}\]

    This is the Biot–Savart law. Here \(\theta\) is the angle between \(d\vec{s}\) and \(\hat{r}\), and the constant \(\mu_0\) is the permeability of free space,

    \[\mu_0 = 4\pi\times10^{-7}\,\mathrm{T\cdot m/A} = 1.257\times 10^{-6}\,\mathrm{T\cdot m/A},\]

    the magnetic counterpart of \(\epsilon_0\). (Before 2019, this value was exact by definition. It is now a measured quantity, equal to \(4\pi\times10^{-7}\) to better than one part in a billion.) The law resembles Coulomb’s law: the field falls off as \(1/r^2\), and it is proportional to the strength of the source, \(I\,ds\) in place of \(q\). But the cross product makes it quite different in direction. The field of a current element is perpendicular both to the element and to \(\hat{r}\), and it is zero along the line of the current itself.

    Biot-Savart geometry: a current element ds on a long vertical wire and a field point beside it.
    Figure 23.2. Finding the field of a long straight wire with the Biot–Savart law. Every current element produces a field at \(P\) pointing into the page, in the direction of \(d\vec{s}\times\hat{r}\).
    Figure descriptionGeometry for the Biot-Savart law. A long straight wire lies along a vertical y axis and carries current I upward. A short current element d s at height y above the origin points up along the wire. A point P lies a perpendicular distance R to the right of the origin. The vector r runs from the element down and to the right to P, making an angle theta with d s. At P, the field d B of the element points into the page, shown as a cross in a circle.

    A long straight wire. Let a long straight wire lie along the \(y\) axis, carrying current \(I\) in the \(+y\) direction, and find the field at a point \(P\) a perpendicular distance \(R\) from it (Figure 23.2). Every element \(d\vec{s} = dy\,\hat\jmath\) contributes a field pointing in the same direction, into the page at \(P\), so we need only add magnitudes. For the element at height \(y\), \(r = \sqrt{y^2 + R^2}\) and \(\sin\theta = R/r\), so

    \[B = \frac{\mu_0 I}{4\pi}\int_{-\infty}^{\infty}\frac{R\,dy}{(y^2 + R^2)^{3/2}} = \frac{\mu_0 I}{4\pi}\left[\frac{y}{R\sqrt{y^2 + R^2}}\right]_{-\infty}^{\infty} = \frac{\mu_0 I}{4\pi}\cdot\frac{2}{R}.\]

    The field of a long straight wire is

    Key Equation: Field of a long straight wire

    \[B = \frac{\mu_0 I}{2\pi R}. \tag{23.2}\]

    It falls off as \(1/R\), just as the electric field of a long line of charge does (equation (16.10)), and for the same geometric reason. For a wire of finite length, the same integral taken between the ends gives a smaller field (Problem 23.5).

    Example 23.1: A wire and a compass

    A straight wire carries a current of \(10\,\mathrm{A}\). Find the magnetic field \(2.0\,\mathrm{cm}\) from it, and compare it with Earth’s field of about \(50\,\mathrm{\mu T}\).

    Solution

    \[B = \frac{\mu_0 I}{2\pi R} = \frac{(4\pi\times10^{-7})(10)}{2\pi(0.020)} = \boxed{1.0\times 10^{-4}\,\mathrm{T}},\]

    twice Earth’s field. A compass held near a wire carrying a few amperes points noticeably away from north, which is exactly what Oersted saw. It is also why a compass near a car’s wiring, or an electronic device, gives misleading readings. (Wires carrying equal currents in opposite directions, like the two conductors of a household cable, produce much smaller fields, since their fields nearly cancel.)

    Arcs and loops. For a wire bent into a circular arc of radius \(R\), the field at the center of the arc is easy to find. Every element is the same distance \(R\) from the center, and every \(d\vec{s}\) is perpendicular to \(\hat{r}\), so each contributes \(dB = (\mu_0/4\pi)I\,ds/R^2\), all in the same direction, perpendicular to the plane of the arc. For an arc subtending an angle \(\phi\) (in radians), the total length is \(R\phi\), and

    \[B = \frac{\mu_0 I\phi}{4\pi R}. \tag{23.3}\]

    For a complete circular loop, \(\phi = 2\pi\), and the field at its center is

    Key Equation: Field at the center of a circular loop

    \[B = \frac{\mu_0 I}{2R} \qquad{\text{(}N\text{ turns: }} B = \frac{\mu_0 NI}{2R}\text{)}. \tag{23.4}\]

    Hairpin wire: two long parallel straight sections joined by a semicircle of radius R.
    Figure 23.3. A hairpin. The two straight sections and the semicircle all produce fields into the page at the center \(C\).
    Figure descriptionA hairpin-shaped wire. Two long horizontal straight wires extend from the left, one above the other, separated by twice the radius R. At their right ends they are joined by a semicircle bulging to the right. Current I flows to the right along the top wire, around the semicircle, and back to the left along the bottom wire. The center C of the semicircle lies midway between the straight wires. At C, the field B points into the page.

    Its direction follows from another form of the right-hand rule: curl the fingers of your right hand around the loop in the direction of the current, and your thumb points along \(\vec{B}\) at the center. This is the same rule that gave the direction of the loop’s magnetic moment \(\vec{\mu}\) in Section 22.3.

    Example 23.2: A hairpin

    A long wire is bent into the hairpin shape of Figure 23.3: two long parallel straight sections joined by a semicircle of radius \(R = 2.0\,\mathrm{cm}\). It carries \(5.0\,\mathrm{A}\). Find the field at the center \(C\) of the semicircle.

    Solution

    Each straight section is a “semi-infinite” wire, ending at the point directly beside \(C\). By symmetry it produces half the field of an infinite wire, \(\mu_0 I/4\pi R\). (The integral of the long-wire calculation, taken from \(0\) to \(\infty\) instead of from \(-\infty\) to \(\infty\), gives half the result.) The semicircle gives equation (23.3) with \(\phi = \pi\), that is, \(\mu_0 I/4R\). By the right-hand rule, all three contributions point into the page. So

    \[B = 2\,\frac{\mu_0 I}{4\pi R} + \frac{\mu_0 I}{4R} = \frac{\mu_0 I}{4\pi R}(2 + \pi) = \frac{(4\pi\times10^{-7})(5.0)}{4\pi(0.020)}(5.14) = \boxed{1.3\times 10^{-4}\,\mathrm{T}},\]

    into the page.

    Checkpoint 23.1

    A long straight wire lies in the plane of the page, carrying current to the right. What is the direction of its magnetic field (a) at a point just above it in the page, (b) at a point just below it, and (c) at a point on the wire’s own line, far to its right?

    Answer

    Answers to Checkpoints

    Checkpoint 23.1. By the right-hand rule, point your thumb along the current (to the right) and your fingers curl around the wire. (a) Just above the wire, in the page, the field points out of the page. (b) Just below, it points into the page. (c) Zero. For any point on the wire’s own line, each current element \(d\vec{s}\) is parallel to \(\hat{r}\), so \(d\vec{s}\times\hat{r} = 0\) in the Biot–Savart law: a current produces no field straight ahead of itself.


    This page titled 23.1: Magnetic Field Due to a Current was last modified on Thu, 12 Nov 2026 04:26:50 GMT and is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Michael Ragsdale.