A long, straight wire carries a current. Is Ampere’s law valid for a loop that does not enclose the wire, or that encloses the wire but is not circular?

Ampere’s law holds true for any closed loop of magnetic field containing constant electric current. The left hand side of Ampere’s circuital law


Where


μ0 is the magnetic permeability of free space,


i is the current enclosed by the loop and B is the magnetic field


The above equation deals with a closed line integral along the path of the magnetic field. The line integral will not have a finite value if the loop is not closed. So, Ampere’s law will not hold for a loop that does not enclose the wire but it will hold for any shape of the loop even if it’s not circular.


1