---
title: Biot–Savart Law
module: Magnetic Sources
moduleNumber: 7
lessonNumber: 2
order: 702
summary: >
  A steady current is a continuous stream of current elements, and the Biot–Savart
  law hands each one a magnetic contribution — a right-hand cross product that falls
  off as the inverse square of distance. Summing the contributions along a conductor
  is a vector line integral, which we carry out for the straight wire to get the
  endpoint-angle formula. The infinite-wire field $B=\mu_0 I/2\pi s$ falls out as the
  limit where both ends recede, and we mark how fast a finite wire departs from it and
  when a thin-filament model is safe.
topics: [Magnetic Sources]
draft: false
sources:
  - book: Tipler & Mosca
    ref: "Ch. 27 — Sources of Magnetic Fields; §§27-1–27-2"
---

## Current elements and observation geometry

The Biot–Savart law gives the magnetic contribution at an observation point from a
small element of a steady current distribution. Let the source element be
$I\,\d\vec\ell$, directed with conventional current, and let
$\vec r=\vec R-\vec r'$ point from the source location $\vec r'$ to
the observation location $\vec R$. The differential magnetic field is

$$
\d\vec B=\frac{\mu_0}{4\pi}
\frac{I\,\d\vec\ell\mathbin{\times}\hat r}{r^2}
=\frac{\mu_0}{4\pi}
\frac{I\,\d\vec\ell\mathbin{\times}\vec r}{r^3}.
$$

The source-observation separation belongs in every term. Using a distance measured
from the midpoint of an extended wire in place of $r$ is valid only in a far-field
approximation, not in the line integral itself. The magnitude is

$$
\d B=\frac{\mu_0}{4\pi}\frac{I\,\d\ell\sin\theta}{r^2},
$$

where $\theta$ is the angle between the directed current element and the source-to-
observation vector. A source element aimed directly toward or away from the
observation point has $\sin\theta=0$ and contributes no magnetic field at that
point. The strongest contribution for fixed $I$, $\d\ell$, and $r$ occurs when
the separation is perpendicular to the element.

$$
% caption: Biot–Savart element geometry. The directed current element $I\,\d\vec\ell$ sits at the source; the separation $\vec r$ runs from source to observation. Only the part of the element perpendicular to $\vec r$ contributes, and $\d\vec B$ points out of their plane.
\begin{tikzpicture}[>=stealth,font=\footnotesize,scale=1.05]
\definecolor{acc}{HTML}{4A6FA5}
\filldraw[acc] (1.2,1.1) circle (.05);
\draw[->,acc,thick] (1.2,1.1)--(2.55,1.1) node[below] {element};
\draw[->,black,thick] (1.28,1.14)--(4.5,2.35);
\node[black,above left] at (3.05,1.85) {$r$};
\draw[black] (1.85,1.1) arc (0:21:.65);
\filldraw[draw=black,fill=black!8] (4.5,2.35) circle (.07);
\node[above] at (4.5,2.35) {observation};
\draw[acc,thick] (2.95,2.15) circle (.15);
\filldraw[acc] (2.95,2.15) circle (.03);
\node[acc,above] at (2.95,2.34) {dB out};
\end{tikzpicture}
$$

The cross product fixes direction as well as magnitude. The vector
$\d\vec\ell\mathbin{\times}\hat r$ is perpendicular to the plane
containing the element and the separation vector. Its sense follows the right-hand
rule: curl fingers from $\d\vec\ell$ toward $\hat r$ through the
smaller angle, and the thumb gives $\d\vec B$. Reversing current reverses every
differential contribution. Reversing the separation vector by accidentally drawing
it from observation point to source also reverses the computed direction, a common
sign error in hand calculations.

$$
% caption: Direction rule for $\d\vec B$. Curl the right hand from the current element toward $\vec r$; the thumb gives $\d\vec B$, normal to their plane (out of the page here). Reversing the current or the separation convention reverses it.
\begin{tikzpicture}[>=stealth,font=\footnotesize,scale=1.05]
\definecolor{acc}{HTML}{4A6FA5}
\draw[->,acc,thick] (1.3,.55)--(1.3,2.45);
\node[acc,left] at (1.22,2.3) {element};
\draw[->,black,thick] (1.3,.55)--(3.6,1.5);
\node[black,below right] at (2.6,1.0) {$r$};
\draw[->,black] (1.9,1.95) arc (118:40:.7);
\draw[acc,thick] (3.05,2.2) circle (.16);
\filldraw[acc] (3.05,2.2) circle (.032);
\node[acc,right] at (3.25,2.2) {dB out};
\end{tikzpicture}
$$

## Line integration over an extended conductor

A real wire is represented by a continuous succession of current elements. In the
magnetostatic approximation, total magnetic field is the vector line integral

$$
\vec B(\vec R)=\frac{\mu_0 I}{4\pi}
\int_{\rm wire}\frac{\d\vec\ell\mathbin{\times}\vec r}{r^3}.
$$

The integration variable belongs to the source position along the wire; the
observation point is held fixed. Symmetry can make every differential contribution
parallel, allowing a scalar integral. Without symmetry, the vector direction must be
retained until components have been summed. The law applies to steady current where
charge distribution and current density are time independent on the observation time
scale. Rapidly changing currents require a retarded electromagnetic treatment beyond
this magnetostatic form.

Place the observation point a perpendicular distance $\rho$ from a finite straight
wire on the x axis. Let the source coordinate run from $-a$ to $b$.
Then

$$
r=\sqrt{x^2+\rho^2},
\qquad
\d B=\frac{\mu_0I}{4\pi}
\frac{\rho\,\d x}{(x^2+\rho^2)^{3/2}}.
$$

Every element contributes in the same normal direction, so integration yields

$$
B=\frac{\mu_0I}{4\pi\rho}
\left(\frac{b}{\sqrt{b^2+\rho^2}}+
\frac{a}{\sqrt{a^2+\rho^2}}\right).
$$

Equivalently, the bracket is the sum of endpoint sines measured from the perpendicular
line through the observation point. Taking $a$ and $b$ to infinity gives the
infinite-wire limit $B=\mu_0I/(2\pi\rho)$. Beyond the wire length the finite-wire
field decreases faster than this, so extending the wire to infinity outside the stated
geometry makes a false far-field prediction.

> **Worked example (Field near a long straight wire).** A long wire carries
> $I=10.0\ \mathrm A$. At $\rho=1.00\ \mathrm{cm}$, treating it as effectively
> infinite,
>
> $$
> B=\frac{\mu_0 I}{2\pi\rho}
> =\frac{(4\pi\times10^{-7})(10.0)}{2\pi(0.0100)}
> =2.00\times10^{-4}\ \mathrm T=200\ \mu\mathrm T.
> $$
>
> The field circles the wire (right-hand rule, thumb along the current). For
> comparison, the Earth's field is about $50\ \mu\mathrm T$, so the wire dominates a
> compass held a centimetre away.

$$
% caption: Finite straight-wire integration. A source element sits at coordinate $x$ along the wire; the separation $\vec r$ to the observation point and the perpendicular distance $\rho$ both enter the line integral, which reduces to the infinite-wire result only as the ends recede.
\begin{tikzpicture}[>=stealth,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}
\draw[acc,thick] (.6,1.05)--(5.3,1.05);
\draw[->,acc,thick] (5.3,1.05)--(5.85,1.05) node[below] {$I$};
\filldraw[acc] (2.3,1.05) circle (.05);
\draw[->,acc,thick] (2.3,1.05)--(2.9,1.05);
\node[below] at (2.35,.92) {element};
\filldraw[draw=black,fill=black!8] (3.7,2.7) circle (.07);
\node[above] at (3.7,2.7) {observation};
\draw[black,dashed] (3.7,1.05)--(3.7,2.7);
\node[black,right] at (3.7,1.9) {distance};
\draw[->,black,thick] (2.36,1.11)--(3.63,2.6);
\node[black,left] at (2.9,1.95) {$r$};
\filldraw[black] (3.7,1.05) circle (.03);
\end{tikzpicture}
$$

The finite-wire expression is proportional to current and changes sign with current
direction. Near a long wire it is inverse in perpendicular distance; far from a
short segment it approaches dipole-like scaling. It vanishes on the wire axis because
the separation vector is parallel to every current element there, although an ideal
line-current model fails inside a real conductor. Check these limits after drawing
the source and observation geometry.

The line-element form is a reduction of a volume-current description. For a current
density $\vec J(\vec r')$ spread through a finite cross-section, the source
contribution is integrated over volume with $\vec J\,\d\tau$ in place of
$I\,\d\vec\ell$. Replacing that volume integral by a line integral assumes a
wire radius small compared with the source-observation distance and a current density
that is adequately represented by one centreline path. Near a thick conductor, at a
corner, or inside the current-carrying material, the current distribution and finite
cross-section must be retained. The return path also matters: a straight segment is
one part of a closed current circuit, and distant return conductors may be negligible
only after their separate contributions have been estimated.

> **Worked example (Finite straight wire versus the infinite-wire limit).** A wire
> runs from $-0.150\ \mathrm m$ to $+0.150\ \mathrm m$ carrying $I=3.00\ \mathrm A$;
> find $B$ at $\rho=0.0500\ \mathrm m$ from its midpoint. Each endpoint factor is
>
> $$
> \frac{0.150}{\sqrt{0.150^2+0.0500^2}}=0.949,
> $$
>
> so
>
> $$
> B=\frac{\mu_0 I}{4\pi\rho}(0.949+0.949)
> =\frac{(10^{-7})(3.00)}{0.0500}(1.898)=1.14\times10^{-5}\ \mathrm T
> =11.4\ \mu\mathrm T,
> $$
>
> normal to the wire–observation plane. The infinite-wire value
> $\mu_0 I/2\pi\rho=12.0\ \mu\mathrm T$ overshoots by $5\%$: at a half-length-to-
> distance ratio of only three, the missing ends already matter. Keep the endpoints
> until the approximation error drops below the measurement uncertainty.

Experimental comparison requires the same geometry. A probe measures field from the
entire conductor arrangement, including leads that complete the circuit. Place the
probe at the stated perpendicular distance, record the current direction and the
normal used for the reported magnetic sign, then reverse current to separate the
odd magnetic contribution from sensor offset. A mismatch that changes when the return
lead is moved is a source-geometry error, not evidence that the Biot–Savart law has
failed.

### Endpoint geometry and signed finite-wire fields

The endpoint form of the straight-wire result is easiest to use after a geometric
sign convention has been fixed. Draw the perpendicular from the observation point to
the wire and assign positive source coordinate in the direction of current. Let
$\alpha_A$ and $\alpha_B$ be the signed angles from that perpendicular to the
lines joining the observation point to the two endpoints. The magnitude can be
written

$$
B=\frac{\mu_0 I}{4\pi\rho}
\left(\sin\alpha_B-\sin\alpha_A\right),
$$

when the endpoint angles follow that signed coordinate convention. A wire centered
under the observation point has equal and opposite endpoint angles, so the
parenthesis becomes twice the positive sine of either magnitude. A wire extending
only to one side has one endpoint angle zero at the perpendicular foot and a smaller
field than a symmetric segment with the same nearest distance.

The angle expression is a compact evaluation of the same line integral, not a
separate law. Check it against the coordinate form before using a diagram drawn from
a different viewing direction. A reversed current changes the normal field direction.
Changing which side of the wire is called positive also changes the signs of both
endpoint angles; the physical field remains unchanged only if the current and normal
conventions are transformed consistently. These bookkeeping details prevent a common
error in which two positive endpoint-angle magnitudes are substituted into a formula
that expects one signed negative angle.

$$
% caption: Signed endpoint angles for a finite straight segment. From the perpendicular foot, the rays to the two ends make angles $\alpha_A$ and $\alpha_B$; the field $\tfrac{\mu_0 I}{4\pi\rho}(\sin\alpha_B-\sin\alpha_A)$ keeps both ends, collapsing to one term when a wire stops at the foot.
\begin{tikzpicture}[>=stealth,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}
\draw[acc,very thick] (.65,.75)--(5.75,.75);
\draw[->,acc,very thick] (5.75,.75)--(6.2,.75) node[below] {$I$};
\filldraw[draw=black,fill=black!8] (3.2,2.75) circle (.07);
\node[above] at (3.2,2.75) {observation};
\draw[black,dashed] (3.2,.75)--(3.2,2.75);
\draw[black] (.65,.75)--(3.2,2.75);
\draw[black] (5.75,.75)--(3.2,2.75);
\draw[black] (3.2,1.95) arc (270:218:.8);
\draw[black] (3.2,1.95) arc (270:322:.8);
\node[below] at (.65,.62) {end A};
\node[below] at (5.75,.62) {end B};
\filldraw[black] (3.2,.75) circle (.03);
\node[black,below right] at (3.28,.72) {foot};
\end{tikzpicture}
$$

The far-field limit supplies an independent scale check. A segment of length $L$ much smaller
than observation distance $r$ has endpoint directions that become
nearly parallel. Their sine difference is approximately $L\sin\theta/r$, giving

$$
B\simeq\frac{\mu_0}{4\pi}\frac{I L\sin\theta}{r^2}.
$$

The short-current-element field falls as $1/r^2$, whereas an ideal infinitely long
wire has field $1/\rho$. The two behaviors refer to
different source geometries. Extending a finite segment to an infinite wire before
taking a far-distance limit changes the physical source and therefore changes the
power of distance in the result.

### Current density and finite cross-section

The line-current model compresses an extended volume current into a centreline. A
solid conductor with current density $\vec J$ instead uses

$$
\vec B(\vec R)=\frac{\mu_0}{4\pi}
\int_{\rm volume}
\frac{\vec J(\vec r')\mathbin{\times}(\vec R-\vec r')}
{|\vec R-\vec r'|^3}\,\d\tau'.
$$

The volume element matters when the observation point is comparable in distance to
the conductor radius. Nearby source points are closer and contribute more strongly
than distant points, so a uniform current density across a wide cross-section does
not generally act like one line placed at an arbitrary edge. Inside a cylindrical
wire with uniform steady current density, the enclosed-current result gives a field
that rises linearly with radial distance from the centre. The external line-current
formula applies only outside the wire.

Skin effect adds a frequency-dependent qualification. At sufficiently high frequency,
alternating current concentrates closer to a conductor surface, making $\vec J$
nonuniform. The magnetostatic line integral remains a low-frequency approximation
only when the current distribution has time to remain effectively uniform over the
cross-section. A DC calibration of a thick wire does not automatically predict its
near field under a rapid current pulse.

$$
% caption: Finite conductor cross-section. Current fills the area (dots mark current toward the viewer); a centreline model holds only when the observation distance far exceeds the radius, and the interior field follows the actual current distribution, not the exterior $1/\rho$ law.
\begin{tikzpicture}[>=stealth,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}
\draw[acc,thick] (2.2,1.55) circle (1.0);
\foreach \x/\y in {1.7/1.2,2.2/1.15,2.7/1.2,1.65/1.6,2.2/1.6,2.75/1.6,1.7/2.0,2.2/2.0,2.7/2.0} {
  \draw[acc,thick] (\x,\y) circle (.075);
  \filldraw[acc] (\x,\y) circle (.018);
}
\filldraw[draw=black,fill=black!8] (5.0,1.55) circle (.07);
\node[above] at (5.0,1.55) {near point};
\draw[black,dashed] (3.22,1.55)--(4.9,1.55);
\node[below] at (2.2,.4) {conductor};
\end{tikzpicture}
$$

### Separating the intended field from the circuit field

A current source, feed leads, return lead, fixture, and probe all belong to the
measured magnetic arrangement. A pair of closely spaced forward and return leads can
cancel much of their distant field, while widely separated leads create a larger
loop area and an appreciable background. The intended straight segment should be
long compared with the scan region only after the return path has been arranged and
tested, not assumed away in the calculation.

Current reversal isolates the field tied to the source current. Record the probe signal at
$+I$, at zero current, and at $-I$ without moving the probe. The odd combination

$$
B_{\rm odd}=\frac{B(+I)-B(-I)}{2}
$$

isolates the current-reversing contribution, while the even combination exposes
offsets and static background fields. At several distances, fit the finite-wire
expression with measured endpoint positions. Treat current, distance, and sensor
offset as independently measured quantities. Residuals that change when a return
lead moves identify an incomplete source model.

### Curved conductors and component-by-component integration

Most conductor shapes do not preserve one common direction for every
Biot--Savart contribution. A bent wire can place one source element in a plane whose
normal differs from that of a neighboring element. In that case, adding
magnitudes first discards directional information. Parameterise each piece of the
wire, evaluate its separation vector to the same observation point, and sum Cartesian
components of

$$
\d\vec B_j=\frac{\mu_0I}{4\pi}
\frac{\d\vec\ell_j\mathbin{\times}\vec r_j}{r_j^3}.
$$

Straight pieces can often be evaluated with the finite-wire expression after their
own perpendicular distances and endpoint angles have been defined. Curved pieces
need a line integral or a numerical sum. At a join, current direction remains
continuous, but the directed element changes orientation abruptly. The magnetic field
is continuous away from an idealized infinitely thin corner, although the local
source geometry changes. A diagram of the full current path prevents an endpoint
from being accidentally treated as a disconnected source.

Every contribution from a planar bent wire to an observation point in the same plane
is normal to that plane. The calculation then reduces to a signed scalar
sum after the normal direction has been chosen. An observation point out of the wire
plane removes that simplification: components along more than one axis can survive.
Symmetry must be demonstrated through paired source elements, not inferred from a
visually balanced sketch. A pair at equal distance with opposite component directions
can cancel one component while doubling another.

A path with no closed form is summed numerically: split it into short directed chords,
take each chord's midpoint as its source point, and add the component vectors. Halving
the largest chord and repeating tests convergence — each signed component should settle,
and two large components can cancel in magnitude while still rotating the total. Refine
where it matters (near the observation point, near a bend, where the path curves), since
uniform segmentation wastes effort on distant, slowly varying stretches.

## Source paths and analytical checks

A circular arc is an intermediate case between one short source element and a
complete current loop. Place the observation point at the centre of an arc of
radius $a$, carrying current $I$ through an angle $\Delta\phi$ in radians. At
every source point, the separation has magnitude $a$, the tangent element is
perpendicular to that separation, and all differential contributions have the same
normal direction. With $\d\ell=a\,\d\phi$, the magnitude integral becomes

$$
B_{\rm arc}
=\frac{\mu_0 I}{4\pi}
\int_{\phi_1}^{\phi_2}\frac{a\,\d\phi}{a^2}
=\frac{\mu_0 I}{4\pi a}\Delta\phi .
$$

The angular span must be expressed in radians. A semicircle has
$\Delta\phi=\pi$, giving $B=\mu_0 I/(4a)$; a complete circle has
$\Delta\phi=2\pi$, giving $B=\mu_0I/(2a)$. The second result is also obtained
by adding two semicircles. The result scales inversely with radius because every
current element moves farther from the centre when the same angular path is enlarged.

$$
% caption: Circular arc about its centre. Every tangent element is perpendicular to its radius, so all contributions share one normal (out of the page here); the centre field is $\tfrac{\mu_0 I}{4\pi a}\Delta\phi$ for an arc of radius $a$ through angle $\Delta\phi$.
\begin{tikzpicture}[>=stealth,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}
\draw[acc,very thick,->] (1.201,2.90) arc (150:20:1.5);
\node[acc,above] at (2.5,3.68) {current};
\draw[black] (2.5,2.15)--(1.987,3.559);
\node[black,left] at (2.18,2.98) {radius $a$};
\draw[acc,thick] (2.5,2.15) circle (.13);
\filldraw[acc] (2.5,2.15) circle (.03);
\node[below] at (2.5,2.0) {center};
\node[acc,right] at (2.72,2.15) {normal out};
\end{tikzpicture}
$$

The normal direction follows the same right-hand rule used for a single element.
Counterclockwise current seen by an observer gives a field at the centre toward that
observer; clockwise current gives the opposite normal. A sign
calculation can assign a positive normal to the page and include the signed angular
increment $\d\phi$. An equally reliable procedure is to attach a normal unit vector
to the current direction once, then integrate the positive arc length. Mixing a
positive arc angle with a normal chosen for the opposite current direction reverses
the answer.

An arc embedded in a wire often comes with radial feed segments. At the centre of
curvature, each element on a radial segment is parallel or antiparallel to its
source-to-observation separation. The cross product in the Biot--Savart integrand
then vanishes. This statement applies at that one geometric point. Moving the
observation point away from the centre makes the separation direction vary along a
radial lead and gives a generally nonzero contribution. A calculation for a loop
with leads should state whether the centre approximation is being used or whether
all portions of the path are included.

> **Worked example (Field at the centre of a semicircular wire).** A semicircular
> path of radius $a=0.0800\ \mathrm m$ carries $I=2.50\ \mathrm A$. The straight feed
> leads point along the radius, so at the centre their elements are parallel to the
> separation and contribute nothing; only the arc, with $\Delta\phi=\pi$, is left:
>
> $$
> B_{\rm semi}=\frac{\mu_0 I}{4a}
> =\frac{(4\pi\times10^{-7})(2.50)}{4(0.0800)}
> =9.82\ \mu\mathrm T.
> $$
>
> A full circle of the same radius and current gives twice this,
> $\mu_0 I/2a=19.6\ \mu\mathrm T$. The number alone fixes nothing without the
> direction, radius, angular span, and lead geometry that produced it.

### Piecewise paths and closure of the physical circuit

The source path in a Biot--Savart calculation is a directed curve, not a collection
of unconnected segments. Label polygonal-circuit vertices in the direction of
conventional current and evaluate every segment with its own endpoints. The total
field is

$$
\vec B(\vec R)
=\sum_{k=1}^{N}
\frac{\mu_0 I}{4\pi}
\int_{C_k}
\frac{\d\vec\ell_k\mathbin{\times}
\left(\vec R-\vec r'_k\right)}
{\left|\vec R-\vec r'_k\right|^3}.
$$

At a vertex, adjacent directed chords meet but their tangent directions differ.
Neither segment should borrow the other segment's perpendicular distance or endpoint
angle. A symmetric path can reduce the amount of arithmetic after components have
been paired. Every side of a square centred on an observation point in its plane
gives the same normal component at the centre, so one finite-wire result is
multiplied by four. Away from the centre, opposite sides have unequal endpoint
angles and must be evaluated separately.

$$
% caption: Directed polygonal circuit for a piecewise Biot–Savart sum. Each side has its own endpoint geometry to the sample point; central symmetry combines equivalent sides only after their normal contributions agree.
\begin{tikzpicture}[>=stealth,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}
\draw[acc,very thick,->] (1.05,.65)--(2.9,.65);
\draw[acc,very thick] (2.75,.65)--(4.55,.65);
\draw[acc,very thick,->] (4.55,.65)--(4.55,1.95);
\draw[acc,very thick] (4.55,1.85)--(4.55,3.05);
\draw[acc,very thick,->] (4.55,3.05)--(2.7,3.05);
\draw[acc,very thick] (2.85,3.05)--(1.05,3.05);
\draw[acc,very thick,->] (1.05,3.05)--(1.05,1.75);
\draw[acc,very thick] (1.05,1.85)--(1.05,.65);
\filldraw[draw=black,fill=black!8] (2.55,1.6) circle (.07);
\draw[black,dashed] (1.05,.65)--(2.55,1.6);
\draw[black,dashed] (4.55,3.05)--(2.55,1.6);
\node[black,above left] at (2.5,1.66) {sample point};
\node[below] at (3.0,.65) {side 1};
\node[right] at (4.55,1.3) {side 2};
\end{tikzpicture}
$$

Path closure has a physical basis. Steady current entering a local section of a
circuit also leaves through some route; otherwise charge density would build up.
When a drawing shows only one intended segment, the omitted feed and return paths
remain part of the experimental apparatus. Their influence may be small at a
specified observation point, but that is an approximation supported by separation
and geometry. Twisting a supply pair reduces the area enclosed by the forward and
return currents and commonly reduces its remote magnetic signal. Locating a return
lead far from a sensitive measurement region can increase the loop area and produce
a background field of the same order as the intended source.

A convenient audit consists of three calculations: the intended segment alone, the
return path alone, and the full closed circuit. The difference between the first and
third values quantifies the lead correction directly. If the correction is larger
than the desired uncertainty, redesign the wiring or include all source paths in the
reported field. An apparatus drawing with current arrows is often more informative
than a single scalar field value because it exposes the route assumptions used in the
model.

### Parametric paths, units, and singular source limits

A parameter $s$ specifies a smooth three-dimensional conductor as

$$
\vec r'=\vec r'(s),
\qquad
\d\vec\ell=\frac{\d\vec r'}{\d s}\,\d s,
\qquad
\vec r=\vec R-\vec r'(s).
$$

The parameter can be arc length, time-like path coordinate, or any monotonic
labelling of the route. Arc length simplifies the geometry because
$\left|\d\vec r'/\d s\right|=1$. Any monotonic parameter works when its derivative
is retained. Unit consistency follows from the integrand:
$\mu_0I\,\d\ell/r^2$ has units of tesla. A source-coordinate table in
centimetres inserted into an SI calculation changes the result by powers of one
hundred, so coordinates should be converted before differences and norms are formed.

The filament model has a singularity if the observation point lies on the idealized
source path. The factor $1/r^3$ is then undefined, while a real conductor has a
finite radius and a distributed current density. Measurements inside or adjacent to
a wire therefore require a finite-cross-section model. A round wire of radius $a$
carrying uniform DC current has an interior field rising from zero at the centre
to the exterior value at the surface. A line-source calculation may still describe
points many radii away, where differences across the cross-section are too small to
resolve at the required accuracy.

An implementation should reject or flag source segments whose midpoint approaches an
observation point closer than the stated conductor radius. Refining a filament mesh
does not cure this modelling error; it only evaluates the singular source more
closely. Replace the segment with an area or volume-current model, or move the
observation coordinate into the external region. This boundary belongs in both
analytic and numerical reports.

### Checks before accepting a Biot--Savart result

Several checks apply without repeating a full derivation. Current reversal must
reverse every signed magnetic component. Mirror symmetry of a source path can force
one component to vanish on a symmetry plane. Far from a compact closed circuit, the
field should decay more rapidly than the $1/\rho$ field of an ideal infinite wire;
the latter geometry contains current extending without bound. Dimensional analysis
requires tesla, and the direction must be perpendicular to the local plane defined
by a source element and its separation vector.

Evaluate a computed path at a sequence of distances and plot one signed component
after choosing an axis. A long straight central region approaches
an inverse-distance trend over distances small compared with endpoint separation.
At larger distances, endpoint and return-path effects bend the curve away from that
local approximation. The complete curve tests the stated source model across its
geometric range.

$$
% caption: Field of a finite straight segment versus distance. Near the middle the field tracks the inverse-distance trend of a long wire; past distances comparable with the segment length, endpoint geometry pulls it below that trend. One fixed normal orientation is used throughout.
\begin{tikzpicture}[>=stealth,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}
\draw[->,black] (.45,.40)--(5.90,.40) node[right] {distance};
\draw[->,black] (.65,.20)--(.65,3.15) node[above] {$B$};
\draw[acc,very thick] plot[domain=.92:5.30,samples=120]
  (\x,{.55+4.51/(\x*sqrt(\x^2+4))});
\draw[black,dashed] plot[domain=.92:2.30,samples=70]
  (\x,{.55+2.05/\x});
\node[acc,above right] at (3.55,.92) {exact segment};
\node[black,below] at (1.65,1.02) {long-wire trend};
\end{tikzpicture}
$$

Analytic and numerical answers should agree within a stated tolerance for a test
geometry with a known solution, such as a finite straight segment or a circular arc.
Then vary one physical quantity at a time: double current, reverse its sign, double
all source dimensions at fixed shape, or move the observation point to a symmetry
location. Each variation has a predicted response. Agreement across these checks
establishes that the coordinate convention, source discretisation, and circuit
closure have been applied consistently.

### Evaluating the straight-segment integral directly

The finite-wire expression follows from a one-variable integral whose geometry is
worth retaining. Put the wire on the $x$ axis, place the sample point at
$(0,\rho,0)$, and direct conventional current toward increasing $x$. A source
element at $(x,0,0)$ has

$$
\d\vec\ell=dx\,\hat x,
\qquad
\vec r=-x\,\hat x+\rho\,\hat y,
\qquad
\d\vec\ell\mathbin{\times}\vec r
=\rho\,\d x\,\hat z.
$$

The field therefore has one positive $z$ component for every source coordinate in
the chosen arrangement. Its magnitude integral is

$$
B_z=\frac{\mu_0I}{4\pi}
\int_{x_A}^{x_B}
\frac{\rho\,\d x}{(x^2+\rho^2)^{3/2}}.
$$

Set $u=x/\rho$. The antiderivative is

$$
\int\frac{\d u}{(1+u^2)^{3/2}}
=\frac{u}{\sqrt{1+u^2}},
$$

which gives

$$
B_z=\frac{\mu_0I}{4\pi\rho}
\left[
\frac{x}{\sqrt{x^2+\rho^2}}
\right]_{x_A}^{x_B}.
$$

The derivation identifies the inverse-$\rho$ factor and shows why both
endpoints remain present. A segment from $x_A=-a$ to $x_B=b$ gives the earlier
endpoint sum because the lower limit is negative. A segment entirely to one side of
the perpendicular foot can have a positive value at both endpoints; subtracting
them then leaves the smaller physical contribution. Substituting unsigned endpoint
distances into this signed bracket produces an artificially large field.

The dimensionless endpoint factor helps judge when the long-wire approximation is
adequate. A centred segment with half-length $a$ has

$$
B_z=
\frac{\mu_0I}{2\pi\rho}
\underbrace{\frac{a/\rho}
{\sqrt{1+(a/\rho)^2}}}_{F(a/\rho)}.
$$

Here $F$ is below one for every finite segment and tends to one only as
$a/\rho$ grows. At $a/\rho=1$, the finite result is about $70.7\%$ of the
infinite-wire value. At $a/\rho=3$, it is about $94.9\%$. The approximation
error is a geometric quantity, separate from meter resolution or current stability.

The coordinate derivation also fixes the field sign without memorizing a separate
diagram. If the current reverses, $dx\,\hat x$ changes sign and so does
$B_z$. If the sample point moves to $(0,-\rho,0)$, the separation's $y$
component changes sign and the field points along negative $z$. A full vector
calculation uses these coordinate changes directly. The scalar endpoint formula
should only be used after its normal direction has been assigned from the original
cross product.

## Spatial sampling and three-dimensional paths

Magnetic field varies with source-observation distance. For the infinite-wire
reference $B=\mu_0I/(2\pi\rho)$, small independent changes obey

$$
\frac{\delta B}{B}\simeq
\frac{\delta I}{I}-\frac{\delta\rho}{\rho}.
$$

The relation gives a first uncertainty budget. A $0.50\ \mathrm{mm}$ position
uncertainty at $\rho=10.0\ \mathrm{mm}$ contributes roughly five percent relative
uncertainty before any current uncertainty or sensor calibration is included.
Finite-wire endpoint factors add a further position dependence because changing
$\rho$ also changes each endpoint angle. A numerical derivative of the stated
finite-source expression is usually clearer than treating the source as infinite
when the scan distance is comparable with wire length.

A magnetometer records an average over a nonzero active region. In a weak gradient,
the centre-point prediction is a good representation of that average. In a steep
gradient, values across the active area differ, and rotating the probe changes the
component it detects. State the sensor axis, active width, nominal coordinate, and
the mechanical datum from which $\rho$ was measured. A probe face placed against
insulation has its active element farther from the conductor than the face position
suggests.

Position calibration benefits from a repeatable mechanical reference. Measure the
wire centreline position, the insulation thickness when relevant, and the offset
between the probe mounting point and active sensing region. A symmetry scan locates
the transverse centreline more reliably than a ruler reading alone. Near a long
straight wire, a signed normal component changes sign across the wire axis. Locate
that zero crossing, then use a separate known spacing for the absolute perpendicular
distance.

Current reversal isolates the source contribution from Earth field, nearby steel,
and electronic offset. It does not remove a position error that is unchanged between
the two readings. A calibration record therefore includes the two reversed readings, a
zero-current reading, the position coordinate, and the uncertainty associated with
the mounting geometry. Treating a stable probe output as proof of an accurate
source-to-probe distance leaves the dominant error untested in many near-wire
measurements.

### Vector components for three-dimensional source paths

Choose axes before evaluating the integral for a general path. Each source segment
contributes

$$
\d B_x=\frac{\mu_0I}{4\pi}
\frac{\d\ell_y r_z-\d\ell_z r_y}{r^3},
\qquad
\d B_y=\frac{\mu_0I}{4\pi}
\frac{\d\ell_z r_x-\d\ell_x r_z}{r^3},
\qquad
\d B_z=\frac{\mu_0I}{4\pi}
\frac{\d\ell_x r_y-\d\ell_y r_x}{r^3}.
$$

The component form is especially effective for a source path that leaves one plane.
Pair geometrically related elements before simplifying. A mirror pair may cancel
$B_x$ while adding $B_z$, for example. A single scalar $B$ cannot preserve
that information. Store a signed vector at each numerical step and take a magnitude
only after all source contributions have been summed.

Coordinate records also make independent reproduction possible. List the unit of
every coordinate, the source vertex order, the chosen positive normal for any planar
subproblem, and the component measured by the instrument. A comparison between an
axis-sensitive sensor and a calculated magnitude requires a projection of the
calculated vector onto the sensor axis. Omitting that projection can create an
apparent disagreement even when the source integral itself is correct.

### Superposition of several paths

Magnetostatic fields add linearly. When a region holds a main conductor, a return
lead, and a trim coil, evaluate each path with its own current and add the vector
results:

$$
\vec B_{\rm total}(\vec R)=\vec B_1(\vec R)+\vec B_2(\vec R)+\vec B_3(\vec R).
$$

The same set of paths can reinforce at one point and cancel at another, which a scalar
magnitude cannot capture. Keep a signed component for each path, on one common set of
axes, and sum before taking any magnitude.

## Range of the magnetostatic model

The line integral assumes a steady current. Electromagnetic changes travel at $c$, so
across a geometry of size $L$ the propagation delay is $L/c$. For a sinusoidal current
at angular frequency $\omega$, the instantaneous magnetostatic form holds when

$$
\frac{\omega L}{c}\ll1
$$

and the current distribution stays close to its low-frequency shape. A rapidly pulsed
source needs the retarded fields and the induced electric field of a changing flux,
which belong to induction and electromagnetic waves; skin effect and inductance can
tighten the bound further. For DC the qualification reduces to the geometry and
current distribution already specified.

The same record should identify the physical coordinate reference. A distance
measured from a clamp edge, insulation surface, conductor centreline, or probe
housing describes four different source-observation geometries. Convert the selected
mechanical reference into the centreline-to-active-region separation before entering
the Biot--Savart integral. A photograph or dimensioned drawing is warranted when a
return lead passes behind the probe or leaves the nominal source plane.
It also preserves the experimental sign convention.
