Equation
Special case: Two straight parallel wires
The bestknown and simplest example of Ampère's force law, which underlies the definition of the
ampere, the
SI unit of current, states that the force per unit length between two straight parallel conductors is

 ${\frac {F_{m}}{L}}=2k_{A}{\frac {I_{1}I_{2}}{r}}$,
where k_{A} is the magnetic force constant from the
Biot–Savart law, F_{m}/L is the total force on either wire per unit length of the shorter (the longer is approximated as infinitely long relative to the shorter), r is the distance between the two wires, and I_{1}, I_{2} are the
direct currents carried by the wires.
This is a good approximation if one wire is sufficiently longer than the other that it can be approximated as infinitely long, and if the distance between the wires is small compared to their lengths (so that the one infinitewire approximation holds), but large compared to their diameters (so that they may also be approximated as infinitely thin lines). The value of k_{A} depends upon the system of units chosen, and the value of k_{A} decides how large the unit of current will be. In the
SI system,^{
[1]} ^{
[2]}

 $k_{A}\ {\overset {\underset {\mathrm {def} }{}}{=}}\ {\frac {\mu _{0}}{4\pi }}$
with μ_{0} the
magnetic constant, defined in SI units as^{
[3]}^{
[4]}

 $\mu _{0}\ {\overset {\underset {\mathrm {def} }{}}{=}}\ 4\pi \times 10^{7}$
N /
A^{2}.
Thus, in vacuum,
 the force per
meter of length between two parallel conductors – spaced apart by 1 m and each carrying a current of 1
A – is exactly

 $\displaystyle 2\times 10^{7}$
N /
m.
Demonstration of Ampère's force law. The force acts between two parallel conductors with constant currents passing through them. If they have the same direction, there is force of attraction, but if the directions are opposite, then the force is repellent.
Performed by Prof. Oliver Zajkov at the Physics Institute at the
Ss. Cyril and Methodius University of Skopje, Macedonia.
General case
The general formulation of the magnetic force for arbitrary geometries is based on iterated
line integrals and combines the
Biot–Savart law and
Lorentz force in one equation as shown below.^{
[5]}^{
[6]}^{
[7]}
 ${\vec {F}}_{12}={\frac {\mu _{0}}{4\pi }}\int _{L_{1}}\int _{L_{2}}{\frac {I_{1}d{\vec {\ell }}_{1}\ \mathbf {\times } \ (I_{2}d{\vec {\ell }}_{2}\ \mathbf {\times } \ {\hat {\mathbf {r} }}_{21})}{r^{2}}}$,
where
 ${\vec {F}}_{12}$ is the total magnetic force felt by wire 1 due to wire 2 (usually measured in
newtons),
 I_{1} and I_{2} are the currents running through wires 1 and 2, respectively (usually measured in
amperes),
 The double line integration sums the force upon each element of wire 1 due to the magnetic field of each element of wire 2,
 $d{\vec {\ell }}_{1}$ and $d{\vec {\ell }}_{2}$ are infinitesimal vectors associated with wire 1 and wire 2 respectively (usually measured in
metres); see
line integral for a detailed definition,
 The vector ${\hat {\mathbf {r} }}_{21}$ is the
unit vector pointing from the differential element on wire 2 towards the differential element on wire 1, and r is the distance separating these elements,
 The multiplication × is a
vector cross product,
 The sign of I_{n} is relative to the orientation $d{\vec {\ell }}_{n}$ (for example, if $d{\vec {\ell }}_{1}$ points in the direction of
conventional current, then I_{1}>0).
To determine the force between wires in a material medium, the
magnetic constant is replaced by the actual
permeability of the medium.
By expanding the
vector triple product and applying Stokes' theorem, the law can be rewritten in the following equivalent way:^{
[8]}
 ${\vec {F}}_{12}={\frac {\mu _{0}}{4\pi }}\int _{L_{1}}\int _{L_{2}}{\frac {(I_{1}d{\vec {\ell }}_{1}\ \mathbf {\cdot } \ I_{2}d{\vec {\ell }}_{2})\ {\hat {\mathbf {r} }}_{21}}{r^{2}}}.$
In this form, it is immediately obvious that the force on wire 1 due to wire 2 is equal and opposite the force on wire 2 due to wire 1, in accordance with
Newton's 3rd law.