Does distance play a role in the magnetic field ?

Answer :

Magnetic force obeys an inverse square law with distance. ... If the distance between two magnets is halved the magnetic force between them will increase to four times the initial value.