Moving Charges and Magnetism

For two thousand years electricity and magnetism looked like separate subjects — amber rubbed with fur, and lodestones that pointed north. Then, in the summer of 1820, Hans Christian Oersted noticed something a compass needle should never do near a plain currentless wire: it swung sideways the instant current began flowing through the wire beside it. A moving charge, it turned out, creates a magnetic field, and a magnetic field, in turn, pushes back on any moving charge or current that crosses it. That two-way conversation between motion, charge, and magnetic field is the entire subject of this chapter. We start with the Lorentz force, the single expression F⃗=q(E⃗+v⃗×B⃗)\vec F = q(\vec E + \vec v \times \vec B) that tells you exactly how a magnetic field pushes a moving charge — always sideways, never speeding it up or slowing it down, only steering it into circles and helices, the working principle of the cyclotron and every electron beam ever bent by a magnet. We then flip the question and ask how currents build fields in the first place: the Biot-Savart law constructs the field of any current distribution element by element, and its cousin Ampere's circuital law turns that into fast, symmetry-driven shortcuts for a straight wire and a solenoid. Along the way we meet the force between two parallel wires — the relation used to define the ampere itself. Finally we assemble a current loop into a magnetic dipole, discover the torque a field exerts on it, and use that torque to build the moving-coil galvanometer, the instrument hiding inside every analogue ammeter and voltmeter. By the end of this chapter you should be able to compute the field of a wire, loop, or solenoid from first principles, predict the trajectory of a charged particle in a magnetic field, and explain how a galvanometer becomes an ammeter or a voltmeter with nothing more than one extra resistor placed in the right spot.

Key takeaways
  • The Lorentz force on a charge is F⃗=q(E⃗+v⃗×B⃗)\vec F = q(\vec E + \vec v \times \vec B); the magnetic part qv⃗×B⃗q\vec v \times \vec B is always perpendicular to v⃗\vec v, so it does zero work and only changes the direction of motion, never the speed.
  • A current-carrying conductor in an external field feels F⃗=Il⃗×B⃗\vec F = I \vec l \times \vec B; for an arbitrary shape this becomes a sum (integral) over current elements, F⃗=∑I dl⃗×B⃗\vec F = \sum I\, d\vec l \times \vec B.
  • A charge moving perpendicular to a uniform BB travels in a circle of radius r=mv/qBr = mv/qB; the cyclotron angular frequency ω=qB/m\omega = qB/m is independent of speed — the operating principle of the cyclotron. A velocity component along BB turns the circle into a helix of pitch p=v∥Tp = v_{\parallel} T.
  • The Biot-Savart law, dB⃗=(μ0/4π) I dl⃗×r^/r2d\vec B = (\mu_0/4\pi)\, I\, d\vec l \times \hat r / r^2, gives the field of any current element; it plays the same foundational role for magnetism that Coulomb's law plays for electrostatics.
  • Integrating Biot-Savart over a circular loop of radius RR gives the axial field B=μ0IR2/2(x2+R2)3/2B = \mu_0 I R^2 / 2(x^2+R^2)^{3/2}, which reduces to B=μ0I/2RB = \mu_0 I / 2R at the centre.
  • Ampere's circuital law, ∮B⃗⋅dl⃗=μ0Ie\oint \vec B \cdot d\vec l = \mu_0 I_e, turns symmetry into shortcuts: B=μ0I/2πrB = \mu_0 I/2\pi r outside a long straight wire, and B=μ0nIB = \mu_0 n I inside a long solenoid, where nn is the number of turns per unit length.
  • Two long parallel wires carrying currents IaI_a and IbI_b a distance dd apart attract if the currents are parallel and repel if antiparallel, with force per unit length f=μ0IaIb/2πdf = \mu_0 I_a I_b / 2\pi d — the relation used to define the ampere itself.
  • A planar current loop of area AA and NN turns carries a magnetic moment m=NIAm = NIA and feels a torque τ⃗=m⃗×B⃗\vec\tau = \vec m \times \vec B in a uniform field but zero net force; the torque vanishes when mm is parallel or antiparallel to BB (stable and unstable equilibrium respectively).
  • The moving coil galvanometer balances this torque against a spring, kϕ=NIABk\phi = NIAB; a small shunt resistance in parallel converts it into an ammeter, and a large resistance in series converts it into a voltmeter.
  • Key idea: a moving charge or current feels a sideways force from a magnetic field (Lorentz force qv×B, and torque m×B on a loop), while currents themselves generate magnetic fields through the Biot-Savart law, whose symmetry-driven shortcut, Ampere's circuital law, gives the fields of a straight wire, a loop and a solenoid, plus the force between parallel currents that defines the ampere.
The core insight

A moving charge or current feels the sideways Lorentz force qv⃗×B⃗q\vec v \times \vec B (and a current loop feels the torque m⃗×B⃗\vec m \times \vec B), while currents themselves generate magnetic fields through the Biot-Savart law, whose symmetry shortcut, Ampere's circuital law, delivers the fields of a straight wire, a solenoid and the force between parallel currents that defines the ampere.

What this chapter covers

The chapter has a clean two-way structure. The first half asks: given a magnetic field, what force does it exert? We meet the Lorentz force on a moving charge, extend it to a current-carrying wire, and use it to find the circular and helical trajectories a charged particle traces in a uniform field — the physics underneath the cyclotron. The second half flips the question: given a current, what field does it create? The Biot-Savart law is the fundamental tool, used first to build the field on the axis of a circular loop, and then replaced, wherever symmetry allows, by the faster Ampere's circuital law, which delivers the fields of a long straight wire and a long solenoid almost by inspection. The two halves are stitched together twice more. Applying the force law to the field one wire produces at a second wire gives the force between parallel currents — important enough to define the SI ampere. Applying the torque version of the force law to a current loop turns it into a magnetic dipole with moment m=NIAm = NIA; that same torque, balanced against a spring, is harnessed inside the moving coil galvanometer, the instrument this chapter ends with.

The core ideas

The Lorentz force: how a magnetic field pushes a moving charge

Recall that a static charge QQ sets up an electric field E⃗\vec E, and a second charge qq placed in that field feels a force F⃗=qE⃗\vec F = q\vec E. Moving charges and currents do something extra: they also set up a magnetic field B⃗(r⃗)\vec B(\vec r), a vector field obeying the same principle of superposition as E⃗\vec E. A point charge qq moving with velocity v⃗\vec v through a region containing both fields feels the combined force first written down by Hendrik Lorentz.

F⃗=q[E⃗(r⃗)+v⃗×B⃗(r⃗)]≡F⃗electric+F⃗magnetic.(1)\vec F = q\left[\vec E(\vec r) + \vec v \times \vec B(\vec r)\right] \equiv \vec F_{\text{electric}} + \vec F_{\text{magnetic}}. \qquad (1)

where: qq is the charge, E⃗\vec E and B⃗\vec B are the fields at the charge's location, and v⃗\vec v is its velocity. The magnetic term is a vector (cross) product of velocity and field, so it vanishes whenever v⃗\vec v and B⃗\vec B are parallel or antiparallel, and it is always perpendicular to both — a genuinely sideways force. Because it is perpendicular to velocity at every instant, it can never do work: only the direction of motion changes, never the speed — the single most important fact in this chapter, and what makes possible clean circular and helical trajectories. The magnitude of the magnetic part is F=qvBsin⁡θF = qvB\sin\theta; setting q=v=B=1q=v=B=1 defines the SI unit of BB, the tesla (T). A smaller non-SI unit is the gauss, 1 G=10−4 T1\ \text{G} = 10^{-4}\ \text{T}; Earth's field is only about 3.6×10−5 T3.6\times10^{-5}\ \text{T}.

Force on a current-carrying conductor

A steady current is simply a stream of moving charges, so the same Lorentz force, summed over every mobile carrier in a wire, produces a net sideways force on the wire itself. For a straight segment of length ll carrying current II in an external field B⃗\vec B (not the field the wire itself produces), the result collapses into a strikingly simple form.

F⃗=I l⃗×B⃗.(2)\vec F = I\, \vec l \times \vec B. \qquad (2)

where: l⃗\vec l is a vector of magnitude ll along the direction of conventional current flow, and B⃗\vec B is the external field at the wire; current II itself is a scalar, only l⃗\vec l carries the direction. For a non-straight conductor, the same reasoning applies element by element: each segment dl⃗jd\vec l_j contributes I dl⃗j×B⃗I\, d\vec l_j \times \vec B, and summing these over the wire gives the total force on any shape.

Figure
A diagram showing a positive charge moving to the right with velocity v in a magnetic field B pointing upward, with the resulting force F pointing out of the page found by the right hand rule, alongside a second panel showing a negative charge deflected in the opposite sense
The Lorentz force is perpendicular to both v and B positive charge, q greater than 0 q v B F out of page • negative charge, q less than 0 -q v B F into page (opposite sense) F = qv × B: the force flips sign when the charge flips sign the two charges deflect in opposite directions for identical v and B

Circular and helical motion; the cyclotron principle

Because the magnetic force never does work, a charge moving perpendicular to a uniform B⃗\vec B keeps a constant speed while the force continuously bends its path — exactly the condition for uniform circular motion, with the magnetic force supplying the centripetal force. A velocity component parallel to B⃗\vec B is completely unaffected (since v⃗∥×B⃗=0\vec v_\parallel \times \vec B = 0), so the particle drifts steadily along the field while still circling perpendicular to it: the combined path is a helix.

r=mvqB,ω=qBm,νc=qB2πm.(3)r = \frac{mv}{qB}, \qquad \omega = \frac{qB}{m}, \qquad \nu_c = \frac{qB}{2\pi m}. \qquad (3)

where: rr is the radius of the circular part of the path, mm and qq the particle's mass and charge, vv its speed, ω\omega the angular frequency of revolution, and νc\nu_c the cyclotron frequency. Neither ω\omega nor νc\nu_c depends on vv or rr — a faster particle sweeps a proportionally larger circle in exactly the same time. This independence is the working principle of the cyclotron: a fixed-frequency alternating voltage keeps re-accelerating the particle every half-turn without retuning, until its speed becomes a significant fraction of cc and relativistic mass increase breaks the synchrony. With a velocity component v∥v_\parallel along B⃗\vec B, the pitch of the helix is p=v∥T=2πmv∥/qBp = v_\parallel T = 2\pi m v_\parallel / qB, with T=2π/ωT = 2\pi/\omega.

The Biot-Savart law

Just as a static charge is the source of an electric field, a current element is the source of a magnetic field, a rule established experimentally by Jean-Baptiste Biot and Félix Savart. An infinitesimal current-carrying element I dl⃗I\, d\vec l produces a field dB⃗d\vec B at a point located by the displacement vector r⃗\vec r from the element.

dB⃗=μ04π I dl⃗×r^r2.(4)d\vec B = \frac{\mu_0}{4\pi}\, \frac{I\, d\vec l \times \hat r}{r^2}. \qquad (4)

where: μ0\mu_0 is the permeability of free space, with μ0/4π=10−7 T ⋅ m/A\mu_0/4\pi = 10^{-7}\ \text{T}\,\cdot\,\text{m/A} exactly (so μ0=4π×10−7 T ⋅ m/A\mu_0 = 4\pi \times 10^{-7}\ \text{T}\,\cdot\,\text{m/A}), I dl⃗I\, d\vec l is the current element — a vector source, unlike the scalar charge that sources E⃗\vec E — and r^\hat r is the unit vector to the field point. The magnitude is dB=(μ0/4π) I dlsin⁡θ/r2dB = (\mu_0/4\pi)\, I\, dl\sin\theta / r^2, with θ\theta the angle between dl⃗d\vec l and r⃗\vec r; the direction is perpendicular to the plane containing them, found with the right-hand screw rule. Both this law and Coulomb's law fall off as inverse-square and obey superposition, but the electric field points along the source-to-point line while the magnetic field is always perpendicular to it, and vanishes exactly along the direction of dl⃗d\vec l itself (since sin⁡θ=0\sin\theta = 0 there).

Magnetic field on the axis of a circular current loop

The most important single application of the Biot-Savart law in this chapter is the field along the axis of a circular current loop — used repeatedly, from defining the magnetic moment to designing a solenoid. The full integration is carried out in the first derivation below; the result is stated here first because everything else in this section builds on it.

B=μ0IR22(x2+R2)3/2.(5)B = \frac{\mu_0 I R^2}{2\left(x^2 + R^2\right)^{3/2}}. \qquad (5)

where: II is the loop current, RR its radius, and xx the distance along the axis from the centre to the field point. Setting x=0x=0 gives the centre field B0=μ0I/2RB_0 = \mu_0 I/2R, directed along the axis by the right-hand thumb rule (curl the fingers along the current, thumb gives B⃗\vec B); for NN tightly wound turns, B0=μ0NI/2RB_0 = \mu_0 N I/2R. For x≫Rx \gg R the R2R^2 term is negligible and B≈μ0IR2/2x3=μ0m/2πx3B \approx \mu_0 I R^2/2x^3 = \mu_0 m/2\pi x^3 with m=IπR2m = I\pi R^2 — the falloff of an electric dipole field along its axis, which is why a current loop is called a magnetic dipole.

Figure
A circular current loop lying in the y z plane with its centre at the origin, the x axis as its symmetry axis, a field point P on the axis at distance x, and the field element dB from a current element resolved into an axial component dBx that survives and a perpendicular component that cancels with the diametrically opposite element
Field on the axis of a circular loop — perpendicular components cancel circular loop, radius R, current I x-axis dl (top) dl (opposite) P x r dB dBx (survives) dB-perp (cancels) Only the axial components dBx add up; the sideways parts from opposite elements cancel in pairs. Summing dBx over the whole loop gives B = mu0 I R squared over 2(x squared + R squared) to the power 3 over 2.

Ampere's circuital law and the field of a long straight wire

The Biot-Savart law is exact but often algebraically heavy. Whenever a current distribution has enough symmetry, Ampere's circuital law gives the same physics in one line — it is to the Biot-Savart law what Gauss's law is to Coulomb's law. Consider any closed loop (an "Amperian loop") and add up the tangential component of B⃗\vec B multiplied by each small length element, all the way around it.

∮B⃗⋅dl⃗=μ0Ienc.(6)\oint \vec B \cdot d\vec l = \mu_0 I_{\text{enc}}. \qquad (6)

where: IencI_{\text{enc}} is the total steady current through any surface bounded by the loop, sign fixed by the right-hand rule. When symmetry lets B⃗\vec B be tangential with constant magnitude (or normal, or zero) along the loop, this collapses to BL=μ0IeBL = \mu_0 I_e. Applying it to a circular loop of radius rr centred on a long straight wire gives B(2πr)=μ0IB(2\pi r) = \mu_0 I, so

B=μ0I2πr.(7)B = \frac{\mu_0 I}{2\pi r}. \qquad (7)

where: rr is the perpendicular distance from the wire. This field has cylindrical symmetry — constant magnitude on any circle centred on the wire, with closed concentric field lines, direction by the right-hand rule — matching Oersted's original compass-needle observation exactly. Unlike a point charge's field, it stays finite everywhere off the wire, since an infinite wire is a line source, not a point source. For a thick wire of radius aa carrying current uniformly across its cross-section, the same law gives B=μ0I/2πrB = \mu_0 I/2\pi r outside (r>ar>a), but inside only the enclosed fraction of current counts, Ie=I(r/a)2I_e = I(r/a)^2, giving B=μ0Ir/2πa2B = \mu_0 I r/2\pi a^2 for r<ar<a — the field rises linearly from zero at the centre, peaks at the surface, then falls as 1/r1/r outside.

The solenoid

A long solenoid — a helix of tightly wound turns whose length far exceeds its radius — is the most useful practical source of a uniform magnetic field, and Ampere's law makes finding it almost effortless (full steps in the third derivation below).

B=μ0nI.(8)B = \mu_0 n I. \qquad (8)

where: nn is the number of turns per unit length, not the total turns NN (if the solenoid has length LL, then n=N/Ln = N/L), and II is the winding current. The field is uniform, strong, and axial everywhere inside an ideal long solenoid, and essentially zero outside — the magnetic analogue of the uniform field between parallel capacitor plates. Wrapping the solenoid into a circle produces a toroid, whose field stays confined entirely inside the windings by the same argument.

Force between two parallel currents and the definition of the ampere

Since a current-carrying wire produces a field, and a field exerts a force on a current-carrying wire, two parallel wires must exert forces on each other. Wire aa, carrying IaI_a, produces Ba=μ0Ia/2πdB_a = \mu_0 I_a/2\pi d at wire bb, a distance dd away carrying IbI_b; the force per unit length on bb follows from Eq. (2).

f=FbaL=μ0IaIb2πd.(9)f = \frac{F_{ba}}{L} = \frac{\mu_0 I_a I_b}{2\pi d}. \qquad (9)

where: dd is the wire separation and LL the length over which the force is measured. By Newton's third law, Fba=−FabF_{ba} = -F_{ab}. The striking part is direction: currents in the same direction attract, opposite directions repel — the reverse of the rule for electric charges. This force is important enough to define a base SI unit: one ampere was the steady current which, maintained in each of two infinite parallel conductors of negligible cross-section one metre apart in vacuum, produces exactly 2×10−7 N2\times10^{-7}\ \text{N} of force per metre of length. The coulomb is then the charge delivered by one ampere flowing for one second.

Torque on a current loop and magnetic dipole moment

A current loop in a uniform external field feels no net force (forces on opposite sides cancel), but it does feel a torque, exactly as an electric dipole feels a torque in a uniform electric field. The full derivation, for a rectangular loop whose normal makes angle θ\theta with B⃗\vec B, is carried out below.

τ⃗=m⃗×B⃗,m=NIA.(10)\vec \tau = \vec m \times \vec B, \qquad m = NIA. \qquad (10)

where: AA is the loop's area, NN the number of turns, and the direction of m⃗\vec m, the magnetic moment, is set by the right-hand thumb rule on the current direction. The torque magnitude τ=mBsin⁡θ\tau = mB\sin\theta is maximum when the loop's plane is parallel to B⃗\vec B (θ=90°\theta = 90°) and zero when m⃗\vec m is parallel or antiparallel to B⃗\vec B. The parallel case (θ=0\theta=0) is stable equilibrium; the antiparallel case (θ=180°\theta=180°) is unstable. This is why a compass needle, or any current loop free to turn, aligns its moment with an external field.

The moving coil galvanometer

The torque of Eq. (10) is harnessed directly to build the moving coil galvanometer, the instrument used to detect and measure small currents, and the core of every analogue ammeter and voltmeter. A coil of NN turns and area AA is suspended in a carefully shaped radial field (using a soft iron core), so B⃗\vec B stays in the plane of the coil and sin⁡θ=1\sin\theta = 1 at every deflection angle. The magnetic torque NIABNIAB is opposed by a spring's restoring torque kϕk\phi, giving equilibrium when

kϕ=NIAB⇒ϕ=(NABk)I.(11)k\phi = NIAB \quad \Rightarrow \quad \phi = \left(\frac{NAB}{k}\right) I. \qquad (11)

where: ϕ\phi is the steady angular deflection, and kk the torsional constant of the spring. The bracketed quantity defines the current sensitivity, ϕ/I=NAB/k\phi/I = NAB/k. A bare galvanometer cannot serve directly as an ammeter (too sensitive, saturating at microampere currents; its own resistance distorts the circuit) or a voltmeter (it would draw too much current). Two fixes solve both: a small shunt resistance rsr_s in parallel diverts most current around the coil, giving an ammeter of resistance ≈rs\approx r_s (when RG≫rsR_G \gg r_s); a large resistance RR in series limits current drawn, giving a voltmeter of resistance ≈R\approx R (when R≫RGR \gg R_G). Note a subtlety: doubling NN doubles current sensitivity, but since coil resistance also scales roughly with NN, the voltage sensitivity ϕ/V=(NAB/k)(1/R)\phi/V = (NAB/k)(1/R) can stay unchanged — raising current sensitivity does not automatically raise voltage sensitivity.

Derivation AThe radius, angular frequency and pitch of a charged particle's path in a uniform magnetic field

The goal of this derivation is to find how a charged particle moves when it enters a region of uniform magnetic field B⃗\vec B, starting from nothing more than the magnitude of the magnetic force and Newton's second law for circular motion, and to show why the resulting frequency of revolution does not depend on the particle's speed — the fact that makes the cyclotron work. We treat the case of velocity purely perpendicular to B⃗\vec B first, then add a parallel component to get the general helical path.

Step 1. Take a charge qq of mass mm moving with speed vv perpendicular to a uniform field B⃗\vec B. The magnetic force has constant magnitude F=qvBF = qvB and is always perpendicular to v⃗\vec v, so it never changes the speed — only the direction. A force of constant magnitude, always perpendicular to velocity, is exactly the condition for uniform circular motion, with this force acting as the centripetal force.

Step 2. Equate the magnetic force to the centripetal force for a circle of radius rr: qvB=mv2/rqvB = mv^2/r, giving r=mv/(qB)r = mv/(qB). A more energetic particle needs a larger circle to keep the same centripetal acceleration from a fixed field; a stronger field or larger charge tightens the circle.

Step 3. Convert to a frequency using v=ωrv = \omega r: substituting r=mv/(qB)r = mv/(qB) gives ω=v/r=qB/m\omega = v/r = qB/m, which no longer contains vv or rr — every particle of the same q/mq/m revolves at the same angular frequency regardless of speed. So νc=ω/2π=qB/2πm\nu_c = \omega/2\pi = qB/2\pi m and T=2π/ω=2πm/(qB)T = 2\pi/\omega = 2\pi m/(qB).

Step 4. Add a velocity component along B⃗\vec B. Since v⃗∥×B⃗=0\vec v_\parallel \times \vec B = 0, this component feels no force and stays constant, so the particle drifts along the field while circling perpendicular to it: a helix, with pitch p=v∥T=2πmv∥/(qB)p = v_\parallel T = 2\pi m v_\parallel /(qB). This speed-independent frequency is what the cyclotron exploits: a fixed-frequency alternating voltage keeps re-accelerating the particle every half-revolution as it spirals outward, up to a maximum radius Rmax⁡R_{\max} set by the machine, delivering maximum kinetic energy 12mvmax⁡2=q2B2Rmax⁡2/(2m)\tfrac{1}{2}mv_{\max}^2 = q^2B^2R_{\max}^2/(2m).

Go deeper · Derivation B · 1 minMagnetic field on the axis of a circular current loop, from the Biot-Savart law
Derivation BMagnetic field on the axis of a circular current loop, from the Biot-Savart law

The goal of this derivation is to integrate the Biot-Savart law over an entire circular current loop to obtain the field at any point on its axis, using a symmetry argument to discard the messy perpendicular components before doing any integration — the standard trick that turns a vector integral into a single scalar one. The result, Eq. (5), is used throughout the rest of the chapter, from the centre-of-loop field to the solenoid.

Step 1. Set up the geometry. Place a circular loop of radius RR, current II, centred at the origin, with field point PP a distance xx along the axis. For any element dl⃗d\vec l on the loop, the displacement r⃗\vec r to PP has magnitude r=x2+R2r=\sqrt{x^2+R^2}, and since dl⃗⊥r⃗d\vec l \perp \vec r for this geometry, the Biot-Savart magnitude simplifies to dB=(μ0/4π) I dl/(x2+R2)dB = (\mu_0/4\pi)\, I\, dl/(x^2+R^2), no angle factor needed.

Step 2. Resolve dB⃗d\vec B into an axial component dBxdB_x and a perpendicular component dB⊥dB_\perp. The element diametrically opposite, by symmetry, gives the same dBxdB_x but a dB⊥dB_\perp pointing in the exact opposite sideways direction. Summed over the whole loop, all perpendicular components cancel in pairs; only the axial components survive.

Step 3. Integrate the surviving axial component. Geometry gives cos⁡θ=R/x2+R2\cos\theta = R/\sqrt{x^2+R^2}, so dBx=dBcos⁡θ=μ0IR dl4π(x2+R2)3/2dB_x = dB\cos\theta = \dfrac{\mu_0 I R\, dl}{4\pi (x^2+R^2)^{3/2}}. Every factor except dldl is constant around the loop, so integrating replaces ∑dl\sum dl with the circumference 2πR2\pi R.

Step 4. Assemble: Bx=μ0IR4π(x2+R2)3/2×2πR=μ0IR22(x2+R2)3/2B_x = \dfrac{\mu_0 I R}{4\pi (x^2+R^2)^{3/2}} \times 2\pi R = \dfrac{\mu_0 I R^2}{2(x^2+R^2)^{3/2}}, exactly Eq. (5). Setting x=0x=0 recovers B0=μ0I/(2R)B_0 = \mu_0 I/(2R); letting x≫Rx \gg R recovers the far-axis dipole falloff B≈μ0IR2/(2x3)=μ0m/(2πx3)B \approx \mu_0 I R^2/(2x^3) = \mu_0 m/(2\pi x^3), with m=IπR2m = I\pi R^2.

Go deeper · Derivation C · 1 minThe magnetic field inside a long solenoid, from Ampere's circuital law
Derivation CThe magnetic field inside a long solenoid, from Ampere's circuital law

The goal of this derivation is to obtain the uniform interior field of a long solenoid, B=μ0nIB = \mu_0 n I, using Ampere's circuital law on a cleverly chosen rectangular loop rather than by directly integrating the Biot-Savart law over every turn — the entire point of Ampere's law is to make a hard integral unnecessary whenever geometry provides enough symmetry, and the solenoid is the standard example of this.

Step 1. Choose the Amperian loop. Take a long solenoid of nn turns per unit length carrying current II, idealised so the field outside is essentially zero and the field inside is uniform and purely axial. Draw a rectangular loop abcdabcd: side abab, length hh, runs parallel to the axis deep inside the solenoid; side cdcd runs parallel to it outside; the transverse sides bcbc, adad connect them, crossing the winding.

Step 2. Evaluate each side's contribution to ∮B⃗⋅dl⃗\oint \vec B \cdot d\vec l. Along cdcd, outside, B≈0B \approx 0. Along the transverse sides, the interior field is purely axial (perpendicular to these sides), so B⃗⋅dl⃗=0\vec B \cdot d\vec l = 0 there too. Only side abab contributes: ∮B⃗⋅dl⃗=Bh\oint \vec B \cdot d\vec l = Bh.

Step 3. Count the enclosed current. The loop encloses every turn passing through the strip of length hh; with nn turns per unit length, that is nhnh turns each carrying II, so Ienc=I(nh)I_{\text{enc}} = I(nh).

Step 4. Apply Ampere's law and solve: Bh=μ0I(nh)Bh = \mu_0 I(nh); the length hh cancels, leaving B=μ0nIB = \mu_0 n I — Eq. (8), independent of exactly where inside the solenoid it is evaluated, confirming the interior field is uniform. Direction is axial, by the right-hand thumb rule on any single turn.

Go deeper · Derivation D · 1 minTorque on a rectangular current loop in a uniform magnetic field
Derivation DTorque on a rectangular current loop in a uniform magnetic field

The goal of this derivation is to show, from the plain definition of force F⃗=Il⃗×B⃗\vec F = I\vec l \times \vec B applied side by side to a rectangular current loop, that the loop experiences zero net force but a nonzero torque τ=IABsin⁡θ\tau = IAB\sin\theta in a uniform external field — and that this torque can be written compactly as τ⃗=m⃗×B⃗\vec\tau = \vec m \times \vec B once the magnetic moment m⃗=IAn^\vec m = IA\hat n is defined, exactly mirroring the electric dipole in a uniform electric field.

Step 1. Set up a rectangular loop ABCDABCD with sides AB=CD=bAB=CD=b and BC=DA=aBC=DA=a, carrying current II, in a uniform field B⃗\vec B such that the loop's normal makes angle θ\theta with B⃗\vec B (θ=90°\theta=90° is the special case where the field lies in the plane of the loop). The two pairs of opposite sides play different roles.

Step 2. Sides BCBC and DADA run along the axis joining the midpoints of ABAB and CDCD; the forces on them are equal, opposite, and collinear along that axis, so they produce neither net force nor net torque, for any θ\theta.

Step 3. Sides ABAB and CDCD, each of length bb, feel forces of equal magnitude F1=F2=IbBF_1 = F_2 = IbB, equal and opposite but not collinear — separated by a perpendicular distance asin⁡θa\sin\theta that shrinks as the loop tilts (full length aa at θ=90°\theta=90°, vanishing as θ→0\theta \to 0).

Step 4. A pair of equal, opposite, non-collinear forces separated by asin⁡θa\sin\theta forms a couple τ=F1(asin⁡θ)=IbB asin⁡θ=I(ab)Bsin⁡θ=IABsin⁡θ\tau = F_1 (a\sin\theta) = IbB\, a\sin\theta = I(ab)B\sin\theta = IAB\sin\theta, with A=abA=ab. Since this torque rotates the moment vector m⃗=IAn^\vec m = IA\hat n toward alignment with B⃗\vec B, and ∣m⃗×B⃗∣=mBsin⁡θ|\vec m \times \vec B| = mB\sin\theta matches exactly, the result is the compact τ⃗=m⃗×B⃗\vec\tau = \vec m \times \vec B. For NN turns, m⃗=NIA⃗\vec m = NI\vec A and the same formula holds.

Worked examples

Board level - Force on a current-carrying wire suspended in a magnetic field

A straight wire of mass 200 g200\ \text{g} and length 1.5 m1.5\ \text{m} carries a current of 2 A2\ \text{A}. It is suspended in mid-air by a uniform horizontal magnetic field perpendicular to the wire. What is the magnitude of the magnetic field needed? (NCERT Example 4.1)

Step 1. For the wire to hang in mid-air, the upward magnetic force F=IlBF=IlB from Eq. (2) must balance gravity: mg=IlBmg = IlB, so B=mg/(Il)B = mg/(Il).

Step 2. Substitute, converting mass to kilograms: m=0.200 kgm=0.200\ \text{kg}, g=9.8 m/s2g=9.8\ \text{m/s}^2, I=2 AI=2\ \text{A}, l=1.5 ml=1.5\ \text{m}: B=(0.200×9.8)/(2×1.5)=1.96/3.0B = (0.200\times9.8)/(2\times1.5) = 1.96/3.0. Answer: B≈0.65 TB \approx 0.65\ \text{T}, horizontal and perpendicular to the wire; Earth's field (≈4×10−5 T\approx 4\times10^{-5}\ \text{T}) is far too weak to matter and is ignored.

Competitive level (JEE / NEET) - Radius, frequency and energy of an electron in a magnetic field

An electron (mass 9×10−31 kg9\times10^{-31}\ \text{kg}, charge 1.6×10−19 C1.6\times10^{-19}\ \text{C}) moves at speed 3×107 m/s3\times10^{7}\ \text{m/s} perpendicular to a magnetic field of 6×10−4 T6\times10^{-4}\ \text{T}. Find the radius of its circular path, its frequency of revolution, and its kinetic energy in keV. (NCERT Example 4.3)

Step 1. Radius from Eq. (3): r=mv/(qB)=(9×10−31×3×107)/(1.6×10−19×6×10−4)≈0.28 m=28 cmr = mv/(qB) = (9\times10^{-31}\times3\times10^{7})/(1.6\times10^{-19}\times6\times10^{-4}) \approx 0.28\ \text{m} = 28\ \text{cm}.

Step 2. Frequency: ν=v/(2πr)≈1.7×107 Hz=17 MHz\nu = v/(2\pi r) \approx 1.7\times10^{7}\ \text{Hz} = 17\ \text{MHz} — the same value the speed-independent formula νc=qB/2πm\nu_c = qB/2\pi m gives directly, a useful cross-check.

Step 3. Kinetic energy: E=12mv2=12(9×10−31)(9×1014)=4.05×10−16 JE = \tfrac{1}{2}mv^2 = \tfrac{1}{2}(9\times10^{-31})(9\times10^{14}) = 4.05\times10^{-16}\ \text{J}. Using 1 eV=1.6×10−19 J1\ \text{eV}=1.6\times10^{-19}\ \text{J}: E≈2530 eV≈2.5 keVE \approx 2530\ \text{eV} \approx 2.5\ \text{keV}. Answer: r≈28 cmr \approx 28\ \text{cm}, ν≈17 MHz\nu \approx 17\ \text{MHz}, E≈2.5 keVE \approx 2.5\ \text{keV}. Timing note: under two minutes. Get rr first, then ν\nu directly from qB/2πmqB/2\pi m (safer than re-using a rounded rr), and EE straight from 12mv2\tfrac12 mv^2 without ever needing rr or BB — many students waste time routing the energy calculation through the radius.

Board level - Magnetic field inside a long current-carrying solenoid

A solenoid of length 0.5 m0.5\ \text{m} has a radius of 1 cm1\ \text{cm} and is made up of 500500 turns. It carries a current of 5 A5\ \text{A}. What is the magnitude of the magnetic field inside the solenoid, well away from its ends? (NCERT Example 4.8)

Step 1. Check the long-solenoid condition: l/a=0.5/0.01=50≫1l/a = 0.5/0.01 = 50 \gg 1, so B=μ0nIB=\mu_0 n I applies. Turns per unit length: n=N/l=500/0.5=1000 turns/mn = N/l = 500/0.5 = 1000\ \text{turns/m}.

Step 2. Substitute into Eq. (8): B=μ0nI=(4π×10−7)(1000)(5)=20π×10−4B = \mu_0 n I = (4\pi\times10^{-7})(1000)(5) = 20\pi\times10^{-4}. Answer: B≈6.28×10−3 TB \approx 6.28\times10^{-3}\ \text{T}, directed along the solenoid's axis.

Competitive level (JEE / NEET) - Torque and angular speed of a rotating current loop in a magnetic field

A 100100-turn closely wound circular coil of radius 10 cm10\ \text{cm}, carrying a current of 3.2 A3.2\ \text{A}, is placed in a vertical plane free to rotate about a horizontal diameter. A uniform magnetic field of 2 T2\ \text{T} exists horizontally; initially the coil's axis is along the field. The coil rotates through 90°90° under the field's influence. Find the torque in the initial and final positions, and the angular speed acquired after the 90°90° rotation, given the coil's moment of inertia is 0.1 kg ⋅ m20.1\ \text{kg}\,\cdot\,\text{m}^2. (NCERT Example 4.10, parts c and d)

Step 1. Find the magnetic moment first: m=NIA=NIπr2=100×3.2×π×(0.1)2≈10 A ⋅ m2m = NIA = NI\pi r^2 = 100\times3.2\times\pi\times(0.1)^2 \approx 10\ \text{A}\,\cdot\,\text{m}^2.

Step 2. Torque at each position, τ=mBsin⁡θ\tau = mB\sin\theta from Eq. (10). Initially θ=0\theta=0 so τi=0\tau_i=0; after rotating 90°90°, τf=mB=10×2=20 N ⋅ m\tau_f = mB = 10\times2 = 20\ \text{N}\,\cdot\,\text{m}.

Step 3. Since τ\tau varies with θ\theta, a single value cannot be used in τ=Iα\tau = I\alpha — use energy instead. Newton's second law Idωdt=mBsin⁡θI\dfrac{d\omega}{dt} = mB\sin\theta becomes, via dωdt=ωdωdθ\dfrac{d\omega}{dt}=\omega\dfrac{d\omega}{d\theta}, Iω dω=mBsin⁡θ dθI\omega\,d\omega = mB\sin\theta\,d\theta. Integrating from θ=0\theta=0 (ω=0\omega=0) to θ=π/2\theta=\pi/2: Iω2/2=mBI\omega^2/2 = mB, so ω=2mB/I\omega=\sqrt{2mB/I}.

Step 4. Substitute: ω=2×10×2/0.1=400=20 rad/s\omega = \sqrt{2\times10\times2/0.1} = \sqrt{400} = 20\ \text{rad/s}. Answer: τi=0\tau_i=0, τf=20 N ⋅ m\tau_f=20\ \text{N}\,\cdot\,\text{m}, ω=20 rad/s\omega=20\ \text{rad/s}. Timing note: three to four minutes. The trap is using τ=Iα\tau=I\alpha with a single constant-torque value; since τ=mBsin⁡θ\tau = mB\sin\theta changes with angle, only the energy-integral route (equivalent to ∫τ dθ=12Iω2\int\tau\,d\theta = \tfrac12 I\omega^2) gives the correct final speed.

Common traps

  • Applying F⃗=Il⃗×B⃗\vec F = I\vec l \times \vec B with B⃗\vec B set to the field the wire itself produces, instead of the external field acting on it — a wire cannot exert a net force on itself.
  • Mixing up the two right-hand rules: the straight-wire grasp rule (thumb along current, fingers curl along B⃗\vec B) versus the loop-axis curl rule (fingers curl along current, thumb gives B⃗\vec B) — using the wrong one is a common sign error.
  • Forgetting that the magnetic force does zero work: a charged particle's speed cannot change in a purely magnetic field, only its direction.
  • Writing B=μ0NI/LB = \mu_0 N I/L as if total turns NN belongs in the solenoid formula — it is B=μ0nIB=\mu_0 n I with nn already turns per unit length; compute n=N/Ln=N/L first, do not divide by LL a second time.
  • Forgetting that same-direction currents attract and opposite-direction currents repel — the reverse of the rule for electric charges.
  • Confusing the angle in τ=mBsin⁡θ\tau = mB\sin\theta: it is between the magnetic moment (loop's normal) and B⃗\vec B, not between the loop's plane and B⃗\vec B — using the wrong one swaps sin⁡θ\sin\theta for cos⁡θ\cos\theta.
  • Mixing up shunt resistance (small, parallel, makes an ammeter) with series resistance (large, series, makes a voltmeter).
  • Sloppy switching between μ0/4π=10−7\mu_0/4\pi = 10^{-7} (element form) and μ0=4π×10−7\mu_0 = 4\pi\times10^{-7} (Ampere's law), and between tesla and gauss (1 G=10−4 T1\ \text{G}=10^{-4}\ \text{T}).

You should be able to…

  • State the Lorentz force law and explain why its magnetic part does no work on a moving charge.
  • Compute the force on a current-carrying wire in an external field, and identify when it is maximum or zero.
  • Derive and apply r=mv/qBr = mv/qB and νc=qB/2πm\nu_c = qB/2\pi m, and explain why νc\nu_c is independent of speed.
  • State the Biot-Savart law and use it to find the field of a circular loop on its axis, including the centre and far-axis limits.
  • State Ampere's circuital law and apply it to derive the fields of a straight wire (inside and outside a thick conductor) and a long solenoid.
  • Explain why parallel currents attract and antiparallel currents repel, and state how this defines the ampere.
  • Define the magnetic moment of a current loop, derive τ=mBsin⁡θ\tau = mB\sin\theta, and identify its stable and unstable equilibria.
  • Explain a moving coil galvanometer, and how a shunt converts it to an ammeter and a series resistance to a voltmeter.
  • Distinguish current sensitivity from voltage sensitivity and explain why raising one need not raise the other.

Ask the tutor: if any step above — the axial-field integral, the solenoid derivation, or the rotating-loop energy integral — still feels shaky, ask the tutor to walk through it with your own numbers.

Why exactly does the magnetic force do no work on a moving charge?

Work is force times displacement along the direction of the force, and the magnetic part of the Lorentz force, qv⃗×B⃗q\vec v \times \vec B, is defined by a cross product that is always perpendicular to v⃗\vec v. Since the particle's instantaneous displacement is along v⃗\vec v, the work done in any instant, dW=F⃗⋅v⃗ dtdW = \vec F \cdot \vec v\, dt, is exactly zero at every moment, not just on average. This is why a charged particle's speed and kinetic energy stay constant in a purely magnetic field even while its direction changes continuously — the field can steer but never throttle.

There seem to be two different right hand rules in this chapter. How do I know which one to use?

They answer different questions. The straight-wire rule finds the field a current produces around itself: grasp the wire, thumb along the current, curled fingers show the field's direction. The loop-axis rule finds the field of a loop: curl the fingers around the loop in the sense of the current, and the extended thumb gives B⃗\vec B along the axis. Separately, the force rule (F⃗=qv⃗×B⃗\vec F = q\vec v \times \vec B) is a genuine cross product: align the fingers along the first vector, curl toward the second, thumb gives the result. Ask first whether you want a field from a current, or a force from a field, and the right tool follows.

Why is the solenoid formula B equals mu0 n I and not mu0 N I?

Because nn and NN measure different things: NN is the total turns in the whole solenoid, while n=N/Ln = N/L is turns per unit length. The Ampere's-law derivation naturally produces nn, because the Amperian loop only ever encloses the turns within its own chosen length hh — not the whole solenoid — and that count, nhnh, is exactly what cancels the hh on the left side of the law, leaving a formula that depends only on the local winding density and the current. If a question gives total turns and total length, always compute n=N/Ln = N/L first.

How does the definition of the ampere actually use the force between two wires?

Current was historically hard to measure directly, but the mechanical force between two current-carrying wires can be measured precisely with a balance. The 1946 definition exploited exactly this: one ampere is the current which, flowing through each of two infinite parallel wires one metre apart in vacuum, produces a force of exactly 2×10−7 N2\times10^{-7}\ \text{N} per metre of length. Plugging Ia=Ib=1 AI_a=I_b=1\ \text{A}, d=1 md=1\ \text{m} into f=μ0IaIb/(2πd)f = \mu_0 I_a I_b/(2\pi d) and requiring f=2×10−7 N/mf = 2\times10^{-7}\ \text{N/m} is exactly how the historical value μ0=4π×10−7 T ⋅ m/A\mu_0 = 4\pi\times10^{-7}\ \text{T}\,\cdot\,\text{m/A} was fixed. (Since 2019 the ampere is redefined via the elementary charge, but this force picture is still the clearest way to see what the unit means.)

Why does a moving coil galvanometer need a radial field and a soft iron core specifically?

The torque formula τ=NIABsin⁡θ\tau = NIAB\sin\theta only becomes the simple linear relation ϕ∝I\phi \propto I in Eq. (11) if sin⁡θ\sin\theta stays fixed (ideally 11) throughout the rotation — otherwise the scale would be badly non-linear. Curving the pole pieces around a central soft iron cylinder makes the field lines run radially outward at the coil at every rotation angle, keeping B⃗\vec B perpendicular to the coil's plane so sin⁡θ=1\sin\theta = 1 regardless of θ\theta. The core does double duty: it shapes this radial pattern and, being highly permeable, concentrates the field lines, increasing BB at the coil and hence the current sensitivity NAB/kNAB/k.

Before this

Where this leads