
Ampere's law states that the magnetic field \( \vec{B} \) generated by a current-carrying conductor can be determined using the equation:
\[ \oint_C \vec{B} \cdot d\vec{l} = \mu_0 I \]
Definitions:
Due to symmetry, the magnetic field is tangential to the loop at all points, and its magnitude \( B \) is constant. Therefore, the line integral simplifies to:
\[ \oint_C \vec{B} \cdot d\vec{l} = B \oint_C dl = B (2 \pi r) \]
Applying Ampere’s law:
\[ B (2 \pi r) = \mu_0 I \]
Solving for \( B \):
\[ B = \frac{\mu_0 I}{2 \pi r} \]
Result: The magnetic field at a distance \( r \) from an infinitely long straight wire carrying a current \( I \) is:
\[ B = \frac{\mu_0 I}{2 \pi r} \]

