User:Shahzad554/sandbox

Magnetism is a property of materials that respond to an applied magnetic field. Permanent magnets have persistent magnetic fields caused by ferromagnetism. That is the strongest and most familiar type of magnetism. However, all materials are influenced varyingly by the presence of a magnetic field. Some are attracted to a magnetic field (paramagnetism); others are repulsed by a magnetic field (diamagnetism); others have a much more complex relationship with an applied magnetic field (spin glass behavior and antiferromagnetism). Substances that are negligibly affected by magnetic fields are known as non-magnetic substances. They include copper, aluminium, gases, and plastic. Pure oxygen exhibits magnetic properties when cooled to a liquid state.

The magnetic state (or phase) of a material depends on temperature (and other variables such as pressure and applied magnetic field) so that a material may exhibit more than one form of magnetism depending on its temperature, etc. A magnet (from Greek μαγνήτις λίθος magnḗtis líthos, "Magnesian stone") is a material or object that produces a magnetic field. This magnetic field is invisible but is responsible for the most notable property of a magnet: a force that pulls on other ferromagnetic materials, such as iron, and attracts or repels other magnets.

A permanent magnet is an object made from a material that is magnetized and creates its own persistent magnetic field. An everyday example is a refrigerator magnet used to hold notes on a refrigerator door. Materials that can be magnetized, which are also the ones that are strongly attracted to a magnet, are called ferromagnetic (or ferrimagnetic). These include iron, nickel, cobalt, some alloys of rare earth metals, and some naturally occurring minerals such as lodestone. Although ferromagnetic (and ferrimagnetic) materials are the only ones attracted to a magnet strongly enough to be commonly considered magnetic, all other substances respond weakly to a magnetic field, by one of several other types of magnetism.

Ferromagnetic materials can be divided into magnetically "soft" materials like annealed iron, which can be magnetized but do not tend to stay magnetized, and magnetically "hard" materials, which do. Permanent magnets are made from "hard" ferromagnetic materials such as alnico and ferrite that are subjected to special processing in a powerful magnetic field during manufacture, to align their internal microcrystalline structure, making them very hard to demagnetize. To demagnetize a saturated magnet, a certain magnetic field must be applied, and this threshold depends on coercivity of the respective material. "Hard" materials have high coercivity, whereas "soft" materials have low coercivity.

An electromagnet is made from a coil of wire that acts as a magnet when an electric current passes through it but stops being a magnet when the current stops. Often, the coil is wrapped around a core of ferromagnetic material like steel, which enhances the magnetic field produced by the coil.