1、Let the current I and the magnetic field B be represented in vector form, i.e., I=Ix+Iy+Iz and B=Bx+By+Bz.
2、Curl the right-hand's four fingers from the direction of the current to the direction of the magnetic field, and the direction pointed by the thumb is the direction of the Ampere force.
3、If the direction of the Ampere force is opposite to the desired direction, it means that the direction of the current and the magnetic field are opposite, and we need to exchange the positions of the current and the magnetic field before making the judgment.