The most basic law of magnetism is that like poles repel one another and unlike poles attract each othe.r This is easily observed when attempting to place two magnets with the same pole together. However, there are also some additional rules for magnetism.
If a bar magnet is cut into two pieces, the pieces become individual magnets with opposite poles. Furthermore, hammering, heating or twisting of the magnets can demagnetize them. Such handling breaks down the linear arrangement of the molecules. A final law of magnetism refers to retention; a long bar magnet will retain its magnetism longer than a short bar magnet.
Carl Friedrich Gauss (1777-1855), Jean-Baptiste Biot (1774-1862), Felix Savart (1791-1841) and Michael Faraday (1791-1867) each created equations that explained what came to be known as the laws of magnetism. These were later expanded upon by James Clerk Maxwell (1831-1879) to become known as electromagnetism.