What is a dipole moment?
This question is more complicated than it looks. There are two ways to define a dipole moment:
In general the value of the dipole moment will depend on the choice of origin. However, in the special case in which total charge vanishes, the dipole moment is independent of origin.
The simplest example of an electric dipole is two oppositely charged particles (charge \(\pm q\)) separated by some distance \(d\). Since total charge vanishes, the dipole moment is independent of origin, and it is easy to see that its magnitude is \(qd\), and that it is directed along the vector from the negative charge to the positive charge.
Now I've defined the dipole moment but I haven't explained its significance. The dipole moment shows up in something called the multipole expansion. I won't explain in detail how this works, but basically it's a way to write a potential with \(1/r\) dependence as a series in powers of \(1/r\). If we have a collection of particles with charges \(q_i\) and positions \(\mathbf{r}'_i\), then \[\phi = \frac{k}{r}\left[\sum_i q_i\right] + \frac{k}{r^2} \left[\sum_i q_i r'_{ij}\right] \hat{r}_j + \frac{k}{2r^3} \left[\sum_i q_i(3 r'_{ij} r'_{ik} - \delta_{jk} r'_i{}^2)\right] \hat{r}_j \hat{r}_k + \ldots\] Note that \(r'_{ij}\) denotes the \(j\)th coordinate of the position of the \(i\)th particle. Repeated indices other than i are summed over. We can also write this in integral form for a continuous matter distribution: \[\phi = \frac{k}{r}\left[\int \rho \, d^3\mathbf{r}'\right] + \frac{k}{r^2} \left[\int \rho r'_j \, d^3\mathbf{r}'\right] \hat{r}_j + \frac{k}{2r^3} \left[\int \rho (3 r'_j r'_k - \delta_{jk} r^{\prime 2}) \, d^3 \mathbf{r}'\right] \hat{r}_j \hat{r}_k + \ldots\] This is the multipole expansion. The first bracketed expression is just the total charge, also called the monopole moment. The term that contains it has \(1/r\) dependence and is the leading-order term. So this tells you that far away from a source, the source looks like a point whose charge is the total charge of the source. The second bracketed expression is recognizable as the dipole moment, which was previously defined. The dipole term contributes to the potential too, but it falls off as \(1/r^2\), so will in general be negligible far away from the source unless the monopole moment vanishes. If the monopole moment vanishes, the dipole term will be the leading-order term. For a "point dipole", then, consisting of two equally and oppositely charged particles very close together, we have \[\phi \approx \frac{k}{r^2} \mathbf{d} \cdot \hat{\mathbf{r}}\] So in general the dipole moment \(\mathbf{d}\), a property of a charge distribution, describes the \(1/r^2\) dependence of the potential (and hence \(1/r^3\) dependence of the field). The magnitude of the dipole moment determines the strength of the dipole part of the field, and the direction enters into the equation through the dot product. For example, if the dipole is located at the origin and oriented along the z-axis, then if you approach along the xy plane, you see no potential. But if you approach along the z-axis, you see a potential that varies as \(1/r^2\).
The next bracketed expression \(\int \rho (3 r'_j r'_k - \delta_{jk} r^{\prime 2})\) is the traceless quadrupole moment. It's responsible for a potential that falls off as \(1/r^3\), and is significant when the dipole moment vanishes as well as the monopole moment. And so on. I won't go into too much detail here.
We can expand the gravitational field in the same way; to calculate the Newtonian gravitational potential, just use the mass of each particle as its charge in the above formulae. So you can compute the mass monopole (total mass), mass dipole, mass quadrupole, and so on. (Also, don't forget to use \(G\) for the constant \(k\).)
There is also a magnetic dipole moment. This is a bit more subtle than it seems. Magnetically charged particles are not known to exist in nature. Magnetic fields as we know them are produced by electric currents. That is, the source of the magnetic vector potential \(\mathbf{A}\) is the current density \(\mathbf{J}\).
Now, the magnetic vector potential depends on each component of the current density separately in the same way in which the electric scalar potential depends on the charge density and the Newtonian gravitational potential depends on the mass density: \begin{align*}\phi &= k_E \int \frac{\rho}{\|\mathbf{r} - \mathbf{r}'\|} \, d^3 \mathbf{r}' \\ A_i &= k_M \int \frac{J_i}{\|\mathbf{r} - \mathbf{r}'\|} \, d^3 \mathbf{r}'\end{align*} where \(k_E = 1/(4\pi \epsilon_0)\) and \(k_M = \mu_0/(4\pi)\) in SI units.
So we can immediately write down the multipole expansion for a given component of the magnetic vector potential, by analogy. \[A_i = \frac{k}{r} \left[\int J_i \, d^3\mathbf{r}'\right] + \frac{k}{r^2} \left[\int J_i r'_j \, d^3 \mathbf{r}'\right] \hat{r}_j + \frac{k}{2r^3} \left[\int J_i (3r'_j r'_k - \delta_{jk} r'^2) \, d^3\mathbf{r}'\right] \hat{r}_j \hat{r}_k + \ldots\] So we see that the leading-order contribution to the magnetic vector potential is given by \[\mathbf{A} \approx \frac{k}{r} \int \mathbf{J} \, d^3\mathbf{r}'\] This is the monopole term; the monopole moment is just the total current. The total current always vanishes for a static current distribution, because otherwise there would be a net movement of charge over time. Thus, not only are there no magnetic monopoles, but there is also no way to set up a static current distribution that produces a \(1/r\) magnetic vector potential. The magnetic vector potential always falls off as \(1/r^2\) or faster for a static current distribution.
Now, consider the dipole term: \[A_i \approx \frac{k}{r^2} \left[\int J_i r'_j \, d^3\mathbf{r}'\right] \hat{r}_j \] The bracketed object is a second-rank tensor; it has two free indices: i and j. Contracting it with the unit vector \(\hat{\mathbf{r}}\) gives a vector, the magnetic vector potential on the left side. This second-rank tensor is the magnetic dipole moment. Likewise, the magnetic quadrupole moment is a third-rank tensor which is contracted with two unit radial vectors to give a resulting vector, the quadrupole contribution to the magnetic vector potential, and so on.
However, the magnetic dipole moment is usually thought of as a vector. How can this be, if it's a second-rank tensor? Hodge duality strikes again! For a static current distribution, consider for fixed i, j the quantity \[I = \int r'_i r'_j \rho(\mathbf{r}') \, d^3\mathbf{r}'\] This quantity should be constant in time since the charge distribution is assumed to remain constant in time. Differentiate this, use the continuity equation to replace \(\partial \rho/\partial t\) by \(-\nabla \cdot \mathbf{J}\), integrate by parts, and discard the surface term at infinity. You will obtain the result that \[ \int r'_i J_j + r'_j J_i \, d^3 \mathbf{r}' = 0\] Therefore the magnetic dipole moment tensor is antisymmetric. Rewrite the dipole term by explicitly antisymmetrizing: \[A_i \approx \frac{k}{2r^2} \left[\int J_i r'_j - J_j r'_i \, d^3\mathbf{r}'\right] \hat{r}_j\] We can rewrite \(J_i r'_j - J_j r'_i\) as \(-\epsilon_{ijk} \epsilon_{lmk} r'_l J_m\) using the contracted epsilon identity. Recognizing the cross product, \[J_i r'_j - J_j r'_i = -\epsilon_{ijk} (\mathbf{r}' \times \mathbf{J})_k\] Define the magnetic dipole moment pseudovector, \[\boldsymbol \mu = \frac{1}{2} \int \mathbf{r}' \times \mathbf{J} \, d^3\mathbf{r}'\] Then \[A_i \approx \frac{k}{r^2} [-\epsilon_{ijk} \mu_k] \hat{r}_j = \frac{k}{r^2} \epsilon_{ikj} \mu_k \hat{r}_j = \frac{k}{r^2} (\boldsymbol\mu \times \hat{\mathbf{r}})_i\] so in conclusion \[\mathbf{A} \approx \frac{k}{r^2} \boldsymbol\mu \times \hat{\mathbf{r}}.\] The pseudovector \(\boldsymbol\mu\) is what we usually think of as the magnetic dipole moment, but it is important to bear in mind that it is just a shorthand for the second-rank tensor originally derived from the multipole expansion. The magnetic dipole moment pseudovector has strange-looking definition with the cross product. The original tensor falls out of the multipole expansion in a straightforward way, in analogy to the electric and mass dipole moments.
The energy of an extended charged body in an external electric field is \[H = \int \rho \phi \, d^3 \mathbf{r}\] We can perform a multipole expansion of this so-called interaction Hamiltonian by expanding the potential in a Taylor series, \[\phi = \phi(0) + \frac{\partial \phi}{\partial x_i}\bigg|_0 r_i + \frac{1}{2} \frac{\partial^2 \phi}{\partial x_i \partial x_j} \bigg|_0 r_i r_j + \ldots\] Note that \(\partial \phi/\partial x_i = -E_i\) and \(\frac{\partial^2 \phi}{\partial x_i \partial x_j} = -\partial E_i/\partial x_j\), so \[H = \phi(0) \left[\int \rho \, d^3 \mathbf{r}\right] - E_i(0) \left[\int r_i \rho \, d^3 \mathbf{r}\right] - \frac{1}{2} \partial_i E_j(0) \left[\int r_i r_j \rho \, d^3 \mathbf{r}\right] + \ldots\] Once again we recognize the monopole and dipole moments in brackets. The third bracketed term is the primitive quadrupole moment. (*) It is easy to see how to extend this to higher powers in \(r\).
So if we just write out the first two terms, \[H \approx q\phi(0) - \mathbf{d} \cdot \mathbf{E}(0)\] with \(q\) the total charge, and \(\mathbf{d}\) the dipole moment. So we see that the potential energy is minimized when the dipole moment lines up with the external electric field.
For a current distribution in a magnetic field we can likewise write down the Hamiltonian \[H = \int \mathbf{A} \cdot \mathbf{J} \, d^3 \mathbf{r}\] and on performing the Taylor expansion we obtain \begin{align*}H &= \int A_i(0) J_i + \partial_i A_j(0) r_i J_j + \ldots \, d^3 \mathbf{r} \\ &= A_i(0) \int J_i \, d^3 \mathbf{r} + \partial_i A_j(0) \int r_i J_j \, d^3 \mathbf{r} + \ldots\end{align*} As stated previously, the first term vanishes. For the second term, we know that the object \(\int r_i J_j\), the magnetic dipole moment tensor, is antisymmetric. Therefore its contraction with the tensor \(\partial_i A_j(0)\) is determined by the antisymmetric part of the latter. \begin{align*}H &= \frac{1}{2}(\partial_i A_j(0) - \partial_j A_i(0)) \int r_i J_j \, d^3 \mathbf{r} + \ldots \\ &= \frac{1}{4}(\partial_i A_j(0) - \partial_j A_i(0)) \int r_i J_j - r_j J_i \, d^3\mathbf{r} + \ldots\end{align*} But then \[(J_i r_j - J_j r_i) \hat{r}_j = -2\epsilon_{ijk} \mu_k,\] so \begin{align*}H &= -\frac{1}{2} \epsilon_{ijk} (\partial_i A_j(0) - \partial_j A_i(0)) \mu_k \\ &= -\frac{1}{2} (\epsilon_{kij} \partial_i A_j(0) - \epsilon_{kij} \partial_j A_i(0)) \mu_k \\ &= -\frac{1}{2} (\epsilon_{kij} \partial_i A_j(0) - \epsilon_{kji} \partial_i A_j(0)) \mu_k \\ &= -\epsilon_{kij} \partial_i A_j(0) \mu_k \\ &= -(\nabla \times \mathbf{A})_k \mu_k \\ &= -\mathbf{B} \cdot \boldsymbol\mu\end{align*} So we get the remarkable result that just as an electric dipole has a potential energy \(-\mathbf{d} \cdot \mathbf{E}\) in an electric field, a magnetic dipole has a potential energy \(-\boldsymbol\mu \cdot \mathbf{B}\) in a magnetic field.
The "passive" dipole moment defined in this way, as a coefficient in the multipole expansion of the Hamiltonian, is identical to the "active" dipole moment defined in the previous section. However, passive dipole moments are sometimes easier to observe. For example, it's awfully hard to measure the magnetic field of a single electron (I'm not sure whether it's been done), but it's easy to observe the interaction energy of an electron with a magnetic field: just set up an ensemble and measure the fraction of the population with spin parallel vs. spin antiparallel to the field; then some basic statistical mechanics tells you the energy difference. In fact, we definitely cannot regard the electron as consisting of classical currents, but we can still define the electron's magnetic dipole moment "passively": it is precisely the vector \(\boldsymbol\mu\) such that \[H = -\boldsymbol\mu \cdot \mathbf{B}\] is true.
The electron also has an electric dipole moment, which is defined analogously. (It is too small to measure by any currently known experimental technique, however.)
(*) This can also be replaced by 1/3 of the traceless quadrupole moment. The extra term in the latter makes no difference to the final result, assuming the external electric field satisfies the free space Maxwell's equations (\(\nabla \cdot \mathbf{E} = 0\)).
1. As a function of a field source
Suppose we have a collection of particles numbered 1, 2, ..., N. Each particle has a "charge" \(q_i\). Then we can define the dipole moment as \[\mathbf{d} = \sum_{i=1}^N q_i \mathbf{r}_i\] That is, multiply each particle's charge by its position vector, and sum on all particles. For a continuous distribution of matter, the sum can be replaced by an integral over space where instead of charge we use charge density, \[\mathbf{d} = \int \mathbf{r} \rho(\mathbf{r}) \, d^3\mathbf{r}\] If the charge or charge density is the electric charge or charge density, the resulting quantity is called the electric dipole moment. There is also a mass dipole moment, where the "charge" is mass and "charge density" is mass density.In general the value of the dipole moment will depend on the choice of origin. However, in the special case in which total charge vanishes, the dipole moment is independent of origin.
The simplest example of an electric dipole is two oppositely charged particles (charge \(\pm q\)) separated by some distance \(d\). Since total charge vanishes, the dipole moment is independent of origin, and it is easy to see that its magnitude is \(qd\), and that it is directed along the vector from the negative charge to the positive charge.
Now I've defined the dipole moment but I haven't explained its significance. The dipole moment shows up in something called the multipole expansion. I won't explain in detail how this works, but basically it's a way to write a potential with \(1/r\) dependence as a series in powers of \(1/r\). If we have a collection of particles with charges \(q_i\) and positions \(\mathbf{r}'_i\), then \[\phi = \frac{k}{r}\left[\sum_i q_i\right] + \frac{k}{r^2} \left[\sum_i q_i r'_{ij}\right] \hat{r}_j + \frac{k}{2r^3} \left[\sum_i q_i(3 r'_{ij} r'_{ik} - \delta_{jk} r'_i{}^2)\right] \hat{r}_j \hat{r}_k + \ldots\] Note that \(r'_{ij}\) denotes the \(j\)th coordinate of the position of the \(i\)th particle. Repeated indices other than i are summed over. We can also write this in integral form for a continuous matter distribution: \[\phi = \frac{k}{r}\left[\int \rho \, d^3\mathbf{r}'\right] + \frac{k}{r^2} \left[\int \rho r'_j \, d^3\mathbf{r}'\right] \hat{r}_j + \frac{k}{2r^3} \left[\int \rho (3 r'_j r'_k - \delta_{jk} r^{\prime 2}) \, d^3 \mathbf{r}'\right] \hat{r}_j \hat{r}_k + \ldots\] This is the multipole expansion. The first bracketed expression is just the total charge, also called the monopole moment. The term that contains it has \(1/r\) dependence and is the leading-order term. So this tells you that far away from a source, the source looks like a point whose charge is the total charge of the source. The second bracketed expression is recognizable as the dipole moment, which was previously defined. The dipole term contributes to the potential too, but it falls off as \(1/r^2\), so will in general be negligible far away from the source unless the monopole moment vanishes. If the monopole moment vanishes, the dipole term will be the leading-order term. For a "point dipole", then, consisting of two equally and oppositely charged particles very close together, we have \[\phi \approx \frac{k}{r^2} \mathbf{d} \cdot \hat{\mathbf{r}}\] So in general the dipole moment \(\mathbf{d}\), a property of a charge distribution, describes the \(1/r^2\) dependence of the potential (and hence \(1/r^3\) dependence of the field). The magnitude of the dipole moment determines the strength of the dipole part of the field, and the direction enters into the equation through the dot product. For example, if the dipole is located at the origin and oriented along the z-axis, then if you approach along the xy plane, you see no potential. But if you approach along the z-axis, you see a potential that varies as \(1/r^2\).
The next bracketed expression \(\int \rho (3 r'_j r'_k - \delta_{jk} r^{\prime 2})\) is the traceless quadrupole moment. It's responsible for a potential that falls off as \(1/r^3\), and is significant when the dipole moment vanishes as well as the monopole moment. And so on. I won't go into too much detail here.
We can expand the gravitational field in the same way; to calculate the Newtonian gravitational potential, just use the mass of each particle as its charge in the above formulae. So you can compute the mass monopole (total mass), mass dipole, mass quadrupole, and so on. (Also, don't forget to use \(G\) for the constant \(k\).)
There is also a magnetic dipole moment. This is a bit more subtle than it seems. Magnetically charged particles are not known to exist in nature. Magnetic fields as we know them are produced by electric currents. That is, the source of the magnetic vector potential \(\mathbf{A}\) is the current density \(\mathbf{J}\).
Now, the magnetic vector potential depends on each component of the current density separately in the same way in which the electric scalar potential depends on the charge density and the Newtonian gravitational potential depends on the mass density: \begin{align*}\phi &= k_E \int \frac{\rho}{\|\mathbf{r} - \mathbf{r}'\|} \, d^3 \mathbf{r}' \\ A_i &= k_M \int \frac{J_i}{\|\mathbf{r} - \mathbf{r}'\|} \, d^3 \mathbf{r}'\end{align*} where \(k_E = 1/(4\pi \epsilon_0)\) and \(k_M = \mu_0/(4\pi)\) in SI units.
So we can immediately write down the multipole expansion for a given component of the magnetic vector potential, by analogy. \[A_i = \frac{k}{r} \left[\int J_i \, d^3\mathbf{r}'\right] + \frac{k}{r^2} \left[\int J_i r'_j \, d^3 \mathbf{r}'\right] \hat{r}_j + \frac{k}{2r^3} \left[\int J_i (3r'_j r'_k - \delta_{jk} r'^2) \, d^3\mathbf{r}'\right] \hat{r}_j \hat{r}_k + \ldots\] So we see that the leading-order contribution to the magnetic vector potential is given by \[\mathbf{A} \approx \frac{k}{r} \int \mathbf{J} \, d^3\mathbf{r}'\] This is the monopole term; the monopole moment is just the total current. The total current always vanishes for a static current distribution, because otherwise there would be a net movement of charge over time. Thus, not only are there no magnetic monopoles, but there is also no way to set up a static current distribution that produces a \(1/r\) magnetic vector potential. The magnetic vector potential always falls off as \(1/r^2\) or faster for a static current distribution.
Now, consider the dipole term: \[A_i \approx \frac{k}{r^2} \left[\int J_i r'_j \, d^3\mathbf{r}'\right] \hat{r}_j \] The bracketed object is a second-rank tensor; it has two free indices: i and j. Contracting it with the unit vector \(\hat{\mathbf{r}}\) gives a vector, the magnetic vector potential on the left side. This second-rank tensor is the magnetic dipole moment. Likewise, the magnetic quadrupole moment is a third-rank tensor which is contracted with two unit radial vectors to give a resulting vector, the quadrupole contribution to the magnetic vector potential, and so on.
However, the magnetic dipole moment is usually thought of as a vector. How can this be, if it's a second-rank tensor? Hodge duality strikes again! For a static current distribution, consider for fixed i, j the quantity \[I = \int r'_i r'_j \rho(\mathbf{r}') \, d^3\mathbf{r}'\] This quantity should be constant in time since the charge distribution is assumed to remain constant in time. Differentiate this, use the continuity equation to replace \(\partial \rho/\partial t\) by \(-\nabla \cdot \mathbf{J}\), integrate by parts, and discard the surface term at infinity. You will obtain the result that \[ \int r'_i J_j + r'_j J_i \, d^3 \mathbf{r}' = 0\] Therefore the magnetic dipole moment tensor is antisymmetric. Rewrite the dipole term by explicitly antisymmetrizing: \[A_i \approx \frac{k}{2r^2} \left[\int J_i r'_j - J_j r'_i \, d^3\mathbf{r}'\right] \hat{r}_j\] We can rewrite \(J_i r'_j - J_j r'_i\) as \(-\epsilon_{ijk} \epsilon_{lmk} r'_l J_m\) using the contracted epsilon identity. Recognizing the cross product, \[J_i r'_j - J_j r'_i = -\epsilon_{ijk} (\mathbf{r}' \times \mathbf{J})_k\] Define the magnetic dipole moment pseudovector, \[\boldsymbol \mu = \frac{1}{2} \int \mathbf{r}' \times \mathbf{J} \, d^3\mathbf{r}'\] Then \[A_i \approx \frac{k}{r^2} [-\epsilon_{ijk} \mu_k] \hat{r}_j = \frac{k}{r^2} \epsilon_{ikj} \mu_k \hat{r}_j = \frac{k}{r^2} (\boldsymbol\mu \times \hat{\mathbf{r}})_i\] so in conclusion \[\mathbf{A} \approx \frac{k}{r^2} \boldsymbol\mu \times \hat{\mathbf{r}}.\] The pseudovector \(\boldsymbol\mu\) is what we usually think of as the magnetic dipole moment, but it is important to bear in mind that it is just a shorthand for the second-rank tensor originally derived from the multipole expansion. The magnetic dipole moment pseudovector has strange-looking definition with the cross product. The original tensor falls out of the multipole expansion in a straightforward way, in analogy to the electric and mass dipole moments.
2. As a parameter determining the response of a body to an external field
As always, with field theories, there are two parts to the game. You've got to know how sources generate fields, and you've also got to know how fields influence test particles and test bodies.The energy of an extended charged body in an external electric field is \[H = \int \rho \phi \, d^3 \mathbf{r}\] We can perform a multipole expansion of this so-called interaction Hamiltonian by expanding the potential in a Taylor series, \[\phi = \phi(0) + \frac{\partial \phi}{\partial x_i}\bigg|_0 r_i + \frac{1}{2} \frac{\partial^2 \phi}{\partial x_i \partial x_j} \bigg|_0 r_i r_j + \ldots\] Note that \(\partial \phi/\partial x_i = -E_i\) and \(\frac{\partial^2 \phi}{\partial x_i \partial x_j} = -\partial E_i/\partial x_j\), so \[H = \phi(0) \left[\int \rho \, d^3 \mathbf{r}\right] - E_i(0) \left[\int r_i \rho \, d^3 \mathbf{r}\right] - \frac{1}{2} \partial_i E_j(0) \left[\int r_i r_j \rho \, d^3 \mathbf{r}\right] + \ldots\] Once again we recognize the monopole and dipole moments in brackets. The third bracketed term is the primitive quadrupole moment. (*) It is easy to see how to extend this to higher powers in \(r\).
So if we just write out the first two terms, \[H \approx q\phi(0) - \mathbf{d} \cdot \mathbf{E}(0)\] with \(q\) the total charge, and \(\mathbf{d}\) the dipole moment. So we see that the potential energy is minimized when the dipole moment lines up with the external electric field.
For a current distribution in a magnetic field we can likewise write down the Hamiltonian \[H = \int \mathbf{A} \cdot \mathbf{J} \, d^3 \mathbf{r}\] and on performing the Taylor expansion we obtain \begin{align*}H &= \int A_i(0) J_i + \partial_i A_j(0) r_i J_j + \ldots \, d^3 \mathbf{r} \\ &= A_i(0) \int J_i \, d^3 \mathbf{r} + \partial_i A_j(0) \int r_i J_j \, d^3 \mathbf{r} + \ldots\end{align*} As stated previously, the first term vanishes. For the second term, we know that the object \(\int r_i J_j\), the magnetic dipole moment tensor, is antisymmetric. Therefore its contraction with the tensor \(\partial_i A_j(0)\) is determined by the antisymmetric part of the latter. \begin{align*}H &= \frac{1}{2}(\partial_i A_j(0) - \partial_j A_i(0)) \int r_i J_j \, d^3 \mathbf{r} + \ldots \\ &= \frac{1}{4}(\partial_i A_j(0) - \partial_j A_i(0)) \int r_i J_j - r_j J_i \, d^3\mathbf{r} + \ldots\end{align*} But then \[(J_i r_j - J_j r_i) \hat{r}_j = -2\epsilon_{ijk} \mu_k,\] so \begin{align*}H &= -\frac{1}{2} \epsilon_{ijk} (\partial_i A_j(0) - \partial_j A_i(0)) \mu_k \\ &= -\frac{1}{2} (\epsilon_{kij} \partial_i A_j(0) - \epsilon_{kij} \partial_j A_i(0)) \mu_k \\ &= -\frac{1}{2} (\epsilon_{kij} \partial_i A_j(0) - \epsilon_{kji} \partial_i A_j(0)) \mu_k \\ &= -\epsilon_{kij} \partial_i A_j(0) \mu_k \\ &= -(\nabla \times \mathbf{A})_k \mu_k \\ &= -\mathbf{B} \cdot \boldsymbol\mu\end{align*} So we get the remarkable result that just as an electric dipole has a potential energy \(-\mathbf{d} \cdot \mathbf{E}\) in an electric field, a magnetic dipole has a potential energy \(-\boldsymbol\mu \cdot \mathbf{B}\) in a magnetic field.
The "passive" dipole moment defined in this way, as a coefficient in the multipole expansion of the Hamiltonian, is identical to the "active" dipole moment defined in the previous section. However, passive dipole moments are sometimes easier to observe. For example, it's awfully hard to measure the magnetic field of a single electron (I'm not sure whether it's been done), but it's easy to observe the interaction energy of an electron with a magnetic field: just set up an ensemble and measure the fraction of the population with spin parallel vs. spin antiparallel to the field; then some basic statistical mechanics tells you the energy difference. In fact, we definitely cannot regard the electron as consisting of classical currents, but we can still define the electron's magnetic dipole moment "passively": it is precisely the vector \(\boldsymbol\mu\) such that \[H = -\boldsymbol\mu \cdot \mathbf{B}\] is true.
The electron also has an electric dipole moment, which is defined analogously. (It is too small to measure by any currently known experimental technique, however.)
(*) This can also be replaced by 1/3 of the traceless quadrupole moment. The extra term in the latter makes no difference to the final result, assuming the external electric field satisfies the free space Maxwell's equations (\(\nabla \cdot \mathbf{E} = 0\)).