Safeguard
Supply Chain Security•

Lorentz Force Explained: Worked Examples From Motors to Mass Specs

The Lorentz force F = q(E + v × B) pushes every moving charge. Worked examples: a proton in 1 T, a motor coil, neon isotopes and a Hall sensor.

Safeguard Security Team
35 min read

The Lorentz force law says that a particle with charge q, moving with velocity v through an electric field E and a magnetic field B, feels a force F = q(E + v × B). The electric part pushes along the field whether the charge moves or not; the magnetic part acts only on moving charges, always at right angles to both the motion and the field.

That single line explains why a motor turns, why a proton circles in a cyclotron, how a mass spectrometer sorts isotopes and how a Hall sensor measures a field. This post goes one level deeper than our tour of famous equations that changed the world and pairs with Maxwell's equations explained, Coulomb's law explained and Faraday's law of induction explained.

Constants come from NIST's CODATA 2022 tables and isotope masses from NIST's isotopic compositions database. Inputs we chose ourselves are labelled illustrative, and every calculation was run twice, by hand and with the Python script in the walkthrough.

Key takeaways

  • The law: F = q(E + v × B). The magnetic term acts only on a moving charge, with size |q| v B sin θ, where θ is the angle between v and B.
  • Direction: use the right hand rule for a positive charge, then flip it for an electron.
  • No work: the magnetic force is always perpendicular to the velocity, so it changes direction but never speed. Energy in a motor or accelerator comes from the power supply.
  • Circles: a proton at 1.0 × 10⁶ m/s in 1.0 T circles with radius 1.04 cm at 15.2 MHz, and that frequency does not depend on speed, which is why the cyclotron works.
  • Motors: F = I L B gives 0.50 N on a 0.20 m wire carrying 5.0 A in 0.50 T; a 100 turn coil turns forces like that into 2.0 N·m of torque.
  • Isotopes: singly charged neon 20 and neon 22 ions accelerated through 2,000 V land 5.6 mm apart in a 0.50 T field.
  • Sensors: the Hall voltage is microvolts in copper and millivolts in a thin semiconductor, which is why Hall sensors are semiconductors.
  • History: Lorentz made the force a basic equation of his electron theory in 1892 and 1895, after Oliver Heaviside's 1889 result for a moving charge, and shared the 1902 Nobel Prize in Physics with Pieter Zeeman.

What does the Lorentz force law say?

Maxwell's equations tell you what fields a set of charges and currents produces. They do not say what a field does to a charge sitting in it. The Lorentz force law fills that gap. OpenStax University Physics puts it this way: Maxwell's equations and the Lorentz force law together cover all the laws of electricity and magnetism.

F = qE + q v × B has two pieces. qE is the electric force: along E for a positive charge, against it for a negative one, moving or not. For a charge at rest near another charge, it is Coulomb's law. q v × B is the magnetic force: perpendicular to both v and B, zero for a charge at rest and zero for a charge moving along a field line. The two add as vectors, and devices such as velocity selectors and Hall sensors deliberately set them against each other.

In SI units, the BIPM SI Brochure lists the tesla as a derived unit equal to one weber per square metre, kg s⁻² A⁻¹. One tesla is the field in which one coulomb moving at one metre per second at right angles to the field feels one newton: the magnetic term read backwards.

Who formulated the Lorentz force, and when?

Hendrik Antoon Lorentz was born in Arnhem on 18 July 1853, took his doctorate at Leiden in 1875 and was given the new chair of theoretical physics there three years later, according to his Nobel Foundation biography, which says he set himself the task of extending Maxwell's theory. His step was to assume matter contains tiny charged particles, later called electrons, and to ask what force the fields exert on each one. He published "La théorie électromagnétique de Maxwell et son application aux corps mouvants" with E. J. Brill in Leiden in 1892 and the "Versuch einer Theorie der electrischen und optischen Erscheinungen in bewegten Körpern" with the same publisher in 1895; the 1906 reprint on the Internet Archive confirms the 1895 edition on its title page.

Oliver Heaviside got to the magnetic term first. In the Philosophical Magazine of April 1889, reprinted in volume 2 of his Electrical Papers, he derived the mechanical force on a moving charge in an external magnetic field as a vector product, noting that his result was double J. J. Thomson's earlier one. The magnetic term is often credited to Heaviside and the combined law, as the basic force of an electron theory, to Lorentz.

The 1902 Nobel Prize in Physics went to Lorentz and Pieter Zeeman for research into "the influence of magnetism upon radiation phenomena". Zeeman saw spectral lines split in a magnetic field, and Lorentz's theory explained it as the magnetic force on charges oscillating inside atoms. In his Nobel lecture, Lorentz described the world of his theory as built from ordinary matter, electrons and the ether. The ether was later dropped, but the force law survived and holds at any speed once mv is replaced by relativistic momentum.

YearEventSource
1879Edwin Hall reports the Hall effect, American Journal of MathematicsInternet Archive
1889Heaviside derives the magnetic force on a moving chargeElectrical Papers, volume 2
1892, 1895Lorentz's electron theory papers, LeidenInternet Archive scans
1902Nobel Prize in Physics to Lorentz and ZeemanNobelPrize.org
1922Nobel Prize in Chemistry to Aston for isotopes found with his mass spectrographNobelPrize.org
1930Ernest O. Lawrence invents the cyclotronBerkeley Lab
1939Nobel Prize in Physics to Lawrence for the cyclotronNobelPrize.org
TodayThe LHC steers protons with 8.3 T dipolesCERN

How does the Lorentz force complete Maxwell's equations?

Think of electromagnetism as a loop with two halves.

  • Sources to fields. Maxwell's equations take charges and currents and give E and B everywhere. Gauss's law says how charge creates an electric field, Gauss's law for magnetism says there are no magnetic monopoles, Faraday's law says a changing magnetic field creates a circulating electric field, and the Ampère and Maxwell law says currents and changing electric fields create magnetic fields.
  • Fields to motion. The Lorentz force takes E and B at the location of a charge and tells you how it accelerates. Its motion changes the currents, which changes the fields, and the loop closes.

Without the second half, the fields would never move anything; without the first, the force would need fields from nowhere. Every example below is one pass around that loop with the field held fixed: we choose the field from a magnet or coil and ask what it does to the charge.

What do the cross product and the right hand rule mean physically?

The cross product v × B has size v B sin θ and points perpendicular to both vectors. Only the part of the velocity at right angles to the field matters, and the push is always sideways.

OpenStax calls the convention right hand rule 1. For a positive charge:

  1. Point the fingers of your right hand along the velocity v.
  2. Sweep them toward the field B, through the smaller angle between them.
  3. Your thumb points along v × B, the force on a positive charge.

An equivalent flat hand version puts the fingers along B and the thumb along v, with the force coming out of the palm. Pick one version and use it every time. For a negative charge, such as an electron, the force is reversed, because the negative q multiplies the whole vector.

Check with unit vectors. An electron moves along +x through a field along +z. x̂ × ẑ = −ŷ, and the negative charge flips it, so the force is along +ŷ. A proton would be pushed along −ŷ. Writing components out is slower than the hand rule and much harder to get wrong.

Why does the magnetic force do no work?

Power is F · v. The magnetic force is perpendicular to v by construction, so F · v = 0 at every instant. OpenStax states the result: the speed and kinetic energy stay constant; only the direction changes.

That sounds strange, because a motor obviously does work and obviously uses magnets. The energy comes from the power supply. The magnetic force pushes the moving electrons in a wire sideways, they push on the wire's lattice, and the wire moves. As the wire moves, the same field gives the electrons a component of force along the wire, opposing the current. That opposing push is the back voltage from Faraday's law, and the supply does work against it. The field converts electrical work into mechanical work without supplying energy of its own.

Worked example 1: a proton circling in a 1 T field

Question. A proton moves at 1.0 × 10⁶ m/s at right angles to a 1.0 T field. Find its radius, period and frequency.

Constants (CODATA 2022). mₚ = 1.672 621 925 95 × 10⁻²⁷ kg; e = 1.602 176 634 × 10⁻¹⁹ C, exact.

Relativity check. v/c ≈ 0.003 34, so γ differs from 1 by about 6 parts per million. The classical formula is fine.

Radius. The force has constant size and is always perpendicular to the velocity, the condition for uniform circular motion, so the magnetic force supplies the centripetal force: qvB = mv²/r, which gives r = mv/(qB).

r = (1.672 621 925 95 × 10⁻²⁷ × 1.0 × 10⁶) / (1.602 176 634 × 10⁻¹⁹ × 1.0) = 1.672 62 × 10⁻²¹ / 1.602 18 × 10⁻¹⁹ = 1.043 97 × 10⁻² m, so r ≈ 1.04 cm.

Period and frequency. The period is the circumference over the speed, T = 2πr/v = 2πm/(qB), and the speed cancels. T = 2π × 1.672 62 × 10⁻²⁷ / (1.602 18 × 10⁻¹⁹ × 1.0) = 6.559 × 10⁻⁸ s, so T ≈ 65.6 ns and f = 1/T ≈ 15.2 MHz.

Second check. F = qvB = 1.602 × 10⁻¹³ N, so a = F/m = 9.579 × 10¹³ m/s². And v²/r = 10¹² / 0.010 44 = 9.579 × 10¹³ m/s². They match. The proton's kinetic energy, ½mv², is 8.36 × 10⁻¹⁶ J or about 5.2 keV, so a 5 keV proton in 1 T turns in a circle about 2 cm across. Double its speed and the circle doubles, but the lap time stays 65.6 ns.

Why the cyclotron works

Because f = qB/(2πm) contains no speed, a faster proton runs a bigger circle in the same time. Lawrence used that at Berkeley; the lab's history dates the invention to 1930 and recalls his first machine, a "proton merry-go-round" of glass, sealing wax and bronze. An alternating voltage across the gap between two D shaped electrodes, running at the cyclotron frequency, kicks the particle every half turn, and the radius grows while the timing stays fixed. OpenStax notes cyclotrons accelerate protons, deuterons or alpha particles, used in collision experiments that make radioactive isotopes. Near light speed γm grows and the frequency drops, so synchrotrons vary the drive frequency and field instead.

The same formula at the LHC

At high speed, use r = p/(|q|B) with p = γmv. CERN lists 8.3 T main dipoles and a nominal proton energy of 6.8 TeV, and at that energy momentum times c and total energy are practically equal. So p ≈ 6.8 × 10¹² × 1.602 18 × 10⁻¹⁹ / 2.997 92 × 10⁸ = 3.634 × 10⁻¹⁵ kg m/s and r = 3.634 × 10⁻¹⁵ / (1.602 18 × 10⁻¹⁹ × 8.3) ≈ 2,733 m, inside a 27 km ring. The classical r = mv/(qB) with v = c gives 0.377 m, wrong by γ ≈ 7,250.

Worked example 2: the force on a wire and the torque on a motor coil

Add q v × B over every carrier in a wire and you get F = I L × B, magnitude I L B sin θ; OpenStax derives it from I = n e A v_d.

Wire. A 0.20 m wire carrying 5.0 A at right angles to a 0.50 T field (illustrative): F = 5.0 × 0.20 × 0.50 = 0.50 N, about the weight of 51 g. Doubling the current to 10 A doubles the force to 1.0 N. At 30 degrees from the field it is multiplied by sin 30° = 0.5, giving 0.25 N; parallel to the field it is zero. All three follow from the formula and from physical sense. Use conventional current for direction: electrons move the other way with negative charge, and the two flips cancel.

Coil. The two sides of a rectangular loop parallel to the axis carry current in opposite directions and feel equal and opposite forces along different lines, so they make a torque. For N turns of area A, OpenStax gives τ = N I A B sin θ, with θ measured from the coil's normal. N I A is the coil's magnetic dipole moment μ, and in vector form τ = μ × B. Take N = 100, a 0.20 m by 0.10 m coil (A = 0.020 m²), I = 2.0 A and B = 0.50 T (illustrative).

τ_max = 100 × 2.0 × 0.020 × 0.50 = 2.0 N·m; at θ = 30°, τ = 1.0 N·m.

Second check. Each long side feels N I L B = 100 × 2.0 × 0.20 × 0.50 = 20 N at 0.05 m from the axis, and two sides give 2 × 20 × 0.05 = 2.0 N·m.

Power. Held at 2.0 N·m at 1,500 rpm (157.1 rad/s), the output is about 314 W. A single coil with a commutator averages (2/π) × 2.0 ≈ 1.27 N·m, about 200 W, which is why real motors spread the winding over many coils.

Commutators and brushless motors

A lone coil would turn until its normal lines up with B and stop, because there the torque is zero and beyond it the torque reverses. A brushed motor's split ring commutator reverses the coil current every half turn so the torque keeps pushing the same way. A brushless motor puts the magnets on the rotor and switches the stator coils electronically, using rotor position often read by Hall sensors. The spinning coil also generates a back voltage proportional to speed; at full speed with no load it nearly cancels the supply voltage and the current falls. Our Faraday's law post works that through with numbers.

Worked example 3: separating neon isotopes in a mass spectrometer

OpenStax describes the Bainbridge mass spectrometer: ions pass a velocity selector, then bend in a magnetic field with a radius set by mass to charge ratio. Francis William Aston won the 1922 Nobel Prize in Chemistry for finding isotopes with his mass spectrograph, and neon was among the first elements shown to have two.

Question. Singly charged ²⁰Ne and ²²Ne ions start near rest, are accelerated through 2,000 V and enter a 0.50 T field at right angles. After a semicircle, how far apart do they land? (Voltage and field illustrative.)

Data. Relative atomic masses (NIST): 19.992 440 1762 and 21.991 385 114. u = 1.660 539 068 92 × 10⁻²⁷ kg; mₑ = 9.109 383 7139 × 10⁻³¹ kg (CODATA 2022). A positive ion is the atom minus one electron.

Step 1: ion masses.

m₂₀ = 19.992 440 1762 × 1.660 539 068 92 × 10⁻²⁷ − 9.109 × 10⁻³¹ = 3.319 732 × 10⁻²⁶ kg

m₂₂ = 21.991 385 114 × 1.660 539 068 92 × 10⁻²⁷ − 9.109 × 10⁻³¹ = 3.651 664 × 10⁻²⁶ kg

The electron correction is about 27 parts per million of the ion mass.

Step 2: speeds. Energy conservation, qV = ½mv², gives v = √(2qV/m).

v₂₀ = √(2 × 1.602 18 × 10⁻¹⁹ × 2,000 / 3.319 73 × 10⁻²⁶) = 1.389 42 × 10⁵ m/s

v₂₂ = √(2 × 1.602 18 × 10⁻¹⁹ × 2,000 / 3.651 66 × 10⁻²⁶) = 1.324 77 × 10⁵ m/s

Both ions get the same energy, so the heavier one is slower.

Step 3: radii. r = mv/(qB), or combining with step 2, r = (1/B)√(2mV/q).

r₂₀ = 3.319 73 × 10⁻²⁶ × 1.389 42 × 10⁵ / (1.602 18 × 10⁻¹⁹ × 0.50) = 0.057 578 m

r₂₂ = 3.651 66 × 10⁻²⁶ × 1.324 77 × 10⁵ / (1.602 18 × 10⁻¹⁹ × 0.50) = 0.060 388 m

Step 4: landing positions. After a semicircle each ion lands a diameter from the entrance slit: 115.16 mm for neon 20 and 120.78 mm for neon 22.

Separation = 2 × (60.388 − 57.578) mm ≈ 5.62 mm.

Second check. At fixed V and B, r scales with √m, and both r₂₂/r₂₀ and √(m₂₂/m₂₀) equal 1.048 80. A 5.6 mm gap between two lines on a detector is easy to resolve, which is why Aston could see the isotopes clearly.

With a velocity selector. Crossed fields pass only ions with v = E/B_s, because qE balances q v B_s. With E = 4.0 × 10⁴ V/m and B_s = 0.20 T (illustrative), v = 2.0 × 10⁵ m/s; in 0.50 T, neon 20 circles at 82.9 mm and neon 22 at 91.2 mm, landing 16.6 mm apart, because r now scales with m rather than √m.

OpenStax lists fire debris analysis, drug identification, explosives screening and medicine among the uses. Many modern instruments use other analysers, but all sort ions by mass to charge ratio with electric or magnetic forces.

Worked example 4: the Hall voltage in a sensor

In 1879 Edwin Hall reported "a new action of the magnet on electric currents" in the American Journal of Mathematics. Carriers in a current crossing a field are pushed to one edge until the transverse electric field balances the magnetic force, E_H = v_d B. With v_d = I/(n q w t), the voltage is V_H = I B/(n q t), as in OpenStax, where t is the thickness along B. The width cancels. The voltage grows with current and field and falls with carrier density and thickness, and its sign shows whether the carriers are negative electrons or positive holes.

Copper. A strip 0.10 mm thick and 10 mm wide carries 10 A in 1.0 T, with n = 8.5 × 10²⁸ m⁻³ (OpenStax's value). V_H = 10 × 1.0 / (8.5 × 10²⁸ × 1.602 18 × 10⁻¹⁹ × 1.0 × 10⁻⁴) ≈ 7.3 µV. Check: v_d = I/(n e A) = 7.34 × 10⁻⁴ m/s, and v_d B w = 7.34 µV. OpenStax notes the Hall potential in metals is generally very small.

Semiconductor. Take a thin element 1.0 µm thick with an illustrative n = 1.0 × 10²² m⁻³, about 8.5 million times fewer carriers than copper, carrying 1.0 mA in 50 mT, roughly a small magnet a few millimetres away. V_H = 1.0 × 10⁻³ × 0.050 / (1.0 × 10²² × 1.602 18 × 10⁻¹⁹ × 1.0 × 10⁻⁶) = 5.0 × 10⁻⁵ / 1.602 × 10⁻³ ≈ 31 mV. Check by scaling from copper: the current is 10⁴ times smaller, the field 20 times smaller, n 8.5 × 10⁶ times smaller and t 100 times smaller, a net factor of (8.5 × 10⁶ × 100)/(10⁴ × 20) = 4,250, and 7.34 µV × 4,250 = 31.2 mV.

Few carriers, a thin layer and a small current give a readable voltage: that is the design logic of a Hall sensor. A Hall element has no moving parts, never touches the magnet it senses, can share silicon with its amplifier and responds to static fields. Typical uses:

  • Brushless motors. Hall sensors around the stator tell the controller which windings to energise next, in fans, drones, power tools and vehicle motors.
  • Cars. Wheel speed, crankshaft and camshaft position, and battery current sensing commonly use the Hall effect or related magnetic sensing.
  • Phones and laptops. A magnet in a cover or lid and a Hall switch in the body detect when it is closed. Phone compasses use Hall or magnetoresistive field sensors, depending on the design.
  • Current measurement. A Hall sensor in the gap of a ferrite ring around a wire lets clamp meters read DC current without breaking the circuit.

OpenStax adds a laboratory use: a Hall probe in a feedback circuit that keeps a precision electromagnet's field steady.

Table: where the Lorentz force does the work

Device or phenomenonFieldMoving chargeWhat the Lorentz force does
Cathode ray tube (historic)Deflection coilsElectron beamSteers the beam across the screen
CyclotronStatic magnetic field; RF electric field across the gapProtons, deuterons, alpha particlesBends the orbit; the electric term adds energy
LHC8.3 T superconducting dipoles6.8 TeV protonsHolds the beam on a radius of about 2.7 km
Mass spectrometerMagnetic sector, often with a velocity selectorIonsSorts ions by mass to charge ratio
Motors and loudspeakersPermanent magnets or field windingsElectrons in the windingsTurns current into torque or cone motion
Hall sensorThe field being measuredCarriers in a semiconductorBuilds a voltage proportional to B
MRI gradient coilsStatic main fieldSwitched gradient currentsVibrates the coils, the main source of scanner noise
Electrodynamic (EDS) maglevVehicle superconducting magnetsCurrents induced in null flux track coilsLevitates and guides the vehicle
AuroraEarth's field, tens of microteslasElectrons and ions from spaceSpirals particles along field lines toward the poles

NASA explains that the solar wind deposits energy in Earth's magnetic environment, and when it is released, energetic particles rain onto the upper atmosphere. The Lorentz force is why the particles follow field lines. A 1 keV electron moves at 1.88 × 10⁷ m/s, so in a 50 µT field r = mv/(eB) gives a gyration radius of about 2.1 m at 1.4 MHz, and, since the force does no work, slides along the field line in a spiral.

For MRI, NIBIB notes noise up to 120 decibels in some scanners. A 2023 OTO Open study attributes it to Lorentz forces from the static field acting on alternating gradient coil currents, growing with field strength and current; a 2003 Human Brain Mapping review describes the coils and wires buckling and bending and launching compressional waves into the supports. Noise control gets harder as fields and gradient currents rise. For maglev, a 2026 Scientific Reports analysis of EDS systems describes Lorentz forces on currents induced in null flux coils providing both levitation and guidance.

Which formula should you use?

SituationFormulaWatch out for
General caseF = q(E + v × B)Sign of q
Perpendicular to uniform Br = mv/(qB), f = qB/(2πm)Use p = γmv near c
At an angle to BHelix: only v sin θ sets the radiusParallel part continues
WireF = I L B sin θConventional current
Coilτ = N I A B sin θθ from the normal
Velocity selectorv = E/BForces must oppose
Hall effectV_H = I B/(n q t)t is along B
Ion after voltage Vr = (1/B)√(2mV/q)Subtract electron mass

Walkthrough: reproduce every number in Python

You can check every figure in this post with plain Python. The script uses only the standard library and hard codes the CODATA 2022 constants and NIST isotope masses, so nothing needs installing. Scientific libraries also publish constants, but check which CODATA edition yours ships before mixing values. A reproducible calculation should not depend on whatever is installed globally; if you add a library later, pin an exact version and freeze again.

Step 1: create a clean environment

mkdir lorentz-check && cd lorentz-check
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip freeze > requirements.txt

Step 2: write the calculations

# lorentz.py
import math

# CODATA 2022, physics.nist.gov/cuu
e  = 1.602176634e-19      # C, exact
mp = 1.67262192595e-27    # kg
me = 9.1093837139e-31     # kg
u  = 1.66053906892e-27    # kg
c  = 299792458.0          # m/s, exact

# Worked example 1: proton, 1.0e6 m/s, 1.0 T
v, B = 1.0e6, 1.0
r = mp * v / (e * B)
f = e * B / (2 * math.pi * mp)
print(f"proton r = {r*100:.4f} cm, T = {1/f*1e9:.2f} ns, f = {f/1e6:.3f} MHz")
print(f"  KE = {0.5*mp*v**2/e/1000:.2f} keV, v/c = {v/c:.5f}")

# LHC contrast: 6.8 TeV/c in 8.3 T
p = 6.8e12 * e / c
print(f"LHC r (relativistic) = {p/(e*8.3):.0f} m, r (wrong, mv/qB with v=c) = {mp*c/(e*8.3):.3f} m")

# Worked example 2: wire and coil
print("wire F =", 5.0 * 0.20 * 0.50, "N")
N, I, A, B = 100, 2.0, 0.20 * 0.10, 0.50
tmax = N * I * A * B
print(f"coil tau_max = {tmax:.2f} N m, tau(30 deg) = {tmax*math.sin(math.radians(30)):.2f} N m")
w = 1500 * 2 * math.pi / 60
print(f"power at 1500 rpm: steady {tmax*w:.0f} W, single coil average {2/math.pi*tmax*w:.0f} W")

# Worked example 3: neon isotopes, 2000 V, 0.50 T
V, B = 2000.0, 0.50
m20 = 19.9924401762 * u - me
m22 = 21.991385114 * u - me
r20 = math.sqrt(2 * m20 * V / e) / B
r22 = math.sqrt(2 * m22 * V / e) / B
print(f"Ne-20 r = {r20*1000:.3f} mm, Ne-22 r = {r22*1000:.3f} mm, gap = {2*(r22-r20)*1000:.2f} mm")
vs = 4.0e4 / 0.20
print(f"selector: v = {vs:.3g} m/s, gap = {2*(m22-m20)*vs/(e*0.50)*1000:.1f} mm")

# Worked example 4: Hall voltage
print(f"copper V_H = {10*1.0/(8.5e28*e*1.0e-4)*1e6:.2f} uV")
print(f"semiconductor V_H = {1e-3*0.05/(1.0e22*e*1.0e-6)*1e3:.1f} mV")

# Aurora: 1 keV electron in 50 uT
ve = math.sqrt(2 * 1000 * e / me)
print(f"aurora electron r = {me*ve/(e*5e-5):.2f} m, f = {e*5e-5/(2*math.pi*me)/1e6:.2f} MHz")

Step 3: run it and compare

python lorentz.py
proton r = 1.0440 cm, T = 65.59 ns, f = 15.245 MHz
  KE = 5.22 keV, v/c = 0.00334
LHC r (relativistic) = 2733 m, r (wrong, mv/qB with v=c) = 0.377 m
wire F = 0.5 N
coil tau_max = 2.00 N m, tau(30 deg) = 1.00 N m
power at 1500 rpm: steady 314 W, single coil average 200 W
Ne-20 r = 57.578 mm, Ne-22 r = 60.388 mm, gap = 5.62 mm
selector: v = 2e+05 m/s, gap = 16.6 mm
copper V_H = 7.34 uV
semiconductor V_H = 31.2 mV
aurora electron r = 2.13 m, f = 1.40 MHz

A neon gap of 5.64 mm means you used proton masses instead of NIST atomic masses. A proton radius off in the third digit usually means gauss or km/s slipped in.

Step 4: keep the script's dependencies healthy

Once someone adds a plotting library or notebook server, the folder carries open source packages that collect vulnerabilities. Scan it with the Safeguard CLI and read the JSON results under ./output:

safeguard scan --dir .
ls output/

Common mistakes

  • Sign errors for electrons. The right hand rule gives the force on a positive charge. In a cathode ray tube, a metal Hall strip or an aurora the carriers are electrons, and the force points opposite to your thumb. Writing q with its sign into F = q v × B and doing the cross product with unit vectors avoids the problem.
  • Forgetting the electric term. In a velocity selector, a Hall sensor, a cyclotron gap or any region near charged electrodes, qE is not small and may be the whole point. F = q v × B alone is the special case E = 0.
  • Mixing gauss and tesla. NIST's SI guide lists one gauss as 10⁻⁴ T. So 1 T is 10,000 G. The gauss is a CGS unit that still appears in older papers and magnet catalogues; plugging it into an SI formula is off by 10,000. Earth's field is about 0.5 G, or 50 µT.
  • Non relativistic formulas at relativistic speeds. r = mv/(qB) and f = qB/(2πm) assume v is small compared with c. Above a few percent of c, use p = γmv. At the LHC the error from ignoring γ is a factor of about 7,250.
  • Measuring the coil angle from its plane. τ = N I A B sin θ uses the angle between the field and the coil's normal. Measuring from the plane swaps sine and cosine and puts maximum torque in the wrong place.
  • Using the width in the Hall formula. t is the thickness along B; the width cancels.
  • Crediting the field with the work. The magnetic force on a free charge does no work. In a motor the power supply works against the back voltage and the field transfers the energy.
  • Dropping the electron mass. A positive ion is the atom minus its electrons. The correction is tens of parts per million: negligible for a classroom example, significant for high resolution work.
  • Assuming the field is uniform. Real magnets have fringe fields at their edges, so real instruments are calibrated against known masses or fields.

FAQ

What is the Lorentz force in simple terms?

It is the total push that electric and magnetic fields give a charged particle. The electric part pushes along the field. The magnetic part pushes sideways, at right angles to both the motion and the field, and only if the particle is moving.

What is the formula for the Lorentz force?

F = q(E + v × B). The magnetic part alone has magnitude |q| v B sin θ.

Who discovered the Lorentz force?

Hendrik Antoon Lorentz set it out in his electron theory, published in Leiden in 1892 and in his 1895 "Versuch". Oliver Heaviside had derived the magnetic force on a moving charge in 1889. Lorentz shared the 1902 Nobel Prize in Physics with Pieter Zeeman.

Why does the magnetic force do no work?

It is always perpendicular to the velocity, so F · v = 0. It changes direction, not speed.

How do you use the right hand rule for the Lorentz force?

Sweep your right hand's fingers from v toward B; your thumb gives the force on a positive charge. Reverse it for an electron.

What is the radius of a charged particle's path in a magnetic field?

r = mv/(|q|B), or p/(|q|B) relativistically. A proton at 10⁶ m/s in 1 T: about 1.04 cm.

How does the Lorentz force make an electric motor turn?

Current in the coils crosses a magnetic field, so each wire feels F = I L B. Opposite sides of a coil feel opposite forces, giving a torque τ = N I A B sin θ, and a commutator or electronic controller keeps reversing the current so the torque always pushes the same way.

How does a mass spectrometer use the Lorentz force?

Ions are given a known energy or speed and sent into a magnetic field, where they bend in circles whose radius depends on mass to charge ratio. Heavier ions bend less and land further away, so landing position gives mass.

What is the Hall effect?

The voltage across a current carrying conductor in a magnetic field, V_H = I B/(n q t), created when the Lorentz force pushes carriers to one side.

The software that runs the machine: an honest bridge

Safeguard does not do physics. Our models are single purpose security models, and nothing in this post was calculated by them; the numbers come from published constants and the Python script above. Safeguard also does not analyse motors, sensors, accelerators or firmware. The link is narrower: motor controller firmware, test benches and sensor data pipelines are software that often includes open source components, such as real time operating systems, communication stacks and Python packages, and those components need the same dependency tracking and patching as any other application.

Fix it without waiting for upstream

Whatever the vulnerability, most of the risk sits in two gaps. The first is the time between a fix being published and that fix actually running in your production builds. The second, and worse, is the time before any fix exists at all, while a maintainer works out a patch and a release schedule. Waiting through both gaps is a habit, not a requirement. Safeguard gives teams three ways to close them.

1. Autonomous remediation: pull requests, not tickets

When a fixed version exists, Griffin, Safeguard's security model, opens a tested, policy gated pull request that moves the affected dependency to the safe version. You can run it on one repository or in bulk across every project that carries the vulnerable version. Remediation categories include dependencies, licenses, security posture and findings, and each one is set separately. Reachability analysis ranks the vulnerable code paths your application actually calls first, so the first pull requests you merge are the ones that matter most. Autonomous remediation ships switched off, with every category set to Manual, so your team decides how much runs on its own and what still needs a human approval.

2. Gold Open Source: the safe version in seconds, free

gold.safeguard.sh is free and needs no login. Search any CVE or package to see affected and fixed versions, CVSS, EPSS, CISA KEV status and a recommended safe version, or use the "Am I affected?" checker. The same data is available through a free read API, README status badges and RSS threat feeds.

3. Gold Registry: start from components that are already fixed

Safeguard Gold rebuilds patched versions of open-source packages and images from source, signs each build, attaches an SBOM, SLSA provenance and VEX, and serves them from registry.safeguard.sh to your organization. Every Gold artifact is held continuously to zero exploitable critical or high CVEs and a completed license check, with signed build provenance (signed with Safeguard's key and verifiable with cosign, SLSA Build Level 3 as the design target) and a public evidence page you can hand to an auditor. An artifact loses its Gold badge if it regresses. Teams can point their own package directory at the registry so hardened equivalents resolve without changing how developers install anything.

When upstream has no fix yet, or will not ship one, Safeguard first works to get the fix accepted upstream. If the issue is severe or upstream will not move, Safeguard builds a fork, fixes the vulnerability there and publishes a hardened Gold build, so you are not stuck on a maintainer's release schedule. You can also request a hardened, compatibility tested build of a specific package. Ask which packages it covers before you plan around it.

Your situationWhat to use
A fixed version existsAutonomous remediation opens the upgrade pull request; Gold Open Source confirms the safe version
You need to know today whether you are affectedGold Open Source lookup and "Am I affected?" checker, free and without login
You want vulnerable versions to stop shippingSafeguard policies and gates in CI
Upstream has no fix yet, or will not ship oneA custom Gold request; fork and patch
You want to start clean on new projectsPull hardened components and images from Gold Registry

One honest limit: when the vulnerable code lives in a vendor appliance, a hosted service or an operating system runtime you do not build yourself, the fix still has to come from that vendor or distribution. The steps above apply to the open source dependencies and container images you build and ship, which is where most teams carry the largest and least tracked share of their exposure.

See how Safeguard would help

None of these demos involve electromagnetism; they show the software side described in the bridge above.

The first demo is a real Safeguard CLI session. It installs the CLI, opens the interactive terminal with safeguard and asks it to fix a lodash CVE in a repository. It reads the finding and advisory, asks before any command that changes something, edits package.json to lodash 4.17.21, runs npm install and npm test with approval, prints a summary and pushes nothing. The same flow applies to a motor test dashboard or a sensor data web app your team maintains: scan the repository, then let the assistant propose the dependency upgrade while you approve the changes.

Click through it at your own pace, or open it full screen.

The second demo sets up the Safeguard runner on your own machine, approves it with its device code and then scans from the terminal. That suits teams who keep instrument control scripts, Hall sensor calibration tools or motor controller build environments on lab machines and want the scan to run where that code lives.

Click through it at your own pace, or open it full screen.

The third demo connects Claude to the Safeguard MCP server with OAuth and lets you choose which tools Claude can use. For an engineer who already works with Claude while writing analysis or test code, it brings dependency findings into the same conversation, limited to the tools you allow.

Click through it at your own pace, or open it full screen.

To try it on your own repositories, download Safeguard and follow the CLI documentation.

Quick check

An electron moves along +x through a magnetic field pointing along +z. Which way is the magnetic force?

Along +y. The cross product x̂ × ẑ is −ŷ, and multiplying by the electron's negative charge flips it to +ŷ. A proton with the same velocity would be pushed along −ŷ.

A proton's speed in a uniform magnetic field doubles. What happens to its orbit radius and its orbit period?

The radius doubles, because r = mv / (qB). The period stays the same, because T = 2πm / (qB) does not contain v, as long as the proton stays non relativistic.

A 0.50 m wire carries 3.0 A at right angles to a 0.40 T field. What force acts on it?

F = I L B = 3.0 × 0.50 × 0.40 = 0.60 N, perpendicular to both the wire and the field.

Sources

Last reviewed: 25 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.