Definition of Ampère's law
Ampère's law connects magnetic fields to the electric currents that produce them. It tells you that if you trace a closed loop around some current-carrying wires, the total magnetic field along that loop depends only on how much current passes through it. This makes it one of the most useful tools for calculating magnetic fields in symmetric situations.
Ampère's law also forms one of the four Maxwell's equations, the set of equations that describe all of classical electromagnetism.
Mathematical formulation
The law is expressed as a line integral of the magnetic field around a closed path (called an Amperian loop):
- is the magnetic field vector
- is an infinitesimal length element along the loop
- is the permeability of free space ()
- is the total current enclosed by the loop
The left side sums up the component of that runs parallel to your chosen path, all the way around the loop. The right side is just the enclosed current times a constant. This formulation applies to steady (constant) currents and static magnetic fields.
Relationship to Maxwell's equations
Ampère's law is one of the four Maxwell's equations, which together unify electricity and magnetism into a single framework. In its original form, it connects magnetic fields specifically to their source: electric currents. Maxwell later modified it by adding a displacement current term (covered below) so that it also accounts for time-varying electric fields. That correction was essential for predicting electromagnetic waves.
Magnetic field of a current-carrying wire
Ampère's law shines when the geometry of a problem has high symmetry. In those cases, you can choose a clever Amperian loop that makes the integral easy to evaluate, often turning it into simple algebra.
Straight wire configuration
For a long, straight wire carrying current , the magnetic field forms concentric circles centered on the wire. To find the field strength at a distance from the wire:
- Choose a circular Amperian loop of radius centered on the wire.
- By symmetry, has the same magnitude everywhere on the loop and points tangent to it, so .
- The enclosed current is just .
- Set them equal: .
- Solve:
The field strength drops off as . Use the right-hand rule to find the direction: point your thumb in the direction of the current, and your fingers curl in the direction of the magnetic field.
Circular loop configuration
For a circular loop of wire, the magnetic field lines form a toroidal (doughnut-like) shape around the wire itself. Near the center of the loop, the field is relatively uniform. Far from the loop, the field pattern resembles that of a magnetic dipole. Ampère's law can be applied to loops concentric with the wire's cross-section, though for finding the field along the axis of the loop, the Biot-Savart law is often more practical.
Applications of Ampère's law
Solenoids and toroids
A solenoid is a long coil of wire wound in a helix. Inside an ideal (infinitely long) solenoid, the magnetic field is uniform and parallel to the axis. Applying Ampère's law with a rectangular loop that has one side inside and one side outside the solenoid gives:
where is the number of turns per unit length and is the current. The field outside an ideal solenoid is zero.
A toroid is a solenoid bent into a closed ring. It confines nearly all of its magnetic field inside the ring, producing very little external field. This makes toroids useful when you need a strong field without stray magnetism.
Electromagnets
Electromagnets apply Ampère's law in a practical way: run current through a coil to generate a magnetic field. Wrapping the coil around a ferromagnetic core (like iron) dramatically increases the field strength because the core material becomes magnetized and adds its own contribution. The resulting field strength scales with both the current and the number of turns. Electromagnets are at the heart of electric motors, generators, magnetic levitation systems, and many other devices.
Limitations of Ampère's law

Steady currents vs. changing fields
The original form of Ampère's law works only for steady currents. It doesn't account for situations where electric fields are changing in time. For example, consider a charging capacitor: current flows into the capacitor plates, but no actual current crosses the gap between them. If you draw an Amperian loop around the wire, the enclosed current depends on which surface you choose, which creates an inconsistency. This problem motivated Maxwell's correction.
Maxwell's correction
Maxwell resolved the inconsistency by adding a displacement current term:
The new term accounts for the magnetic field produced by a changing electric flux. In the capacitor example, the changing electric field between the plates acts like a current for the purposes of generating a magnetic field. This correction completed the set of Maxwell's equations and was a key step toward predicting electromagnetic waves.
Integral form vs. differential form
Ampère's law can be written in two mathematically equivalent ways. Both describe the same physics; the choice depends on the problem.
Line integral representation
The integral form is the one you'll use most often in this course:
It's best suited for problems with high symmetry (straight wires, solenoids, toroids) where you can choose an Amperian loop along which is constant. This lets you pull out of the integral and solve directly.
Curl of the magnetic field
The differential form is obtained from the integral form using Stokes' theorem:
Here is the current density vector (current per unit area). This form gives a local relationship: it tells you how the magnetic field curls at each individual point in space based on the current density at that point. It's more useful for analyzing non-uniform or complex current distributions, and you'll encounter it more in advanced courses.
Ampère's law vs. Biot-Savart law
Both laws relate electric currents to the magnetic fields they produce, but they're suited to different situations.
Symmetry considerations
- Ampère's law works best when the current distribution has high symmetry (infinite straight wires, solenoids, toroids). In these cases, you can exploit the symmetry to simplify the line integral dramatically.
- The Biot-Savart law works for any current distribution, regardless of symmetry. It calculates the field contribution from each small segment of current and sums them up.
Computational efficiency
For symmetric problems, Ampère's law is far simpler. Finding the field of an infinite straight wire takes a few lines of algebra with Ampère's law, but requires setting up and evaluating a full vector integral with Biot-Savart. However, for geometries without obvious symmetry (a short wire segment, an oddly shaped loop), Biot-Savart is the only option. Think of Ampère's law as the shortcut that works when symmetry allows it, and Biot-Savart as the general-purpose tool.
Experimental verification

Historical experiments
The law traces back to experiments in the early 1800s. Hans Christian Oersted first discovered that electric currents deflect magnetic compass needles (1820), showing that electricity and magnetism are connected. André-Marie Ampère then performed systematic experiments with current-carrying wires, measuring the forces between them and establishing the quantitative relationship that bears his name. Michael Faraday's later work on electromagnetic induction provided further evidence for the deep connection between electric and magnetic fields.
Modern measurement techniques
Today, Ampère's law is verified to extraordinary precision using:
- Hall effect sensors for measuring magnetic field strength at specific locations
- SQUIDs (superconducting quantum interference devices) for detecting extremely weak magnetic fields
- NMR (nuclear magnetic resonance) techniques for analyzing field uniformity
- Atomic magnetometers for high-accuracy field measurements based on atomic transitions
Ampère's law in different media
Vacuum vs. material environments
In vacuum, Ampère's law uses . Inside a material, the effective permeability changes to , where is the relative permeability of the medium.
- Ferromagnetic materials (iron, nickel, cobalt) have , greatly enhancing the magnetic field. This is why iron cores are used in electromagnets and transformers.
- Paramagnetic materials have slightly greater than 1 (weak enhancement).
- Diamagnetic materials have slightly less than 1 (weak opposition to the field).
Magnetization effects
When a material is placed in an external magnetic field, it can develop internal magnetization , which represents aligned atomic magnetic moments. These create bound currents within the material that contribute to the total magnetic field. To handle this, a modified form of Ampère's law uses the H-field (magnetic field intensity):
Here is the free current density (the current you control externally). The H-field separates out the material's response, making calculations in materials more manageable.
Relationship to other electromagnetic laws
Faraday's law
Faraday's law describes electromagnetic induction: a changing magnetic field induces an electric field. This is complementary to Ampère's law (with Maxwell's correction), which says a changing electric field induces a magnetic field. Together, these two laws explain how electromagnetic waves propagate: oscillating electric and magnetic fields sustain each other as they travel through space. Both laws are also central to how transformers and generators work.
Gauss's law for magnetism
Gauss's law for magnetism states that the divergence of the magnetic field is always zero: . In plain terms, magnetic field lines always form closed loops. There are no magnetic monopoles (isolated north or south poles). This complements Ampère's law by constraining the topology of magnetic fields: Ampère's law tells you how fields curl around currents, while Gauss's law tells you the field lines never start or end.
Technological applications
Electric motors
Electric motors work by passing current through conductors placed in a magnetic field, producing a force (via the Lorentz force). Ampère's law is used to calculate the magnetic fields generated by the stator windings and to optimize the motor's design. Applications range from tiny DC motors in toys to massive industrial drives.
Magnetic resonance imaging (MRI)
MRI scanners require extremely strong, uniform magnetic fields (typically 1.5 T or 3 T) to align hydrogen nuclei in the body. Superconducting coils carry large currents to generate these fields, and Ampère's law is essential for designing the coil geometry so that the field is uniform across the imaging volume. The result is detailed, non-invasive images of soft tissues with high resolution.