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.
Rare-earth magnet
The rare-earth (lanthanide) elements are metals that are ferromagnetic, meaning that like iron they can be magnetized to become permanent magnets, but their Curie temperatures (the temperature above which their ferromagnetism disappears) are below room temperature, so in pure form their magnetism only appears at low temperatures. However, they form compounds with the transition metals such as iron, nickel, and cobalt, and some of these compounds have Curie temperatures well above room temperature. Rare-earth magnets are made from these compounds.