# Question about north and south poles of a magnet

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 magnet(Its backside) attracted to the front of the magnet 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?

• I wouldn't really think of a single electric circuit as a "magnet" with a north pole and a south pole. It's more like an ideal magnetic dipole, where the "north pole" and "south pole" are infinitesimally close together, which makes it tricky to distinguish them. It's easier to see what's going on if you think of a long solenoid, where the two poles are quite far away. Feb 5, 2017 at 6:31