We need a ruler, a table, a bar magnet, a string, a magnetic compass and a sheet of white paper for this experiment.
The steps taken are as follows:
1. Stick the sheet of white paper on the table and place a magnetic compass on it.
2. Mark the north‒south directions on the paper with the help of compass.
3. Tie one end of the string to the middle portion of the bar magnet and other to the ruler.
4. Place the ruler on the table so that the magnet can move freely.
After leaving the magnet undisturbed for a little while, we will note the direction in which it comes to rest.
When we compare this with the directions marked on the paper, we will see that the magnet aligns itself towards north–south direction. If we give the magnet a twist, then we will observe this alignment once again.