Skip to main content
Physics LibreTexts

12.6: Ampère’s Law

  • Page ID
    4425
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)
    Learning Objectives

    By the end of this section, you will be able to:

    • Explain how Ampère’s law relates the magnetic field produced by a current to the value of the current
    • Calculate the magnetic field from a long straight wire, either thin or thick, by Ampère’s law

    A fundamental property of a static magnetic field is that, unlike an electrostatic field, it is not conservative. A conservative field is one that does the same amount of work on a particle moving between two different points regardless of the path chosen. Magnetic fields do not have such a property. Instead, there is a relationship between the magnetic field and its source, electric current. It is expressed in terms of the line integral of \(\vec{B}\) and is known as Ampère’s law. This law can also be derived directly from the Biot-Savart law. We now consider that derivation for the special case of an infinite, straight wire.

    Figure \(\PageIndex{1}\) shows an arbitrary plane perpendicular to an infinite, straight wire whose current I is directed out of the page. The magnetic field lines are circles directed counterclockwise and centered on the wire. To begin, let’s consider \(\oint \vec{B} \cdot d\vec{l}\) over the closed paths M and N. Notice that one path (M) encloses the wire, whereas the other (N) does not. Since the field lines are circular, \(\vec{B} \cdot d\vec{l}\) is the product of B and the projection of dl onto the circle passing through \(d\vec{l}\). If the radius of this particular circle is r, the projection is \(rd\theta\), and

    \[\vec{B} \cdot d\vec{l} = Br \, d\theta.\]

    Figures A and B show an arbitrary plane perpendicular to an infinite, straight wire whose current I is directed out of the page. The magnetic field lines are circles directed counterclockwise and centered on the wire. Ampere path M demonstrated in the Figure A encloses the wire. Ampere path N demonstrated in the Figure B does not enclose the wire.
    Figure \(\PageIndex{1}\): The current I of a long, straight wire is directed out of the page. The integral \(\oint d\theta\) equals \(2\pi\) and 0, respectively, for paths M and N.

    With \(\vec{B}\) given by Equation 12.4.1,

    \[\oint \vec{B} \cdot d\vec{l} = \oint \left(\frac{\mu_0 I}{2\pi r}\right) \, r \, d\theta = \frac{\mu_0 I}{2\pi} \oint d\theta.\]

    For path M, which circulates around the wire, \(\oint_M d\theta = 2\pi\) and

    \[\oint_M \vec{B} \cdot d\vec{l} = \mu_0 I.\]

    Path N, on the other hand, circulates through both positive (counterclockwise) and negative (clockwise) \(d\theta\) (see Figure \(\PageIndex{1}\)), and since it is closed, \(\oint_N d\theta = 0\). Thus for path N,

    \[\oint_N \vec{B} \cdot d\vec{l} = 0.\]

    The extension of this result to the general case is Ampère’s law.

    Ampere's Law

    Over an arbitrary closed path,

    \[\oint \vec{B} \cdot d\vec{l} = \mu_0 I\]

    where I is the total current passing through any open surface S whose perimeter is the path of integration. Only currents inside the path of integration need be considered.

    To determine whether a specific current I is positive or negative, curl the fingers of your right hand in the direction of the path of integration, as shown in Figure \(\PageIndex{1}\). If I passes through S in the same direction as your extended thumb, I is positive; if I passes through S in the direction opposite to your extended thumb, it is negative.

    Problem-Solving Strategy: Ampère’s Law

    To calculate the magnetic field created from current in wire(s), use the following steps:

    1. Identify the symmetry of the current in the wire(s). If there is no symmetry, use the Biot-Savart law to determine the magnetic field.
    2. Determine the direction of the magnetic field created by the wire(s) by right-hand rule 2.
    3. Chose a path loop where the magnetic field is either constant or zero.
    4. Calculate the current inside the loop.
    5. Calculate the line integral \(\oint \vec{B} \cdot d\vec{l}\) around the closed loop.
    6. Equate \(\oint \vec{B} \cdot d\vec{l}\) with \(\mu_0 I_{enc}\) with \(\mu_0 I_{enc}\) and solve for \(\vec{B}\).
    Using Ampère’s Law to Calculate the Magnetic Field Due to a Wire

    Use Ampère’s law to calculate the magnetic field due to a steady current I in an infinitely long, thin, straight wire as shown in Figure \(\PageIndex{2}\).

    Figures shows an infinitely long, thin, straight wire with the current directed out of the page. The possible magnetic field components in this plane, BR and BTheta, are shown at arbitrary points on a circle of radius r centered on the wire.
    Figure \(\PageIndex{2}\): The possible components of the magnetic field B due to a current I, which is directed out of the page. The radial component is zero because the angle between the magnetic field and the path is at a right angle.

    Strategy

    Consider an arbitrary plane perpendicular to the wire, with the current directed out of the page. The possible magnetic field components in this plane, \(B_r\) and \(B_{\theta}\) are shown at arbitrary points on a circle of radius r centered on the wire. Since the field is cylindrically symmetric, neither \(B_r\) nor \(B_{\theta}\) varies with the position on this circle. Also from symmetry, the radial lines, if they exist, must be directed either all inward or all outward from the wire. This means, however, that there must be a net magnetic flux across an arbitrary cylinder concentric with the wire. The radial component of the magnetic field must be zero because \(\vec{B}_r \cdot d\vec{l} = 0\). Therefore, we can apply Ampère’s law to the circular path as shown.

    Solution

    Over this path \(\vec{B}\) is constant and parallel to \(d\vec{l}\), so

    \[\oint \vec{B} \cdot d\vec{l} = B_{\theta} \oint dl = B_{\theta}(2\pi r).\]

    Thus Ampère’s law reduces to

    \[B_{\theta}(2\pi r) = \mu_0 I.\]

    Finally, since \(B_{\theta}\) is the only component of \(\vec{B}\), we can drop the subscript and write

    \[B = \frac{\mu_0 I}{2\pi r}.\]

    This agrees with the Biot-Savart calculation above.

    Significance

    Ampère’s law works well if you have a path to integrate over which \(\vec{B} \cdot d\vec{l}\) has results that are easy to simplify. For the infinite wire, this works easily with a path that is circular around the wire so that the magnetic field factors out of the integration. If the path dependence looks complicated, you can always go back to the Biot-Savart law and use that to find the magnetic field.

    Example \(\PageIndex{2}\): Calculating the Magnetic Field of a Thick Wire with Ampère’s Law

    The radius of the long, straight wire of Figure \(\PageIndex{3}\) is a, and the wire carries a current \(I_0\) that is distributed uniformly over its cross-section. Find the magnetic field both inside and outside the wire.

    Figure A shows a long, straight wire of radius a that carries current I. Figure B shows a cross-section of the same wire with the Ampère’s loop of radius r.
    Figure \(\PageIndex{3}\): (a) A model of a current-carrying wire of radius a and current \(I_0\). (b) A cross-section of the same wire showing the radius a and the Ampère’s loop of radius r.

    Strategy

    This problem has the same geometry as Example \(\PageIndex{1}\), but the enclosed current changes as we move the integration path from outside the wire to inside the wire, where it doesn’t capture the entire current enclosed (see Figure \(\PageIndex{3}\)).

    Solution

    For any circular path of radius r that is centered on the wire,

    \[\oint \vec{B} \cdot d\vec{l} = \oint Bdl = B\oint dl = B(2\pi r).\]

    From Ampère’s law, this equals the total current passing through any surface bounded by the path of integration.

    Consider first a circular path that is inside the wire \((r \leq a)\) such as that shown in part (a) of Figure \(\PageIndex{3}\). We need the current I passing through the area enclosed by the path. It’s equal to the current density J times the area enclosed. Since the current is uniform, the current density inside the path equals the current density in the whole wire, which is \(I_0 / \pi a^2\). Therefore the current I passing through the area enclosed by the path is

    \[I = \frac{\pi r^2}{\pi a^2} I_0 = \frac{r^2}{a^2}I_0.\]

    We can consider this ratio because the current density J is constant over the area of the wire. Therefore, the current density of a part of the wire is equal to the current density in the whole area. Using Ampère’s law, we obtain

    \[B(2\pi r) = \mu_0 \left(\frac{r^2}{a^2}\right) I_0,\]

    and the magnetic field inside the wire is

    \[B = \frac{\mu_0 I_0}{2\pi} \frac{r}{a^2} (r \leq a).\]

    Outside the wire, the situation is identical to that of the infinite thin wire of the previous example; that is,

    \[B = \frac{\mu_0 I_0}{2\pi r} (r \geq a).\]

    The variation of B with r is shown in Figure \(\PageIndex{4}\).

    Graph shows the variation of B with r. It linearly increases with the r until the point a. Then it starts to decrease proportionally to the inverse of r.
    Figure \(\PageIndex{4}\): Variation of the magnetic field produced by a current \(I_0\) in a long, straight wire of radius a.

    Significance

    The results show that as the radial distance increases inside the thick wire, the magnetic field increases from zero to a familiar value of the magnetic field of a thin wire. Outside the wire, the field drops off regardless of whether it was a thick or thin wire.

    This result is similar to how Gauss’s law for electrical charges behaves inside a uniform charge distribution, except that Gauss’s law for electrical charges has a uniform volume distribution of charge, whereas Ampère’s law here has a uniform area of current distribution. Also, the drop-off outside the thick wire is similar to how an electric field drops off outside of a linear charge distribution, since the two cases have the same geometry and neither case depends on the configuration of charges or currents once the loop is outside the distribution.

    Using Ampère’s Law with Arbitrary Paths

    Use Ampère’s law to evaluate \(\oint \vec{B} \cdot d\vec{l}\) for the current configurations and paths in Figure \(\PageIndex{5}\).

    Figure A shows four wires carrying currents of two Amperes, five Amperes, three Amperes, and four Amperes. All four wires are inside the loop. First and second wires carry current downward through the loop. Third and fourth wires carry current upward through the loop. Figure B shows three wires carrying currents of five Amperes, two Amperes, and three Amperes. First and third wires are outside the loop, second wire is inside the loop. First wire carries current upward through the loop. Second and third wires carry current downward through the loop. Figure C shows three wires carrying currents of seven Amperes, five Amperes, and three Amperes. All three wires are inside the loop. First and second wires carry current downward through the loop. Third wire carries current upward through the loop.
    Figure \(\PageIndex{5}\): Current configurations and paths for Example \(\PageIndex{3}\).

    Strategy

    Ampère’s law states that \(\oint \vec{B} \cdot d\vec{l} = \mu_0 I\) where I is the total current passing through the enclosed loop. The quickest way to evaluate the integral is to calculate \(\mu_0 I\) by finding the net current through the loop. Positive currents flow with your right-hand thumb if your fingers wrap around in the direction of the loop. This will tell us the sign of the answer.

    Solution

    (a) The current going downward through the loop equals the current going out of the loop, so the net current is zero. Thus, \(\oint \vec{B} \cdot d\vec{l} = 0.\)

    (b) The only current to consider in this problem is 2A because it is the only current inside the loop. The right-hand rule shows us the current going downward through the loop is in the positive direction. Therefore, the answer is \(\oint \vec{B} \cdot d\vec{l} = \mu_0 (2 \, A) = 2.51 \times 10^{-6} T \cdot m.\)

    (c) The right-hand rule shows us the current going downward through the loop is in the positive direction. There are \(7A + 5A = 12 A\) of current going downward and –3 A going upward. Therefore, the total current is 9 A and \(\oint \vec{B} \cdot d\vec{l} = \mu_0 (9 \, A) = 5.65 \times 10^{-6} T \cdot m\).

    Significance

    If the currents all wrapped around so that the same current went into the loop and out of the loop, the net current would be zero and no magnetic field would be present. This is why wires are very close to each other in an electrical cord. The currents flowing toward a device and away from a device in a wire equal zero total current flow through an Ampère loop around these wires. Therefore, no stray magnetic fields can be present from cords carrying current.

    Exercise \(\PageIndex{1}\)

    Consider using Ampère’s law to calculate the magnetic fields of a finite straight wire and of a circular loop of wire. Why is it not useful for these calculations?

    Answer

    In these cases the integrals around the Ampèrian loop are very difficult because there is no symmetry, so this method would not be useful.

    Contributors and Attributions

    Samuel J. Ling (Truman State University), Jeff Sanny (Loyola Marymount University), and Bill Moebs with many contributing authors. This work is licensed by OpenStax University Physics under a Creative Commons Attribution License (by 4.0).


    This page titled 12.6: Ampère’s Law is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by OpenStax via source content that was edited to the style and standards of the LibreTexts platform.