Magnetic field circulation around current-carrying conductors
Ampère's Law is one of Maxwell's equations relating the circulation of the magnetic field around a closed loop to the current enclosed by that loop. For a long straight wire carrying current I, the magnetic field at distance r forms concentric circles with magnitude B = μ₀I/(2πr), where μ₀ = 4π×10⁻⁷ T·m/A. Using the right-hand rule: thumb along current direction, fingers curl in the direction of B. For a coaxial cable (inner current +I, outer current -I), the field outside is zero because the net enclosed current is zero. Inside a solenoid with n turns per unit length, B = μ₀nI (uniform and parallel to the axis), while outside it is approximately zero. Ampère's Law is most useful when the magnetic field has high symmetry (cylindrical for wires, rectangular for solenoids), allowing B to be pulled out of the integral.
Plus 148+ other Pro labs covering AP Physics, Biology, Chemistry, Earth Science, and Math — with unlimited simulation time, advanced parameters, and detailed analytics.
Already have an account?
Sign in →In magnetostatics, Ampère's Law states that the line integral of B around any closed Amperian loop equals μ₀ times the current threading that loop: ∮B·dl = μ₀I_enc; the full Maxwell-Ampère version adds a displacement-current term μ₀ε₀ dΦ_E/dt for time-varying fields. The power of the magnetostatic form lies in symmetry: for a long straight wire the integrand is constant around a circle of radius r, giving B(2πr) = μ₀I and therefore B = μ₀I/(2πr). Inside an ideal solenoid with n turns per meter, a rectangular Amperian loop yields B = μ₀nI (uniform, axially directed) while outside B ≈ 0. The simulation lets you switch between a bare wire, a coaxial cable, and a solenoid, position the Amperian loop with loopRadius, and watch ∮B·dl update numerically as the enclosed current changes.
MisconceptionAmpère's Law works for any closed loop — you can always use it to find B directly, even for a bent or irregular wire.
CorrectMathematically ∮B·dl = μ₀I_enc holds for any closed loop, but B can only be factored out of the integral when the field has high symmetry (constant magnitude along the loop, constant angle with dl). For irregular geometries you cannot simplify the integral, so Ampère's Law gives a true result but not a useful one for calculating B.
MisconceptionThe magnetic field inside a solenoid points in the same direction as the current in the wire.
CorrectThe field inside a solenoid points along the solenoid axis, which is perpendicular to the current-carrying wire segments. Apply the right-hand rule: curl the fingers in the direction of current flow around the turns and the thumb points along the axis in the direction of B.
MisconceptionThe magnetic field outside a solenoid is just weaker, not zero.
CorrectFor an ideal infinite solenoid, B outside is zero by a symmetry argument: the field must be uniform and vanish at infinity for an infinite uniform solenoid. An Amperian rectangle straddling the wall with one long side inside and one outside gives B_inside − B_outside = μ₀nI, consistent with B_inside = μ₀nI when B_outside = 0. Real finite solenoids have a small but nonzero exterior field.
MisconceptionA coaxial cable with equal and opposite inner and outer currents still produces a B field outside the cable.
CorrectAny Amperian loop enclosing the full coaxial cable sees I_enc = +I − I = 0, so ∮B·dl = 0 and B = 0 outside. This is why coaxial cables are used in precision electronics — they confine the magnetic field entirely within the outer conductor.
MisconceptionDoubling the loop radius doubles the magnetic field from a long wire because the loop encloses more area.
CorrectB = μ₀I/(2πr) falls as 1/r — doubling r halves B. Ampère's Law relates the integral to I_enc, which does not change with loop size for a single wire. The field drops because the same current is spread over a larger circumference.
Biot-Savart, dB = (μ₀/4π)(I dl × r̂)/r², gives B from any current element by direct integration — it always works but can require difficult integrals. Ampère's Law ∮B·dl = μ₀I_enc gives the same answer with almost no integration when the geometry is symmetric enough to pull B out of the integral. For a long wire or solenoid, Ampère's Law takes two lines; Biot-Savart takes a full integral calculation.
The simulation addresses 3.A.1 (properties of the magnetic field, including direction and magnitude from current configurations), 3.B.1 (the Biot-Savart Law and its relationship to Ampère's Law for symmetric geometries), and 3.C.1 (Ampère's Law applied to straight wires, solenoids, and toroids to calculate B). All three codes appear in the experiment's standards.ap[] array.
For an ideal infinite solenoid, B outside is zero by a symmetry argument: the field must be uniform and, for an infinite solenoid extending to infinity in both directions, it must also vanish at infinity — so B_outside = 0. An Amperian rectangle straddling the solenoid wall gives B_inside − B_outside = μ₀nI, which is consistent with B_inside = μ₀nI once we set B_outside = 0 from the symmetry argument. Real finite solenoids have a small but nonzero exterior field (magnetic field lines must close).
μ₀ = 4π × 10⁻⁷ T·m/A is the permeability of free space. It appears in Ampère's Law as the proportionality constant linking field circulation to enclosed current. In SI it has units of T·m/A = kg·m/A²·s², which you can derive from the dimensional analysis of ∮B·dl = μ₀I_enc.
Yes. For a toroid of N total turns and mean radius r carrying current I, a circular Amperian loop of radius r inside the toroid gives B(2πr) = μ₀NI, so B = μ₀NI/(2πr). The field is confined inside the toroid and varies with radial position. Outside the toroid, any Amperian loop encloses equal forward and return currents, giving B = 0.
Curl the four fingers of your right hand in the direction that current flows around the solenoid turns (following the helical winding). Your extended thumb then points in the direction of B inside the solenoid. Alternatively, look at one end of the solenoid: if current flows counterclockwise when viewed from that end, that end is the north pole (B exits).