The sources of magnetic moments in materials can be represented by poles in analogy to electrostatics. Consider a bar magnet which has magnetic poles of equal magnitude but opposite polarity. Each pole is the source of magnetic force which weakens with distance. Since magnetic poles always come in pairs, their forces partially cancel each other because while one pole pulls, the other repels. This cancellation is greatest when the poles are close to each other i.e. when the bar magnet is short. The magnetic force produced by a bar magnet, at a given point in space, therefore depends on two factors: on both the strength p of its poles, and on the vector ℓ separating them. The moment is defined as
It points in the direction from South to North pole. The analogy with electric dipoles should not be taken too far because magnetic dipoles are associated with angular momentum (see Magnetic moment and angular momentum). Nevertheless, magnetic poles are very useful for magnetostatic calculations, particularly in applications to ferromagnets. Practitioners using the magnetic pole approach generally represent the magnetic field by the irrotational field H, in analogy to the electric field E.