\subsection{Amp\`ere's Law and Symmetry Reduction}

This subsection states Amp\`ere's law and shows how symmetry can reduce a difficult line integral to simple algebra when the current distribution is highly symmetric. It is the magnetic analogue of Gauss's law.

\dfn{Amperian loop and enclosed current}{Let $C$ be any closed curve in space (called an \emph{Amperian loop}). The \emph{enclosed current} $I_{\mathrm{enc}}$ is the algebraic sum of all steady currents passing through any open surface $S$ bounded by $C$. The sign of each current is determined by the right-hand rule: curl the fingers of your right hand along the direction of integration around $C$; if your thumb points in the direction of the current, that current counts as positive. Currents in the opposite direction count as negative.}

\nt{Just as with Gauss's law, Amp\`ere's law is always true, but it is not always useful for finding $\vec{B}$. In a general asymmetric current distribution, knowing only the total enclosed current does not tell you the field at each point on the loop. The main strategy is therefore: first identify strong symmetry, then choose an Amperian loop matched to that symmetry so that $B=|\vec{B}|$ is constant on the field-contributing parts of the loop and the angle between $\vec{B}$ and $d\vec{\ell}$ is everywhere $0^\circ$, $180^\circ$, or $90^\circ$.}

\thm{Amp\`ere's law and when symmetry makes it useful}{Let $C$ be any closed curve and $I_{\mathrm{enc}}$ the net steady current passing through any surface bounded by $C$. Then Amp\`ere's law states
\[
\oint_C \vec{B}\cdot d\vec{\ell}=\mu_0 I_{\mathrm{enc}}.
\]
This law is always true. It becomes a practical method for solving for the magnetic field when the current distribution has enough symmetry that one can choose an Amperian loop for which the magnitude $B=|\vec{B}|$ is constant on each field-contributing part of the loop and the angle between $\vec{B}$ and $d\vec{\ell}$ is everywhere $0^\circ$, $180^\circ$, or $90^\circ$. Then the line integral reduces to algebraic terms such as $B\ell$, $-B\ell$, or $0$. Common useful cases are cylindrical symmetry (long straight wires), planar symmetry (infinite current sheets), and solenoidal symmetry (ideal solenoids). The direction of $\vec{B}$ follows the right-hand rule relative to the enclosed current: if the thumb of your right hand points in the direction of the current, your fingers curl in the direction of the magnetic field circulation.}

\nt{Amp\`ere's law is the magnetic analogue of Gauss's law. Gauss's law relates the electric field flux through a closed surface to the enclosed charge, $\oint\vec{E}\cdot d\vec{A}=q_{\mathrm{enc}}/\varepsilon_0$. Amp\`ere's law relates the magnetic field circulation around a closed loop to the enclosed current, $\oint\vec{B}\cdot d\vec{\ell}=\mu_0 I_{\mathrm{enc}}$. Both are universally valid but are practically useful for finding fields only when the source distribution has high symmetry. The matching of symmetry to geometry is parallel: spherical symmetry $\to$ spherical Gaussian surface, cylindrical symmetry $\to$ circular Amperian loop, planar symmetry $\to$ rectangular Amperian loop.}

\pf{How symmetry reduces the line integral}{Let a long straight wire carry current $I$ along the $+z$ axis. By cylindrical symmetry, the magnetic field circulates around the wire in concentric circles in planes perpendicular to the wire, and its magnitude $B(r)$ depends only on the radial distance $r$ from the wire axis. Choose a circular Amperian loop of radius $r$ centred on the wire. Along this loop, $\vec{B}$ is everywhere tangent to $d\vec{\ell}$, so $\vec{B}\cdot d\vec{\ell}=B(r)\,d\ell$, and $B(r)$ is constant everywhere on the loop. Therefore,
\[
\oint_C \vec{B}\cdot d\vec{\ell}=B(r)\oint_C d\ell=B(r)(2\pi r).
\]
If the enclosed current is $I_{\mathrm{enc}}$, Amp\`ere's law gives
\[
B(r)(2\pi r)=\mu_0 I_{\mathrm{enc}}.
\]
The law itself is general, but the symmetry is what allowed $B(r)$ to be pulled outside the integral.}

\mprop{Magnetic field of a long straight wire}{Let $\mu_0=4\pi\times 10^{-7}\,\mathrm{T\cdot m/A}$ be the permeability of free space. Consider a long straight wire of radius $R$ carrying total steady current $I$ with uniform current density $J$ across its cross section. The magnetic field magnitude is
\[
B(r)=\begin{cases}
\dfrac{\mu_0 I\,r}{2\pi R^2} & \text{for }r<R\;\text{(inside the wire)},\\[1.2ex]
\dfrac{\mu_0 I}{2\pi r} & \text{for }r>R\;\text{(outside the wire)}.
\end{cases}
\]
Inside the wire the field grows linearly with $r$; outside it falls as $1/r$. In both regions, $\vec{B}$ is tangent to circles centred on the wire axis, in the direction given by the right-hand rule.}

\cor{Continuity of $B$ at the wire surface}{At the surface of the wire ($r=R$), both the inside and outside formulas give the same result:
\[
B(R)=\frac{\mu_0 I\,R}{2\pi R^2}=\frac{\mu_0 I}{2\pi R}.
\]
The magnetic field is continuous at the boundary even though the functional form changes. The maximum field occurs at the surface.}

\mprop{Magnetic field of an infinite current sheet}{An infinite planar sheet carrying uniform surface current density $K$ (current per unit width, in units of $\mathrm{A/m}$). Choose a rectangular Amperian loop of length $L$ straddling the sheet, with two long sides parallel to the field and two short sides perpendicular. By symmetry, the field has constant magnitude on each side of the sheet and is parallel to the sheet but perpendicular to the current direction. Amp\`ere's law gives
\[
2BL=\mu_0(KL)\quad\Rightarrow\quad B=\frac{\mu_0 K}{2}.
\]
The field reverses direction on opposite sides of the sheet. The field outside is independent of distance from the sheet.}

\ex{Illustrative example}{A square loop of side $0.1\,\mathrm{m}$ carries a current $I=2\,\mathrm{A}$ in a uniform magnetic field $B=0.5\,\mathrm{T}$ perpendicular to the plane of the loop. The magnetic flux through the loop is
\[
\Phi_B = BA = (0.5\,\mathrm{T})(0.1\,\mathrm{m})^2 = 5.0\times 10^{-3}\,\mathrm{T\cdot m^2}.
\]}

\qs{Worked example}{A long cylindrical wire of radius $R=2.0\times 10^{-3}\,\mathrm{m}=2.0\,\mathrm{mm}$ carries a steady current $I=10\,\mathrm{A}$ uniformly distributed across its cross section. The current flows in the $+\hat{k}$ direction.

Find the magnetic field magnitude and direction at:
\begin{enumerate}[label=(\alph*)]
\item $r_1=1.0\times 10^{-3}\,\mathrm{m}=1.0\,\mathrm{mm}$ (inside the wire), and
\item $r_2=5.0\times 10^{-3}\,\mathrm{m}=5.0\,\mathrm{mm}$ (outside the wire).
\end{enumerate}}

\sol Let the wire lie along the $z$ axis with current flowing in the $+\hat{k}$ direction. By cylindrical symmetry, the magnetic field circulates around the wire in concentric circles in planes perpendicular to the wire. The field magnitude depends only on the radial distance $r$ from the wire axis.

Choose a circular Amperian loop of radius $r$ centred on the wire axis. Along this loop, $\vec{B}$ is everywhere tangent to $d\vec{\ell}$, so $\vec{B}\cdot d\vec{\ell}=B(r)\,d\ell$. The line integral becomes
\[
\oint_C \vec{B}\cdot d\vec{\ell}=B(r)\oint_C d\ell=B(r)(2\pi r).
\]

The enclosed current depends on whether the loop is inside or outside the wire. The uniform current density is
\[
J=\frac{I}{\pi R^2}.
\]

\textbf{(a) Inside the wire ($r_1<R$).} The enclosed current is the fraction of the total current passing through the area inside the Amperian loop:
\[
I_{\mathrm{enc}}=J(\pi r_1^2)=\frac{I}{\pi R^2}(\pi r_1^2)=I\,\frac{r_1^2}{R^2}.
\]
Substitute the values:
\[
I_{\mathrm{enc}}=(10\,\mathrm{A})\,\frac{(1.0\times 10^{-3}\,\mathrm{m})^2}{(2.0\times 10^{-3}\,\mathrm{m})^2}=(10\,\mathrm{A})\,\frac{1.0\times 10^{-6}}{4.0\times 10^{-6}}.
\]
Thus
\[
I_{\mathrm{enc}}=(10\,\mathrm{A})\times\frac{1}{4}=2.5\,\mathrm{A}.
\]

Apply Amp\`ere's law:
\[
B(r_1)(2\pi r_1)=\mu_0 I_{\mathrm{enc}}.
\]
Solve for $B(r_1)$:
\[
B(r_1)=\frac{\mu_0 I_{\mathrm{enc}}}{2\pi r_1}=\frac{(4\pi\times 10^{-7}\,\mathrm{T\cdot m/A})(2.5\,\mathrm{A})}{2\pi(1.0\times 10^{-3}\,\mathrm{m})}.
\]
Compute step by step:
\[
(4\pi\times 10^{-7})(2.5)=10\pi\times 10^{-7},
\]
\[
2\pi(1.0\times 10^{-3})=2\pi\times 10^{-3},
\]
\[
B(r_1)=\frac{10\pi\times 10^{-7}}{2\pi\times 10^{-3}}\,\mathrm{T}=5.0\times 10^{-4}\,\mathrm{T}.
\]

The direction follows the right-hand rule: thumb along $+\hat{k}$ (current direction), fingers curl counterclockwise when viewed from above.

\textbf{(b) Outside the wire ($r_2>R$).} The Amperian loop encloses the entire wire, so
\[
I_{\mathrm{enc}}=I=10\,\mathrm{A}.
\]

Apply Amp\`ere's law:
\[
B(r_2)(2\pi r_2)=\mu_0 I.
\]
Solve for $B(r_2)$:
\[
B(r_2)=\frac{\mu_0 I}{2\pi r_2}=\frac{(4\pi\times 10^{-7}\,\mathrm{T\cdot m/A})(10\,\mathrm{A})}{2\pi(5.0\times 10^{-3}\,\mathrm{m})}.
\]
Compute step by step:
\[
(4\pi\times 10^{-7})(10)=40\pi\times 10^{-7},
\]
\[
2\pi(5.0\times 10^{-3})=10\pi\times 10^{-3},
\]
\[
B(r_2)=\frac{40\pi\times 10^{-7}}{10\pi\times 10^{-3}}\,\mathrm{T}=4.0\times 10^{-4}\,\mathrm{T}.
\]

The direction is again given by the right-hand rule: counterclockwise when viewed from above.

\bigskip
\textbf{Final answers:}
\begin{enumerate}[label=(\alph*)]
\item $B(r_1)=5.0\times 10^{-4}\,\mathrm{T}=0.50\,\mathrm{mT}$, directed counterclockwise around the wire.
\item $B(r_2)=4.0\times 10^{-4}\,\mathrm{T}=0.40\,\mathrm{mT}$, directed counterclockwise around the wire.
\end{enumerate}
