Direction of magnetic field in a solenoid

The north and south pole of a solenoid depends on two factors. One, the direction of the current flow and two, the direction of the winding (clockwise or counter-clockwise). Start by determine the positive pole of the power source (e.g: battery), then the end of the solenoid that you are going to connect to it. Now, looking down the solenoid tube determine what direction is the winding. If clockwise in relation to the positive wire then is the south pole, if anti-clockwise then is the north pole. So, to summarize the magnetic south pole is always clockwise in relation to the positive wire.


To identify the north and south poles of a solenoid from the direction of the current, I think the easiest method is this mnemonic,

which I explained in a bit more depth here. To get the direction of the field lines, then as always the field lines come out of the north pole, and circle back to the south pole.