Unit 7
Sources of Magnetic Field
Unit 6 took the magnetic field \(\mathbf{B}\) as given and asked what it does to moving charges. This unit asks where \(\mathbf{B}\) comes from — and the answer is short: moving charge, that is, current. Every coil, motor, relay, loudspeaker, transformer and MRI scanner is a carefully shaped current whose job is to make a particular field. You will learn two tools for computing that field: the Biot–Savart law, which adds up the contribution of every little piece of wire (always works, often tedious), and Ampère's law, which gets the answer in one line when the geometry is symmetric. The lab lets you drag current elements around and watch the field build up piece by piece.
1 · Currents make magnetic fields
In 1820 Hans Christian Ørsted noticed that a compass needle swings when a nearby wire carries current. That one observation joins electricity and magnetism: a stationary charge makes only an electric field, but a moving charge also makes a magnetic field. A current is a huge number of moving charges, so it makes a field you can measure with a compass.
The constant \(\mu_0\) (“mu-nought”) is the permeability of free space, the magnetic partner of \(\varepsilon_0\):
One more fact that shapes everything below: magnetic field lines never start or end. There is no magnetic “charge” (no isolated north pole has ever been found), so field lines always close on themselves. Around a straight wire they are circles; through a coil they run up the middle and loop back around the outside. In Gauss's-law language, the magnetic flux through any closed surface is zero: \(\oint\mathbf{B}\cdot d\mathbf{A} = 0\).
Every trace on a circuit board carries current, so every trace makes a magnetic field — and every loop of trace can pick one up. This is the root of electromagnetic interference (EMI). The rule you will hear from every board designer, “keep the current loop area small: route the return path right under the signal,” comes straight out of this unit and the next.
2 · The Biot–Savart law
A wire is a chain of tiny moving-charge pieces. Chop it into short current elements \(I\,d\boldsymbol{\ell}\): \(d\boldsymbol{\ell}\) is a tiny vector along the wire, pointing the way the current flows, and \(I\) is the current. Replacing \(q\mathbf{v}\) by \(I\,d\boldsymbol{\ell}\) (they have the same units, C·m/s = A·m) gives the field of one element. Add up all the elements and you have the field of the whole wire.
- Draw the wire, the field point P, and one generic element \(d\boldsymbol{\ell}\) at a general position (call its coordinate \(y\), or its angle \(\phi\)).
- Write \(\mathbf{r}\) (element → P), its length \(r\), and \(\sin\theta\) in terms of that coordinate.
- Find the direction of \(d\boldsymbol{\ell}\times\hat{\mathbf{r}}\). If all elements give the same direction, just integrate magnitudes. If not, use symmetry to cancel components first, then integrate the survivor.
- Integrate over the wire. Check the limits and that the units come out in tesla.
The right-hand grip rule
For a quick direction check you rarely need the full cross product. Grab the wire with your right hand, thumb along the current: your fingers curl the way the field circles the wire. For a loop the same rule flips roles: curl your fingers along the current, and your thumb points along the field through the middle of the loop (the loop's “north” side).
Using the left hand (it happens when the right one is holding the pen!) reverses every answer. And keep the two versions straight: for a straight wire, thumb = current, fingers = field; for a loop or coil, fingers = current, thumb = field. Both are the same physics — the cross product \(d\boldsymbol{\ell}\times\hat{\mathbf{r}}\) — seen from different angles.
3 · Field of a straight wire
Put a straight wire along the \(y\)-axis, carrying current \(I\) in the \(+y\) direction from \(y = y_1\) to \(y = y_2\). The field point P sits on the \(x\)-axis at perpendicular distance \(a\) from the wire. An element at height \(y\) is a distance \(r = \sqrt{y^2 + a^2}\) from P, and \(\sin\theta = a/r\). Every element gives a \(d\mathbf{B}\) in the same direction (into the page, as in the figure above), so:
Three special cases cover nearly every problem:
| Wire | Angles | Field at distance \(a\) |
|---|---|---|
| Infinitely long | \(\beta_1 = -90^\circ,\ \beta_2 = +90^\circ\) | \(B = \dfrac{\mu_0 I}{2\pi a}\) |
| Semi-infinite, P opposite its end | \(\beta_1 = 0,\ \beta_2 = 90^\circ\) | \(B = \dfrac{\mu_0 I}{4\pi a}\) — exactly half |
| Length \(L\), P opposite its midpoint | \(\sin\beta_2 = -\sin\beta_1 = \dfrac{L/2}{\sqrt{(L/2)^2 + a^2}}\) | \(B = \dfrac{\mu_0 I}{4\pi a}\cdot\dfrac{L}{\sqrt{(L/2)^2 + a^2}}\) |
Students used to electric fields draw \(\mathbf{B}\) radially out from the wire. It is never radial. At a point due east of a wire carrying current toward you, the field points north (up the page), as in the figure. When two wires are involved, find each wire's field direction at the point separately, then add them as vectors.
A clamp-on ammeter measures current without breaking the circuit: its jaws are a magnetic core that collects the circling field of the wire inside and a sensor (a Hall sensor from Unit 6, or a coil for AC) reads it. Section 6 explains why it does not matter where in the jaws the wire sits.
4 · Loops and arcs
Bend the wire into a circle of radius \(R\) and ask for the field on the axis, a distance \(z\) from the centre. Every element is perpendicular to its \(\mathbf{r}\) (\(\sin\theta = 1\)) and at the same distance \(r = \sqrt{R^2 + z^2}\). Each \(d\mathbf{B}\) is tilted; the sideways components cancel in pairs from opposite sides of the loop, and only the axial part survives, a fraction \(\cos\alpha = R/r\) of each. Summing \(d\ell\) around the loop gives \(2\pi R\):
Far from the loop (\(z\gg R\)), \(B_z\approx \dfrac{\mu_0 I R^2}{2z^3} = \dfrac{\mu_0}{2\pi}\dfrac{\mu}{z^3}\), where \(\mu = I\pi R^2\) is the magnetic dipole moment from Unit 6. This is the same \(1/z^3\) law as an electric dipole's axial field \(\dfrac{1}{4\pi\varepsilon_0}\dfrac{2p}{z^3}\): a current loop is a magnetic dipole, whether it is a coil, a bar magnet's atoms, or an electron's orbit.
Helmholtz coils — two identical coaxial coils separated by one radius — exploit this curve: placed so each sits where the other's field is bending over, their sum is very flat in the middle. Labs use them to cancel Earth's field or to calibrate magnetometers. And the \(1/z^3\) fall-off is why near-field wireless links (NFC, RFID tags, phone chargers) only work at a few centimetres.
5 · Force between parallel wires
Now combine Units 6 and 7. Wire 1 makes a field \(B_1 = \mu_0 I_1/(2\pi d)\) at wire 2, a distance \(d\) away. Wire 2 carries current \(I_2\) through that field, so it feels the force \(\mathbf{F} = I_2\mathbf{L}\times\mathbf{B}_1\). Per unit length:
With charges, like repels like. With currents it is the reverse: parallel currents attract. Do not reason by analogy — run the grip rule and \(I\mathbf{L}\times\mathbf{B}\) each time.
From 1948 to 2019 the SI ampere was defined by this force: the current which, in two long parallel wires 1 m apart in vacuum, produces \(2\times10^{-7}\) N per metre of length. Plug in: \(\mu_0(1)(1)/(2\pi\cdot1) = 2\times10^{-7}\) N/m, which is why \(\mu_0\) was exactly \(4\pi\times10^{-7}\). Since 2019 the ampere is defined by fixing the elementary charge \(e = 1.602176634\times10^{-19}\) C, so \(\mu_0\) is now a measured value — equal to \(4\pi\times10^{-7}\) to about one part in \(10^{10}\). For this course, treat it as exact.
In switchgear, busbars carrying thousands of amperes are bolted down hard, because during a short-circuit fault the current can jump tenfold or more and the force grows with \(I^2\) — a hundredfold. Breakers and busbar supports are rated for these electromagnetic forces. In a cable, the supply and return conductors carry opposite currents and push apart.
6 · Ampère's law
Biot–Savart always works but can be a long integral. When the current has enough symmetry there is a shortcut, the magnetic partner of Gauss's law. Instead of a closed surface, it uses a closed path (an “Amperian loop”) and a line integral: walk around the path, and at each small step \(d\boldsymbol{\ell}\) add up the component of \(\mathbf{B}\) along your step.
Check it on the long wire. Take a circle of radius \(r\) around the wire. By symmetry \(B\) has the same size all the way round and points along the path, so \(\mathbf{B}\cdot d\boldsymbol{\ell} = B\,d\ell\) and the integral is \(B\cdot 2\pi r\). Ampère says that equals \(\mu_0 I\), so \(B = \mu_0 I/(2\pi r)\) — the Biot–Savart result in one line.
- Use symmetry to decide the direction of \(\mathbf{B}\) and what it can depend on (e.g. only on \(r\)).
- Choose a path where, on each piece, \(\mathbf{B}\) is either parallel to the path with constant size (contributes \(B\times\text{length}\)) or perpendicular to it / zero (contributes nothing).
- Count the enclosed current, with signs.
- Solve for \(B\).
A thick wire: inside and outside
A long straight conductor of radius \(R\) carries current \(I\) spread uniformly over its cross-section (current density \(J = I/\pi R^2\)). Use circles of radius \(r\):
- \(I_{\text{enc}} = 0\) does not mean \(B = 0\). It means the line integral is zero. Outside a coax cable it happens that \(B\) is zero too, but only because symmetry also forces \(B\) to be the same all the way round.
- The \(\mathbf{B}\) in the integral is the total field from all currents, inside and outside the path. Outside currents just contribute zero to the integral, not zero field.
- Ampère's law is always true (for steady currents) but only useful with symmetry: an infinite line, an infinite plane, a long solenoid, a toroid. For a single loop or a finite wire, go back to Biot–Savart.
A coaxial cable carries current \(I\) out on the centre conductor and \(I\) back on the braid. An Amperian circle outside both encloses \(I - I = 0\), and symmetry then gives \(B = 0\) outside: a coax keeps its magnetic field to itself and neither radiates nor picks up interference much. Twisted pairs use the same idea more cheaply: the two opposite currents sit close together, so their fields nearly cancel a short distance away.
7 · Solenoids and toroids
A solenoid is a wire wound as a long, tight helix. Each turn is a loop; inside, their fields add up along the axis; outside, the contributions from the near and far sides of each turn nearly cancel. For a long solenoid the ideal picture is: uniform field inside, zero outside.
A toroid is a solenoid bent into a doughnut so it has no ends. Its field lines are circles inside the core. Take an Amperian circle of radius \(r\) inside the windings: it threads all \(N\) turns once.
Solenoid: \(n\) is turns per metre (\(N/\ell\)). Toroid: \(N\) is the total number of turns. Writing \(\mu_0 N I\) for a solenoid gives an answer with the wrong units (T·m) — a quick units check catches it.
Solenoid actuators — door locks, valves, relays, the starter solenoid in a car — use this field to pull a soft-iron plunger into the coil. MRI magnets are large superconducting solenoids: to reach 1.5 T, \(nI = B/\mu_0\approx1.2\times10^{6}\) A/m, impossible to sustain in copper without melting it, easy in a superconductor with zero resistance. Toroidal inductors and transformers are popular in power electronics because their field stays inside the core and barely disturbs neighbouring circuits. Unit 8 turns the solenoid's \(B = \mu_0 n I\) into the inductance formula.
8 · Magnetic materials (brief)
Inside matter, electrons behave like tiny current loops (orbital motion and, more importantly, spin), so every atom can be a small magnetic dipole. How those dipoles respond to an applied field sorts materials into three families. We describe the response with the relative permeability \(\mu_r\) (some textbooks write \(K_m\)): fill a solenoid with the material and the field becomes \(B = \mu_r\mu_0 n I = \mu n I\). The magnetic susceptibility is \(\chi_m = \mu_r - 1\).
| Type | \(\chi_m\) | What happens | Examples |
|---|---|---|---|
| Diamagnetic | small, negative (\(\sim -10^{-5}\)) | Applied field induces atomic currents that oppose it; weakly repelled by magnets. | copper, water, bismuth, superconductors (perfect: \(\chi_m = -1\)) |
| Paramagnetic | small, positive (\(10^{-6}\)–\(10^{-3}\)) | Existing atomic dipoles partly line up with the field; weakly attracted. Alignment fights thermal jiggling, so it weakens as temperature rises. | aluminium, oxygen, platinum |
| Ferromagnetic | huge (\(\mu_r\sim10^2\)–\(10^5\)), not constant | Neighbouring dipoles lock together in domains; the field grows the aligned domains. Saturates; shows hysteresis; lost above the Curie temperature (iron: 770 °C). | iron, nickel, cobalt, silicon steel, ferrites, NdFeB |
Ferromagnets have two features that matter to engineers. Saturation: once all domains are aligned, more current adds only the vacuum contribution; iron saturates around 1.5–2 T, ferrites around 0.3–0.5 T. Hysteresis: the magnetisation depends on history, so cycling the field around a loop costs energy every cycle (heat). “Soft” materials (silicon steel, ferrite) have thin hysteresis loops and are used for cores; “hard” materials (NdFeB, ferrite magnets) keep a large remanent field and make permanent magnets.
An inductor's iron or ferrite core multiplies its field (and inductance) by \(\mu_r\) — until it saturates, when the inductance collapses and the current spikes. Choosing a core so it never saturates at peak current is a routine power-supply design step. Hysteresis loss (plus eddy-current loss, Unit 8) is the “core loss” on every transformer data sheet. Permanent NdFeB magnets (remanence about 1.2–1.4 T) are why modern motors, headphones and hard-drive actuators are so small.
9 · Worked examples
1. A wire versus Earth's field
A long straight cable carries a steady \(15\) A. What field does it produce at a compass \(5.0\) cm away, and how does it compare with Earth's \(\approx 50\ \mu\text{T}\)?
Slightly larger than Earth's field — the compass will point badly wrong. This is why compasses are mounted away from wiring in cars and boats, and why DC power cables are run as close-spaced pairs (the return current's field cancels most of it).
2. Centre of a square loop (four finite wires)
A square loop of side \(a = 10\) cm carries \(I = 2.0\) A. Find \(B\) at its centre.
Each side is a finite wire of length \(a\), seen from its perpendicular bisector at distance \(a/2 = 0.050\) m. The ends are at \(\sin\beta = \pm\dfrac{a/2}{\sqrt{(a/2)^2 + (a/2)^2}} = \pm\dfrac{1}{\sqrt2}\).
By the grip rule, all four sides give a field in the same direction at the centre (along the loop's axis), so they add:
Sanity check: a circular loop of radius \(5.0\) cm (which fits inside the square) gives \(\mu_0I/(2R) = 25.1\ \mu\text{T}\). The square's corners are farther away, so slightly less field — consistent.
3. A coil on and off its centre
A flat coil has \(N = 50\) turns of radius \(R = 4.0\) cm and carries \(I = 0.50\) A. Find \(B\) at the centre and on the axis \(z = 3.0\) cm away.
On the axis, \(\sqrt{R^2+z^2} = \sqrt{16+9} = 5.0\) cm, so
Direction: along the axis, by the loop right-hand rule. Writing the axial formula as a ratio to the centre value avoids recomputing all the constants.
4. Forces on a power cable · EE
A supply and return conductor, \(1.0\) cm apart, each carry \(100\) A (in opposite directions). Find the force per metre, and its value during a \(10\) kA short-circuit.
Opposite currents repel. Normal operation: negligible. During the fault, 2 kN on every metre — roughly the weight of 200 kg — for the few milliseconds before the breaker trips. Cable cleats and busbar supports are sized for exactly this.
5. Inside and outside a thick conductor
A long copper rod of radius \(R = 2.0\) mm carries \(10\) A uniformly. Find \(B\) at \(r = 1.0\) mm, \(2.0\) mm and \(4.0\) mm.
Inside, \(B\propto r\): at \(r = 1.0\) mm (half the radius), \(B = 0.50\) mT. Outside, \(B\propto 1/r\): at \(r = 4.0\) mm (twice the radius), \(B = 0.50\) mT.
Scaling arguments like this are faster and less error-prone than plugging numbers into each formula. (For AC at high frequency the current crowds to the surface — the skin effect — and the inside result changes; this example is DC.)
6. A lab solenoid and an MRI magnet · EE
(a) A solenoid \(20\) cm long has \(1000\) turns and carries \(2.0\) A. Find \(B\) inside. (b) An MRI magnet is wound with \(n = 5000\) turns/m of superconducting wire. What current gives 1.5 T?
About 240 A, flowing continuously and for years. In copper wire thin enough to wind 5000 turns per metre, that current would dissipate an enormous power; in a superconductor it dissipates nothing, so once the magnet is “ramped” the supply is disconnected and the current keeps circulating on its own.
Checklist
- I can state the Biot–Savart law, say what each symbol means, and find the direction of \(d\boldsymbol{\ell}\times\hat{\mathbf{r}}\).
- I know \(B = \mu_0 I/(2\pi r)\) for a long wire, that its field lines are circles, and the grip rule for their direction.
- I can use \(B = \frac{\mu_0 I}{4\pi a}(\sin\beta_2 - \sin\beta_1)\) for finite and semi-infinite wires.
- I know \(\mu_0 I/(2R)\) at a loop's centre, \(\mu_0 I\phi/(4\pi R)\) for an arc (radians!), and the on-axis formula.
- I know parallel currents attract with \(F/L = \mu_0 I_1 I_2/(2\pi d)\).
- I can choose an Amperian path and get \(B\) for a thick wire, a coax, a solenoid (\(\mu_0 nI\)) and a toroid (\(\mu_0 NI/2\pi r\)).
- I can tell dia-, para- and ferromagnets apart and explain saturation and hysteresis.