Magnet
Rare earth (lanthanoid) elements have a partially occupied "f" electron shell (which can accommodate up to 14 electrons). The spin of these electrons can be aligned, resulting in very strong magnetic fields, and therefore, these elements are used in compact high-strength magnets where their higher price is not a concern. The most common types of rare-earth magnets are samarium-cobalt and neodymium-iron-boron (NIB) magnets.
Magnetism
Magnetism was first discovered in the ancient world, when people noticed that lodestones, naturally magnetized pieces of the mineral magnetite, could attract iron. The word "magnet" comes from the Greek term μαγνῆτις λίθος "magnētis lithos", "the Magnesian stone, lodestone." In ancient Greece, Aristotle attributed the first of what could be called a scientific discussion of magnetism to the philosopher Thales of Miletus, who lived from about 625 BC to about 545 BC. The ancient Indian medical text "Sushruta Samhita" describes using magnetite to remove arrows embedded in a person's body.
In ancient China, the earliest literary reference to magnetism lies in a 4th-century BC book named after its author, "The Sage of Ghost Valley".
The 2nd-century BC annals, "Lüshi Chunqiu", also notes:
"The lodestone makes iron approach, or it attracts it."
The earliest mention of the attraction of a needle is in a 1st-century work "Lunheng" ("Balanced Inquiries"): "A lodestone attracts a needle."
The 11th-century Chinese scientist Shen Kuo was the first person to write—in the "Dream Pool Essays"—of the magnetic needle compass and that it improved the accuracy of navigation by employing the astronomical concept of true north.
By the 12th century the Chinese were known to use the lodestone compass for navigation. They sculpted a directional spoon from lodestone in such a way that the handle of the spoon always pointed south.