Magnetic Fields from Wires, Loops, and Solenoids
An electric current produces a magnetic field: around a long straight wire the field forms circles with strength B = μ0I ÷ 2πr, at the center of a circular loop B = μ0NI ÷ 2R, and inside a long solenoid the field is nearly uniform, B = μ0nI, where μ0 = 4π × 10−7 T·m/A. In brief: the direction of the field is given by the right-hand grip rule: with the thumb along the current, the fingers curl in the direction of the field. A solenoid behaves like a bar magnet, and a soft iron core can increase its field by hundreds of times, making an electromagnet.
Electromagnets in cranes and relays, the coils in loudspeakers and MRI scanners, all use magnetic fields from currents. This guide gives the fields of wires, loops and solenoids with the right-hand rules, explains electromagnets, compares the three geometries in a table, works through numerical examples and corrects common mistakes.
What is the field around a straight wire?
Hans Christian Ørsted found in 1820 that a compass needle near a wire is deflected when a current flows. The magnetic field lines around a long straight wire are concentric circles in planes perpendicular to the wire. Right-hand grip rule: grasp the wire with the right hand, thumb in the direction of the conventional current; the curled fingers show the direction of the field. The magnitude at a distance r from a long wire carrying current I is
B = μ0I ÷ (2πr),
so it is proportional to the current and decreases as 1/r. The constant μ0 (the permeability of free space) is 4π × 10−7 T·m/A. Reversing the current reverses the field. Two parallel wires with currents in the same direction attract each other, and with currents in opposite directions repel (the basis of the old definition of the ampere).
What is the field of a loop?
A circular current loop of radius R gives a field that is strongest at the center, where B = μ0I ÷ 2R for a single turn, and B = μ0NI ÷ 2R for a coil of N turns. The field lines pass through the loop in one direction and return outside, like the field of a short bar magnet. The face of the loop from which the field lines emerge behaves as a north pole (looking at that face, the current appears to be anticlockwise), and the other face as a south pole.
What is the field of a solenoid?
A solenoid is a long coil of wire wound in a helix. The fields of the individual turns add up inside it and nearly cancel outside. In the middle of a long solenoid, the field is strong and nearly uniform, parallel to the axis: B = μ0nI, where n = N ÷ L is the number of turns per meter. At the ends, it is about half of that value. Outside, the field resembles that of a bar magnet. The polarity follows the grip rule: curl the fingers of the right hand in the direction of the current in the coils, and the thumb points to the north pole. A core of soft iron concentrates and increases the field (B = μ0μrnI, where the relative permeability μr can be 100 to 100,000). The strength can be increased by raising the current, the number of turns per unit length, or adding a core. Electromagnets can be switched on and off, and are used in scrap-yard cranes, electric bells, relays, loudspeakers, MRI machines and maglev trains.
Field geometries compared
| Arrangement | Field strength | Field shape |
|---|---|---|
| Long straight wire | B = μ0I ÷ 2πr | Concentric circles |
| Circular coil (center) | B = μ0NI ÷ 2R | Like a short magnet |
| Long solenoid (inside) | B = μ0nI | Uniform inside, like a bar magnet outside |
Worked example: calculating fields
- Straight wire. A wire carries 10 A. At r = 5.0 cm: B = (4π × 10−7 × 10) ÷ (2π × 0.050) = 2 × 10−7 × 10 ÷ 0.050 = 4.0 × 10−5 T = 40 µT, comparable to the Earth’s field (25 to 65 µT). Doubling the distance to 10 cm halves the field to 20 µT.
- Coil. A flat coil with 100 turns and radius 10 cm carries 2.0 A. At the center: B = μ0NI ÷ 2R = (4π × 10−7 × 100 × 2.0) ÷ (2 × 0.10) = 2.51 × 10−4 ÷ 0.20 = 1.26 × 10−3 T = 1.26 mT.
- Solenoid. A solenoid has 1,000 turns per meter and carries 2.0 A. B = μ0nI = 4π × 10−7 × 1,000 × 2.0 = 2.51 × 10−3 T = 2.5 mT. With an iron core of μr = 500: B = 1.26 T.
- Current needed. To make a field of 0.010 T inside a solenoid with 2,000 turns per meter: I = B ÷ (μ0n) = 0.010 ÷ (4π × 10−7 × 2,000) = 0.010 ÷ 2.51 × 10−3 = 4.0 A.
How was the link discovered?
Ørsted’s observation during a lecture in 1820 led to a flurry of research. André-Marie Ampère showed within weeks that parallel currents attract or repel, and formulated Ampère’s law. Jean-Baptiste Biot and Félix Savart gave the law for the field of a current element. William Sturgeon built the first electromagnet in 1824, and Joseph Henry greatly improved it in the 1820s and 1830s, lifting hundreds of kilograms. James Clerk Maxwell unified electric and magnetic phenomena in the 1860s.
Which mistakes are common?
Mistake 1: Using the left hand or the wrong thumb direction
For the conventional current, use the right hand with the thumb along the current.
Mistake 2: Saying that the field is strongest at the wire’s surface only
It falls off as 1/r outside the wire, but is stronger the closer you are.
Mistake 3: Forgetting the number of turns
For coils, multiply by N, or use n turns per meter for solenoids.
Mistake 4: Using the solenoid formula for a short coil
B = μ0nI applies to the middle of a long solenoid. At the ends, the field is about half.