Electromagnetism
Electromagnetism is the physics of the electromagnetic field: a field which exerts a force on particles that possess the property of electric charge, and is in turn affected by the presence and motion of those particles.
A changing magnetic field produces an electric field (this is the phenomenon of electromagnetic induction, the basis of operation for electrical generators, induction motors, and transformers). Similarly, a changing electric field generates a magnetic field. Because of this interdependence of the electric and magnetic fields, it makes sense to consider them as a single coherent entitythe electromagnetic field.
The magnetic field is produced by the motion of electric charges, i.e. electric current. The magnetic field causes the magnetic force associated with magnets.
The theoretical implications of electromagnetism led to the development of special relativity by Albert Einstein in 1905.

# History
While preparing for an evening lecture on 21 April 1820, Hans Christian rsted developed an experiment which provided evidence that surprised him. As he was setting up his materials, he noticed a compass needle deflected from magnetic north when the electric current from the battery he was using was switched on and off. This deflection convinced him that magnetic fields radiate from all sides of a wire carrying an electric current, just as light and heat do, and that it confirmed a direct relationship between electricity and magnetism.
At the time of discovery, rsted did not suggest any satisfactory explanation of the phenomenon, nor did he try to represent the phenomenon in a mathematical framework. However, three months later he began more intensive investigations. Soon thereafter he published his findings, proving that an electric current produces a magnetic field as it flows through a wire. The CGS unit of magnetic induction (oersted) is named in honor of his contributions to the field of electromagnetism.
His findings resulted in intensive research throughout the scientific community in electrodynamics. They influenced French physicist Andre-Marie Ampere's developments of a single mathematical form to represent the magnetic forces between current-carrying conductors. rsted's discovery also represented a major step toward a unified concept of energy.
rsted was not the first person to examine the relation between electricity and magnetism. In 1802  Gian Domenico Romagnosi, an Italian legal scholar, deflected a magnetic needle by electrostatic charges. He interpreted his observations as The Relation between electricity and magnetism. Actually, no galvanic current existed in the setup and hence no electromagnetism was present. An account of the discovery was published in 1802 in an Italian newspaper, but it was largely overlooked by the contemporary scientific community.
This unification, which was observed by Michael Faraday, extended by James Clerk Maxwell, and partially reformulated by Oliver Heaviside, is one of the triumphs of 19th century physics. It had far-reaching consequences, one of which was the understanding of the nature of light. As it turns out, what is thought of as "light" is actually a propagating oscillatory disturbance in the electromagnetic field, i.e., an electromagnetic wave. Different frequencies of oscillation give rise to the different forms of electromagnetic radiation, from radio waves at the lowest frequencies, to visible light at intermediate frequencies, to gamma rays at the highest frequencies.

# The electromagnetic force
The force that the electromagnetic field exerts on electrically charged particles, called the electromagnetic force, is one of the four fundamental forces. The other fundamental forces are the strong nuclear force (which holds atomic nuclei together), the weak nuclear force (which causes certain forms of radioactive decay), and the gravitational force. All other forces are ultimately derived from these fundamental forces.
The electromagnetic force is the one responsible for practically all the phenomena encountered in daily life, with the exception of gravity. All the forces involved in interactions between atoms can be traced to the electromagnetic force acting on the electrically charged protons and electrons inside the atoms. This includes the forces we experience in "pushing" or "pulling" ordinary material objects, which come from the intermolecular forces between the individual molecules in our bodies and those in the objects. It also includes all forms of chemical phenomena, which arise from interactions between electron orbitals.

# Classical electrodynamics
The scientist William Gilbert proposed, in his De Magnete (1600), that electricity and magnetism, while both capable of causing attraction and repulsion of objects, were distinct effects.  Mariners had noticed that lightning strikes had the ability to disturb a compass needle, but the link between lightning and electricity was not confirmed until Benjamin Franklin's proposed experiments in 1752.  One of the first to discover and publish a link between man-made electric current and magnetism was Romagnosi, who in 1802 noticed that connecting a wire across a Voltaic pile deflected a nearby compass needle. However, the effect did not become widely known until 1820, when rsted performed a similar experiment. rsted's work influenced Ampere to produce a theory of electromagnetism that set the subject on a mathematical foundation.
An accurate theory of electromagnetism, known as classical electromagnetism, was developed by various physicists over the course of the 19th century, culminating in the work of James Clerk Maxwell, who unified the preceding developments into a single theory and discovered the electromagnetic nature of light. In classical electromagnetism, the electromagnetic field obeys a set of equations known as Maxwell's equations, and the electromagnetic force is given by the Lorentz force law.
One of the peculiarities of classical electromagnetism is that it is difficult to reconcile with classical mechanics, but it is compatible with special relativity. According to Maxwell's equations, the speed of light is a universal constant, dependent only on the electrical permittivity and magnetic permeability of the vacuum. This violates Galilean invariance, a long-standing cornerstone of classical mechanics. One way to reconcile the two theories is to assume the existence of a luminiferous aether through which the light propagates. However, subsequent experimental efforts failed to detect the presence of the aether. In 1905, Albert Einstein solved the problem with the introduction of special relativity, which replaces classical kinematics with a new theory of kinematics that is compatible with classical electromagnetism.
In addition, relativity theory shows that in moving frames of reference a magnetic field transforms to a field with a nonzero electric component and vice versa; thus firmly showing that they are two sides of the same coin, and thus the term "electromagnetism".

# The photoelectric effect
In another paper published in that same year, Albert Einstein undermined the very foundations of classical electromagnetism. His theory of the photoelectric effect (for which he won the Nobel prize for physics) posited that light could exist in discrete particle-like quantities, which later came to be known as photons. Einstein's theory of the photoelectric effect extended the insights that appeared in the solution of the ultraviolet catastrophe presented by Max Planck in 1900. In his work, Planck showed that hot objects emit electromagnetic radiation in discrete packets, which leads to a finite total energy emitted as black body radiation. Both of these results were in direct contradiction with the classical view of light as a continuous wave. Planck's and Einstein's theories were progenitors of quantum mechanics, which, when formulated in 1925, necessitated the invention of a quantum theory of electromagnetism. This theory, completed in the 1940s, is known as quantum electrodynamics (or "QED"), and is one of the most accurate theories known to physics.

# Definition
The term electrodynamics is sometimes used to refer to the combination of electromagnetism with mechanics, and deals with the effects of the electromagnetic field on the dynamic behavior of electrically charged particles.

# Units
Electromagnetic units are part of a system of electrical units based primarily upon the magnetic properties of electric currents, the fundamental cgs unit being the abampere. The units are:
- ampere (current)
- coulomb (charge)
- farad (capacitance)
- henry (inductance)
- ohm (resistance)
- volt (electric potential)
- watt (power)
In the electromagnetic cgs system, electrical current is a fundamental quantity defined via Ampere's law and takes the permeability as a dimensionless quantity (relative permeability) whose value in a vacuum is unity. As a consequence, the square of the speed of light appears explicitly in some of the equations interrelating quantities in this system.