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.