Physics Tutor
Language: English

Magnetic Fields of Magnets and Currents

Where magnetic fields come from: magnets, Earth and every electric current. Round a long straight wire the field circles the wire and weakens with distance as .

Compasses around a wire, seen from above: when a current flows, the needles swing into circles around the wire, and they turn round when the current is reversed.
Compasses around a wire, seen from above: when a current flows, the needles swing into circles around the wire, and they turn round when the current is reversed.

Before this topic: Electric Current and Resistance

Beginner

Key ideas

  • A compass needle is a tiny magnet: it points along the field, whose lines run out of a magnet's north pole and round into its south pole.
  • Earth is a giant magnet. The magnetic pole under the Arctic is really a south pole, so it pulls the north end of every compass.
  • An electric current makes a magnetic field: around a straight wire, compass needles turn to form a ring.
  • Reverse the current and the ring reverses. Right hand: thumb along the current, fingers curl the way the field goes.
  • A coil carrying a current is an electromagnet you can switch off; an iron core inside makes it far stronger.

Hang a bar magnet from a thread and it settles with one end towards the north. That end is its north pole, the other its south pole. Two like poles push each other away; a north and a south pull together.

A compass needle is just a small magnet on a pivot. Wherever you place it, its north end shows the direction of the magnetic field at that spot. Move it around a magnet and you can trace the field lines: they leave the north pole, curve round and enter the south pole.

Earth is a giant magnet too, with a twist. Since unlike poles attract, the magnetic pole hidden under the Arctic must really be a south pole: that is why it pulls the north end of every compass.

In 1820 Hans Christian Ørsted found that a wire carrying a current also makes a magnetic field. The animation repeats his experiment, seen from above: small compasses sit around an upright wire. With no current they all point north. Switch on, and they swing into a ring around the wire; reverse the current and the ring turns the other way. To remember which way, grip the wire with your right hand, thumb along the current: your fingers curl the way the field goes.

Wind the wire into a coil and the rings add up inside it: you get an electromagnet that you can switch off. Soft iron inside makes it far stronger. Even a fridge magnet works this way, its electrons circling and spinning like tiny currents, all lined up.

Check yourself: a compass sits just north of an upright wire whose current flows upward. Where does its needle point? Answer: west, because seen from above, the field circles anticlockwise.

Intermediate

Key ideas

  • Long straight wire: , with ; doubling halves .
  • Right-hand grip rule: thumb along the current, fingers curl the way the field lines go.
  • 20 A gives 200 µT at 2 cm and 100 µT at 4 cm, ten and five times Earth's horizontal 20 µT.
  • A compass shows the total field, the wire's plus Earth's, so far from the wire it leans back towards north.
  • Solenoid: inside, with turns per metre; an iron core makes it far stronger.

What a magnetic field is, and how strong

A wire with no magnet in it turns a compass needle once a current flows through it. A magnetic field is what turns a compass needle near a magnet or a current. It has a direction, the way a compass's north end settles, and a size, the magnetic flux density , measured in tesla (T): in 1 T, a wire carrying 1 A across the field is pushed with 1 N on every metre.

A tesla is a lot: a fridge magnet gives a few millitesla and an MRI scanner 1.5–3 T, while Earth's field is only 25–65 µT. A compass lying flat feels only its horizontal part, about 20 µT in mid-latitudes, the green value in the animation.

Field lines run the way a compass points, crowd where the field is strong and never cross; round a bar magnet they leave the north pole and curve into the south pole. Earth's magnetic pole under the Arctic attracts the north end of every compass, so it is a south pole.

The field of a long straight wire

In 1820 Hans Christian Ørsted saw a compass needle swing when he switched on a current in a nearby wire: electric currents make magnetic fields. The field lines of a long straight wire are circles centred on it, so the needle turns sideways, and iron filings on a card round the wire form rings. At a distance from the wire

where is the current and is the magnetic constant,

Double and doubles; double and halves. A handy shortcut is , so that with in amperes and in metres.

Which way it goes: reading the diagram

The direction comes from the right-hand grip rule: grip the wire with your right hand, thumb along the current, and your fingers curl the way the field lines go. The rule uses the conventional current ; in a metal the electrons drift the other way.

The animation looks down on the card, so the wire is seen end-on: a dot (•) means current out of the screen, like an arrow's tip, and a cross (×) current into it, like its feathers. With out of the screen your thumb points at you and the field circles anticlockwise: the blue arrows on the east side point north. When the current reverses, the arrows flip and every needle swings round; the readouts, which give only the size of the field, stay the same.

The inner needles, in the stronger field, swing faster than the outer ones, because the twist a field gives a magnet grows with .

Loops and solenoids

Bend the wire into a circular loop of radius and every part of it sends its field through the middle in the same direction. At the centre

which is times what a straight wire gives at the distance ; a flat coil of turns gives times as much.

Stack many turns along a tube and you have a solenoid. Inside a long solenoid the fields of the turns add up to a nearly uniform field along the axis, while outside they almost cancel:

Here is the number of turns per metre, turns over a length ; the radius does not matter if the coil is long compared with its width. The ends act like a bar magnet's poles: curl your right fingers along the current in the turns and your thumb points to the north end. With a soft-iron core inside, the coil becomes an electromagnet.

Worked example: the compasses in the animation

The wire carries , and the compasses sit 2 cm and 4 cm from it. With the distances in metres:

These are the two blue readouts, ten and five times Earth's horizontal 20 µT. A compass, though, shows the total field, the wire's plus Earth's. For the inner compass due north of the wire, the wire's field points west and Earth's north, so the needle turns from the circle towards north by an angle whose tangent is : about 5.7°. At 4 cm the ratio is , and the outer needles lean towards north by up to about 11°.

Where would the wire's field match Earth's ?

With the current out of the screen, the field 20 cm due west of the wire points south and cancels Earth's: a compass there has no preferred direction. Due north, the two fields add at right angles to about 28 µT, and the needle points north-west. Reversing the current moves the cancelling point to the east.

Worked example: winding an electromagnet

You want 10 mT inside a coil 25 cm long, with wire rated for 2 A. Solve for the turns per metre:

That is about 4000 turns per metre, or turns, and , about 500 times Earth's horizontal field.

On a tube of radius 2 cm the coil uses of wire. In copper of cross-section 0.5 mm² its resistance is , so 2 A needs about 8.5 V and turns 17 W into heat.

A soft-iron core lines up its atomic magnets with the coil's field and multiplies it many times: to a few tenths of a tesla in a straight rod, and to nearly 2 T, where iron saturates, in a closed iron path such as a lifting magnet's.

Common mistakes

Where you meet it

Electromagnets lift scrap steel, hold fire doors open and switch relays. A loudspeaker drives its cone with a coil in a magnet's field, and an MRI scanner is a large solenoid: 1.5 T needs , say 2000 turns per metre carrying 600 A, so its coil is cooled until it superconducts.

Next, Magnetic Force on Moving Charges shows what a field does to a current, Electromagnetic Induction how a changing field drives one, and Motors, Generators and Transformers uses both.

Advanced

Key ideas

  • Ampère's law on a circle round the wire gives , so is constant.
  • Inside a wire of radius with uniform current, : zero on the axis, largest at the surface.
  • Biot–Savart, , handles any shape: at the centre of a loop.
  • A rectangle half inside a long solenoid gives a uniform inside and almost no field outside.
  • : field lines always close, even through a magnet, and no magnetic monopole has ever been found.

Two local laws for steady currents

Every steady magnetic field obeys two rules. Everything else in the lesson, from the straight wire to the coaxial cable, follows from them.

For currents that do not change in time, the magnetic field satisfies

Here is the current density, the current per unit area of cross-section (A/m²), and is the magnetic constant. The divergence measures how much field flows out of a tiny volume; the curl measures how much it circulates round a tiny loop.

The first law says that no net flux of leaves any closed surface. Field lines therefore never start or end, because there are no magnetic charges. The lines of in Electric Field and Potential, by contrast, start and end on charges.

The second law says that circulates round currents, and only round currents. Where , the field has no curl at all.

Ampère's law: circulation counts current

The curl law holds point by point. To use it on a real wire we need a form that adds up the circulation round a whole loop. Integrate the curl law over any surface bounded by a closed loop : Stokes' theorem turns the left side into a line integral round , and the right side becomes times the current that crosses the surface. The result is Ampère's law:

Figure 1
Figure 1. A closed loop round a wire carrying upwards, and two surfaces it bounds: the flat disc and the dashed dome . Notice that the wire pierces both, and that the steps and the field circle the way the right-hand fingers curl.
Legend
Current in the wire, upwards. It crosses and alike, so it is the of Ampère's law.
Closed loop round which is added up.
Flat disc bounded by .
Dome bounded by the same loop ; the wire pierces it too.
Short step along , in the sense the right-hand fingers curl when the thumb points along .
Magnetic field on ; it circles the wire in the same sense as the steps.

In Figure 1 the loop is cut into small steps . At each step, take the part of along the step and multiply it by the step's length. The left side of the law is the sum of these products all the way round .

The direction of travel fixes the sign. Point your right thumb along a current: if your fingers curl the way the steps go, that current counts as positive. Here the wire carries upwards, so the steps run anticlockwise as seen from above. The field circles the wire the same way, so every product is positive.

is the current crossing a surface bounded by . The obvious choice is the flat disc . But the dashed dome has the same edge , and the law does not say which surface to use, so both must give the same answer. In Figure 1 they do: the wire pierces and alike, so each is crossed by .

This agreement is not automatic. The divergence of any curl is zero, so taking the divergence of the curl law gives : charge never piles up, current flows round closed circuits, and every surface spanning carries the same current. A charging capacitor breaks this. A dome that passes between its plates is crossed by no current, while the flat disc is crossed by the wire. That is the first sign that changing fields need an extra term, met at the end of this lesson.

The straight wire, outside and inside

Ampère's law gives in one line, but only when symmetry tells us in advance that the field is the same all round the loop. The long straight wire is the cleanest case, and it shows how the symmetry argument goes.

A long straight wire looks the same after you slide along it or turn about it. So each part of can depend only on the distance from the wire. Split into three parts: radial (pointing away from the wire), along the wire, and circling it.

The radial part is zero. Take a closed cylinder of radius round the wire. Its two flat ends cancel, because the field along the wire is the same at both, entering one as it leaves the other. A radial part would then leave the curved side everywhere and give a net flux, which forbids.

The part along the wire is zero outside it. Take a rectangle in a plane through the wire, with both long sides outside the wire and on the same side of it. It encloses no current. Its short sides are radial, where the field has no part, so the two long sides must cancel: the field along the wire is the same at every distance. Far away it must vanish, so it vanishes everywhere outside.

What remains circles the wire, with a size that depends only on . Round a circle of radius centred on the wire, always points along the step, so the left side of Ampère's law is . Setting this equal to gives

Inside a wire of radius that carries its current uniformly, a circle of radius encloses only part of the current. That part is the ratio of the areas, . So , and

The field is zero on the axis and rises linearly to at the surface: 4.0 mT for 20 A in a wire of radius 1 mm. Outside, it falls as . Figure 4, further down, draws Ampère circles in both regions.

The solenoid: a uniform field inside

A solenoid is a long coil of wire, the standard way to make a uniform field. Ampère's law shows why with a single rectangle that lies half inside the coil and half outside.

Figure 2
Figure 2. A long solenoid cut along its axis: dots are current out of the page, crosses current into it. Notice the rectangle : its inner side, of length , runs along ; its outer side lies where ; turns pass through it.
Legend
Rectangular loop for Ampère's law, run anticlockwise.
Length of the two sides of parallel to the axis.
Current in each turn: out of the page at the top, into it at the bottom.
Field inside the solenoid, along the axis; it is zero outside.
Number of turns passing through ; is the number of turns per metre.

Figure 2 cuts a long solenoid along its axis. In the top row the current comes out of the page (dots); in the bottom row it goes into the page (crosses). Curl the fingers of your right hand along the current in the turns, and your thumb gives the field inside: along the axis, to the right, as the arrows show.

Outside the coil the field is zero. A rectangle lying wholly outside encloses no current, so its two long sides, parallel to the axis, must cancel: the field along the axis is the same at every distance outside. Far from the coil it must die away, so it is zero everywhere outside. That is the below the coil.

Now follow the rectangle of Figure 2 round. Its inner side, of length , runs along the axis inside the coil, in the direction of , and contributes . Its outer side lies where and contributes nothing. Its two short sides cross the axial field at right angles inside the coil and lie in zero field outside, so they add nothing either. The left side of Ampère's law is just .

On the right side, is threaded by turns, where is the number of turns per metre, and each carries . So , and gives

Nothing in this depends on how far the inner side is from the axis, so the field is the same everywhere inside: uniform. It depends on the turns per metre and the current, not on the radius of the coil.

The B(r) graph and circles of equal flux

At the Advanced level the animation plots the field of the 20 A wire, against from 1 to 6 cm. This section reads that graph and shows why Ampère's law fixes its shape.

The curve is the hyperbola , or 400 µT·cm. It passes through 400 µT at 1 cm, the marked 200 µT at 2 cm, 100 µT at 4 cm and 67 µT at 6 cm. On log–log axes it would be a straight line of slope −1, against −2 for a point charge and −3 for a distant magnet.

The constant product is exactly what Ampère's law demands. Take a loop that encloses no current: out along a radius from 2 to 4 cm, round the 4 cm circle through an angle , in along another radius, and back round the 2 cm circle. On the radial parts is at right angles to the path, so they contribute nothing. The outer arc runs with the field and gives ; the inner arc runs against it and gives . The two cancel, as they must with no current inside. A field falling faster or slower than would fail this test.

The flux through a strip in a plane through the wire, one metre long and reaching from to , is the sum of across it:

It depends only on the ratio , so every doubling of adds the same . Field lines drawn at equal steps of flux are therefore circles of radius 1, 2, 4 and 8 cm, spreading out as the field weakens; the two dashed circles of the animation are neighbours in such a set.

The Biot–Savart law: a loop seen from its axis

Ampère's law gives only when symmetry keeps the field constant along some loop. Round a single circular coil no such loop exists, so we need a law that works for a circuit of any shape. The Biot–Savart law builds the field from short pieces of current:

Here is a short element of wire pointing along the current, is its distance from the field point and is the unit vector from the element towards that point. Each element adds a contribution that falls as and points at right angles to both the current and the line of sight.

Figure 3
Figure 3. A circular loop of radius and a point on its axis at height . The element gives at right angles to the line . Notice that the grey element opposite cancels the sideways part, leaving . Not to scale.
Legend
Current in the loop, anticlockwise as seen from above.
Radius of the loop.
Height of above the centre of the loop, along the axis.
Point on the axis where the field is found.
Distance from the element to , equal to .
Unit vector from the element towards .
Short element of the loop, on the right where the current runs into the page; drawn as up in this tilted view.
Field of that element at , at right angles to and to .
Axial part of ; the axial parts of all elements point up and add.

Figure 3 applies the law to a circular loop of radius carrying , at a point on its axis a height above the centre. Look first at the element on the right-hand side of the ring. There the current runs into the page; in this tilted view, into the page is drawn as up.

Two facts make this element easy. Its distance from is , by Pythagoras on the triangle with sides and . And , which runs along the ring, is at right angles to the line , so the cross product has its full size: . Its direction is at right angles to both and : up and away from the axis, as the arrow shows.

Now look at the grey element on the opposite side of the ring. Its current runs the other way, so its field is the mirror image: up and away from the axis on its own side. The sideways parts of the two cancel. Pairing every element with its opposite, all the sideways parts cancel, and only the axial parts survive, all pointing up.

How big is ? The arrow is at right angles to the line , so the small triangle formed by and is similar to the large triangle with sides , and . Hence .

Every element is at the same distance and gives the same ratio , and the element lengths add up to the circumference . The sum is therefore just a product:

Two limits check the result. At the centre, , so and every element is side-on, and . For 20 A in a loop of radius 2 cm that is 628 µT, times the 200 µT of a straight wire at the same 2 cm.

Far along the axis, for , the bracket becomes and : the field falls as . At 20 cm the same loop gives only 0.62 µT, where a straight wire still gives 20 µT. A small loop is a magnetic dipole, with the same far field as a bar magnet. Every real circuit, return wires included, is a closed loop, so far enough away its field also falls as the cube of the distance.

Finite wires and short solenoids

The same sum handles straight pieces of wire and coils of finite length, and shows how good the ideal formulas are.

A straight segment of length , seen from a point at perpendicular distance opposite its midpoint, gives

The first factor is the infinite-wire value; the second, always less than 1, is the correction for the missing ends. For a 1 m wire seen from 4 cm it is 0.9968, so the field falls only 0.3 % short.

For a solenoid six radii long, like the animation's, adding up the fields of its turns gives 95 % of at the centre and 49 % at the ends, where the computed field lines fan out. The ideal is the limit of a very long coil.

Worked problem: a coaxial return path

A coaxial cable sends a current out along a central rod and brings it back along a tube round it. It is a good test of Ampère's law, because the enclosed current changes from one circle to the next.

Let the animation's 20 A flow out of the screen along a copper rod of radius and back into it through a thin tube of radius round the rod. What do the compasses at 2 cm and 4 cm feel, and what is the field 0.5 cm from the axis?

Figure 4
Figure 4. A coaxial cable in cross-section (left) and against for the same circles (right). The rod carries out of the page and the tube brings it back. Notice that circles 1 and 2 give the same , and circle 3 gives none. Not to scale.
Legend
Current in the rod, out of the page; the tube carries the same current back.
Radius of the rod.
Radius of the tube.
Size of the field on a circle of radius round the axis.
Distance from the axis.

The left half of Figure 4 is the cross-section. The dot at the centre is the current coming out of the page along the rod of radius ; the crosses are its return into the page along the tube of radius . The dashed circles 1, 2 and 3 are Ampère loops at 0.5 cm, 2 cm and 4 cm. The drawing squeezes the radii to make room for the labels, so it is not to scale.

The cable looks the same after turning about its axis or sliding along it, just like the straight wire, so the field again circles the axis with a size that depends only on . On each circle, Ampère's law gives , or with . The only work is finding .

Circle 1, inside the rod, encloses , a quarter, of the rod's area and so a quarter of its current. Circle 2 encloses all of the rod's current and none of the tube's. Circle 3 encloses both, and they cancel:


The right half of Figure 4 plots against for the whole cable. The field climbs in a straight line to a peak of 400 µT at , follows the animation's hyperbola out to , then drops to zero. Circles 1 and 2 sit at the same height: 200 µT inside the rod at 0.5 cm, and 200 µT outside it at 2 cm.

So the inner compasses, at 2 cm, notice nothing new: the tube's current lies outside their circle, and a uniform tube makes no field inside itself. The outer compasses, at 4 cm, feel only Earth's horizontal field of about 20 µT and point north as if the current were off.

If 5 A leaked to earth elsewhere, so that only 15 A came back through the tube, circle 3 would enclose 5 A. The outer compasses would then feel from the cable, more than Earth's field. A residual-current device uses exactly this: a ring round both conductors senses only their net current, the of Ampère's law, and cuts off the circuit when it is not zero.

One field seen from two frames

Magnetism is not a separate force. This section shows that the magnetic force of a wire is an electric force seen from another frame.

Let the wire be copper with a cross-section of 2.5 mm². Its mobile electrons carry about per metre of wire, balanced exactly by the positive ions, so the wire is neutral. To carry 20 A the electrons drift at only .

Now let a charge move alongside the wire, parallel to the electrons and at their speed . In the lab it feels a magnetic force, because it moves through the field . In its own frame it is at rest, and a magnetic field exerts no force on a charge at rest. The force cannot vanish by a change of viewpoint, so in that frame it must be electric.

It is. In the charge's frame the ions move, so their spacing is length-contracted and they are more crowded than in the lab. The electrons are now at rest, at their own natural spacing, which is wider than the contracted spacing seen in the lab, so they are less crowded. The wire is no longer neutral.

The two densities differ by a fraction : a net charge of less than one electron per metre of wire. Yet at 2 cm this tiny charge makes an electric field of , the same as the of a charge moving at through 200 µT. Electric and magnetic fields are two aspects of one field, mixed by a change of frame, with as the rate of exchange.

The right-hand rule is only a convention. appears both in the field law and in the force , so a left-hand rule used in both would reverse and change no prediction.

Permanent magnets obey the same equations. Their currents are inside atoms, above all the spins of electrons, lined up across whole domains in iron.

Limits of validity

These are the laws of steady currents. When currents change, Maxwell's term joins in the curl law. It mends the charging capacitor of Figure 1, and it makes changes of the field spread at .

The static formulas still hold at distances much smaller than the wavelength. At 50 Hz the wavelength is 6000 km, so household wiring is magnetostatic; at 100 MHz it is 3 m, and a wire radiates.

The laws also assume empty space or air, whose permeability differs from by less than one part per million. The strongest steady laboratory fields are about 45 T, and magnetars, a kind of neutron star, reach about .

The magnetism of matter is quantum at heart. Classical physics predicts no magnetisation at all for charges in thermal equilibrium, and the alignment of spins in iron is a quantum effect.

Where this leads

Magnetic Force on Moving Charges adds the force , the attraction between parallel currents and the circular orbits of charged particles. Electromagnetic Induction shows that a changing drives an electric field round a loop, the counterpart of Ampère's law, and Motors, Generators and Transformers uses coils and iron cores. With Maxwell's term, the two curl laws give the waves of Electromagnetic Waves, and the change of frame above is developed in Special Relativity.

Key formulas

Field of a long straight wire

The field lines of a straight current are circles round the wire, with the same field all along each circle. Ampère's law on such a circle gives , so the field is proportional to the current and falls as , more slowly than the of a point charge. Its direction follows the right-hand grip rule.

Symbols
magnetic field at distance
magnetic constant
current in the wire
distance from the axis of the wire

When it holds: For a steady current in a straight wire much longer than , outside the wire and with no iron nearby. Inside a wire of radius with uniform current, instead; a 1 m wire seen from 4 cm gives 0.3 % less than the formula.

Example: The animation's 20 A: at 2 cm and 100 µT at 4 cm.

Magnetic constant

sets how strong a field a given current makes, in SI units. Until 2019 its value was exact by definition, because the ampere was defined through the force between two parallel wires; now the ampere is fixed through the charge of the electron and is measured, but it still equals to better than one part in a billion. Together with the electric constant it fixes the speed of light, .

Symbols
magnetic constant (permeability of free space)

When it holds: The value for vacuum, and for air to within one part in a million. Inside a magnetic material such as iron the field is multiplied by the relative permeability of the material, which is not a constant.

Example: , so for the animation's 20 A the product is at every distance.

Field inside a long solenoid

Inside a long coil the fields of all the turns add up to a uniform field along the axis, while outside they nearly cancel. Ampère's law round a rectangle with one side inside gives : only the turns per metre and the current matter, not the radius. Seen from outside, the end round which the current flows anticlockwise is the north pole.

Symbols
magnetic field inside the solenoid
magnetic constant
number of turns per metre
current in the winding
total number of turns
length of the solenoid

When it holds: For a solenoid much longer than its radius, well inside it and away from the ends, where the field drops to about half; without an iron core, which multiplies the field until the iron saturates near 2 T.

Example: 1000 turns on 25 cm carrying 2 A: and .

Field at the centre of a circular loop

Every element of the loop is at the same distance from the centre and at right angles to the line joining them, so the Biot–Savart contributions all point the same way, along the axis, and add up to . That is times the field of a straight wire at the same distance. A flat coil of turns gives times as much.

Symbols
magnetic field at the centre of the loop
magnetic constant
current in the loop
radius of the loop

When it holds: Only at the centre. On the axis, at a distance , the field is , which far away falls as , like the field of a small magnet.

Example: 20 A in a loop of radius 2 cm: , times the 200 µT that the straight wire gives at 2 cm.

Ampère's law

Go round any closed loop and add up the component of along the path times each step: this total, the circulation, equals times the current threading the loop. Currents outside the loop change on it but add nothing to the circulation. With your fingers along the loop, a current along your right thumb counts as positive. The law follows from by Stokes' theorem.

Symbols
magnetic field at each point of the loop
short step along the loop
magnetic constant
net current through the loop

When it holds: True for any loop when the currents are steady, but it gives the field only when symmetry keeps the field constant along the loop (wire, solenoid, coaxial cable, ring-shaped coil). When fields change, a term proportional to the rate of change of the electric flux through the loop must be added to the current.

Example: Round the animation's wire at 2 cm: , which is times 20 A.

Biot–Savart law

Each short piece of a circuit contributes a field that falls as the inverse square of the distance, as in Coulomb's law, but points at right angles to both the current and the line from the piece to the field point. Because of the cross product the contribution is largest side-on and zero straight ahead along the wire. Adding the pieces of the whole circuit gives its field, whatever its shape.

Symbols
field contributed by one element
magnetic constant
current in the circuit
short piece of wire, pointing along the current
unit vector from the element to the field point
distance from the element to the field point

When it holds: For steady currents, summed round complete circuits. For rapidly changing currents the delay of the field, which travels at , must be included.

Example: For a loop of radius every piece is side-on at the distance , and the sum is ; for a long straight wire the sum is .

Glossary

Magnetic field
The property of the space round magnets and currents that turns compass needles and pushes on moving charges. It has a direction, the way the north end of a compass points, and a size, the flux density in tesla.
Magnetic field line
A line drawn so that a compass placed on it points along it. Field lines crowd together where the field is strong, never cross, and close on themselves: round a straight wire they are circles.
Magnetic pole
An end of a magnet where field lines leave (north pole) or enter (south pole). Like poles repel and unlike poles attract; poles always come in pairs, and a magnet cut in two becomes two smaller magnets.
Earth's magnetic field
The field of the planet, made by currents in its liquid iron outer core: 25–65 µT at the surface. Its horizontal part, about 20 µT in mid-latitudes, sets compasses north; the magnetic pole under the Arctic is a south pole.
Ørsted's experiment
The discovery, in 1820, that a compass needle beside a wire turns when a current flows: the first link found between electricity and magnetism. The needle turns across the wire, not towards it.
Right-hand grip rule
Grip the wire with your right hand, thumb along the conventional current: your fingers curl the way the field lines go. For a coil, curl your fingers along the current in the turns and your thumb points to the north end.
Solenoid
A long coil of wire wound on a tube. Inside, its field is nearly uniform, , whatever the radius; outside, the field is weak and has the pattern of a bar magnet's.
Electromagnet
A coil with a soft-iron core. The coil's field lines up the iron's atomic magnets, which multiply the field many times, and switching off the current lets the load go.
Magnetic domain
A region of a ferromagnet such as iron in which the atomic magnets all point the same way. An applied field grows the domains aligned with it; once all are aligned, near 2 T, the iron is saturated.
Ampère's law
The circulation of round any closed loop equals times the current through the loop. With enough symmetry it gives the field of a wire, , or of a solenoid in one line.
Biot–Savart law
The field of a short piece of current: at right angles to the current and to the line of sight, and falling as . Adding the pieces gives the field of any circuit, such as at the centre of a loop.
Magnetic monopole
A hypothetical isolated north or south pole, a magnetic charge. None has ever been found, which is what expresses: field lines have no beginning and no end.
Quantities
Magnetic field (flux density)The strength of the magnetic field at a point. Earth's horizontal field is about 20 µT; the animation's wire gives 200 µT at 2 cm.
Magnetic constantSets how strong a field a current makes in SI units: , so that .
CurrentThe charge passing per second. Its conventional direction, the way positive charge would flow, sets the direction of the field.
Distance from the wireMeasured at right angles from the axis of the wire; the field falls as . In the Biot–Savart law is instead the distance from a current element to the field point, along the unit vector .
Radius of the loopThe radius of a circular current loop, which is also the distance of every part of it from the centre.
Number of turnsHow many times the wire is wound round a coil or solenoid.
Length of the solenoidThe length over which the turns are wound; the formula for inside needs it to be much larger than the radius.
Turns per unit length: 1000 turns over 25 cm give .
Enclosed currentThe net current through any surface bounded by an Ampère loop, counted positive along the right thumb when the fingers follow the loop.
Line elementA short directed step along an Ampère loop, or a short piece of wire pointing along the current in the Biot–Savart law.

Quiz

  1. Beginner A compass sits next to a wire. What happens to its needle when a current is switched on in the wire?

    1. Nothing: only magnets can move a compass needle
    2. It turns, because the current makes a magnetic field around the wire
    3. It spins round and round for as long as the current flows
    4. It swings round to point straight at the wire
    Show answer

    Answer: B. It turns, because the current makes a magnetic field around the wire

    An electric current produces a magnetic field, as Ørsted discovered in 1820. The needle turns to line up with that field, along a circle around the wire, and then stays still.

  2. Beginner A straight wire carrying a current passes upright through a card, and iron filings are sprinkled on the card. What pattern do they form?

    1. Straight lines pointing away from the wire
    2. Parallel lines running north–south
    3. Circles centred on the wire
    4. No pattern, because a wire is not a magnet
    Show answer

    Answer: C. Circles centred on the wire

    The field lines of a straight current are circles around the wire, and the filings line up along them.

  3. Beginner Two bar magnets are pushed together with their north poles facing each other. What do you feel?

    1. They push each other apart
    2. They pull together
    3. Nothing, unless one of them is made of iron
    4. They pull together at first, then push apart
    Show answer

    Answer: A. They push each other apart

    Like poles repel and unlike poles attract, so two north poles push each other apart.

  4. Intermediate A long straight wire carries 10 A. What is the magnetic field 5 cm from it? (μ₀ = 4π × 10⁻⁷ T·m/A)

    1. 2.0 × 10⁻⁵ T
    2. 4.0 × 10⁻⁷ T
    3. 1.3 × 10⁻⁴ T
    4. 4.0 × 10⁻⁵ T
    Show answer

    Answer: D. 4.0 × 10⁻⁵ T

    B = μ₀·I/(2π·r) = 2 × 10⁻⁷ × 10 / 0.05 = 4.0 × 10⁻⁵ T, or 40 µT. Leaving r in centimetres gives 4.0 × 10⁻⁷ T, and using the loop formula μ₀·I/(2r) by mistake gives 1.3 × 10⁻⁴ T.

  5. Intermediate The field 3 cm from a long straight wire is 120 µT. What is it 6 cm from the wire?

    1. 240 µT
    2. 120 µT
    3. 60 µT
    4. 30 µT
    Show answer

    Answer: C. 60 µT

    B is inversely proportional to r: doubling the distance halves the field, giving 60 µT. 30 µT would follow from an inverse-square law, which describes a point charge, not a long wire.

  6. Intermediate A current flows straight up a vertical wire. Seen from above, which way do the magnetic field lines go round the wire?

    1. Anticlockwise
    2. Clockwise
    3. Radially outwards, away from the wire
    4. Straight up, along the current
    Show answer

    Answer: A. Anticlockwise

    Right-hand grip rule: with your thumb pointing up along the current, your fingers curl anticlockwise when seen from above.

  7. Advanced A long straight wire and a circular loop of radius R carry the same current I. How does the field at the centre of the loop compare with the wire's field at distance R?

    1. They are equal
    2. The loop's field is π times larger
    3. The loop's field is twice as large
    4. The loop's field is π times smaller
    Show answer

    Answer: B. The loop's field is π times larger

    At the centre of the loop B = μ₀·I/(2R), while the wire gives μ₀·I/(2πR) at distance R: a ratio of π. Every element of the loop is at distance R and perpendicular to the line joining it to the centre, so all their contributions add up in the same direction.

  8. Advanced A long straight wire of radius a carries a current I spread uniformly over its cross-section. How does B vary with the distance r from the axis inside the wire (r < a)?

    1. B = 0 everywhere inside the wire
    2. B = μ₀·I/(2π·r), as outside, so it is largest on the axis
    3. B grows in proportion to r, reaching μ₀·I/(2π·a) at the surface
    4. B is the same everywhere inside, equal to μ₀·I/(2π·a)
    Show answer

    Answer: C. B grows in proportion to r, reaching μ₀·I/(2π·a) at the surface

    A circle of radius r < a encloses the current I·r²/a², so Ampère's law gives B·2πr = μ₀·I·r²/a² and B = μ₀·I·r/(2πa²): zero on the axis, rising linearly to the surface value.