Step 1: Ampere's Circuital Law.
Ampere's circuital law states that the line integral of the magnetic field around a closed loop is proportional to the total current passing through the loop:
\[
\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 element of the loop, \( \mu_0 \) is the permeability of free space, and \( I_{\text{enc}} \) is the current enclosed by the loop.
Step 2: Choose a Circular Path.
To calculate the magnetic field around a straight current-carrying conductor, we choose a circular path centered on the conductor. The symmetry of the situation means the magnetic field will have the same magnitude at all points on the circular path and will be directed tangentially to the path. Thus, \( \mathbf{B} \) and \( d\mathbf{l} \) are parallel, and the dot product \( \mathbf{B} \cdot d\mathbf{l} \) simplifies to \( B dl \).
Step 3: Integral Form of Ampere's Law.
The line integral around the circular path becomes:
\[
\oint \mathbf{B} \cdot d\mathbf{l} = B \oint dl = B (2 \pi r)
\]
where \( r \) is the radius of the circle (the distance from the wire to the point where the magnetic field is being calculated).
Step 4: Applying Ampere’s Law.
According to Ampere's law, this integral is equal to \( \mu_0 I \), where \( I \) is the current passing through the conductor. Therefore, we have:
\[
B (2 \pi r) = \mu_0 I
\]
Step 5: Solving for \( B \).
Solving for the magnetic field \( B \), we get:
\[
B = \frac{\mu_0 I}{2 \pi r}
\]
Step 6: Conclusion.
Thus, the magnetic field at a distance \( r \) from a long straight current-carrying conductor is:
\[
B = \frac{\mu_0 I}{2 \pi r}
\]