Deflection of a compass due to electric current I am a high school student and am not able to understand the reason behind the direction of deflection of the needle of a compass due to electric current.
When the compass is placed over the current-carrying wire which is going from south to north, the magnetic field lines because of the wire would be from west to east(According to the right hand thumb rule). So the north pole would be towards the west and south pole would be towards the east. A compass always points towards the geographic north pole i.e the magnetic south pole. So, the compass should point towards the south pole of this magnetic field i.e east. But according to the "Ampere's swimming rule/SNOW rule" the magnetic needle should point towards the west.
Can someone explain the reason behind this? Or in general, the reason behind the deflection of a compass?
 A: A compass needle is essentially a magnetic dipole, and when a magnetic dipole is placed in a magnetic field, it will experience a torque that attempts to align it with the magnetic field, as shown in the image below:

Therefore, if the current in the wire is flowing upwards, the field in front points to the right and so does the compass needle.
I have never heard of the SNOW rule myself before, but apparently, there is confusion about which object is placed over the other. A quick search turns up this result which is wrong, and this result which is correct, but with the wire over the compass. However, the reasoning — which is that the needle points in the direction of the magnetic field — is always true regardless of which acronym you use to remember it.
A: A compass needle (or any permanent magnet) has a north “seeking” pole. That is the end which tends to swing toward the north if the magnet is free to rotate.  The direction which a compass needle points can be taken as the definition of the direction of a magnetic field in which it resides. (The magnetic field of the  earth points north.)  A compass needle points away from the north “seeking” pole of another magnet. So, the magnetic field of a magnet emerges from its “north pole” and reenters at the “south pole”.  (The earth has a north magnetic pole in the region of Antarctica.)  The magnetic field of a long current carrying wire wraps around the wire in a direction indicated by a “right hand rule”, and that can be verified with a compass needle.
