model, there is also a force on a magnetic dipole due to a non-uniform magnetic field, but this is due to Lorentz forces on the current loop that makes up the magnetic dipole. The force obtained in the case of a current loop model is where the gradient ∇ is the change of the quantity per unit distance, and the direction is that of maximum increase of . To understand this equation, note that the dot product , where m and B represent the magnitude of the m and B vectors and θ is the angle between them. If m is in the same direction as B then the dot product is positive and the gradient points 'uphill' pulling the magnet into regions of higher B-field (more strictly larger m · B). B represents the strength and direction of the magnetic field. This equation is strictly only valid for magnets of zero size, but is often a good approximation for not too large magnets. The magnetic force on larger magnets is determined by dividing them into smaller regions having their own m then summing up the forces on each of these regions. Magnetic-charge model The magnetic-charge model assumes that the magnetic forces between magnets are due to magnetic charges near the poles. This model works even close to the magnet when the magnetic field becomes more complicated, and more dependent on the detailed shape and magnetization of the magnet than just the magnetic dipole contribution. Formally, the field can be expressed as a multipole expansion: A dipole field, plus a quadrupole field, plus an octopole field, etc. in the Ampère model, but this can be very cumbersome mathematically. Calculating the magnetic force Calculating the attractive or repulsive force between two magnets is, in the general case, a very complex operation, as it depends on the shape, magnetization, orientation and separation of the magnets. The magnetic-charge model does depend on some knowledge of how the ‘magnetic charge’ is distributed over the magnetic poles. It is only truly useful for simple configurations even then. Fortunately, this restriction covers many useful cases. Force between two magnetic poles If both poles are small enough to be represented as single points then they can be considered to be point magnetic charges. Classically, the force between two magnetic poles is given by: where F is force (SI unit: newton) qm1 and qm2 are the magnitudes of