As
you probably know, like poles of magnets repel and unlike poles
attract. The force between two magnets increases as they're brought
closer together, but how does it vary? Many things in nature follow an
inverse square law. So the luminous intensity of an omnidirectional (the
same in all directions) light source or loudness of an omnidirectional
sound source follows an inverse square law. If you move 3 times further
away from a sound than your original position, the loudness reduces by a
factor of 9. At 100 times the original distance, the loudness reduces
by 100 x 100 =10,000 times. Similarly for the brightness of a light.
That's because the sound or light flux is passing through an imaginary
sphere and the surface area of a sphere depends on the square of its
radius (4πr²). In
this Quora post, we discover that for a magnet, the scenario is a lot more complicated
because fields aren't uniformly shaped.