What is a magnetic field?

The magnetostatic energy is the energy stored in the field generated by a material's magnetic moments. The magnet's field reaches its maximum intensity if all the magnetic moments orient in one direction; this is what occurs in a hard magnet. In order to prevent building up the magnetic field, sometimes magnetic moments tend to form loops. That way, the energy stored in the magnetic field can be constrained; this is what occurs in a soft magnet. What determines whether a magnet is hard or soft is the dominant term of its magnetic energy. For hard magnets, the anisotropy constant is relatively large, making the magnetic moments align with easy axis. The opposite case applies to soft magnets, in which the magnetostatic energy is dominant.

Exchange spring magnet

An Exchange Spring Magnet is a magnetic material with high coercivity and high saturation properties derived from the exchange interaction between a hard magnetic material and a soft magnetic material, respectively. Coehoorn et al. were the first able to observe an actual exchange spring magnet. Exchange spring magnets are cheaper than many magnets containing rare earth/transition metals (RE-TM Magnets), as the hard phase of the magnet (which commonly comprises RE-TM material) can be less than 15% of the overall magnet by volume.

First proposed by Kneller and Hawig in 1991, the exchange spring magnet utilizes the epitaxy between hard and soft magnetic materials: the hard material helps retain the soft material’s anisotropy, which increases its coercivity.

The magnetic hysteresis loop of an exchange spring magnet theoretically takes on a shape resembling that of a summation of its hard and soft magnetic components (as seen in Figure 1), meaning its "energy product" is higher than those of its components. A magnet’s maximum energy product (BH), which is roughly proportional to its coercivity (H) and magnetization saturation (M), is used as a metric of its ability to do magnetic work as (BH) is twice the magnet’s available magnetostatic energy. The exchange spring magnet offers a geometry able to improve upon the previously reported maximum energy products of materials such as Rare Earth/Transition Metal complexes; while both materials have sufficiently large H values and operate at relatively high Curie Temperatures, the exchange spring magnet can achieve much higher M values than the Rare Earth/Transition Metal (RE-TM) complexes.

An important component of exchange spring magnets is anisotropy: while exchange spring magnets that are isotropic in bulk still exhibit a greater energy product than many RE-TM magnets, the energy product of their anisotropic form is theorized to be significantly higher.

The magnetic moment of a bulk material is the sum of all of its atomic moments. The atomic moments' interactions with each other and with the externally applied field determine the behavior of the magnet. Each atomic magnetic moment tries to orient itself so that the total magnetic energy reaches a minimum. There are generally four types of energy competing with each other to reach equilibrium: each is derived from the exchange coupling effect, magnetic anisotropy, the magnetiostatic energy of the magnet, and the magnet's interaction with external field.

Exchange coupling is a quantum mechanical effect that keeps the adjacent moments aligned with one another. Exchange energy of adjacent moments increases as the angle between the two moments increases.

where formula_2 is the exchange constant and formula_3 is the position vector of neighbor formula_4 with respect to site formula_5. Typical values of formula_6 are on the order of formula_7 J/m.

Magnetic anisotropy energy arises from the crystalline structure of the material. For a simple case, the effect can be modeled by a uniaxial energy distribution. Along an axial direction, called the easy axis, the magnetic moments tend to align. The energy increases if the orientation of a magnetic moment deviates from the easy axis.

Another magnetostatic energy arises interaction with an external field. Magnetic moments naturally try to align with the applied field.

Since the magnetostatic energy dominates in the soft magnet, the magnetic moments tend to successfully orient along the external field.

In the exchange spring magnet, the hard phase has high coercivity and the soft phase has high saturation. The hard phase and the soft phase interact through their interface by exchange coupling.

From left to right in Figure 3, an external field is first applied in an upward direction in order to saturate the magnet. Then, the external field is reversed and starts to demagnetize the magnet. Since the coercivity of the hard phase is relatively high, the moments remain unchanged so as to minimize the anisotropy and exchange energy. The magnetic moments in the soft phase start rotating to align with the applied field. Because of the exchange coupling at the soft/hard interface, the magnetic moments at the soft phase boundary have to align with the adjacent moment in hard phase. At the regions close to the interface, because of exchange coupling, the chain of magnetic moments acts like a spring. If the external field is increased, more moments in soft phase rotate downward, and the width of the transition region becomes smaller as the exchange energy density increases. The magnetic moments in the hard phase do not rotate until the external field is high enough that the exchange energy density in the transition region is comparable to the anisotropy energy density in the hard phase. At this point, the rotation of magnetic moments in the soft phase starts to affect the hard phase. As the external field surpasses the hard material's coercivity, the hard magnet gets fully demagnetized.

In the previous process, when the magnetic moments in the hard magnet start to rotate, the intensity of external field is already much higher than the coercivity of the soft phase, but there is still a transition region in soft phase. If the thickness of the soft phase is less than twice as thick as the transition region, the soft phase should have a large effective coercivity, smaller than but comparable to the coercivity of the hard phase.

In a thin soft phase, it is hard for the external field to rotate the magnetic moments, similar to a hard magnet with high saturation magnetization. After applying a high external field to partially demagnetize the magnetic moments in the hard phase and after subsequently removing the external field, the rotated moments in the soft phase can be rotated back by exchange coupling with the hard phase (Figure 5). This phenomenon is shown in the hysteresis loop of an exchange spring magnet (Figure 6).

Comparing the exchange spring magnet's hysteresis loop with that of a conventional hard magnet demonstrates that the exchange spring magnet is more likely to recover from the opposing external field. When the external field is removed, the remanent magnetization can recover to a value close to its original. The name "exchange spring magnet" is derived from the reversibility of magnetization.

The dimension of the soft phase inside the exchange spring magnet should be kept small enough so as to retain reversible magnetization. Additionally, the volume fraction of the soft phase needs to be as large as possible in order to achieve a high magnetization saturation. One viable material geometry is to fabricate a magnet by embedding hard particles inside a soft matrix. That way, the soft matrix material occupies the largest volume fraction while being close to the hard particles. The size and spacing of the hard particles is on the scale of nanometers. If the hard magnets are spheres on an fcc space lattice in the soft magnetic phase, the volume fraction of the hard phase can be 9%. Since the total magnetization saturation is summed up by volume fraction, it is close to the value of a pure soft phase.

The fabrication of an exchange spring magnet requires precise control of the particle-matrix structure at the nanometer-scale dimension. Several approaches have been tested, including metallurgical method, sputtering, and particle self-assembly.

A magnetic field is a vector field that describes the magnetic influence of electrical currents and magnetized materials. In everyday life, the effects of magnetic fields are often seen in permanent magnets, which pull on magnetic materials (such as iron) and attract or repel other magnets. Magnetic fields surround and are created by magnetized material and by moving electric charges (electric currents) such as those used in electromagnets. Magnetic fields exert forces on nearby moving electrical charges and torques on nearby magnets. In addition, a magnetic field that varies with location exerts a force on magnetic materials. Both the strength and direction of a magnetic field varies with location. As such, it is an example of a vector field.

Magnetic field

The term'magnetic field' is used for two distinct but closely related fields denoted by the symbols and. In the International System of Units, is measured in units of amperes per meter and is measured in teslas, which are equivalent to newtons per meter per ampere. and differ in how they account for magnetization. In a vacuum, and are the same aside from units; but in a magnetized material, /formula_1 and differ by the magnetization of the material at that point in the material.

Magnetic fields are produced by moving electric charges and the intrinsic magnetic moments of elementary particles associated with a fundamental quantum property, their spin. Magnetic fields and electric fields are interrelated, and are both components of the electromagnetic force, one of the four fundamental forces of nature.

Magnetic fields are widely used throughout modern technology, particularly in electrical engineering and electromechanics. Rotating magnetic fields are used in both electric motors and generators. The interaction of magnetic fields in electric devices such as transformers is studied in the discipline of magnetic circuits. Magnetic forces give information about the charge carriers in a material through the Hall effect. The Earth produces its own magnetic field, which shields the Earth's ozone layer from the solar wind and is important in navigation using a compass.
Although magnets and magnetism were studied much earlier, the research of magnetic fields began in 1269 when French scholar Petrus Peregrinus de Maricourt mapped out the magnetic field on the surface of a spherical magnet using iron needles. Noting that the resulting field lines crossed at two points he named those points 'poles' in analogy to Earth's poles. He also clearly articulated the principle that magnets always have both a north and south pole, no matter how finely one slices them.

Almost three centuries later, William Gilbert of Colchester replicated Petrus Peregrinus' work and was the first to state explicitly that Earth is a magnet. Published in 1600, Gilbert's work, "De Magnete", helped to establish magnetism as a science.

In 1750, John Michell stated that magnetic poles attract and repel in accordance with an inverse square law. Charles-Augustin de Coulomb experimentally verified this in 1785 and stated explicitly that the north and south poles cannot be separated. Building on this force between poles, Siméon Denis Poisson (1781–1840) created the first successful model of the magnetic field, which he presented in 1824. In this model, a magnetic -field is produced by'magnetic poles' and magnetism is due to small pairs of north/south magnetic poles.
Three discoveries challenged this foundation of magnetism, though. First, in 1819, Hans Christian Ørsted discovered that an electric current generates a magnetic field encircling it. Then in 1820, André-Marie Ampère showed that parallel wires with currents attract one another if the currents are in the same direction and repel if they are in opposite directions. Finally, Jean-Baptiste Biot and Félix Savart discovered the Biot–Savart law in 1820, which correctly predicts the magnetic field around any current-carrying wire.

Extending these experiments, Ampère published his own successful model of magnetism in 1825. In it, he showed the equivalence of electrical currents to magnets and proposed that magnetism is due to perpetually flowing loops of current instead of the dipoles of magnetic charge in Poisson's model. This has the additional benefit of explaining why magnetic charge can not be isolated. Further, Ampère derived both Ampère's force law describing the force between two currents and Ampère's law, which, like the Biot–Savart law, correctly described the magnetic field generated by a steady current. Also in this work, Ampère introduced the term electrodynamics to describe the relationship between electricity and magnetism.

In 1831, Michael Faraday discovered electromagnetic induction when he found that a changing magnetic field generates an encircling electric field. He described this phenomenon in what is known as Faraday's law of induction. Later, Franz Ernst Neumann proved that, for a moving conductor in a magnetic field, induction is a consequence of Ampère's force law. In the process, he introduced the magnetic vector potential, which was later shown to be equivalent to the underlying mechanism proposed by Faraday.

In 1850, Lord Kelvin, then known as William Thomson, distinguished between two magnetic fields now denoted and. The former applied to Poisson's model and the latter to Ampère's model and induction. Further, he derived how and relate to each other.

The reason and are used for the two magnetic fields has been a source of some debate among science historians. Most agree that Kelvin avoided to prevent confusion with the SI fundamental unit of length, the Metre, abbreviated "m". Others believe the choices were purely random.

Between 1861 and 1865, James Clerk Maxwell developed and published Maxwell's equations, which explained and united all of classical electricity and magnetism. The first set of these equations was published in a paper entitled "" in 1861. These equations were valid although incomplete. Maxwell completed his set of equations in his later 1865 paper "A Dynamical Theory of the Electromagnetic Field" and demonstrated the fact that light is an electromagnetic wave. Heinrich Hertz experimentally confirmed this fact in 1887.

The twentieth century extended electrodynamics to include relativity and quantum mechanics. Albert Einstein, in his paper of 1905 that established relativity, showed that both the electric and magnetic fields are part of the same phenomena viewed from different reference frames. (See moving magnet and conductor problem for details about the thought experiment that eventually helped Albert Einstein to develop special relativity.) Finally, the emergent field of quantum mechanics was merged with electrodynamics to form quantum electrodynamics (QED).

The magnetic field can be defined in several equivalent ways based on the effects it has on its environment.

Often the magnetic field is defined by the force it exerts on a moving charged particle. It is known from experiments in electrostatics that a particle of charge in an electric field experiences a force. However, in other situations, such as when a charged particle moves in the vicinity of a current-carrying wire, the force also depends on the velocity of that particle. The velocity dependent portion can be separated such that the force on the particle satisfies the "Lorentz force law",
Here is the particle's velocity and × denotes the cross product. The vector is termed the magnetic field, and it is "defined" as the vector field necessary to make the Lorentz force law correctly describe the motion of a charged particle. This definition allows the determination of in the following way

Alternatively, the magnetic field can be defined in terms of the torque it produces on a magnetic dipole (see magnetic torque on permanent magnets below).

In addition to, there is a quantity, which is often called the "magnetic field". In a vacuum, and are proportional to each other, with the multiplicative constant depending on the physical units. Inside a material they are different (see H and B inside and outside magnetic materials). The term "magnetic field" is historically reserved for while using other terms for. Informally, though, and formally for some recent textbooks mostly in physics, the term'magnetic field' is used to describe as well as or in place of.
There are many alternative names for both (see sidebar).

In SI units, is measured in teslas (symbol: T) and correspondingly (magnetic flux) is measured in webers (symbol: Wb) so that a flux density of 1 Wb/m is 1 tesla. The SI unit of tesla is equivalent to (newton·second)/(coulomb·metre). In Gaussian-cgs units, is measured in gauss (symbol: G). (The conversion is 1 T = 10000 G.) One nanotesla is equivalent to 1 gamma (symbol: γ). The -field is measured in amperes per metre (A/m) in SI units, and in oersteds (Oe) in cgs units.

The finest precision for a magnetic field measurement was attained by Gravity Probe B experiment at 5 aT ()

Devices used to measure the local magnetic field are called magnetometers. Important classes of magnetometers include using induction magnetometer (or search-coil magnetometer) which measure only varying magnetic field, rotating coil magnetometer, Hall effect magnetometers, NMR magnetometers, SQUID magnetometers, and fluxgate magnetometers. The magnetic fields of distant astronomical objects are measured through their effects on local charged particles. For instance, electrons spiraling around a field line produce synchrotron radiation that is detectable in radio waves.

Mapping the magnetic field of an object is simple in principle. First, measure the strength and direction of the magnetic field at a large number of locations (or at every point in space). Then, mark each location with an arrow (called a vector) pointing in the direction of the local magnetic field with its magnitude proportional to the strength of the magnetic field.

An alternative method to map the magnetic field is to 'connect' the arrows to form magnetic "field lines". The direction of the magnetic field at any point is parallel to the direction of nearby field lines, and the local density of field lines can be made proportional to its strength. Magnetic field lines are like streamlines in fluid flow, in that they represent something continuous, and a different resolution would show more or fewer lines.

An advantage of using magnetic field lines as a representation is that many laws of magnetism (and electromagnetism) can be stated completely and concisely using simple concepts such as the 'number' of field lines through a surface. These concepts can be quickly 'translated' to their mathematical form. For example, the number of field lines through a given surface is the surface integral of the magnetic field.

Various phenomena have the effect of "displaying" magnetic field lines as though the field lines were physical phenomena. For example, iron filings placed in a magnetic field, form lines that correspond to 'field lines'. Magnetic field "lines" are also visually displayed in polar auroras, in which plasma particle dipole interactions create visible streaks of light that line up with the local direction of Earth's magnetic field.

Field lines can be used as a qualitative tool to visualize magnetic forces. In ferromagnetic substances like iron and in plasmas, magnetic forces can be understood by imagining that the field lines exert a tension, (like a rubber band) along their length, and a pressure perpendicular to their length on neighboring field lines. 'Unlike' poles of magnets attract because they are linked by many field lines; 'like' poles repel because their field lines do not meet, but run parallel, pushing on each other. The rigorous form of this concept is the electromagnetic stress–energy tensor.

"Permanent magnets" are objects that produce their own persistent magnetic fields. They are made of ferromagnetic materials, such as iron and nickel, that have been magnetized, and they have both a north and a south pole.

The magnetic field of permanent magnets can be quite complicated, especially near the magnet. The magnetic field of a small straight magnet is proportional to the magnet's "strength" (called its magnetic dipole moment ). The equations are non-trivial and also depend on the distance from the magnet and the orientation of the magnet. For simple magnets, points in the direction of a line drawn from the south to the north pole of the magnet. Flipping a bar magnet is equivalent to rotating its by 180 degrees.

The magnetic field of larger magnets can be obtained by modeling them as a collection of a large number of small magnets called dipoles each having their own. The magnetic field produced by the magnet then is the net magnetic field of these dipoles. And, any net force on the magnet is a result of adding up the forces on the individual dipoles.

There are two competing models for the nature of these dipoles. These two models produce two different magnetic fields, and. Outside a material, though, the two are identical (to a multiplicative constant) so that in many cases the distinction can be ignored. This is particularly true for magnetic fields, such as those due to electric currents, that are not generated by magnetic materials.

It is sometimes useful to model the force and torques between two magnets as due to magnetic poles repelling or attracting each other in the same manner as the Coulomb force between electric charges. In this model, a magnetic -field is produced by "magnetic charges" that are'smeared' around each pole. These "magnetic charges" are in fact related to the magnetization field.

The -field, therefore, is analogous to the electric field, which starts at a positive electric charge and ends at a negative electric charge. Near the north pole, therefore, all -field lines point away from the north pole (whether inside the magnet or out) while near the south pole all -field lines point toward the south pole (whether inside the magnet or out). Too, a north pole feels a force in the direction of the -field while the force on the south pole is opposite to the -field.

In the magnetic pole model, the elementary magnetic dipole is formed by two opposite magnetic poles of pole strength separated by a small distance vector, such that. The magnetic pole model predicts correctly the field both inside and outside magnetic materials, in particular the fact that is opposite to the magnetization field inside a permanent magnet.

Since it is based on the fictitious idea of a "magnetic charge density", the pole model has limitations. Magnetic poles cannot exist apart from each other as electric charges can, but always come in north/south pairs. If a magnetized object is divided in half, a new pole appears on the surface of each piece, so each has a pair of complementary poles. The magnetic pole model does not account for magnetism that is produced by electric currents.

After Ørsted discovered that electric currents produce a magnetic field and Ampere discovered that electric currents attracted and repelled each other similar to magnets, it was natural to hypothesize that all magnetic fields are due to electric current loops. In this model developed by Ampere, the elementary magnetic dipole that makes up all magnets is a sufficiently small Amperian loop of current I. The dipole moment of this loop is where is the area of the loop.

These magnetic dipoles produce a magnetic -field. One important property of the -field produced this way is that magnetic -field lines neither start nor end (mathematically, is a solenoidal vector field); a field line either extends to infinity or wraps around to form a closed curve. To date, no exception to this rule has been found. (See magnetic monopole below.) Magnetic field lines exit a magnet near its north pole and enter near its south pole, but inside the magnet -field lines continue through the magnet from the south pole back to the north. If a -field line enters a magnet somewhere it has to leave somewhere else; it is not allowed to have an end point. Magnetic poles, therefore, always come in N and S pairs.

More formally, since all the magnetic field lines that enter any given region must also leave that region, subtracting the 'number' of field lines that enter the region from the number that exit gives identically zero. Mathematically this is equivalent to:

where the integral is a surface integral over the closed surface (a closed surface is one that completely surrounds a region with no holes to let any field lines escape). Since points outward, the dot product in the integral is positive for -field pointing out and negative for -field pointing in.

There is also a corresponding differential form of this equation covered in Maxwell's equations below.

The force between two small magnets is quite complicated and depends on the strength and orientation of both magnets and the distance and direction of the magnets relative to each other. The force is particularly sensitive to rotations of the magnets due to magnetic torque. The force on each magnet depends on its magnetic moment and the magnetic field of the other.

To understand the force between magnets, it is useful to examine the "magnetic pole model" given above. In this model, the "-field" of one magnet pushes and pulls on "both" poles of a second magnet. If this -field is the same at both poles of the second magnet then there is no net force on that magnet since the force is opposite for opposite poles. If, however, the magnetic field of the first magnet is "nonuniform" (such as the near one of its poles), each pole of the second magnet sees a different field and is subject to a different force. This difference in the two forces moves the magnet in the direction of increasing magnetic field and may also cause a net torque.

This is a specific example of a general rule that magnets are attracted (or repulsed depending on the orientation of the magnet) into regions of higher magnetic field. Any non-uniform magnetic field, whether caused by permanent magnets or electric currents, exerts a force on a small magnet in this way.

The details of the Amperian loop model are different and more complicated but yield the same result: that magnetic dipoles are attracted/repelled into regions of higher magnetic field.
Mathematically, the force on a small magnet having a magnetic moment due to a magnetic field is:

where the gradient is the change of the quantity per unit distance and the direction is that of maximum increase of. To understand this equation, note that the dot product, where and represent the magnitude of the and vectors and is the angle between them. If is in the same direction as then the dot product is positive and the gradient points 'uphill' pulling the magnet into regions of higher -field (more strictly larger ). This equation is strictly only valid for magnets of zero size, but is often a good approximation for not too large magnets. The magnetic force on larger magnets is determined by dividing them into smaller regions each having their own then summing up the forces on each of these very small regions.

If two like poles of two separate magnets are brought near each other, and one of the magnets is allowed to turn, it promptly rotates to align itself with the first. In this example, the magnetic field of the stationary magnet creates a "magnetic torque" on the magnet that is free to rotate. This magnetic torque tends to align a magnet's poles with the magnetic field lines. A compass, therefore, turns to align itself with Earth's magnetic field.

Magnetic torque is used to drive electric motors. In one simple motor design, a magnet is fixed to a freely rotating shaft and subjected to a magnetic field from an array of electromagnets. By continuously switching the electric current through each of the electromagnets, thereby flipping the polarity of their magnetic fields, like poles are kept next to the rotor; the resultant torque is transferred to the shaft. See Rotating magnetic fields below.

As is the case for the force between magnets, the magnetic pole model leads more readily to the correct equation. Here, two equal and opposite magnetic charges experiencing the same also experience equal and opposite forces. Since these equal and opposite forces are in different locations, this produces a torque proportional to the distance (perpendicular to the force) between them. With the definition of as the pole strength times the distance between the poles, this leads to, where is a constant called the vacuum permeability, measuring V·s/(A·m) and is the angle between and.

The Amperian loop model also predicts the same magnetic torque. Here, it is the field interacting with the Amperian current loop through a Lorentz force described below. Again, the results are the same although the models are completely different.
Mathematically, the torque on a small magnet is proportional both to the applied magnetic field and to the magnetic moment of the magnet:

where × represents the vector cross product. Note that this equation includes all of the qualitative information included above. There is no torque on a magnet if is in the same direction as the magnetic field. (The cross product is zero for two vectors that are in the same direction.) Further, all other orientations feel a torque that twists them toward the direction of magnetic field.

Currents of electric charges both generate a magnetic field and feel a force due to magnetic B-fields.

All moving charged particles produce magnetic fields. Moving point charges, such as electrons, produce complicated but well known magnetic fields that depend on the charge, velocity, and acceleration of the particles.

Magnetic field lines form in concentric circles around a cylindrical current-carrying conductor, such as a length of wire. The direction of such a magnetic field can be determined by using the "right hand grip rule" (see figure at right). The strength of the magnetic field decreases with distance from the wire. (For an infinite length wire the strength is inversely proportional to the distance.)
Bending a current-carrying wire into a loop concentrates the magnetic field inside the loop while weakening it outside. Bending a wire into multiple closely spaced loops to form a coil or "solenoid" enhances this effect. A device so formed around an iron core may act as an "electromagnet", generating a strong, well-controlled magnetic field. An infinitely long cylindrical electromagnet has a uniform magnetic field inside, and no magnetic field outside. A finite length electromagnet produces a magnetic field that looks similar to that produced by a uniform permanent magnet, with its strength and polarity determined by the current flowing through the coil.

The magnetic field generated by a steady current (a constant flow of electric charges, in which charge neither accumulates nor is depleted at any point) is described by the "Biot–Savart law":

where the integral sums over the wire length where vector is the vector line element with direction in the same sense as the current, is the magnetic constant, is the distance between the location of and the location where the magnetic field is calculated, and is a unit vector in the direction of. In the case of a sufficiently long wire, this becomes:

where "r" is the distance from the wire.

A slightly more general way of relating the current formula_8 to the -field is through Ampère's law:

where the line integral is over any arbitrary loop and formula_8 is the current enclosed by that loop. Ampère's law is always valid for steady currents and can be used to calculate the -field for certain highly symmetric situations such as an infinite wire or an infinite solenoid.

In a modified form that accounts for time varying electric fields, Ampère's law is one of four Maxwell's equations that describe electricity and magnetism.

A charged particle moving in a -field experiences a "sideways" force that is proportional to the strength of the magnetic field, the component of the velocity that is perpendicular to the magnetic field and the charge of the particle. This force is known as the "Lorentz force", and is given by
where

The Lorentz force is always perpendicular to both the velocity of the particle and the magnetic field that created it. When a charged particle moves in a static magnetic field, it traces a helical path in which the helix axis is parallel to the magnetic field, and in which the speed of the particle remains constant. Because the magnetic force is always perpendicular to the motion, the magnetic field can do no work on an isolated charge. It can only do work indirectly, via the electric field generated by a changing magnetic field. It is often claimed that the magnetic force can do work to a non-elementary magnetic dipole, or to charged particles whose motion is constrained by other forces, but this is incorrect because the work in those cases is performed by the electric forces of the charges deflected by the magnetic field.

The force on a current carrying wire is similar to that of a moving charge as expected since a current carrying wire is a collection of moving charges. A current-carrying wire feels a force in the presence of a magnetic field. The Lorentz force on a macroscopic current is often referred to as the "Laplace force".
Consider a conductor of length, cross section, and charge due to electric current. If this conductor is placed in a magnetic field of magnitude that makes an angle with the velocity of charges in the conductor, the force exerted on a single charge is
so, for charges where
the force exerted on the conductor is
where.

The direction of force on a charge or a current can be determined by a mnemonic known as the "right-hand rule" (see the figure). Using the right hand, pointing the thumb in the direction of the current, and the fingers in the direction of the magnetic field, the resulting force on the charge points outwards from the palm. The force on a negatively charged particle is in the opposite direction. If both the speed and the charge are reversed then the direction of the force remains the same. For that reason a magnetic field measurement (by itself) cannot distinguish whether there is a positive charge moving to the right or a negative charge moving to the left. (Both of these cases produce the same current.) On the other hand, a magnetic field combined with an electric field "can" distinguish between these, see Hall effect below.

An alternative mnemonic to the right hand rule is Flemings's left hand rule.

The formulas derived for the magnetic field above are correct when dealing with the entire current. A magnetic material placed inside a magnetic field, though, generates its own bound current, which can be a challenge to calculate. (This bound current is due to the sum of atomic sized current loops and the spin of the subatomic particles such as electrons that make up the material.) The -field as defined above helps factor out this bound current; but to see how, it helps to introduce the concept of "magnetization" first.

The "magnetization" vector field represents how strongly a region of material is magnetized. It is defined as the net magnetic dipole moment per unit volume of that region. The magnetization of a uniform magnet is therefore a material constant, equal to the magnetic moment of the magnet divided by its volume. Since the SI unit of magnetic moment is A⋅m, the SI unit of magnetization is ampere per meter, identical to that of the -field.

The magnetization field of a region points in the direction of the average magnetic dipole moment in that region. Magnetization field lines, therefore, begin near the magnetic south pole and ends near the magnetic north pole. (Magnetization does not exist outside the magnet.)

In the Amperian loop model, the magnetization is due to combining many tiny Amperian loops to form a resultant current called "bound current". This bound current, then, is the source of the magnetic field due to the magnet. (See Magnetic dipoles below and for more information.) Given the definition of the magnetic dipole, the magnetization field follows a similar law to that of Ampere's law:

where the integral is a line integral over any closed loop and is the 'bound current' enclosed by that closed loop.

In the magnetic pole model, magnetization begins at and ends at magnetic poles. If a given region, therefore, has a net positive'magnetic pole strength' (corresponding to a north pole) then it has more magnetization field lines entering it than leaving it. Mathematically this is equivalent to:

where the integral is a closed surface integral over the closed surface and is the'magnetic charge' (in units of magnetic flux) enclosed by. (A closed surface completely surrounds a region with no holes to let any field lines escape.) The negative sign occurs because the magnetization field moves from south to north.

In SI units, the H-field is related to the B-field by

In terms of the H-field, Ampere's law is
where represents the 'free current' enclosed by the loop so that the line integral of does not depend at all on the bound currents.

For the differential equivalent of this equation see Maxwell's equations. Ampere's law leads to the boundary condition
where is the surface free current density and the unit normal formula_20 points in the direction from medium 2 to medium 1.

Similarly, a surface integral of over any closed surface is independent of the free currents and picks out the "magnetic charges" within that closed surface:

which does not depend on the free currents.

The -field, therefore, can be separated into two independent parts:

where is the applied magnetic field due only to the free currents and is the demagnetizing field due only to the bound currents.

The magnetic -field, therefore, re-factors the bound current in terms of "magnetic charges". The field lines loop only around 'free current' and, unlike the magnetic field, begins and ends near magnetic poles as well.

Most materials respond to an applied -field by producing their own magnetization and therefore their own -field. Typically, the response is weak and exists only when the magnetic field is applied. The term "magnetism" describes how materials respond on the microscopic level to an applied magnetic field and is used to categorize the magnetic phase of a material. Materials are divided into groups based upon their magnetic behavior:

In the case of paramagnetism and diamagnetism, the magnetization is often proportional to the applied magnetic field such that:
where is a material dependent parameter called the permeability. In some cases the permeability may be a second rank tensor so that may not point in the same direction as. These relations between and are examples of constitutive equations. However, superconductors and ferromagnets have a more complex to relation; see magnetic hysteresis.

Energy is needed to generate a magnetic field both to work against the electric field that a changing magnetic field creates and to change the magnetization of any material within the magnetic field. For non-dispersive materials, this same energy is released when the magnetic field is destroyed so that the energy can be modeled as being stored in the magnetic field.

For linear, non-dispersive, materials (such that where is frequency-independent), the energy density is:

If there are no magnetic materials around then can be replaced by. The above equation cannot be used for nonlinear materials, though; a more general expression given below must be used.

In general, the incremental amount of work per unit volume needed to cause a small change of magnetic field is:

Once the relationship between and is known this equation is used to determine the work needed to reach a given magnetic state. For hysteretic materials such as ferromagnets and superconductors, the work needed also depends on how the magnetic field is created. For linear non-dispersive materials, though, the general equation leads directly to the simpler energy density equation given above.

A changing magnetic field, such as a magnet moving through a conducting coil, generates an electric field (and therefore tends to drive a current in such a coil). This is known as "Faraday's law" and forms the basis of many electrical generators and electric motors.

Mathematically, Faraday's law is:
where formula_27 is the electromotive force (or "EMF", the voltage generated around a closed loop) and is the "magnetic flux"—the product of the area times the magnetic field normal to that area. (This definition of magnetic flux is why is often referred to as "magnetic flux density".)

The negative sign represents the fact that any current generated by a changing magnetic field in a coil produces a magnetic field that "opposes" the "change" in the magnetic field that induced it. This phenomenon is known as Lenz's law.

This integral formulation of Faraday's law can be converted into a differential form, which applies under slightly different conditions. This form is covered as one of Maxwell's equations below.

Similar to the way that a changing magnetic field generates an electric field, a changing electric field generates a magnetic field. This fact is known as "Maxwell's correction to Ampère's law" and is applied as an additive term to Ampere's law as given above. This additional term is proportional to the time rate of change of the electric flux and is similar to Faraday's law above but with a different and positive constant out front. (The electric flux through an area is proportional to the area times the perpendicular part of the electric field.)

The full law including the correction term is known as the Maxwell–Ampère equation. It is not commonly given in integral form because the effect is so small that it can typically be ignored in most cases where the integral form is used.

The Maxwell term "is" critically important in the creation and propagation of electromagnetic waves. Maxwell's correction to Ampère's Law together with Faraday's law of induction describes how mutually changing electric and magnetic fields interact to sustain each other and thus to form electromagnetic waves, such as light: a changing electric field generates a changing magnetic field, which generates a changing electric field again. These, though, are usually described using the differential form of this equation given below.

Like all vector fields, a magnetic field has two important mathematical properties that relates it to its "sources". (For the "sources" are currents and changing electric fields.) These two properties, along with the two corresponding properties of the electric field, make up "Maxwell's Equations". Maxwell's Equations together with the Lorentz force law form a complete description of classical electrodynamics including both electricity and magnetism.

The first property is the divergence of a vector field,, which represents how 'flows' outward from a given point. As discussed above, a -field line never starts or ends at a point but instead forms a complete loop. This is mathematically equivalent to saying that the divergence of is zero. (Such vector fields are called solenoidal vector fields.) This property is called Gauss's law for magnetism and is equivalent to the statement that there are no isolated magnetic poles or magnetic monopoles. The electric field on the other hand begins and ends at electric charges so that its divergence is non-zero and proportional to the charge density (See Gauss's law).

The second mathematical property is called the curl, such that represents how curls or 'circulates' around a given point. The result of the curl is called a 'circulation source'. The equations for the curl of and of are called the Ampère–Maxwell equation and Faraday's law respectively. They represent the differential forms of the integral equations given above.

The complete set of Maxwell's equations then are:

where = complete microscopic current density and is the charge density.

As discussed above, materials respond to an applied electric field and an applied magnetic field by producing their own internal 'bound' charge and current distributions that contribute to and but are difficult to calculate. To circumvent this problem, and fields are used to re-factor Maxwell's equations in terms of the "free current density" and "free charge density" :

These equations are not any more general than the original equations (if the 'bound' charges and currents in the material are known). They also must be supplemented by the relationship between and as well as that between and. On the other hand, for simple relationships between these quantities this form of Maxwell's equations can circumvent the need to calculate the bound charges and currents.

According to the special theory of relativity, the partition of the electromagnetic force into separate electric and magnetic components is not fundamental, but varies with the observational frame of reference: An electric force perceived by one observer may be perceived by another (in a different frame of reference) as a magnetic force, or a mixture of electric and magnetic forces.

Formally, special relativity combines the electric and magnetic fields into a rank-2 tensor, called the "electromagnetic tensor". Changing reference frames "mixes" these components. This is analogous to the way that special relativity "mixes" space and time into spacetime, and mass, momentum and energy into four-momentum.

In advanced topics such as quantum mechanics and relativity it is often easier to work with a potential formulation of electrodynamics rather than in terms of the electric and magnetic fields. In this representation, the "magnetic vector potential", and the electric scalar potential, are defined such that:

The vector potential may be interpreted as a "generalized potential momentum per unit charge" just as is interpreted as a "generalized potential energy per unit charge".

Maxwell's equations when expressed in terms of the potentials can be cast into a form that agrees with special relativity with little effort. In relativity together with forms the four-potential, analogous to the four-momentum that combines the momentum and energy of a particle. Using the four potential instead of the electromagnetic tensor has the advantage of being much simpler—and it can be easily modified to work with quantum mechanics.

In modern physics, the electromagnetic field is understood to be not a "classical" field, but rather a quantum field; it is represented not as a vector of three numbers at each point, but as a vector of three quantum operators at each point. The most accurate modern description of the electromagnetic interaction (and much else) is "quantum electrodynamics" (QED), which is incorporated into a more complete theory known as the "Standard Model of particle physics".

In QED, the magnitude of the electromagnetic interactions between charged particles (and their antiparticles) is computed using perturbation theory. These rather complex formulas produce a remarkable pictorial representation as Feynman diagrams in which virtual photons are exchanged.

Predictions of QED agree with experiments to an extremely high degree of accuracy: currently about 10 (and limited by experimental errors); for details see precision tests of QED. This makes QED one of the most accurate physical theories constructed thus far.

All equations in this article are in the classical approximation, which is less accurate than the quantum description mentioned here. However, under most everyday circumstances, the difference between the two theories is negligible.

The Earth's magnetic field is produced by convection of a liquid iron alloy in the outer core. In a dynamo process, the movements drive a feedback process in which electric currents create electric and magnetic fields that in turn act on the currents.

The field at the surface of the Earth is approximately the same as if a giant bar magnet were positioned at the center of the Earth and tilted at an angle of about 11° off the rotational axis of the Earth (see the figure). The north pole of a magnetic compass needle points roughly north, toward the North Magnetic Pole. However, because a magnetic pole is attracted to its opposite, the North Magnetic Pole is actually the south pole of the geomagnetic field. This confusion in terminology arises because the pole of a magnet is defined by the geographical direction it points.

Earth's magnetic field is not constant—the strength of the field and the location of its poles vary. Moreover, the poles periodically reverse their orientation in a process called geomagnetic reversal. The most recent reversal occurred 780,000 years ago.

The largest magnetic field produced over a macroscopic volume is 2.8 kT
(VNIIEF in Sarov, Russia, 1998).
Magnetars have the highest known magnetic field of any naturally occurring object; magnetars range from 0.1 to 100 GT (10 to 10 T). See orders of magnitude (magnetic field).

The "rotating magnetic field" is a key principle in the operation of alternating-current motors. A permanent magnet in such a field rotates so as to maintain its alignment with the external field. This effect was conceptualized by Nikola Tesla, and later utilized in his, and others', early AC (alternating current) electric motors.

A rotating magnetic field can be constructed using two orthogonal coils with 90 degrees phase difference in their AC currents. However, in practice such a system would be supplied through a three-wire arrangement with unequal currents.

This inequality would cause serious problems in standardization of the conductor size and so, to overcome it, three-phase systems are used where the three currents are equal in magnitude and have 120 degrees phase difference. Three similar coils having mutual geometrical angles of 120 degrees create the rotating magnetic field in this case. The ability of the three-phase system to create a rotating field, utilized in electric motors, is one of the main reasons why three-phase systems dominate the world's electrical power supply systems.

Synchronous motors use DC-voltage-fed rotor windings, which lets the excitation of the machine be controlled—and induction motors use short-circuited rotors (instead of a magnet) following the rotating magnetic field of a multicoiled stator. The short-circuited turns of the rotor develop eddy currents in the rotating field of the stator, and these currents in turn move the rotor by the Lorentz force.

In 1882, Nikola Tesla identified the concept of the rotating magnetic field. In 1885, Galileo Ferraris independently researched the concept. In 1888, Tesla gained for his work. Also in 1888, Ferraris published his research in a paper to the "Royal Academy of Sciences" in Turin.

The charge carriers of a current-carrying conductor placed in a transverse magnetic field experience a sideways Lorentz force; this results in a charge separation in a direction perpendicular to the current and to the magnetic field. The resultant voltage in that direction is proportional to the applied magnetic field. This is known as the "Hall effect".

The "Hall effect" is often used to measure the magnitude of a magnetic field. It is used as well to find the sign of the dominant charge carriers in materials such as semiconductors (negative electrons or positive holes).

An important use of is in "magnetic circuits" where inside a linear material. Here, is the magnetic permeability of the material. This result is similar in form to Ohm's law, where is the current density, is the conductance and is the electric field. Extending this analogy, the counterpart to the macroscopic Ohm's law () is:

where formula_32 is the magnetic flux in the circuit, formula_33 is the magnetomotive force applied to the circuit, and is the reluctance of the circuit. Here the reluctance is a quantity similar in nature to resistance for the flux.

Using this analogy it is straightforward to calculate the magnetic flux of complicated magnetic field geometries, by using all the available techniques of circuit theory.The magnetic field of a magnetic dipole is depicted in the figure. From outside, the ideal magnetic dipole is identical to that of an ideal electric dipole of the same strength. Unlike the electric dipole, a magnetic dipole is properly modeled as a current loop having a current and an area. Such a current loop has a magnetic moment of:

where the direction of is perpendicular to the area of the loop and depends on the direction of the current using the right-hand rule. An ideal magnetic dipole is modeled as a real magnetic dipole whose area has been reduced to zero and its current increased to infinity such that the product is finite. This model clarifies the connection between angular momentum and magnetic moment, which is the basis of the Einstein–de Haas effect "rotation by magnetization" and its inverse, the Barnett effect or "magnetization by rotation". Rotating the loop faster (in the same direction) increases the current and therefore the magnetic moment, for example.

It is sometimes useful to model the magnetic dipole similar to the electric dipole with two equal but opposite magnetic charges (one south the other north) separated by distance. This model produces an -field not a -field. Such a model is deficient, though, both in that there are no magnetic charges and in that it obscures the link between electricity and magnetism. Further, as discussed above it fails to explain the inherent connection between angular momentum and magnetism.

A "magnetic monopole" is a hypothetical particle (or class of particles) that has, as its name suggests, only one magnetic pole (either a north pole or a south pole). In other words, it would possess a "magnetic charge" analogous to an electric charge. Magnetic field lines would start or end on magnetic monopoles, so if they exist, they would give exceptions to the rule that magnetic field lines neither start nor end.

Modern interest in this concept stems from particle theories, notably Grand Unified Theories and superstring theories, that predict either the existence, or the possibility, of magnetic monopoles. These theories and others have inspired extensive efforts to search for monopoles. Despite these efforts, no magnetic monopole has been observed to date.

In recent research, materials known as spin ices can simulate monopoles, but do not contain actual monopoles.

A very common source of magnetic field found in nature is a dipole, with a "South pole" and a "North pole", terms dating back to the use of magnets as compasses, interacting with the Earth's magnetic field to indicate North and South on the globe. Since opposite ends of magnets are attracted, the north pole of a magnet is attracted to the south pole of another magnet. The Earth's North Magnetic Pole (currently in the Arctic Ocean, north of Canada) is physically a south pole, as it attracts the north pole of a compass.
A magnetic field contains energy, and physical systems move toward configurations with lower energy. When diamagnetic material is placed in a magnetic field, a "magnetic dipole" tends to align itself in opposed polarity to that field, thereby lowering the net field strength. When ferromagnetic material is placed within a magnetic field, the magnetic dipoles align to the applied field, thus expanding the domain walls of the magnetic domains.

Magnetism

Magnetism is a class of physical phenomena that are mediated by magnetic fields. Electric currents and the magnetic moments of elementary particles give rise to a magnetic field, which acts on other currents and magnetic moments. The most familiar effects occur in ferromagnetic materials, which are strongly attracted by magnetic fields and can be magnetized to become permanent magnets, producing magnetic fields themselves. Only a few substances are ferromagnetic; the most common ones are iron, nickel and cobalt and their alloys. The prefix "" refers to iron, because permanent magnetism was first observed in lodestone, a form of natural iron ore called magnetite, FeO.

Although ferromagnetism is responsible for most of the effects of magnetism encountered in everyday life, all other materials are influenced to some extent by a magnetic field, by several other types of magnetism. Paramagnetic substances such as aluminum and oxygen are weakly attracted to an applied magnetic field; diamagnetic substances such as copper and carbon are weakly repelled; while antiferromagnetic materials such as chromium and spin glasses have a more complex relationship with a magnetic field. The force of a magnet on paramagnetic, diamagnetic, and antiferromagnetic materials is usually too weak to be felt, and can be detected only by laboratory instruments, so in everyday life these substances are often described as non-magnetic.

The magnetic state (or magnetic phase) of a material depends on temperature and other variables such as pressure and the applied magnetic field. A material may exhibit more than one form of magnetism as these variables change.

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.

Alexander Neckam, by 1187, was the first in Europe to describe the compass and its use for navigation. In 1269, Peter Peregrinus de Maricourt wrote the "Epistola de magnete", the first extant treatise describing the properties of magnets. In 1282, the properties of magnets and the dry compasses were discussed by Al-Ashraf, a Yemeni physicist, astronomer, and geographer.

In 1600, William Gilbert published his "De Magnete, Magneticisque Corporibus, et de Magno Magnete Tellure" ("On the Magnet and Magnetic Bodies, and on the Great Magnet the Earth"). In this work he describes many of his experiments with his model earth called the terrella. From his experiments, he concluded that the Earth was itself magnetic and that this was the reason compasses pointed north (previously, some believed that it was the pole star (Polaris) or a large magnetic island on the north pole that attracted the compass).

An understanding of the relationship between electricity and magnetism began in 1819 with work by Hans Christian Ørsted, a professor at the University of Copenhagen, who discovered by the accidental twitching of a compass needle near a wire that an electric current could create a magnetic field. This landmark experiment is known as Ørsted's Experiment. Several other experiments followed, with André-Marie Ampère, who in 1820 discovered that the magnetic field circulating in a closed-path was related to the current flowing through the perimeter of the path; Carl Friedrich Gauss; Jean-Baptiste Biot and Félix Savart, both of whom in 1820 came up with the Biot–Savart law giving an equation for the magnetic field from a current-carrying wire; Michael Faraday, who in 1831 found that a time-varying magnetic flux through a loop of wire induced a voltage, and others finding further links between magnetism and electricity. James Clerk Maxwell synthesized and expanded these insights into Maxwell's equations, unifying electricity, magnetism, and optics into the field of electromagnetism. In 1905, Einstein used these laws in motivating his theory of special relativity, requiring that the laws held true in all inertial reference frames.

Electromagnetism has continued to develop into the 21st century, being incorporated into the more fundamental theories of gauge theory, quantum electrodynamics, electroweak theory, and finally the standard model.

Magnetism, at its root, arises from two sources:
The magnetic properties of materials are mainly due to the magnetic moments of their atoms' orbiting electrons. The magnetic moments of the nuclei of atoms are typically thousands of times smaller than the electrons' magnetic moments, so they are negligible in the context of the magnetization of materials. Nuclear magnetic moments are nevertheless very important in other contexts, particularly in nuclear magnetic resonance (NMR) and magnetic resonance imaging (MRI).

Ordinarily, the enormous number of electrons in a material are arranged such that their magnetic moments (both orbital and intrinsic) cancel out. This is due, to some extent, to electrons combining into pairs with opposite intrinsic magnetic moments as a result of the Pauli exclusion principle (see "electron configuration"), and combining into filled subshells with zero net orbital motion. In both cases, the electrons preferentially adopt arrangements in which the magnetic moment of each electron is cancelled by the opposite moment of another electron. Moreover, even when the electron configuration "is" such that there are unpaired electrons and/or non-filled subshells, it is often the case that the various electrons in the solid will contribute magnetic moments that point in different, random directions, so that the material will not be magnetic.

Sometimes, either spontaneously, or owing to an applied external magnetic field—each of the electron magnetic moments will be, on average, lined up. A suitable material can then produce a strong net magnetic field.

The magnetic behavior of a material depends on its structure, particularly its electron configuration, for the reasons mentioned above, and also on the temperature. At high temperatures, random thermal motion makes it more difficult for the electrons to maintain alignment.

Diamagnetism appears in all materials, and is the tendency of a material to oppose an applied magnetic field, and therefore, to be repelled by a magnetic field. However, in a material with paramagnetic properties (that is, with a tendency to enhance an external magnetic field), the paramagnetic behavior dominates. Thus, despite its universal occurrence, diamagnetic behavior is observed only in a purely diamagnetic material. In a diamagnetic material, there are no unpaired electrons, so the intrinsic electron magnetic moments cannot produce any bulk effect. In these cases, the magnetization arises from the electrons' orbital motions, which can be understood classically as follows:

Note that this description is meant only as a heuristic; the Bohr-van Leeuwen theorem shows that diamagnetism is impossible according to classical physics, and that a proper understanding requires a quantum-mechanical description.

Note that all materials undergo this orbital response. However, in paramagnetic and ferromagnetic substances, the diamagnetic effect is overwhelmed by the much stronger effects caused by the unpaired electrons.

In a paramagnetic material there are "unpaired electrons"; i.e., atomic or molecular orbitals with exactly one electron in them. While paired electrons are required by the Pauli exclusion principle to have their intrinsic ('spin') magnetic moments pointing in opposite directions, causing their magnetic fields to cancel out, an unpaired electron is free to align its magnetic moment in any direction. When an external magnetic field is applied, these magnetic moments will tend to align themselves in the same direction as the applied field, thus reinforcing it.

A ferromagnet, like a paramagnetic substance, has unpaired electrons. However, in addition to the electrons' intrinsic magnetic moment's tendency to be parallel to an applied field, there is also in these materials a tendency for these magnetic moments to orient parallel to each other to maintain a lowered-energy state. Thus, even in the absence of an applied field, the magnetic moments of the electrons in the material spontaneously line up parallel to one another.

Every ferromagnetic substance has its own individual temperature, called the Curie temperature, or Curie point, above which it loses its ferromagnetic properties. This is because the thermal tendency to disorder overwhelms the energy-lowering due to ferromagnetic order.

Ferromagnetism only occurs in a few substances; common ones are iron, nickel, cobalt, their alloys, and some alloys of rare-earth metals.

The magnetic moments of atoms in a ferromagnetic material cause them to behave something like tiny permanent magnets. They stick together and align themselves into small regions of more or less uniform alignment called magnetic domains or Weiss domains. Magnetic domains can be observed with a magnetic force microscope to reveal magnetic domain boundaries that resemble white lines in the sketch. There are many scientific experiments that can physically show magnetic fields.

When a domain contains too many molecules, it becomes unstable and divides into two domains aligned in opposite directions, so that they stick together more stably, as shown at the right.

When exposed to a magnetic field, the domain boundaries move, so that the domains aligned with the magnetic field grow and dominate the structure (dotted yellow area), as shown at the left. When the magnetizing field is removed, the domains may not return to an unmagnetized state. This results in the ferromagnetic material's being magnetized, forming a permanent magnet.

When magnetized strongly enough that the prevailing domain overruns all others to result in only one single domain, the material is magnetically saturated. When a magnetized ferromagnetic material is heated to the Curie point temperature, the molecules are agitated to the point that the magnetic domains lose the organization, and the magnetic properties they cause cease. When the material is cooled, this domain alignment structure spontaneously returns, in a manner roughly analogous to how a liquid can freeze into a crystalline solid.

In an antiferromagnet, unlike a ferromagnet, there is a tendency for the intrinsic magnetic moments of neighboring valence electrons to point in "opposite" directions. When all atoms are arranged in a substance so that each neighbor is anti-parallel, the substance is antiferromagnetic. Antiferromagnets have a zero net magnetic moment, meaning that no field is produced by them. Antiferromagnets are less common compared to the other types of behaviors and are mostly observed at low temperatures. In varying temperatures, antiferromagnets can be seen to exhibit diamagnetic and ferromagnetic properties.

In some materials, neighboring electrons prefer to point in opposite directions, but there is no geometrical arrangement in which "each" pair of neighbors is anti-aligned. This is called a spin glass and is an example of geometrical frustration.

Like ferromagnetism, ferrimagnets retain their magnetization in the absence of a field. However, like antiferromagnets, neighboring pairs of electron spins tend to point in opposite directions. These two properties are not contradictory, because in the optimal geometrical arrangement, there is more magnetic moment from the sublattice of electrons that point in one direction, than from the sublattice that points in the opposite direction.

Most ferrites are ferrimagnetic. The first discovered magnetic substance, magnetite, is a ferrite and was originally believed to be a ferromagnet; Louis Néel disproved this, however, after discovering ferrimagnetism.

When a ferromagnet or ferrimagnet is sufficiently small, it acts like a single magnetic spin that is subject to Brownian motion. Its response to a magnetic field is qualitatively similar to the response of a paramagnet, but much larger.An electromagnet is a type of magnet in which the magnetic field is produced by an electric current. The magnetic field disappears when the current is turned off. Electromagnets usually consist of a large number of closely spaced turns of wire that create the magnetic field. The wire turns are often wound around a magnetic core made from a ferromagnetic or ferrimagnetic material such as iron; the magnetic core concentrates the magnetic flux and makes a more powerful magnet.

The main advantage of an electromagnet over a permanent magnet is that the magnetic field can be quickly changed by controlling the amount of electric current in the winding. However, unlike a permanent magnet that needs no power, an electromagnet requires a continuous supply of current to maintain the magnetic field.

Electromagnets are widely used as components of other electrical devices, such as motors, generators, relays, solenoids, loudspeakers, hard disks, MRI machines, scientific instruments, and magnetic separation equipment. Electromagnets are also employed in industry for picking up and moving heavy iron objects such as scrap iron and steel. Electromagnetism was discovered in 1820.

As a consequence of Einstein's theory of special relativity, electricity and magnetism are fundamentally interlinked. Both magnetism lacking electricity, and electricity without magnetism, are inconsistent with special relativity, due to such effects as length contraction, time dilation, and the fact that the magnetic force is velocity-dependent. However, when both electricity and magnetism are taken into account, the resulting theory (electromagnetism) is fully consistent with special relativity. In particular, a phenomenon that appears purely electric or purely magnetic to one observer may be a mix of both to another, or more generally the relative contributions of electricity and magnetism are dependent on the frame of reference. Thus, special relativity "mixes" electricity and magnetism into a single, inseparable phenomenon called electromagnetism, analogous to how relativity "mixes" space and time into spacetime.

All observations on electromagnetism apply to what might be considered to be primarily magnetism, e.g. perturbations in the magnetic field are necessarily accompanied by a nonzero electric field, and propagate at the speed of light.
In a vacuum,
where is the vacuum permeability.

In a material,
The quantity is called "magnetic polarization".

If the field is small, the response of the magnetization in a diamagnet or paramagnet is approximately linear:
the constant of proportionality being called the magnetic susceptibility. If so,

In a hard magnet such as a ferromagnet, is not proportional to the field and is generally nonzero even when is zero (see Remanence).

The phenomenon of magnetism is "mediated" by the magnetic field. An electric current or magnetic dipole creates a magnetic field, and that field, in turn, imparts magnetic forces on other particles that are in the fields.

Maxwell's equations, which simplify to the Biot–Savart law in the case of steady currents, describe the origin and behavior of the fields that govern these forces. Therefore, magnetism is seen whenever electrically charged particles are in motion—for example, from movement of electrons in an electric current, or in certain cases from the orbital motion of electrons around an atom's nucleus. They also arise from "intrinsic" magnetic dipoles arising from quantum-mechanical spin.

The same situations that create magnetic fields—charge moving in a current or in an atom, and intrinsic magnetic dipoles—are also the situations in which a magnetic field has an effect, creating a force. Following is the formula for moving charge; for the forces on an intrinsic dipole, see magnetic dipole.

When a charged particle moves through a magnetic field B, it feels a Lorentz force F given by the cross product:

where

Because this is a cross product, the force is perpendicular to both the motion of the particle and the magnetic field. It follows that the magnetic force does no work on the particle; it may change the direction of the particle's movement, but it cannot cause it to speed up or slow down. The magnitude of the force is
where formula_8 is the angle between v and B.

One tool for determining the direction of the velocity vector of a moving charge, the magnetic field, and the force exerted is labeling the index finger "V", the middle finger "B", and the thumb "F" with your right hand. When making a gun-like configuration, with the middle finger crossing under the index finger, the fingers represent the velocity vector, magnetic field vector, and force vector, respectively. See also right-hand rule.

Since a bar magnet gets its ferromagnetism from electrons distributed evenly throughout the bar, when a bar magnet is cut in half, each of the resulting pieces is a smaller bar magnet. Even though a magnet is said to have a north pole and a south pole, these two poles cannot be separated from each other. A monopole—if such a thing exists—would be a new and fundamentally different kind of magnetic object. It would act as an isolated north pole, not attached to a south pole, or vice versa. Monopoles would carry "magnetic charge" analogous to electric charge. Despite systematic searches since 1931,, they have never been observed, and could very well not exist.

Nevertheless, some theoretical physics models predict the existence of these magnetic monopoles. Paul Dirac observed in 1931 that, because electricity and magnetism show a certain symmetry, just as quantum theory predicts that individual positive or negative electric charges can be observed without the opposing charge, isolated South or North magnetic poles should be observable. Using quantum theory Dirac showed that if magnetic monopoles exist, then one could explain the quantization of electric charge—that is, why the observed elementary particles carry charges that are multiples of the charge of the electron.

Certain grand unified theories predict the existence of monopoles which, unlike elementary particles, are solitons (localized energy packets). The initial results of using these models to estimate the number of monopoles created in the big bang contradicted cosmological observations—the monopoles would have been so plentiful and massive that they would have long since halted the expansion of the universe. However, the idea of inflation (for which this problem served as a partial motivation) was successful in solving this problem, creating models in which monopoles existed but were rare enough to be consistent with current observations.

While heuristic explanations based on classical physics can be formulated, diamagnetism, paramagnetism and ferromagnetism can only be fully explained using quantum theory.
A successful model was developed already in 1927, by Walter Heitler and Fritz London, who derived, quantum-mechanically, how hydrogen molecules are formed from hydrogen atoms, i.e. from the atomic hydrogen orbitals formula_9 and formula_10 centered at the nuclei "A" and "B", see below. That this leads to magnetism is not at all obvious, but will be explained in the following.

According to the Heitler–London theory, so-called two-body molecular formula_11-orbitals are formed, namely the resulting orbital is:

Here the last product means that a first electron, r, is in an atomic hydrogen-orbital centered at the second nucleus, whereas the second electron runs around the first nucleus. This "exchange" phenomenon is an expression for the quantum-mechanical property that particles with identical properties cannot be distinguished. It is specific not only for the formation of chemical bonds, but as one will see, also for magnetism, i.e. in this connection the term exchange interaction arises, a term which is essential for the origin of magnetism, and which is stronger, roughly by factors 100 and even by 1000, than the energies arising from the electrodynamic dipole-dipole interaction.

As for the "spin function" formula_13, which is responsible for the magnetism, we have the already mentioned Pauli's principle, namely that a symmetric orbital (i.e. with the + sign as above) must be multiplied with an antisymmetric spin function (i.e. with a − sign), and "vice versa". Thus:

I.e., not only formula_15 and formula_10 must be substituted by "α" and "β", respectively (the first entity means "spin up", the second one "spin down"), but also the sign + by the − sign, and finally r by the discrete values "s" (= ±½); thereby we have formula_17 and formula_18. The "singlet state", i.e. the − sign, means: the spins are "antiparallel", i.e. for the solid we have antiferromagnetism, and for two-atomic molecules one has diamagnetism. The tendency to form a (homoeopolar) chemical bond (this means: the formation of a "symmetric" molecular orbital, i.e. with the + sign) results through the Pauli principle automatically in an "antisymmetric" spin state (i.e. with the − sign). In contrast, the Coulomb repulsion of the electrons, i.e. the tendency that they try to avoid each other by this repulsion, would lead to an "antisymmetric" orbital function (i.e. with the − sign) of these two particles, and complementary to a "symmetric" spin function (i.e. with the + sign, one of the so-called "triplet functions"). Thus, now the spins would be "parallel" (ferromagnetism in a solid, paramagnetism in two-atomic gases).

The last-mentioned tendency dominates in the metals iron, cobalt and nickel, and in some rare earths, which are "ferromagnetic". Most of the other metals, where the first-mentioned tendency dominates, are "nonmagnetic" (e.g. sodium, aluminium, and magnesium) or "antiferromagnetic" (e.g. manganese). Diatomic gases are also almost exclusively diamagnetic, and not paramagnetic. However, the oxygen molecule, because of the involvement of π-orbitals, is an exception important for the life-sciences.

The Heitler-London considerations can be generalized to the Heisenberg model of magnetism (Heisenberg 1928).

The explanation of the phenomena is thus essentially based on all subtleties of quantum mechanics, whereas the electrodynamics covers mainly the phenomenology.Some organisms can detect magnetic fields, a phenomenon known as magnetoception. In addition to detection, biomagnetic phenomena are utilized by organisms in a number of ways. For instance, chitons, a type of marine mollusk, produce magnetite to harden their teeth, and even humans produce magnetite in bodily tissue. Magnetobiology studies magnetic fields as a medical treatment; fields naturally produced by an organism are known as biomagnetism.