thumb|350px|The [[magnetic field due to natural magnetic dipoles (upper left), magnetic monopoles (upper right), an electric current in a circular loop (lower left) or in a solenoid (lower right). All generate the same field profile when the arrangement is infinitesimally small.]]
In electromagnetism, a magnetic dipole is a theoretical description of a sufficiently small magnet such as that of an atom or electron. All magnets can be described as being a magnetic dipole for sufficiently large distances from the magnet. The strength of a magnetic dipole is determined by a single property its magnetic dipole moment. The magnetic dipole model accurately predicts many properties of small magnets such as the magnetic field it produces, how it interacts with other magnetic dipoles, and how an external magnetic field will apply a torque or create a net force on the dipole.
Two different models can be used to describe a magnetic dipole. The simplest to understand, but least correct, is to imagine the magnet as 2 equal but opposite poles that act similar to electric charges. The 'ideal' magnetic dipole then is modeled by shrinking the distance between the poles while increasing the magnetic pole strength such that product of the two (the magnetic dipole moment) remains at the given value for that dipole. This can often give correct results in an easy to understand way, but suffers from being incorrect (magnetic poles do not exist as separate entities) and giving incorrect results in certain cases (for example inside of a magnet).
The more correct description of a magnetic dipole is that of a closed loop of electric current that encloses a flat area . The magnetic moment of this dipole then is the product of its area and it current. This amperian loop model has the advantage of being physically correct, at least for the part of the magnetic field of an atom due to the motion of the electrons around the nucleus of atoms.
Because magnetic monopoles do not exist, the magnetic field at a large distance from any static magnetic source looks like the field of a dipole with the same dipole moment. For higher-order sources (e.g. quadrupoles) with no dipole moment, their field decays towards zero with distance faster than a dipole field does.
Models
The preferred classical explanation of a magnetic dipole has changed over time. Before the 1930s, textbooks explained the magnetic dipole using hypothetical magnetic point charges. Since then, most have defined it in terms of Ampèrian currents. In magnetic materials, the cause of the magnetic moment are the spin and orbital angular momentum states of the electrons.
Magnetic pole model
thumb|upright|An electrostatic analog for a magnetic moment: two opposing charges separated by a finite distance.
The sources of magnetic moments in materials can be represented by poles in analogy to electrostatics. This is sometimes known as the Gilbert model. In this model, a small magnet is modeled by a pair of fictitious magnetic monopoles of equal magnitude but opposite polarity. Each pole is the source of magnetic force which weakens with distance. Since magnetic poles always come in pairs, their forces partially cancel each other because while one pole pulls, the other repels. This cancellation is greatest when the poles are close to each other i.e. when the bar magnet is short. The magnetic force produced by a bar magnet, at a given point in space, therefore depends on two factors: the strength of its poles (magnetic pole strength), and the vector <math>\mathrm{\boldsymbol \ell}</math> separating them. The magnetic dipole moment is related to the fictitious poles as When the current density in the integral is replaced by a loop of current I in a plane enclosing an area S then the volume integral becomes a line integral and the resulting dipole moment becomes
<math display="block">\mathbf{m} = I\mathbf{S},</math>
which is how the magnetic dipole moment for an Amperian loop is derived.
Practitioners using the current loop model generally represent the magnetic field by the solenoidal field , analogous to the electrostatic field .
Magnetic moment of a solenoid
thumb|right|Image of a solenoid
A generalization of the above current loop is a coil, or solenoid. Its moment is the vector sum of the moments of individual turns. If the solenoid has identical turns (single-layer winding) and vector area ,
<math display="block">\mathbf{m} = N I \mathbf{S}.</math>
Quantum mechanical model
When calculating the magnetic moments of materials or molecules on the microscopic level it is often convenient to use a third model for the magnetic moment that exploits the linear relationship between the angular momentum and the magnetic moment of a particle. While this relation is straightforward to develop for macroscopic currents using the amperian loop model (see below), neither the magnetic pole model nor the amperian loop model truly represents what is occurring at the atomic and molecular levels. At that level quantum mechanics must be used. Fortunately, the linear relationship between the magnetic dipole moment of a particle and its angular momentum still holds, although it is different for each particle. Further, care must be used to distinguish between the intrinsic angular momentum (or spin) of the particle and the particle's orbital angular momentum.
External magnetic field produced by a magnetic dipole moment
thumb|200px|upright|An electrostatic analogue for a magnetic moment: two opposing charges separated by a finite distance. Each arrow represents the direction of the field vector at that point.
thumbnail|200px|right|The magnetic field of a current loop. The ring represents the current loop, which goes into the page at the x and comes out at the dot.
In classical physics, the magnetic field of a dipole is calculated as the limit of either a current loop or a pair of charges as the source shrinks to a point while keeping the magnetic moment constant. For the current loop, this limit is most easily derived from the vector potential:
: <math>{\mathbf{A({\mathbf{r)=\frac{\mu_{0{4\pi}\frac\times{\mathbf{r}{r^{3,</math>
where μ<sub>0</sub> is the vacuum permeability constant and is the surface of a sphere of radius .
The magnetic flux density (strength of the B-field) is then
:<math> \mathbf{F} = \nabla\left(\mathbf{m}_2\cdot\mathbf{B}_1\right), </math>
or
: <math>
\mathbf{F}(\mathbf{r}, \mathbf{m}_1, \mathbf{m}_2) = \dfrac{3 \mu_0}{4 \pi r^5}\left[(\mathbf{m}_1\cdot\mathbf{r})\mathbf{m}_2 + (\mathbf{m}_2\cdot\mathbf{r})\mathbf{m}_1 + (\mathbf{m}_1\cdot\mathbf{m}_2)\mathbf{r} - \dfrac{5(\mathbf{m}_1\cdot\mathbf{r})(\mathbf{m}_2\cdot\mathbf{r})}{r^2}\mathbf{r}\right],
</math>
where is the distance between dipoles. The force acting on is in the opposite direction.
The torque can be obtained from the formula
: <math>\boldsymbol{\tau}=\mathbf{m}_2 \times \mathbf{B}_1.</math>
Dipolar fields from finite sources
The magnetic scalar potential produced by a finite source, but external to it, can be represented by a multipole expansion. Each term in the expansion is associated with a characteristic moment and a potential having a characteristic rate of decrease with distance from the source. Monopole moments have a rate of decrease, dipole moments have a rate, quadrupole moments have a rate, and so on. The higher the order, the faster the potential drops off. Since the lowest-order term observed in magnetic sources is the dipole term, it dominates at large distances. Therefore, at large distances any magnetic source looks like a dipole of the same magnetic moment.
