This acts as a magnet with variable distance between the north and south poles. The magnitude of the magnetic field decreases with distance.