Step-by-step explanation:
A basic law of magnetism is that unlike poles attract each other. Two bar magnets can illustrate this. ... A pole of the second is brought, in turn, near each of the two ends of the hanging magnet.
Second Law of Magnetism
The force is in direct proportion to the product of the forces of the pole. The force exists in inverse proportion to the square of the middle distance between the poles. The force is dependent on the specific medium in which the magnets are placed.