Ampere's law is a fundamental principle in electromagnetism that relates the magnetic field around a closed loop to the electric current passing through that loop. The law is expressed mathematically as a line integral of the magnetic field, denoted as \( \oint \mathbf{B} \cdot d\mathbf{l} = \mu_0 I_{\text{enc}} \), where \( \mathbf{B} \) is the magnetic field, \( d\mathbf{l} \) is an infinitesimal segment of the loop, \( \mu_0 \) is the permeability of free space, and \( I_{\text{enc}} \) is the current enclosed by the loop. The integral is taken over a closed path, known as an Amperian loop, which is crucial for applying this law.
To apply Ampere's law, consider a scenario with an infinitely long current-carrying wire. If the current \( I \) flows into the page, the magnetic field \( \mathbf{B} \) will circulate around the wire. By using the right-hand rule, you can determine the direction of the magnetic field: if you point your thumb in the direction of the current, your fingers will curl in the direction of the magnetic field lines.
When you choose a circular Amperian loop of radius \( r \) around the wire, the magnetic field is constant in magnitude and direction along the loop. Thus, the line integral simplifies to \( \oint \mathbf{B} \cdot d\mathbf{l} = B \oint d\mathbf{l} = B(2\pi r) \). Setting this equal to \( \mu_0 I \) gives the equation:
\[ B(2\pi r) = \mu_0 I \]
From this, you can solve for the magnetic field \( B \):
\[ B = \frac{\mu_0 I}{2\pi r} \]
This result shows that the magnetic field around an infinitely long wire decreases inversely with distance from the wire, which is a key takeaway from Ampere's law. This method is often more efficient than using the Biot-Savart law for calculating magnetic fields in such scenarios.