For a long time electricity and magnetism were thought to be separate forces. In the 19th century Maxwell demonstrated that they were interrelated phenomena then Einstein proved with the Special Theory of Relativity that they are aspects of one unified phenomenon.
The core of the relationship is that a changing magnetic field produces an electric field and conversely, a changing electric field produces a magnetic field.
We know that charge is an innate property of all charged fundamental particles. If a particle is charged it has a positive or negative charge. The most common charged particles in the universe are negatively charged electrons or positively charged protons. When charged particles are moving, they are known as electric currents.
> Magnetism is a physical property produced by the _motion_ of electric charge, which of course, is the same thing as [electric current](/Electronics/Physics_of_electricity/Current.md)
A **magnet** is a material or object that produces a magnetic field. This field is invisible but visible by its effects: pulling on other magnetic materials such as iron, steel, nickel, cobalt etc and attracting or repelling other magnets.
All magnets have two ends where their magnetic effects are strongest. These regions are called the **poles** of the magnet. Materials can be _magnetic_ but they are not _magnetized_ until another magnetic material has entered into their field. At this point, the attraction and repulsion behaviour can be observed.
This behaviour is a function of the **magnetic force** which is **_transmitted_** via the **magnetic field**.
### Relation to electrons
Magnetism, understood as the effect of a magnetic field, arises from the properties of the electrons in an atom. We know that atoms 'orbit' the nucleus of the atom but as they circle the nucleus they also spin or rotate on their own axis.
As they spin they produce a **magnetic dipole**: the two poles noted above. We call this propensity of electrons the **intrinsic magnetic moment** of the electron. It is aggregates of these miniature magnetic behaviours that produce the overall magnetic property of the material.
In most materials, equal numbers of electrons spin in opposite directions. As a result, their magentic effects are cancelled out. However **in strongly magnetic materials an overall majority of electrons spin in one particular direction**. This breaks the equilibrium and produces the magnetic field.
If you have material A where the electrons all spin in one direction and material B where the electrons all spin in a direction opposite to A, then B will be attracted to A and you can observe the effects of the magnetic force in action.
A field is a property of spacetime. It means that a physical quantity is assigned to every point in space. This quantity has a numerical value and may vary over time.
There are different types of field. The electric field is an instance of a **vector field**. With vector fields there is more than one number for each point in space:
Every charged object sets up an electric field in the surrounding space. A second charge “feels” the presence of this field. The second charge is either attracted toward the initial charge or repelled from it, depending on the signs of the charges. Of course, since the second charge also has an electric field, the first charge feels its presence and is either attracted or repelled by the second charge too. The electric field from a charge is directed away from the charge when the charge is positive and toward the charge when it is negative.
As already noted, the magnetic field is the field created by a magnetic material: a material where the spin of the electrons is in disequillibrium. As with the electric field, a magnetic field exerts an attraction or repulsion on other spinning electrons. This is the **magnetic force**; the force is transmitted by the field. Attraction occurs when the two sets of electrons spin in opposite directions to each other. Repulsion occurs when the two sets of electrons spin in the same direction.
> Crucially the magnetic force influences only those charges that are already in motion.
The magnetic field and force is more complex than the electric field/force. Whereas the electric field and force point either towards or away from the charge, the magnetic field is different:
- The magnetic field points perpendicular to its source
- The magentic force points perpendicular to the magnentic field
This is illustrated below which shows the magnetic field operating at right angles to the flow of charge within a wire.
Although we have described the electric and magnetic fields separately, they are in fact a single unified and inseparable field created by charged particles and particles with a magentic moment.
The electromagnetic field does not carry charge or magnetic moment, it carries energy and momentum. This energy and momentum can be transferred to charged particles and particles with magnetic moment.
Electromagnetic waves consist of rapidly changing electric and magnetic fields that travel as waves. Electromagnetic waves are emitted any time an electrically charged object or magnet accelerates. These waves are generally referred to as light. All frequencies of light consist of electromagnetic waves, from radio waves on the low-frequency (long wavelengths) end of the electromagnetic spectrum to gamma rays on the high-frequency (short wavelengths) end.