Physics · Intermediate

Charged particle in magnetic field

Written by SignalsLab

Early edition: these lessons are being reviewed.

Content

Summary

A charged particle moving in a magnetic field feels a force perpendicular to both its velocity and the field. This force does no work, so speed stays constant while direction changes, producing circular or helical motion. The radius and period depend on mass, charge, speed and field strength.

Intuition

Imagine swinging a ball on a string: the string pulls sideways, never along the motion, so the ball turns without speeding up. The magnetic force plays the role of the string. It always points at right angles to the velocity, so it bends the path but cannot change the kinetic energy. A faster particle needs a larger circle to turn, while a stronger field or larger charge tightens the circle. Heavier particles resist turning and make bigger circles. Any velocity component along the field is unaffected, so the particle spirals like a corkscrew. This principle underlies mass spectrometers, cyclotrons, auroras, and the guiding of charged particles in medical proton therapy accelerators.

Key equations

F→=qv→×B→
(1)

Magnetic (Lorentz) force on charge q with velocity v in field B; perpendicular to both.

r=mv⊥|q|B
(2)

Radius of circular path from the velocity component perpendicular to B.

T=2πm|q|B
(3)

Period of circular motion, independent of speed (non-relativistic).

ω=|q|Bm
(4)

Angular (cyclotron) frequency.

p=|q|Br
(5)

Momentum from measured track radius, used in detectors.

Derivation

  1. Start with F=qvBsin⁡(θ). For v perpendicular to B, F=qvB.
  2. Since F is perpendicular to v, power F·v = 0, so speed is constant.
  3. A constant-magnitude force perpendicular to velocity gives uniform circular motion with centripetal acceleration v2/r.
  4. Apply Newton's second law: mv2r=qvB.
  5. Solve for r: r = m v /(qB).
  6. Period T=2πrv=2πmqB, where v cancels.
  7. If v has a component parallel to B, it is unchanged, so the path is a helix with pitch = v_parallel T.

Worked example

Problem

A proton (m = 1.67e-27 kg, q = 1.60e-19 C) moves at 2.0e6 m/s perpendicular to a 0.50 T field. Find the radius and period.

  1. r = m v /(qB) = (1.67e-27)(2.0e6)/((1.60e-19)(0.50)).
  2. Numerator: 3.34e-21. Denominator: 8.0e-20.
  3. r = 4.2e-2 m.
  4. T = 2 pi m /(qB) = 2 pi (1.67e-27)/(8.0e-20) = 1.31e-7 s.

Answer r ≈ 4.2 cm, T ≈ 0.13 microseconds

Common mistakes

  • Thinking the magnetic force speeds the particle up; it only changes direction.
  • Forgetting the force direction reverses for negative charges.
  • Using the right-hand rule with velocity and field in the wrong order.
  • Believing period depends on speed (it does not, non-relativistically).
  • Using total speed instead of the perpendicular component for the radius.
  • Assuming a force exists when v is parallel to B; it is zero.

Animation

Animation coming soon

The animated version of this lesson is being prepared for the web. In the Signals AI app, lessons are drawn step by step.

Code

scene.py(71 lines)
import sys
import numpy as np
from manim import *
from blocks import *

# Simulation: charge q in uniform B along z, dv/dt = (q/m) v x B, fixed-step RK4
Q_OVER_M = 1.0
BZ = 1.0
DT = 0.02
STEPS = 500


def simulate(v0=(1.0, 0.0, 0.5), steps=STEPS, dt=DT):
    """Integrate motion with RK4 and record positions and velocities."""
    def acc(v):
        return Q_OVER_M * np.cross(v, np.array([0.0, 0.0, BZ]))

    r = np.zeros(3)
    v = np.array(v0, dtype=float)
    pos, vel = [r.copy()], [v.copy()]
    for _ in range(steps):
        k1 = acc(v)
        k2 = acc(v + 0.5 * dt * k1)
        k3 = acc(v + 0.5 * dt * k2)
        k4 = acc(v + dt * k3)
        vn = v + dt / 6 * (k1 + 2 * k2 + 2 * k3 + k4)
        r = r + dt * 0.5 * (v + vn)
        v = vn
        pos.append(r.copy())
        vel.append(v.copy())
    return np.array(pos), np.array(vel)


POS, VEL = simulate()


class Main(Scene):
    def construct(self):
        # Title
        TitleCard(self, "Lorentz force helix", "Charge in a uniform magnetic field")
        # Top-down view (x,y) on the left, side view (z vs t) on the right
        ax1 = Axes(x_range=[-1.5, 1.5, 1], y_range=[-2.5, 0.5, 1], x_length=5, y_length=4,
                   axis_config={"color": C_DIM, "include_tip": False}).shift(LEFT * 3.3 + DOWN * 0.2)
        l1 = Text("x-y plane", font_size=24).next_to(ax1, UP, buff=0.1)
        ax2 = Axes(x_range=[0, 10, 2], y_range=[0, 5, 1], x_length=5, y_length=4,
                   axis_config={"color": C_DIM, "include_tip": False}).shift(RIGHT * 3.3 + DOWN * 0.2)
        l2 = Text("z vs time", font_size=24).next_to(ax2, UP, buff=0.1)
        self.play(Create(ax1), Create(ax2), FadeIn(l1), FadeIn(l2))
        ts = np.arange(len(POS)) * DT
        c1 = ax1.plot_line_graph(POS[::5, 0], POS[::5, 1], add_vertex_dots=False,
                                 line_color=C_MAIN)
        c2 = ax2.plot_line_graph(ts[::5], POS[::5, 2], add_vertex_dots=False,
                                 line_color=C_ACCENT)
        StepCaption(self, "Force is perpendicular to v: circular motion in x-y")
        self.play(Create(c1), Create(c2), run_time=5)
        self.wait(0.5)
        StepCaption(self, "Constant v_z along B adds drift: a helix")
        self.wait(1.5)
        StepCaption(self, "Magnetic force bends the path but does no work: speed is constant.")
        self.wait(1.5)


if __name__ == "__main__" and "--selftest" in sys.argv:
    speed = np.linalg.norm(VEL, axis=1)
    assert np.allclose(speed, speed[0], rtol=1e-6)
    assert np.allclose(VEL[:, 2], 0.5)
    # gyroradius r = v_perp m/(qB) = 1; center at (0, -1) since a = v x B
    d = np.hypot(POS[:, 0], POS[:, 1] + 1.0)
    assert np.allclose(d, 1.0, atol=1e-3)
    assert np.allclose(POS[0], 0)
    print("ok")

The Manim scene code that draws this lesson's animation in the Signals AI app (Python, Manim Community).

ccBYNC© 2026 SignalsLab. Lesson text shared as is under CC BY-NC 4.0.