I've always been taught: North poles attract south poles. Yesterday after studying electromagnetism, I've a question to ask. Here's a diagram: In circuits like these, this is how the north and south poles of these electromagnets are defined. Now my question is, is the reason that the South pole of the first electromagnet(Its backside) attracted to the front of the electromagnet in the back because the two circuits have current flowing in the same direction? Is this why in general the north pole attracts the south pole? How does this work in a permanent magnet such as a bar magnet?