Magnetostatic Forces, Biot-Savart Law, and Ampere Law
Magnetostatics studies magnetic fields produced by steady currents. The electrostatic source is charge density; the magnetostatic source is current density. Magnetic force differs sharply from electric force: it acts on moving charge or current, and its direction is perpendicular to both velocity and magnetic flux density. This cross-product geometry is why motors rotate, wires carrying parallel currents attract or repel, and current loops experience torque.
Two complementary field laws dominate the subject. Biot-Savart law is a source integral, useful for finite wires and loops. Ampere's law is an integral circulation law, powerful when symmetry makes the magnetic field simple along a closed path. Together they mirror the Coulomb/Gauss pairing from electrostatics.
Figure: Parallel current-carrying wires are the laboratory-scale picture behind Ampere forces and magnetostatic interaction energy. Image: Wikimedia Commons, Sbyrnes321, public domain.
Definitions
The magnetic force on a charge moving with velocity is
For a current element in a magnetic flux density,
The torque on a small current loop with magnetic dipole moment is
where
The magnetic flux density and magnetic field intensity are related by
in a linear isotropic medium.
Biot-Savart law for a filamentary current is
For surface and volume current densities,
and
Ampere's law for magnetostatics is
or in differential form,
Gauss's law for magnetism is
The absence of magnetic monopoles in this model means magnetic flux lines close on themselves. A bar magnet's field may appear to leave one pole and enter another outside the material, but inside the material the flux continues. This is different from electric flux, which can begin on positive free charge and end on negative free charge.
Key results
For an infinitely long straight wire carrying current in the direction,
The direction follows the right-hand rule: thumb in current direction, fingers curl in .
For an infinite current sheet with surface current density in the plane ,
with directions set by the right-hand rule and boundary conditions.
The force per unit length between two parallel currents separated by distance in a homogeneous medium is
Currents in the same direction attract; currents in opposite directions repel.
For a circular loop of radius carrying current , the magnetic field intensity at the center is
On the axis of the loop,
These loop formulas are the magnetostatic analogue of ring-charge electrostatic fields.
Ampere's law and Biot-Savart law are not competing truths; they are different computational forms of the same magnetostatic physics. Ampere's law gives fast answers only when the chosen path can make simple. Biot-Savart works for less symmetric source distributions, but the vector integral can be longer. In practical modeling, finite coils, bends, and nearby magnetic materials often require numerical field solvers because neither hand method remains simple.
Magnetic force does no work on an isolated point charge in the ideal Lorentz-force sense because is perpendicular to velocity. Motors still deliver mechanical work because sources maintain currents in conductors while magnetic forces act on the current-carrying structure. Energy flows from electrical sources through fields into mechanical motion, so the simple point-charge statement should not be misread as "magnetic devices cannot do work."
Current density notation matters in extended conductors. Volume current density has units A/m, surface current density has units A/m, and filament current has units A. They represent different idealizations of the same physical idea. Choosing the wrong density changes the dimensions of the integral and usually reveals the mistake before the final answer.
The vector magnetic potential is often introduced after Ampere's law because is automatically satisfied by . In magnetostatics, can simplify calculations for current distributions and becomes essential in time-varying field theory. Even when is not unique, its curl gives the physical field.
Magnetostatic approximations assume currents are steady enough that charge accumulation and displacement current are negligible. This is usually valid for dc coils and slowly varying currents in compact structures, but it breaks down when dimensions become comparable to wavelength or when capacitive effects between conductors become important.
When a result depends on "infinite" wire, sheet, or solenoid assumptions, treat it as a local approximation. It is accurate only far from ends and edges compared with the observation distance and structure dimensions.
Visual
| Law | Best use | Integral |
|---|---|---|
| Biot-Savart | finite wire, circular loop, arbitrary known current | |
| Ampere | infinite wire, solenoid, toroid, current sheet | |
| Magnetic force | wire in known field | |
| Torque | current loop in known field |
Worked example 1: Field around a long wire
Problem: A long straight wire carries A in free space. Find and at cm.
Step 1: Use cylindrical symmetry and Ampere's law. Choose a circular Amperian path of radius around the wire.
Step 2: is tangential and constant on the path, so
Step 3: The enclosed current is , hence
Step 4: Substitute:
Step 5: Convert to :
Answer:
Check: This is comparable to Earth's magnetic field magnitude, which is reasonable for several amperes at a few centimeters.
Worked example 2: Force between parallel conductors
Problem: Two long parallel wires in air are separated by cm. They carry A and A in the same direction. Find the force per meter on wire 2.
Step 1: Field produced by wire 1 at wire 2:
Step 2: Substitute:
Step 3: Force on length of wire 2 is because the wire direction is perpendicular to .
Step 4: Per unit length:
Step 5: Direction: currents in the same direction attract, so wire 2 is pulled toward wire 1.
Check: The compact formula gives , the same result.
Code
import numpy as np
mu0 = 4 * np.pi * 1e-7
def long_wire_fields(I, rho):
H = I / (2 * np.pi * rho)
B = mu0 * H
return H, B
def force_per_length(I1, I2, d):
return mu0 * I1 * I2 / (2 * np.pi * d)
H, B = long_wire_fields(8, 0.04)
print(f"H = {H:.2f} A/m, B = {B:.3e} T")
print(f"F/l = {force_per_length(5, 3, 0.10):.3e} N/m")
Common pitfalls
- Using in Ampere's law instead of . The basic magnetostatic circulation law uses and free current.
- Forgetting the cross-product direction in magnetic force. The force is perpendicular to current and field.
- Applying Ampere's law as a shortcut when symmetry does not make constant or tangential on the chosen path.
- Confusing in cylindrical coordinates with charge density. Context and subscript notation matter.
- Treating magnetic field lines as starting or ending on currents. Magnetic flux has zero divergence; field lines form loops.
- Missing the sign of attraction or repulsion between parallel currents.
- Treating a finite straight wire as infinite without checking the observation distance relative to wire length.
Connections
- Vector algebra and coordinate systems for cross products and cylindrical unit vectors.
- Gradient, divergence, curl, and integral theorems for Stokes's theorem behind Ampere's law.
- Magnetic materials, inductance, and energy for , magnetic energy, and inductors.
- Maxwell equations for time-varying fields for the displacement-current extension.