A magnet has two poles, a north pole and a south pole. When two magnets are brought close, like poles repel each other and unlike poles attract each other. We can use this rule to identify the unmarked poles.
Step 1. Take the magnet whose poles are marked. Its north pole and south pole are already known.
Step 2. Bring the marked north pole near one end of the unmarked magnet. Observe whether that end is attracted or repelled.
Step 3. Now bring the marked south pole near the same end of the unmarked magnet, and observe again.
Step 4. Decide using the rule:
- If the end of the unmarked magnet is repelled by the marked north pole, then that end is a north pole. (It is also attracted by the marked south pole.)
- If the end of the unmarked magnet is attracted to the marked north pole, then that end is a south pole. (It is repelled by the marked south pole.)
Step 5. The opposite end of the unmarked magnet is then the other pole. For example, if one end is found to be the north pole, the other end is the south pole.
Important check: Repulsion is the more reliable test. A magnet attracts unmagnetised iron objects as well, so attraction alone can be misleading. Repulsion can occur only between like poles, so if an end is repelled by the marked north pole, it must itself be a north pole.
Conclusion: By testing each end of the unmarked magnet with the marked north and south poles and looking for repulsion, we can identify both poles of the unmarked magnet.