Magnetic Fields Produced by Currents
Ampere's law connects magnetic fields to the electric currents that produce them. It gives you a powerful tool for calculating magnetic field strength in situations with nice symmetry, like straight wires, loops, and solenoids. The right-hand rule then helps you figure out which direction those fields point.
These ideas are the foundation for understanding electromagnets, motors, MRI machines, and any device that creates a magnetic field from flowing current.
Ampere's Law and Magnetic Fields
Ampere's law says that if you trace a closed loop around some current-carrying wires, the total magnetic field along that loop is proportional to the current enclosed. In equation form:
Here's what each piece means:
- is the sum of the magnetic field () dotted with tiny length elements () all the way around a closed loop
- is the total current passing through the area enclosed by that loop
- is the permeability of free space, a constant equal to
The key takeaway: magnetic field strength is directly proportional to current. Double the current, and you double the field.
Ampere's law is most useful when the geometry has high symmetry, so the math simplifies. The three classic cases are:
- Infinite straight wires (like long power lines)
- Circular loops (like single-turn coils)
- Solenoids (tightly wound coils, used in MRI machines)
For situations without nice symmetry, the Biot-Savart law provides an alternative approach that works for more complex wire shapes, though the calculations are harder.

Right-Hand Rule for Magnetic Fields
The right-hand rule tells you the direction of the magnetic field around a current-carrying wire. Here's how to use it:
- Point your right thumb in the direction of the conventional current (positive to negative).
- Curl your fingers around the wire.
- Your fingers now point in the direction the magnetic field wraps around the wire.
For a straight wire, the field lines form concentric circles centered on the wire and perpendicular to it. Picture a wire passing through the center of a stack of CDs: each CD represents a circular field line.
For a circular loop or solenoid, the field pattern looks like a bar magnet. Field lines exit one end (the north pole) and curve around to enter the other end (the south pole). Inside the loop or solenoid, the field lines run roughly parallel and uniform. To find which end is north, curl your right-hand fingers in the direction of current flow around the loop; your thumb points toward the north pole.
One important property: magnetic field lines always form continuous closed loops and never cross each other.

Magnetic Field Strength Calculations
Each of the three symmetric geometries has its own formula.
Infinite straight wire carrying current , at a distance from the wire:
The field drops off as , so moving twice as far from the wire cuts the field in half.
Center of a circular loop of radius carrying current :
A larger radius means a weaker field at the center, since the current is farther away from that point.
Inside a solenoid with total turns, length , and current :
where is the number of turns per unit length. The field inside a long solenoid is remarkably uniform, and outside it's approximately zero.
Example calculation: A solenoid has 500 turns, a length of 0.20 m, and carries 2.0 A of current. Find the magnetic field inside.
- Calculate the turn density:
- Apply the formula:
- Compute:
This is about 6.3 mT, which is roughly 100 times stronger than Earth's magnetic field.
Additional Concepts in Magnetism
- Magnetic flux () measures the total magnetic field passing through a given area. It depends on field strength, the area, and the angle between the field and the surface.
- Gauss's law for magnetism states that the net magnetic flux through any closed surface is always zero. This reflects the fact that magnetic monopoles (isolated north or south poles) don't exist; field lines always form closed loops.
- Current density () describes how current is distributed across the cross-sectional area of a conductor, measured in .