How to demagnetise a magnet
There are several ways to demagnetise a magnet.
All of the following processes involve reorientating the aligned poles in a magnet by altering the spin of the electrons in the atom.
Demagnetise by heating
When magnets are exposed to high temperatures (usually more than 80°C), the particles within the magnet begin to vibrate at an increasingly faster and sporadic rate. This misaligns the particles, causing the magnetism to be lost.
Demagnetising by hammering
The physical disruption and vibration caused by repeated hammering of a magnet shakes the order of the material, misaligning the particles, and this demagnetises it.
Demagnetising by rubbing magnets together
Magnets stored together or rubbed against each other will have an effect on one another, changing the north-south orientation of the atoms within the magnets and thus lessening their overall magnetic field strength.
Demagnetise by applying AC current
Alternating current (AC) rapidly switches direction, changing the orientation of the electromagnetic field. The north-south orientation of the atoms within the magnet then try to orient according to the field, but since it's changing, they end up randomised, thus lessening the overall magnetic field strength of the magnet.