Can an electromagnet repel a strong magnet? When the direction of current is reversed, the polarity of an electromagnet should be reversed. I am trying to understand why this did not happen in an experiment I conducted today.
An electromagnet was connected to a 12v battery and I verified that it was working.
I then touched the electromagnet to a strong regular magnet (rated to hold over 50 kg). There was a strong force between the magnets. I then disconnected the electromagnet from power, reversed the wires, and turned it back on. I expected to feel the electromagnet repel the other magnet, but instead they two magnets got stuck together again. It seems like reversing the wires had no affect on the polarity of the electromagnet.
Here is a picture of the electromagnet I used for reference:

And here is the strong regular magnet.
 A: The electromagnet appears to contain a ferromagnetic core. This core is magnetized by the electromagnetic coil. It retains a magnetic field after the coil is turned off, and its field may take some time to reverse after the coil polarity is reversed.
Moreover, if the test magnet is more powerful than the coil (which sounds to be the case), it will cancel the field of the coil completely. You are essentially attaching the ferromagnet to the permanent magnet.
Source: Wikipedia.
You might try again with only a coreless coil. Perhaps try an inductor rather than a dedicated solenoid.
A: When one magnet is much stronger than another one, the stronger magnet will overcome the original magnetization (M) of the weaker magnet and attract it even when they were originally opposed.
A: The permanent magnet appears to have a ferrous metal sheathing which is attracted to the permanent magnet, and thus cancels out much if not all of the permanent magnets ability to repel when the polarity is reversed. You can try eliminating the sheathing, but that would greatly reduce the power of the permanent magnet along with its ability to repel.  Per my discussion with Magnetech a while back.  
A: Use a small transformer using the "E" shape types. You can reverse polarity on those with no problems since the regular types can be switched 50-60 times per second (hz).
You will need to use the secondary winding and throw out the primary winding.
Have to make sure that the secondary winding has around 1-20ohms, and not more or less.
And can handle around 2-4 amps.
You can get an idea by googling "super electromagnets made from microwave transformer"...
