In magnetostatics, the force of attraction or repulsion between two current-carrying wires (see first figure below) is often called **Ampère's force law**. The physical origin of this force is that each wire generates a magnetic field, following the Biot–Savart law, and the other wire experiences a magnetic force as a consequence, following the Lorentz force law.

# Equation

The best-known 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

where *k*A is the magnetic force constant from the Biot–Savart law, *Fm/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, so 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 infinite-wire 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]}

with μ0 the magnetic constant, *defined* in SI units as^{[3]}^{[4]}

Thus, in vacuum,

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]}

where

- 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,
- and are infinitesimal vectors associated with wire 1 and wire 2 respectively (usually measured in metres); see line integral for a detailed definition,
- The vector 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 (for example, if 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.

For the case of two separate closed wires, the law can be rewritten in the following equivalent way by expanding the vector triple product and applying Stokes' theorem:^{[8]}

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.

# Historical background

The form of Ampere's force law commonly given was derived by Maxwell and is one of several expressions consistent with the original experiments of Ampère and Gauss.
The x-component of the force between two linear currents I and I’, as depicted in the adjacent diagram, was given by Ampère in 1825 and Gauss in 1833 as follows:^{[9]}

Following Ampère, a number of scientists, including Wilhelm Weber, Rudolf Clausius, James Clerk Maxwell, Bernhard Riemann, Hermann Grassmann,^{[10]} and Walther Ritz, developed this expression to find a fundamental expression of the force. Through differentiation, it can be shown that:

and also the identity:

With these expressions, Ampère's force law can be expressed as:

Using the identities:

and

Ampère's results can be expressed in the form:

As Maxwell noted, terms can be added to this expression, which are derivatives of a function Q(r) and, when integrated, cancel each other out. Thus, Maxwell gave "the most general form consistent with the experimental facts" for the force on ds arising from the action of ds':^{[11]}

Q is a function of r, according to Maxwell, which "cannot be determined, without assumptions of some kind, from experiments in which the active current forms a closed circuit." Taking the function Q(r) to be of the form:

We obtain the general expression for the force exerted on ds by ds:

Integrating around s' eliminates k and the original expression given by Ampère and Gauss is obtained. Thus, as far as the original Ampère experiments are concerned, the value of k has no significance. Ampère took k=-1; Gauss took k=+1, as did Grassmann and Clausius, although Clausius omitted the S component. In the non-ethereal electron theories, Weber took k=-1 and Riemann took k=+1. Ritz left k undetermined in his theory. If we take k = -1, we obtain the Ampère expression:

If we take k=+1, we obtain

Using the vector identity for the triple cross product, we may express this result as

When integrated around ds' the second term is zero, and thus we find the form of Ampère's force law given by Maxwell:

# Derivation of parallel straight wire case from general formula

Start from the general formula:

and

Therefore, the integral is

Evaluating the cross-product:

As expected, the force that the wire feels is proportional to its length. The force per unit length is:

# Notable derivations of Ampère's force law

Chronologically ordered:

- Ampère's original 1823 derivation:
Assis, André Koch Torres; Chaib, J. P. M. C; Ampère, André-Marie (2015).
*Ampère's electrodynamics: analysis of the meaning and evolution of Ampère's force between current elements, together with a complete translation of his masterpiece: Theory of electrodynamic phenomena, uniquely deduced from experience*^{[20]}(PDF). Montreal: Apeiron. ISBN 978-1-987980-03-5. - Maxwell's 1873 derivation:
*Treatise on Electricity and Magnetism*vol. 2, part 4, ch. 2 (§§502-527)^{[21]} - Pierre Duhem's 1892 derivation:
Duhem, Pierre Maurice Marie (9 September 2018).
*Ampère's Force Law: A Modern Introduction*^{[22]}. Alan Aversa (trans.). doi:10.13140/RG.2.2.31100.03206/1^{[23]}. Retrieved 3 July 2019. (EPUB^{[24]}) translation of:*Leçons sur l'électricité et le magnétisme*vol. 3, appendix to book 14, pp. 309-332^{[25]}(in French) - Alfred O'Rahilly's 1938 derivation:
*Electromagnetic Theory: A Critical Examination of Fundamentals*vol. 1, pp. 102^{[26]}-104 (cf. the following pages, too)