# Magnet

A magnet 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, steel, nickel, cobalt, etc. 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 the elements iron, nickel and cobalt and their alloys, 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 strong 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. The overall strength of a magnet is measured by its magnetic moment or, alternatively, the total magnetic flux it produces. The local strength of magnetism in a material is measured by its magnetization.
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 "soft" ferromagnetic material such as mild steel, which greatly enhances the magnetic field produced by the coil.

## Discovery and development

Ancient people learned about magnetism from lodestones (or magnetite) which are naturally magnetized pieces of iron ore. The word magnet was adopted in Middle English from Latin magnetum "lodestone", ultimately from Greek μαγνῆτις [λίθος] (magnētis [lithos]) meaning "[stone] from Magnesia", a place in Anatolia where lodestones were found (today Manisa in modern-day Turkey). Lodestones, suspended so they could turn, were the first magnetic compasses. The earliest known surviving descriptions of magnets and their properties are from Anatolia, India, and China around 2,500 years ago. The properties of lodestones and their affinity for iron were written of by Pliny the Elder in his encyclopedia Naturalis Historia in the 1st century AD.
In 11th century China, it was discovered that quenching red hot iron in the Earth's magnetic field would leave the iron permanently magnetized. This led to the development of the navigational compass, as described in Dream Pool Essays in 1088. By the 12th to 13th centuries AD, magnetic compasses were used in navigation in China, Europe, the Arabian Peninsula and elsewhere.
A straight iron magnet tends to demagnetize itself by its own magnetic field. To overcome this, the horseshoe magnet was invented by Daniel Bernoulli in 1743. A horseshoe magnet avoids demagnetization by returning the magnetic field lines to the opposite pole.
In 1820, Hans Christian Ørsted discovered that a compass needle is deflected by a nearby electric current. In the same year André-Marie Ampère showed that iron can be magnetized by inserting it in an electrically fed solenoid. This led William Sturgeon to develop an iron-cored electromagnet in 1824. Joseph Henry further developed the electromagnet into a commercial product in 1830–1831, giving people access to strong magnetic fields for the first time. In 1831 he built an ore separator with an electromagnet capable of lifting 750 pounds (340 kg).

## Physics
### Magnetic field

The magnetic flux density (also called magnetic B field or just magnetic field, usually denoted by B) is a vector field. The magnetic B field vector at a given point in space is specified by two properties:
* Its direction, which is along the orientation of a compass needle.
* Its magnitude (also called strength), which is proportional to how strongly the compass needle orients along that direction.
In SI units, the strength of the magnetic B field is given in teslas.

### Magnetic moment

A magnet's magnetic moment (also called magnetic dipole moment and usually denoted μ) is a vector that characterizes the magnet's overall magnetic properties. For a bar magnet, the direction of the magnetic moment points from the magnet's south pole to its north pole, and the magnitude relates to how strong and how far apart these poles are. In SI units, the magnetic moment is specified in terms of A·m$^2$ (amperes times meters squared).
A magnet both produces its own magnetic field and responds to magnetic fields. The strength of the magnetic field it produces is at any given point proportional to the magnitude of its magnetic moment. In addition, when the magnet is put into an external magnetic field, produced by a different source, it is subject to a torque tending to orient the magnetic moment parallel to the field. The amount of this torque is proportional both to the magnetic moment and the external field. A magnet may also be subject to a force driving it in one direction or another, according to the positions and orientations of the magnet and source. If the field is uniform in space, the magnet is subject to no net force, although it is subject to a torque.
A wire in the shape of a circle with area A and carrying current I has a magnetic moment of magnitude equal to IA.

### Magnetization

The magnetization of a magnetized material is the local value of its magnetic moment per unit volume, usually denoted M, with units A/m. It is a vector field, rather than just a vector (like the magnetic moment), because different areas in a magnet can be magnetized with different directions and strengths (for example, because of domains, see below). A good bar magnet may have a magnetic moment of magnitude 0.1 A·m$^2$ and a volume of 1 cm$^3$, or 1×10$^{−6}$ m$^3$, and therefore an average magnetization magnitude is 100,000 A/m. Iron can have a magnetization of around a million amperes per meter. Such a large value explains why iron magnets are so effective at producing magnetic fields.

### Modelling magnets

Two different models exist for magnets: magnetic poles and atomic currents.
Although for many purposes it is convenient to think of a magnet as having distinct north and south magnetic poles, the concept of poles should not be taken literally: it is merely a way of referring to the two different ends of a magnet. The magnet does not have distinct north or south particles on opposing sides. If a bar magnet is broken into two pieces, in an attempt to separate the north and south poles, the result will be two bar magnets, each of which has both a north and south pole. However, a version of the magnetic-pole approach is used by professional magneticians to design permanent magnets.
In this approach, the divergence of the magnetization ∇·M inside a magnet is treated as a distribution of magnetic monopoles. This is a mathematical convenience and does not imply that there are actually monopoles in the magnet. If the magnetic-pole distribution is known, then the pole model gives the magnetic field H. Outside the magnet, the field B is proportional to H, while inside the magnetization must be added to H. An extension of this method that allows for internal magnetic charges is used in theories of ferromagnetism.
Another model is the Ampère model, where all magnetization is due to the effect of microscopic, or atomic, circular bound currents, also called Ampèrian currents, throughout the material. For a uniformly magnetized cylindrical bar magnet, the net effect of the microscopic bound currents is to make the magnet behave as if there is a macroscopic sheet of electric current flowing around the surface, with local flow direction normal to the cylinder axis. Microscopic currents in atoms inside the material are generally canceled by currents in neighboring atoms, so only the surface makes a net contribution; shaving off the outer layer of a magnet will not destroy its magnetic field, but will leave a new surface of uncancelled currents from the circular currents throughout the material. The right-hand rule tells which direction positively-charged current flows. However, current due to negatively-charged electricity is far more prevalent in practice.

### Polarity

The north pole of a magnet is defined as the pole that, when the magnet is freely suspended, points towards the Earth's North Magnetic Pole in the Arctic (the magnetic and geographic poles do not coincide, see magnetic declination). Since opposite poles (north and south) attract, the North Magnetic Pole is actually the south pole of the Earth's magnetic field. As a practical matter, to tell which pole of a magnet is north and which is south, it is not necessary to use the Earth's magnetic field at all. For example, one method would be to compare it to an electromagnet, whose poles can be identified by the right-hand rule. The magnetic field lines of a magnet are considered by convention to emerge from the magnet's north pole and reenter at the south pole.

### Magnetic materials

The term magnet is typically reserved for objects that produce their own persistent magnetic field even in the absence of an applied magnetic field. Only certain classes of materials can do this. Most materials, however, produce a magnetic field in response to an applied magnetic field – a phenomenon known as magnetism. There are several types of magnetism, and all materials exhibit at least one of them.
The overall magnetic behavior of a material can vary widely, depending on the structure of the material, particularly on its electron configuration. Several forms of magnetic behavior have been observed in different materials, including:
* Ferromagnetic and ferrimagnetic materials are the ones normally thought of as magnetic; they are attracted to a magnet strongly enough that the attraction can be felt. These materials are the only ones that can retain magnetization and become magnets; a common example is a traditional refrigerator magnet. Ferrimagnetic materials, which include ferrites and the longest used and naturally occurring magnetic materials magnetite and lodestone, are similar to but weaker than ferromagnetics. The difference between ferro- and ferrimagnetic materials is related to their microscopic structure, as explained in Magnetism.
* Paramagnetic substances, such as platinum, aluminum, and oxygen, are weakly attracted to either pole of a magnet. This attraction is hundreds of thousands of times weaker than that of ferromagnetic materials, so it can only be detected by using sensitive instruments or using extremely strong magnets. Magnetic ferrofluids, although they are made of tiny ferromagnetic particles suspended in liquid, are sometimes considered paramagnetic since they cannot be magnetized.
* Diamagnetic means repelled by both poles. Compared to paramagnetic and ferromagnetic substances, diamagnetic substances, such as carbon, copper, water, and plastic, are even more weakly repelled by a magnet. The permeability of diamagnetic materials is less than the permeability of a vacuum. All substances not possessing one of the other types of magnetism are diamagnetic; this includes most substances. Although force on a diamagnetic object from an ordinary magnet is far too weak to be felt, using extremely strong superconducting magnets, diamagnetic objects such as pieces of lead and even mice can be levitated, so they float in mid-air. Superconductors repel magnetic fields from their interior and are strongly diamagnetic.
There are various other types of magnetism, such as spin glass, superparamagnetism, superdiamagnetism, and metamagnetism.

### Shape

The shape of a permanent magnet has a large influence on its magnetic properties. When a magnet is magnetized, a demagnetizing field will be created inside it. As the name suggests, the demagnetizing field will work to demagnetize the magnet, decreasing its magnetic properties. The strength of the demagnetizing field $H_{d}$ is proportional to the magnet's magnetization $M$ and shape, according to
    $H_{d}=-N_{d}M.$
Here, $N_{d}$ is called the demagnetizing factor, and has a different value depending on the magnet's shape. For example, if the magnet is a sphere, then $N_{d}={\frac {1}{3}}$.
The value of the demagnetizing factor also depends on the direction of the magnetization in relation to the magnet's shape. Since a sphere is symmetrical from all angles, the demagnetizing factor only has one value. But a magnet that is shaped like a long cylinder will yield two different demagnetizing factors, depending on if it's magnetized parallel to or perpendicular to its length.

## Common uses

* Magnetic recording media: VHS tapes contain a reel of magnetic tape. The information that makes up the video and sound is encoded on the magnetic coating on the tape. Common audio cassettes also rely on magnetic tape. Similarly, in computers, floppy disks and hard disks record data on a thin magnetic coating.
* Credit, debit, and automatic teller machine cards: All of these cards have a magnetic strip on one side. This strip encodes the information to contact an individual's financial institution and connect with their account(s).
* Older types of televisions (non flat screen) and older large computer monitors: TV and computer screens containing a cathode-ray tube employ an electromagnet to guide electrons to the screen.
* Sensor: Permanent magnets are useful components for fabricating magnetic sensors for the detection of motion, displacement, position, and so forth.
* Speakers and microphones: Most speakers employ a permanent magnet and a current-carrying coil to convert electric energy (the signal) into mechanical energy (movement that creates the sound). The coil is wrapped around a bobbin attached to the speaker cone and carries the signal as changing current that interacts with the field of the permanent magnet. The voice coil feels a magnetic force and in response, moves the cone and pressurizes the neighboring air, thus generating sound. Dynamic microphones employ the same concept, but in reverse. A microphone has a diaphragm or membrane attached to a coil of wire. The coil rests inside a specially shaped magnet. When sound vibrates the membrane, the coil is vibrated as well. As the coil moves through the magnetic field, a voltage is induced across the coil. This voltage drives a current in the wire that is characteristic of the original sound.
* Electric guitars use magnetic pickups to transduce the vibration of guitar strings into electric current that can then be amplified. This is different from the principle behind the speaker and dynamic microphone because the vibrations are sensed directly by the magnet, and a diaphragm is not employed. The Hammond organ used a similar principle, with rotating tonewheels instead of strings.
* Electric motors and generators: Some electric motors rely upon a combination of an electromagnet and a permanent magnet, and, much like loudspeakers, they convert electric energy into mechanical energy. A generator is the reverse: it converts mechanical energy into electric energy by moving a conductor through a magnetic field.
* Medicine: Hospitals use magnetic resonance imaging to spot problems in a patient's organs without invasive surgery.
* Chemistry: Chemists use nuclear magnetic resonance to characterize synthesized compounds.
* Chucks are used in the metalworking field to hold objects. Magnets are also used in other types of fastening devices, such as the magnetic base, the magnetic clamp and the refrigerator magnet.
* Compasses: A compass (or mariner's compass) is a magnetized pointer free to align itself with a magnetic field, most commonly Earth's magnetic field.
* Art: Vinyl magnet sheets may be attached to paintings, photographs, and other ornamental articles, allowing them to be attached to refrigerators and other metal surfaces. Objects and paint can be applied directly to the magnet surface to create collage pieces of art. Metal magnetic boards, strips, doors, microwave ovens, dishwashers, cars, metal I beams, and any metal surface can be used magnetic vinyl art.
* Science projects: Many topic questions are based on magnets, including the repulsion of current-carrying wires, the effect of temperature, and motors involving magnets.
* Toys: Given their ability to counteract the force of gravity at close range, magnets are often employed in children's toys, such as the Magnet Space Wheel and Levitron, to amusing effect.
* Refrigerator magnets are used to adorn kitchens, as a souvenir, or simply to hold a note or photo to the refrigerator door.
* Magnets can be used to make jewelry. Necklaces and bracelets can have a magnetic clasp, or may be constructed entirely from a linked series of magnets and ferrous beads.
* Magnets can pick up magnetic items (iron nails, staples, tacks, paper clips) that are either too small, too hard to reach, or too thin for fingers to hold. Some screwdrivers are magnetized for this purpose.
* Magnets can be used in scrap and salvage operations to separate magnetic metals (iron, cobalt, and nickel) from non-magnetic metals (aluminum, non-ferrous alloys, etc.). The same idea can be used in the so-called "magnet test", in which a car chassis is inspected with a magnet to detect areas repaired using fiberglass or plastic putty.
* Magnets are found in process industries, food manufacturing especially, in order to remove metal foreign bodies from materials entering the process (raw materials) or to detect a possible contamination at the end of the process and prior to packaging. They constitute an important layer of protection for the process equipment and for the final consumer.
* Magnetic levitation transport, or maglev, is a form of transportation that suspends, guides and propels vehicles (especially trains) through electromagnetic force. Eliminating rolling resistance increases efficiency. The maximum recorded speed of a maglev train is 581 kilometers per hour (361 mph).
* Magnets may be used to serve as a fail-safe device for some cable connections. For example, the power cords of some laptops are magnetic to prevent accidental damage to the port when tripped over. The MagSafe power connection to the Apple MacBook is one such example.

## Medical issues and safety

Because human tissues have a very low level of susceptibility to static magnetic fields, there is little mainstream scientific evidence showing a health effect associated with exposure to static fields. Dynamic magnetic fields may be a different issue, however; correlations between electromagnetic radiation and cancer rates have been postulated due to demographic correlations (see Electromagnetic radiation and health).
If a ferromagnetic foreign body is present in human tissue, an external magnetic field interacting with it can pose a serious safety risk.
A different type of indirect magnetic health risk exists involving pacemakers. If a pacemaker has been embedded in a patient's chest (usually for the purpose of monitoring and regulating the heart for steady electrically induced beats), care should be taken to keep it away from magnetic fields. It is for this reason that a patient with the device installed cannot be tested with the use of a magnetic resonance imaging device.
Children sometimes swallow small magnets from toys, and this can be hazardous if two or more magnets are swallowed, as the magnets can pinch or puncture internal tissues.
Magnetic imaging devices (e.g. MRIs) generate enormous magnetic fields, and therefore rooms intended to hold them exclude ferrous metals. Bringing objects made of ferrous metals (such as oxygen canisters) into such a room creates a severe safety risk, as those objects may be powerfully thrown about by the intense magnetic fields.

## Magnetizing ferromagnets

Ferromagnetic materials can be magnetized in the following ways:
* Heating the object higher than its Curie temperature, allowing it to cool in a magnetic field and hammering it as it cools. This is the most effective method and is similar to the industrial processes used to create permanent magnets.
* Placing the item in an external magnetic field will result in the item retaining some of the magnetism on removal. Vibration has been shown to increase the effect. Ferrous materials aligned with the Earth's magnetic field that are subject to vibration (e.g., frame of a conveyor) have been shown to acquire significant residual magnetism. Likewise, striking a steel nail held by fingers in a N-S direction with a hammer will temporarily magnetize the nail.
* Stroking: An existing magnet is moved from one end of the item to the other repeatedly in the same direction (single touch method) or two magnets are moved outwards from the center of a third (double touch method).
* Electric Current: The magnetic field produced by passing an electric current through a coil can get domains to line up. Once all of the domains are lined up, increasing the current will not increase the magnetization.

## Demagnetizing ferromagnets

Magnetized ferromagnetic materials can be demagnetized (or degaussed) in the following ways:
* Heating a magnet past its Curie temperature; the molecular motion destroys the alignment of the magnetic domains, completely demagnetizing it
* Placing the magnet in an alternating magnetic field with intensity above the material's coercivity and then either slowly drawing the magnet out or slowly decreasing the magnetic field to zero. This is the principle used in commercial demagnetizers to demagnetize tools, erase credit cards, hard disks, and degaussing coils used to demagnetize CRTs.
* Some demagnetization or reverse magnetization will occur if any part of the magnet is subjected to a reverse field above the magnetic material's coercivity.
* Demagnetization progressively occurs if the magnet is subjected to cyclic fields sufficient to move the magnet away from the linear part on the second quadrant of the B–H curve of the magnetic material (the demagnetization curve).
* Hammering or jarring: mechanical disturbance tends to randomize the magnetic domains and reduce magnetization of an object, but may cause unacceptable damage.

## Types of permanent magnets
### Magnetic metallic elements

Many materials have unpaired electron spins, and the majority of these materials are paramagnetic. When the spins interact with each other in such a way that the spins align spontaneously, the materials are called ferromagnetic (what is often loosely termed as magnetic). Because of the way their regular crystalline atomic structure causes their spins to interact, some metals are ferromagnetic when found in their natural states, as ores. These include iron ore (magnetite or lodestone), cobalt and nickel, as well as the rare earth metals gadolinium and dysprosium (when at a very low temperature). Such naturally occurring ferromagnets were used in the first experiments with magnetism. Technology has since expanded the availability of magnetic materials to include various man-made products, all based, however, on naturally magnetic elements.

### Composites

Ceramic, or ferrite, magnets are made of a sintered composite of powdered iron oxide and barium/strontium carbonate ceramic. Given the low cost of the materials and manufacturing methods, inexpensive magnets (or non-magnetized ferromagnetic cores, for use in electronic components such as portable AM radio antennas) of various shapes can be easily mass-produced. The resulting magnets are non-corroding but brittle and must be treated like other ceramics.
Alnico magnets are made by casting or sintering a combination of aluminium, nickel and cobalt with iron and small amounts of other elements added to enhance the properties of the magnet. Sintering offers superior mechanical characteristics, whereas casting delivers higher magnetic fields and allows for the design of intricate shapes. Alnico magnets resist corrosion and have physical properties more forgiving than ferrite, but not quite as desirable as a metal. Trade names for alloys in this family include: Alni, Alcomax, Hycomax, Columax, and Ticonal.
Injection-molded magnets are a composite of various types of resin and magnetic powders, allowing parts of complex shapes to be manufactured by injection molding. The physical and magnetic properties of the product depend on the raw materials, but are generally lower in magnetic strength and resemble plastics in their physical properties.

### Flexible magnet

Flexible magnets are composed of a high-coercivity ferromagnetic compound (usually ferric oxide) mixed with a resinous polymer binder. This is extruded as a sheet and passed over a line of powerful cylindrical permanent magnets. These magnets are arranged in a stack with alternating magnetic poles facing up (N, S, N, S...) on a rotating shaft. This impresses the plastic sheet with the magnetic poles in an alternating line format. No electromagnetism is used to generate the magnets. The pole-to-pole distance is on the order of 5 mm, but varies with manufacturer. These magnets are lower in magnetic strength but can be very flexible, depending on the binder used.
For magnetic compounds (e.g. Nd$_2$Fe$_{14}$B) that are vulnerable to a grain boundary corrosion problem it gives additional protection.

### Rare-earth magnets

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.

### Single-molecule magnets (SMMs) and single-chain magnets (SCMs)

In the 1990s, it was discovered that certain molecules containing paramagnetic metal ions are capable of storing a magnetic moment at very low temperatures. These are very different from conventional magnets that store information at a magnetic domain level and theoretically could provide a far denser storage medium than conventional magnets. In this direction, research on monolayers of SMMs is currently under way. Very briefly, the two main attributes of an SMM are:
* a large ground state spin value (S), which is provided by ferromagnetic or ferrimagnetic coupling between the paramagnetic metal centres
* a negative value of the anisotropy of the zero field splitting (D)
Most SMMs contain manganese but can also be found with vanadium, iron, nickel and cobalt clusters. More recently, it has been found that some chain systems can also display a magnetization that persists for long times at higher temperatures. These systems have been called single-chain magnets.

### Nano-structured magnets

Some nano-structured materials exhibit energy waves, called magnons, that coalesce into a common ground state in the manner of a Bose–Einstein condensate.

### Rare-earth-free permanent magnets

The United States Department of Energy has identified a need to find substitutes for rare-earth metals in permanent-magnet technology, and has begun funding such research. The Advanced Research Projects Agency-Energy (ARPA-E) has sponsored a Rare Earth Alternatives in Critical Technologies (REACT) program to develop alternative materials. In 2011, ARPA-E awarded 31.6 million dollars to fund Rare-Earth Substitute projects. Iron nitrides are promising materials for rare-earth free magnets.

### Costs

The current cheapest permanent magnets, allowing for field strengths, are flexible and ceramic magnets, but these are also among the weakest types. The ferrite magnets are mainly low-cost magnets since they are made from cheap raw materials: iron oxide and Ba- or Sr-carbonate. However, a new low cost magnet, Mn–Al alloy, has been developed and is now dominating the low-cost magnets field. It has a higher saturation magnetization than the ferrite magnets. It also has more favorable temperature coefficients, although it can be thermally unstable. Neodymium–iron–boron (NIB) magnets are among the strongest. These cost more per kilogram than most other magnetic materials but, owing to their intense field, are smaller and cheaper in many applications.

### Temperature

Temperature sensitivity varies, but when a magnet is heated to a temperature known as the Curie point, it loses all of its magnetism, even after cooling below that temperature. The magnets can often be remagnetized, however.
Additionally, some magnets are brittle and can fracture at high temperatures.
The maximum usable temperature is highest for alnico magnets at over 540 °C (1,000 °F), around 300 °C (570 °F) for ferrite and SmCo, about 140 °C (280 °F) for NIB and lower for flexible ceramics, but the exact numbers depend on the grade of material.

## Electromagnets

An electromagnet, in its simplest form, is a wire that has been coiled into one or more loops, known as a solenoid. When electric current flows through the wire, a magnetic field is generated. It is concentrated near (and especially inside) the coil, and its field lines are very similar to those of a magnet. The orientation of this effective magnet is determined by the right hand rule. The magnetic moment and the magnetic field of the electromagnet are proportional to the number of loops of wire, to the cross-section of each loop, and to the current passing through the wire.
If the coil of wire is wrapped around a material with no special magnetic properties (e.g., cardboard), it will tend to generate a very weak field. However, if it is wrapped around a soft ferromagnetic material, such as an iron nail, then the net field produced can result in a several hundred- to thousandfold increase of field strength.
Uses for electromagnets include particle accelerators, electric motors, junkyard cranes, and magnetic resonance imaging machines. Some applications involve configurations more than a simple magnetic dipole; for example, quadrupole and sextupole magnets are used to focus particle beams.

## Units and calculations

For most engineering applications, MKS (rationalized) or SI (Système International) units are commonly used. Two other sets of units, Gaussian and CGS-EMU, are the same for magnetic properties and are commonly used in physics.
In all units, it is convenient to employ two types of magnetic field, B and H, as well as the magnetization M, defined as the magnetic moment per unit volume.
* The magnetic induction field B is given in SI units of teslas (T). B is the magnetic field whose time variation produces, by Faraday's Law, circulating electric fields (which the power companies sell). B also produces a deflection force on moving charged particles (as in TV tubes). The tesla is equivalent to the magnetic flux (in webers) per unit area (in meters squared), thus giving B the unit of a flux density. In CGS, the unit of B is the gauss (G). One tesla equals 10$^4$ G.
* The magnetic field H is given in SI units of ampere-turns per meter (A-turn/m). The turns appear because when H is produced by a current-carrying wire, its value is proportional to the number of turns of that wire. In CGS, the unit of H is the oersted (Oe). One A-turn/m equals 4π×10$^{−3}$ Oe.
* The magnetization M is given in SI units of amperes per meter (A/m). In CGS, the unit of M is the oersted (Oe). One A/m equals 10$^{−3}$ emu/cm$^3$. A good permanent magnet can have a magnetization as large as a million amperes per meter.
* In SI units, the relation B = μ$_0$(H + M) holds, where μ$_0$ is the permeability of space, which equals 4π×10$^{−7}$ T•m/A. In CGS, it is written as B = H + 4πM. (The pole approach gives μ$_0$H in SI units. A μ$_0$M term in SI must then supplement this μ$_0$H to give the correct field within B, the magnet. It will agree with the field B calculated using Ampèrian currents).
Materials that are not permanent magnets usually satisfy the relation M = χH in SI, where χ is the (dimensionless) magnetic susceptibility. Most non-magnetic materials have a relatively small χ (on the order of a millionth), but soft magnets can have χ on the order of hundreds or thousands. For materials satisfying M = χH, we can also write B = μ$_0$(1 + χ)H = μ$_0$μ$_r$H = μH, where μ$_r$ = 1 + χ is the (dimensionless) relative permeability and μ =μ$_0$μ$_r$ is the magnetic permeability. Both hard and soft magnets have a more complex, history-dependent, behavior described by what are called hysteresis loops, which give either B vs. H or M vs. H. In CGS, M = χH, but χ$_{SI}$ = 4πχ$_{CGS}$, and μ = μ$_r$.
Caution: in part because there are not enough Roman and Greek symbols, there is no commonly agreed-upon symbol for magnetic pole strength and magnetic moment. The symbol m has been used for both pole strength (unit A•m, where here the upright m is for meter) and for magnetic moment (unit A•m$^2$). The symbol μ has been used in some texts for magnetic permeability and in other texts for magnetic moment. We will use μ for magnetic permeability and m for magnetic moment. For pole strength, we will employ q$_m$. For a bar magnet of cross-section A with uniform magnetization M along its axis, the pole strength is given by q$_m$ = MA, so that M can be thought of as a pole strength per unit area.

### Fields of a magnet

Far away from a magnet, the magnetic field created by that magnet is almost always described (to a good approximation) by a dipole field characterized by its total magnetic moment. This is true regardless of the shape of the magnet, so long as the magnetic moment is non-zero. One characteristic of a dipole field is that the strength of the field falls off inversely with the cube of the distance from the magnet's center.
Closer to the magnet, the magnetic field becomes more complicated and more dependent on the detailed shape and magnetization of the magnet. Formally, the field can be expressed as a multipole expansion: A dipole field, plus a quadrupole field, plus an octupole field, etc.
At close range, many different fields are possible. For example, for a long, skinny bar magnet with its north pole at one end and south pole at the other, the magnetic field near either end falls off inversely with the square of the distance from that pole.

### Calculating the magnetic force
#### Pull force of a single magnet

The strength of a given magnet is sometimes given in terms of its pull force — its ability to pull ferromagnetic objects. The pull force exerted by either an electromagnet or a permanent magnet with no air gap (i.e., the ferromagnetic object is in direct contact with the pole of the magnet) is given by the Maxwell equation:
    $F={{B^{2}A} \over {2\mu _{0}}}$,
where:
* F is force (SI unit: newton)
* A is the cross section of the area of the pole (in square meters)
* B is the magnetic induction exerted by the magnet.
This result can be easily derived using Gilbert model, which assumes that the pole of magnet is charged with magnetic monopoles that induces the same in the ferromagnetic object.
If a magnet is acting vertically, it can lift a mass m in kilograms given by the simple equation:
    $m={{B^{2}A} \over {2\mu _{0}g}},$
where g is the gravitational acceleration.

#### Force between two magnetic poles

Classically, the force between two magnetic poles is given by:
    $F={{\mu q_{m1}q_{m2}} \over {4\pi r^{2}}}$
where
    F is force (SI unit: newton)
    q$_{m1}$ and q$_{m2}$ are the magnitudes of magnetic poles (SI unit: ampere-meter)
    μ is the permeability of the intervening medium (SI unit: tesla meter per ampere, henry per meter or newton per ampere squared)
    r is the separation (SI unit: meter).
The pole description is useful to the engineers designing real-world magnets, but real magnets have a pole distribution more complex than a single north and south. Therefore, implementation of the pole idea is not simple. In some cases, one of the more complex formulae given below will be more useful.

#### Force between two nearby magnetized surfaces of area A

The mechanical force between two nearby magnetized surfaces can be calculated with the following equation. The equation is valid only for cases in which the effect of fringing is negligible and the volume of the air gap is much smaller than that of the magnetized material:
    $F={\frac {\mu _{0}H^{2}A}{2}}={\frac {B^{2}A}{2\mu _{0}}}$
where:
    A is the area of each surface, in m$^2$
    H is their magnetizing field, in A/m
    μ$_0$ is the permeability of space, which equals 4π×10$^{−7}$ T•m/A
    B is the flux density, in T.

#### Force between two bar magnets

The force between two identical cylindrical bar magnets placed end to end at large distance $z\gg R$ is approximately:
    $F\simeq \left[{\frac {B_{0}^{2}A^{2}\left(L^{2}+R^{2}\right)}{\pi \mu _{0}L^{2}}}\right]\left[{\frac {1}{z^{2}}}+{\frac {1}{(z+2L)^{2}}}-{\frac {2}{(z+L)^{2}}}\right]$
where:
    B$_0$ is the magnetic flux density very close to each pole, in T,
    A is the area of each pole, in m$^2$,
    L is the length of each magnet, in m,
    R is the radius of each magnet, in m, and
    z is the separation between the two magnets, in m.
    $B_{0}\,=\,{\frac {\mu _{0}}{2}}M$ relates the flux density at the pole to the magnetization of the magnet.
Note that all these formulations are based on Gilbert's model, which is usable in relatively great distances. In other models (e.g., Ampère's model), a more complicated formulation is used that sometimes cannot be solved analytically. In these cases, numerical methods must be used.

#### Force between two cylindrical magnets

For two cylindrical magnets with radius $R$ and length $L$, with their magnetic dipole aligned, the force can be asymptotically approximated at large distance $z\gg R$ by,
    $F(z)\simeq {\frac {\pi \mu _{0}}{4}}M^{2}R^{4}\left[{\frac {1}{z^{2}}}+{\frac {1}{(z+2L)^{2}}}-{\frac {2}{(z+L)^{2}}}\right]$
where $M$ is the magnetization of the magnets and $z$ is the gap between the magnets. A measurement of the magnetic flux density very close to the magnet $B_{0}$ is related to $M$ approximately by the formula
    $B_{0}={\frac {\mu _{0}}{2}}M$
The effective magnetic dipole can be written as
    $m=MV$
Where $V$ is the volume of the magnet. For a cylinder, this is $V=\pi R^{2}L$.
When $z\gg L$, the point dipole approximation is obtained,
    $F(x)={\frac {3\pi \mu _{0}}{2}}M^{2}R^{4}L^{2}{\frac {1}{z^{4}}}={\frac {3\mu _{0}}{2\pi }}M^{2}V^{2}{\frac {1}{z^{4}}}={\frac {3\mu _{0}}{2\pi }}m_{1}m_{2}{\frac {1}{z^{4}}}$
which matches the expression of the force between two magnetic dipoles.