Why is the interaction energy of a dipole and a magnetic field *negative* when they are parallel? The interaction energy between a magnetic moment, $\mu$, and an applied magnetic field, $B$, is given by
$$\varepsilon=-\mu \cdot B$$
That negative sign is confusing my inuition. If we expand the equation based on the definition of dot product, then
$$\varepsilon=-|\mu||B|\cos(\theta)$$
Theta is the angle between the direction of $\mu$ and the direction of $B$. A $0$ degree angle means the moment is parallel to the field and a $180$ degree angle means that it is anti-parallel. In the parallel case,
$$\varepsilon=-|\mu||B|\cos(0)=-|\mu||B|(1)=-|\mu||B|$$
Why is that negative sign there though? What is its purpose? This result tells me that the energy from the moment spinning to line up with the field is negative!
 A: Would have left this as a comment but not enough "street cred" at the moment: There is a detailed discussion in Am J Phys, see
"Extended charge in motion: Why is the Hamiltonian of a magnetic dipole −m⋅B?
−m⋅B?" D. Arsenović1 and M. Božić by Am. J. Phys. 68, 540 (2000); http://dx.doi.org/10.1119/1.19481
The paper is in response to a question posed by David Griffiths.
A: The formula that you quote is the potential energy when a magnetic dipole of moment $\vec \mu$ finds itself in a uniform magnetic field $\vec B$.
You have noted that it is a dot product.  
The zero of potential energy has arbitrarily been chosen to be when the magnet moment and the magnetic field are at right angles to one another.
The lowest energy state of the system is when the magnetic moment and the magnetic field are parallel and in the same direction and as $\vec \mu \cdot \vec B$ is positive, a negative sign is included to make the potential energy negative $-\mu B$.
Left to its own devices, this is how a dipole would orient itself relative to a magnetic field in order to minimize the energy of the system.
To rotate the magnet dipole through $180^\circ$ work has to be done on the system and the potential energy of the system increases by $2 \mu B$.
In this state with the magnetic moment and the magnetic field anti-parallel and the dot product is $-\mu B$, but with the minus sign the potential energy of the system becomes $+\mu B$.  
You might ask; "Well why not define the magnetic moment the other way round?"
The answer is that to define the direction of the magnetic moment of a current loop the right hand rule is used and so if you are looking down on a loop and the current is anticlockwise that convention tells you that the magnetic moment direction is towards you.
It is only a convention but that is the convention that a lot of people use.

