BetaFree coursewareRewritten from MIT OpenCourseWareCC BY-NC-SA 4.0
Open CosmologyThe High School: physics from the very first step

Magnetic fields from currents

Every electric current makes a magnetic field: round a long straight wire the field lines are circles, given by the right-hand grip rule, with B = μ₀I/(2πr); a loop of wire acts as a flat magnet, and a long coil (a solenoid) has a uniform field B = μ₀nI inside; an iron core makes an electromagnet far stronger; and two parallel currents attract or repel with a force per metre μ₀I₁I₂/(2πd), which once defined the ampere.

You need this first

Full reading path (46 pages)
  1. Powers of ten and scientific notation (hs-0)
  2. Units and the SI system (hs-0)
  3. Solving and rearranging formulas (hs-0)
  4. Graphs, straight lines and slope (hs-0)
  5. Quadratics and power laws (hs-0)
  6. Angles, radians and trigonometry (hs-0)
  7. Vectors (hs-0)
  8. Distance and displacement (hs-1)
  9. Rates of change and area under a graph (hs-0)
  10. Speed and velocity (hs-1)
  11. Position–time graphs (hs-1)
  12. Acceleration (hs-1)
  13. Velocity–time graphs (hs-1)
  14. Equations for constant acceleration (hs-1)
  15. Free fall (hs-1)
  16. What is a force? (hs-2)
  17. Relative velocity (hs-1)
  18. Newton's first law: inertia (hs-2)
  19. Newton's second law (hs-2)
  20. Circular motion (hs-1)
  21. Newton's third law (hs-2)
  22. Weight, normal force and tension (hs-2)
  23. Friction and drag (hs-2)
  24. Springs and Hooke's law (hs-2)
  25. Inclined planes (hs-2)
  26. Centripetal force (hs-2)
  27. Work (hs-3)
  28. Kinetic energy and the work–energy theorem (hs-3)
  29. Newton's law of gravitation (hs-2)
  30. Gravitational potential energy (hs-3)
  31. Conservation of energy (hs-3)
  32. Electric charge (hs-6)
  33. Coulomb's law (hs-6)
  34. Projectile motion (hs-1)
  35. Oscillations and simple harmonic motion (hs-5)
  36. Waves: speed, frequency, wavelength (hs-5)
  37. Superposition and standing waves (hs-5)
  38. Power (hs-3)
  39. Exponentials and logarithms (hs-0)
  40. Density and pressure (hs-4)
  41. Sound and intensity (hs-5)
  42. The electric field (hs-6)
  43. Electric potential and voltage (hs-6)
  44. Current, resistance and Ohm's law (hs-6)
  45. Torque and balance (hs-2)
  46. Magnetic fields and magnetic force (hs-6)
On this page · 8 sections
  1. Oersted's discovery
  2. The field around a straight wire
  3. The field of a loop
  4. The solenoid
  5. Electromagnets and iron cores
  6. Force between two parallel currents
  7. Try it
  8. Summary

In lesson 6.9 a magnet's field pushed on a current. This lesson turns that round: a current makes a magnetic field of its own. Every wire that carries a current is surrounded by a magnetic field, and by winding wire into coils you can make magnets that switch on and off at the press of a button. That is how electric bells, door locks, loudspeakers and the cranes that lift scrap cars work.

Oersted's discovery#

For a long time electricity and magnetism seemed to be two separate subjects. In 1820 the Danish physicist Hans Christian Oersted showed in a lecture that they are linked. He ran a current through a wire held over a compass, and the compass needle turned. When the current stopped, the needle swung back; when the current was reversed, it turned the other way.

A compass needle lines up with the magnetic field, so the experiment shows that:

  • a current makes a magnetic field around it;
  • with no current there is no field;
  • reversing the current reverses the field.

You can repeat it with a battery, a piece of wire and a compass. Only close the circuit for a few seconds at a time: a bare wire has very little resistance, so the current is large and the battery soon runs flat and the wire gets hot.

The field around a straight wire#

Sprinkle iron filings on a card with a vertical wire through it, switch on a large current, and the filings form circles centred on the wire. The field lines of a long straight wire are closed circles in planes at right angles to the wire. They have no beginning and no end, unlike the field lines of electric charges, which start and stop on charges.

To draw such fields on flat paper, a current or field coming out of the page is shown as a dot, ⊙ (the point of an arrow coming towards you), and one going into the page as a cross, ⊗ (the feathers at the tail of an arrow flying away from you).

The direction of the circles follows from the right-hand grip rule: grip the wire with your right hand, with your thumb pointing along the current. Your fingers then curl the way the field lines go. As in the rest of this block, "current" means conventional current, from + to −. The rule only works with the right hand; the left hand always gives the wrong direction.

So a current coming out of the page has field lines going anticlockwise around it, and a current going into the page has them going clockwise.

How strong is the field?

The field is strongest close to the wire and weaker further away. For a long straight wire carrying a current II, the field strength at a distance rr from the wire is

Field of a long straight wire
B=μ0I2πrB = \frac{\mu_0 I}{2\pi r}
In words

B equals mu nought I over the quantity 2 pi r

Source: MIT 8.02T Electricity and Magnetism, Course Notes, Chapter 9: Sources of Magnetic Fields (Liao, Dourmashkin and Belcher), Sections 9.1 (straight wire, ring), 9.2 (parallel wires), 9.4 (solenoid) and 9.6.4 (ferromagnetism), simplified to this level, Eq. (9.1.7), p. 5

Here μ0\mu_0 (mu nought) is a constant of nature, the permeability of free space, μ0=4π×10−7 T m/A\mu_0 = 4\pi \times 10^{-7}\ \text{T m/A}. It plays the same part for magnetic fields that kk played for electric ones. Note that BB falls as 1/r1/r, not 1/r21/r^2: twice as far from the wire, the field is half as strong. The field of a point charge falls faster because it spreads out in all directions; the field of a long wire only spreads out sideways.

For comparison, the Earth's magnetic field at its surface is about 5×10−5 T5 \times 10^{-5}\ \text{T} (50 μT50\ \mu\text{T}).

Field strength of a long straight wire against distance, computed from B=μ0I/(2πr)B = \mu_0 I/(2\pi r) and shown in microtesla: with II in amperes and rr in metres, B=0.2 I/rB = 0.2\,I/r μT. The dashed line is the Earth's field, about 50 μT. Doubling the current doubles the field at every distance.
Worked example

A compass next to a cable

A long straight cable carries a steady current of 12 A12\ \text{A}. (a) What is the magnetic field 3.0 cm3.0\ \text{cm} from the cable? (b) How far from the cable is its field as strong as the Earth's, 5×10−5 T5 \times 10^{-5}\ \text{T}?

(a) Use the formula for a straight wire

B=μ0I2πr=4π×10−7×122π×0.030=8.0×10−5 TB = \dfrac{\mu_0 I}{2\pi r} = \dfrac{4\pi \times 10^{-7} \times 12}{2\pi \times 0.030} = 8.0 \times 10^{-5}\ \text{T}, or 80 μT80\ \mu\text{T}: more than the Earth's field, so a compass this close turns noticeably.

(b) Solve for the distance

r=μ0I2πB=4π×10−7×122π×5×10−5=0.048 mr = \dfrac{\mu_0 I}{2\pi B} = \dfrac{4\pi \times 10^{-7} \times 12}{2\pi \times 5 \times 10^{-5}} = 0.048\ \text{m}, about 5 cm5\ \text{cm}. Further away, the cable's field is weaker than the Earth's.

The field of a loop#

Bend the wire into a circular loop. Apply the grip rule to each piece of the loop and you find that, inside the loop, the fields of all the pieces point the same way: they add up. The field lines pass through the loop, spread out around the outside and come back in at the other face.

A loop therefore acts as a flat magnet with a north face and a south face. There is a second form of the right-hand rule for it: curl the fingers of your right hand round the loop in the direction of the current, and your thumb points out of the north face, the side where the field lines come out.

At the centre of a circular loop of radius RR the field is

Field at the centre of a circular loop
B=μ0I2RB = \frac{\mu_0 I}{2R}
In words

B equals mu nought I over the quantity 2 capital R

Source: MIT 8.02T Electricity and Magnetism, Course Notes, Chapter 9: Sources of Magnetic Fields (Liao, Dourmashkin and Belcher), Sections 9.1 (straight wire, ring), 9.2 (parallel wires), 9.4 (solenoid) and 9.6.4 (ferromagnetism), simplified to this level, p. 9, B₀ below Eq. (9.1.15)

A flat coil of NN turns wound close together acts like NN loops on top of each other, so the field at its centre is NN times as large.

The solenoid#

Now wind the wire into a long coil, with many turns side by side along a tube. Such a coil is a solenoid. The fields of all the loops add up. Inside a long solenoid the field lines run parallel to the axis and are evenly spaced: the field is uniform, the same at every point inside, away from the ends. Outside, the field is weak and has the same shape as the field of a bar magnet, with a north pole at one end and a south pole at the other. The grip rule for a loop tells you which end is north.

The field inside a long solenoid is

Field inside a long solenoid
B=μ0nI,n=NLB = \mu_0 n I, \qquad n = \frac{N}{L}
In words

B equals mu nought n I, n equals capital N over L

Source: MIT 8.02T Electricity and Magnetism, Course Notes, Chapter 9: Sources of Magnetic Fields (Liao, Dourmashkin and Belcher), Sections 9.1 (straight wire, ring), 9.2 (parallel wires), 9.4 (solenoid) and 9.6.4 (ferromagnetism), simplified to this level, Eq. (9.4.3), p. 21

where NN is the number of turns, LL the length of the solenoid and nn the number of turns per metre. Neither the width of the coil nor the position inside it appears: only how tightly the turns are packed and how much current flows.

Worked example

A coil for a physics lab

A solenoid is 20 cm20\ \text{cm} long and has 500500 turns. It carries a current of 2.0 A2.0\ \text{A}. Find the field inside it and compare it with the Earth's field.

Turns per metre

n=N/L=500/0.20=2500n = N/L = 500/0.20 = 2500 turns per metre.

The field

B=μ0nI=4π×10−7×2500×2.0=6.3×10−3 TB = \mu_0 n I = 4\pi \times 10^{-7} \times 2500 \times 2.0 = 6.3 \times 10^{-3}\ \text{T}, or 6.3 mT6.3\ \text{mT}.

Compare

6.3×10−3/(5×10−5)≈1306.3 \times 10^{-3} / (5 \times 10^{-5}) \approx 130: the field inside the coil is about 130 times the Earth's field.

Electromagnets and iron cores#

A solenoid with a current is a magnet that you can switch on and off, make stronger by turning up the current or adding turns, and turn round by reversing the current. Put a bar of iron inside it and the field becomes much stronger. That combination is an electromagnet.

As in lesson 6.9, iron is ferromagnetic: its domains point in different directions, so a plain piece of iron is not a magnet. The coil's field lines the domains up, and then their fields add to the coil's. Inside the iron the field can become 10310^3 to 10410^4 times as strong as the coil's field alone. Electromagnets use soft iron, which keeps very little of its magnetism when the current stops. In other materials the domains stay lined up after the field is gone: that is how a permanent magnet is made (MIT 8.02T notes, Sec. 9.6.4, p. 32).

You can test this at home with a battery, insulated wire and an iron nail: wind the wire round the nail, connect the battery, and the nail picks up paper clips. More turns pick up more clips, and most of the clips drop when you disconnect.

Electromagnets are used wherever a force has to be switched by electricity: scrapyard cranes that lift and drop cars, electric bells, relays (switches worked by a small current), loudspeakers and magnetic locks on doors. Many electric motors use them too.

Force between two parallel currents#

A current makes a magnetic field, and a current in a magnetic field feels a force. So two currents push or pull on each other. Take two long straight wires, a distance dd apart, with currents I1I_1 and I2I_2. Wire 1 makes a field B=μ0I1/(2πd)B = \mu_0 I_1/(2\pi d) at wire 2, at right angles to wire 2. A length LL of wire 2 then feels the force F=BI2LF = BI_2L of lesson 6.9, so the force per metre of wire is

Force per metre between two parallel currents
FL=μ0I1I22πd\frac{F}{L} = \frac{\mu_0 I_1 I_2}{2\pi d}
In words

F over L equals mu nought I one I two over the quantity 2 pi d

Source: MIT 8.02T Electricity and Magnetism, Course Notes, Chapter 9: Sources of Magnetic Fields (Liao, Dourmashkin and Belcher), Sections 9.1 (straight wire, ring), 9.2 (parallel wires), 9.4 (solenoid) and 9.6.4 (ferromagnetism), simplified to this level, Eq. (9.2.1), p. 13

Wire 1 feels the same force from wire 2, in the opposite direction, as Newton's third law requires. The grip rule and the direction rule of lesson 6.9 give the result:

  • currents in the same direction attract;
  • currents in opposite directions repel.
Worked example

The two wires of a power cord

A power cord feeds a heater. Its two wires are 4.0 mm4.0\ \text{mm} apart and carry 10 A10\ \text{A} each, in opposite directions (to the heater and back). What is the force between 2.0 m2.0\ \text{m} of the two wires, and is it a push or a pull?

Force per metre

FL=μ0I1I22πd=4π×10−7×10×102π×0.0040=5.0×10−3 N/m\dfrac{F}{L} = \dfrac{\mu_0 I_1 I_2}{2\pi d} = \dfrac{4\pi \times 10^{-7} \times 10 \times 10}{2\pi \times 0.0040} = 5.0 \times 10^{-3}\ \text{N/m}.

Force on the length of cord

F=5.0×10−3×2.0=1.0×10−2 NF = 5.0 \times 10^{-3} \times 2.0 = 1.0 \times 10^{-2}\ \text{N}. The currents are opposite, so the wires repel, but only with about the weight of a one-gram mass: the insulation holds them easily.

The old definition of the ampere

This force was used to define the unit of current. From 1948 until 2019 the ampere was defined as the steady current that, flowing in two long straight parallel wires 1 m1\ \text{m} apart in a vacuum, makes them push or pull on each other with a force of 2×10−7 N2 \times 10^{-7}\ \text{N} per metre of length. Check it with the formula: F/L=4π×10−7×1×1/(2π×1)=2×10−7 N/mF/L = 4\pi \times 10^{-7} \times 1 \times 1/(2\pi \times 1) = 2 \times 10^{-7}\ \text{N/m}. That definition is the reason why μ0\mu_0 has the tidy value 4π×10−7 T m/A4\pi \times 10^{-7}\ \text{T m/A} (since 2019 μ0\mu_0 is measured rather than fixed, but the measured value given by NIST still equals 4π×10−7 T m/A4\pi \times 10^{-7}\ \text{T m/A} to about one part in 101010^{10}). Infinitely long wires cannot be built, so since 2019 the ampere has been based instead on the charge of one electron, ee.

Try it#

Open the "Electromagnet" screen. Put the compass at different places around the coil and watch it follow the field lines. Change the current, the number of loops and the direction of the current, and see how the field strength and the north pole change.

Magnets and Electromagnets. Simulation by PhET Interactive Simulations, University of Colorado Boulder, licensed under CC BY-NC 4.0 (https://phet.colorado.edu). Open full screen

Summary#

  • A current makes a magnetic field (Oersted, 1820). Around a long straight wire the field lines are circles; the right-hand grip rule (thumb along the current, fingers curl with the field) gives their direction.
  • The field of a long straight wire is B=μ0I/(2πr)B = \mu_0 I/(2\pi r), with μ0=4π×10−7 T m/A\mu_0 = 4\pi \times 10^{-7}\ \text{T m/A}: it falls as 1/r1/r.
  • A loop of wire acts as a flat magnet, with B=μ0I/(2R)B = \mu_0 I/(2R) at its centre. A long coil, a solenoid, has a uniform field B=μ0nIB = \mu_0 n I inside, with nn turns per metre, and a bar-magnet field outside.
  • An iron core lines up its domains with the coil's field and makes an electromagnet that is much stronger and can be switched on and off.
  • Two parallel currents attract (same direction) or repel (opposite directions) with a force per metre F/L=μ0I1I2/(2πd)F/L = \mu_0 I_1 I_2/(2\pi d). From 1948 to 2019 this force defined the ampere.

Symbols on this page

Show the 18 symbols used here
μ\mu mu.
The prefix micro, one millionth: 1 μT = 10⁻⁶ T. Say it: “mu” (sounds like “myoo”).
π\pi pi.
The ratio of a circle's circumference to its diameter, π ≈ 3.14159. Say it: “pi”.
≈\approx approximately equal.
Is approximately equal to. Say it: “is approximately”.
×\times times.
Times (multiplication). Between two vectors: the cross product. Say it: “times”.
kk k.
Coulomb's constant, k = 9.0 × 10⁹ N m²/C². Unit: N m²/C². Say it: “k”.
dd d.
Distance between the two parallel wires. Unit: m. Say it: “d”.
nn n.
Number of turns per metre of the solenoid, n = N/L. Unit: 1/m. Say it: “n”.
ee e.
The elementary charge: the size of the charge of one electron, e = 1.6 × 10⁻¹⁹ C (an electron has charge −e). Unit: C. Say it: “e”.
FF F.
Magnetic force on a length of current-carrying wire. Unit: N. Say it: “F”.
rr r.
Distance from a long straight wire. Unit: m. Say it: “r”.
BB B.
Magnetic field strength (the magnetic flux density), in tesla. Unit: T. Say it: “B”.
LL L.
Length: of the solenoid in n = N/L, or of the piece of wire that feels the force in F = BIL. Unit: m. Say it: “L”.
NN N.
Number of turns of the coil or solenoid. Say it: “capital N”.
RR R.
Radius of a circular loop of wire. Unit: m. Say it: “capital R”.
II I.
The current in the wire, loop or coil. Unit: A. Say it: “I”.
μ0\mu_{0} mu nought.
The permeability of free space, 4π × 10⁻⁷ T m/A. Unit: T m/A. Say it: “mu nought”.
I1I_{1} I 1.
The current in wire 1. Unit: A. Say it: “I one”.
I2I_{2} I 2.
The current in wire 2. Unit: A. Say it: “I two”.

Tap or click a symbol in a formula to see the same explanation. All symbols: symbols and notation.

Words on this page

Show the 14 words used here

New here

permeability of free space.
The constant μ₀ that sets the strength of magnetic fields made by currents in empty space.
solenoid.
A long coil of wire wound like a spring; a current through it makes a strong, nearly uniform magnetic field inside.

Also used

field.
Something that has a value at every point of space, such as the temperature, the wind velocity or the electric field at each place. Explained in Newton's law of gravitation.
magnetic field.
The field made by magnets and moving charges, which pushes sideways on other moving charges and turns compass needles. Explained in Magnetic fields and magnetic force.
field lines.
Curves drawn so that at every point they run along the field; where they crowd together the field is strong. Explained in The electric field.
right-hand rule.
A way to find a direction with the right hand: curl the fingers from the first vector to the second; the thumb gives the result. Explained in Magnetic fields and magnetic force.
uniform.
The same at every point, or unchanging in time: a uniform rod has the same density all along it. Explained in The electric field.
ferromagnetic.
Of a material such as iron, called a ferromagnet: strongly magnetized by a field, because neighbouring atomic magnets line up together in regions called domains. Explained in Magnetic fields and magnetic force.
MIT.
Massachusetts Institute of Technology: the university in Cambridge, USA, whose free courses this site rewrites.
p..
Page, in a reference to a source; pp. means pages, as in pp. 3–5.
Newton's third law.
When one body pushes or pulls on another, the second pushes or pulls back on the first equally hard, in the opposite direction. Explained in Newton's third law.
ampere.
The SI unit of electric current: one coulomb of charge passing a point each second. Explained in Current, resistance and Ohm's law.
vacuum.
Space with nothing in it; in quantum theory, a state with no particles, usually the one of lowest energy. Explained in Free bosons: identical particles, oscillators and the vibrating string.

Academic

conventional.
Usual and standard, following the accepted way; or fixed by an agreed choice.

Tap or click a word, here or in the text, for its meaning in this lesson. All words: the glossary. How many words are marked in the text: Reading options (the “Aa” button).

Where this leads

In cosmology

Pages that build on this

Practise

Check your understanding

  1. A long straight wire runs straight towards you, with the current coming out of the page. Seen from where you are, the magnetic field lines around it are…
  2. The magnetic field 6.0 cm6.0\ \text{cm} from a long straight wire is 30 μT30\ \mu\text{T}. What is the field 2.0 cm2.0\ \text{cm} from the same wire?
  3. A solenoid 0.30 m0.30\ \text{m} long has 600600 turns and carries 0.50 A0.50\ \text{A}. What is the field inside it?
  4. A second solenoid is wound on a tube twice as wide, with the same number of turns over the same length, and carries the same current. The field inside the solenoid…
  5. Two long parallel wires carry currents in opposite directions. The wires…
0 of 5 answered

Flashcards

1 / 5