Even a single bar magnet of ordinary dimensions will slightly heat up as it gradually loses its magnetism. The reason is this. Having its magnetic domains lined up raises its magnetic field energy. That energy can be lowered if the domains lose alignment. Over very long periods of time exactly that happens. The energy released goes to heat up the magnet.
Let's take some ballpark figures to get a rough idea of how big the effect is. A pretty strong magnet may have field energy density of about 1 J/cm3
. If all that energy rapidly converted to thermal energy, it would heat the magnet up very roughly 0.1K (same as 0.1°C).
Now in practice, most ordinary magnets maintain their magnetism for very long times, so the extra heat has plenty of time to leak out into the surroundings without making even that small increase in the magnet's temperature.
If you put two bar magnets together so they repel, that increases the field energy and slightly speeds up the rate it leaks into heat. If you put them together (gently) so they stick, the opposite happens.
I bet that if you took two typical magnets in a carefully-controlled constant-temperature environment and forced them together in the repelling alignment that the extra magnetic field energy would shake a few domains loose to realign, so that the temperature would go up enough to just barely measure with a sensitive lab thermometer.
If you drive a magnet's field back and forth repeatedly with an ac field, the heating can become quite appreciable. That can happen with transformer cores.
(published on 01/19/12)