Magnetism
In physics, magnetism is one of the phenomena by which materials exert attractive or repulsive forces on other materials. Some well known materials that exhibit easily detectable magnetic properties (called magnets) are nickel, iron, cobalt, and their alloys; however, all materials are influenced to greater or lesser degree by the presence of a magnetic field.
Magnetism also has other manifestations in physics, particularly as one of the two components of electromagnetic waves such as light.

# History
Aristotle attributes the first of what could be called a scientific discussion on magnetism to Thales, who lived from about 625 BC to about 545 BC.  In China, the earliest literary reference to magnetism lies in a 4th century BC book called Book of the Devil Valley Master (): "The lodestone makes iron come or it attracts it." The earliest mention of the attraction of a needle appears in a work composed between 20 and 100 AD (Louen-heng): "A lodestone attracts a needle." The ancient Chinese scientist Shen Kuo (1031-1095) was the first person to write of the magnetic needle compass and that it improved the accuracy of navigation by employing the astronomical concept of true north (Dream Pool Essays, 1088 AD), and by the 12th century the Chinese were known to use the lodestone compass for navigation.  Alexander Neckham, by 1187, was the first in Europe to describe the compass and its use for navigation. In 1269 Peter Peregrinus wrote the Epistola de Magnete, the first extant treatise describing the properties of magnets.
An understanding of the relationship between electricity and magnetism began in 1819 with work by Hans Christian Oersted, a professor at the University of Copenhagen, who discovered more or less by accident that an electric current could influence a compass needle.  This landmark experiment is known as Oersted's Experiment.  Several other experiments followed, with Andre-Marie Ampere, Carl Friedrich Gauss, Michael Faraday, 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, in the process showing that electricity and magnetism are fundamentally interlinked and inseparable.
Electromagnetism has continued to develop into the twentieth century, being incorporated into the more fundamental theories of gauge theory, quantum electrodynamics, electroweak theory, and finally the standard model.

# Physics of magnetism

## Magnets and magnetic materials
Every electron is, by its nature, a small magnet (see Electron magnetic dipole moment). Ordinarily, the countless electrons in a material are randomly oriented in different directions, leaving no effect on average, but in a bar magnet the electrons are aligned in the same direction, so they act cooperatively, creating a net magnetic field.
In addition to the electron's intrinsic magnetic field, there is sometimes an additional magnetic field that results from the electron's orbital motion about the nucleus. This effect is analogous to how a current-carrying loop of wire generates a magnetic field (see Magnetic dipole). Again, ordinarily, the motion of the electrons is such that there is no average field from the material, but in certain conditions, the motion can line up so as to produce a measurable total field.
The overall magnetic behavior of a material can vary widely, depending on the structure of the material, and particularly on its electron configuration. Several forms of magnetic behavior have been observed in different materials, including:
- Diamagnetism
- Paramagnetism
Molecular magnet
- Molecular magnet
- Ferromagnetism
Antiferromagnetism
Ferrimagnetism
Metamagnetism
- Antiferromagnetism
- Ferrimagnetism
- Metamagnetism
- Spin glass
- Superparamagnetism

## Magnetism, electricity, and special relativity
As a consequence of Einstein's theory of special relativity, electricity and magnetism are understood to be 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 to one observer may be purely magnetic 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 (analogously to how special relativity "mixes" space and time into spacetime).

## Magnetic fields and forces
The phenomenon of magnetism is "mediated" by the magnetic field -- i.e., 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.
To an excellent approximation (but ignoring some quantum effects---see quantum electrodynamics), 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 effects, i.e. from quantum-mechanical spin.
The same situations which 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 force F given by the cross product:
where 
q\, is the electric charge of the particle,
\vec{v} \, is the velocity vector of the particle, and \vec{B} \, is the magnetic field. 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 \theta \, is the angle between the \vec{v} \, and \vec{B} \, vectors.
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.
Lenz's law gives the direction of the induced electromotive force (emf) and current resulting from electromagnetic induction. German physicist Heinrich Lenz formulated it in 1834.

## Magnetic dipoles
A very common source of magnetic field shown 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' magnetic pole of the earth must be magnetically 'south'.
A magnetic field contains energy, and physical systems stabilize into the configuration with the lowest energy. Therefore, when placed in a magnetic field, a magnetic dipole tends to align itself in opposed polarity to that field, thereby canceling the net field strength as much as possible and lowering the energy stored in that field to a minimum. For instance, two identical bar magnets placed side-to-side normally line up North to South, resulting in a much smaller net magnetic field, and resist any attempts to reorient them to point in the same direction. The energy required to reorient them in that configuration is then stored in the resulting magnetic field, which is double the strength of the field of each individual magnet. (This is, of course, why a magnet used as a compass interacts with the Earth's magnetic field to indicate North and South).
An alternative, equivalent formulation, which is often easier to apply but perhaps offers less insight, is that a magnetic dipole in a magnetic field experiences a torque and a force which can be expressed in terms of the field and the strength of the dipole (i.e., its magnetic dipole moment). For these equations, see magnetic dipole.

## Magnetic monopoles
Since a bar magnet gets its ferromagnetism from microscopic 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, as of 2006, 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.

# Units of electromagnetism

## SI units related to magnetism

## Other units
- gauss-The gauss, abbreviated as G, is the cgs unit of magnetic flux density or magnetic induction (B).
- oersted-The oersted is the CGS unit of magnetic field strength.
- maxwell-is the CGS unit for the magnetic flux.
- o -common symbol for the permeability of free space (4x10-7 N/(ampere-turn)2).