Magnetite is a rock mineral and one of the main iron ores, with the chemical formula Fe3O4. It is one of the oxides of iron, and is ferrimagnetic; it is attracted to a magnet and can be magnetized to become a permanent magnet itself. It is the most magnetic of all the naturally-occurring minerals on Earth. Naturally-magnetized pieces of magnetite, called lodestone, will attract small pieces of iron, which is how ancient peoples first discovered the property of magnetism. Today it is mined as iron ore.