The electromagnetic field describes the force on an electrically charged particle due to the presence of other charges. Because the total electromagnetic force depends both on the particle's charge and its velocity, the electromagnetic field is usually treated as the combination of separate, but related, force fields: the electric field is the force per charge on a stationary test particle, while the magnetic field determines the contribution due to the particle's velocity.
Electric charge can be either positive or negative. Particles with charges of the same sign repel each other, while particles with charges of opposite signs attract. If the charges are stationary, the magnitude of the electrostatic force is given by Coulomb's Law:
where q1 and q2 are the charges, r is the distance between them, and ε0 is the permittivity of free space. Given a distribution of charges, the total force F on a stationary charge q is the sum of the forces due to the individual charges. Thus, the electric field E of the charge distribution can be defined as F/q, in the limit as the size of the particle tends to zero.
The electric and magnetic fields are related in the sense that curl (local rotation) of either contributes to the rate of change of the other, and conversely. Thus, a moving electric charge induces a magnetic field and a moving magnet produces an electric field. The total electromagnetic force on a charged particle of charge q and velocity vector v is given by the Lorentz Force Law: F = q(E + v×B).
Because the particle's velocity depends on the reference frame of the observer, but the (proper) force experienced by the particle is not, an electric field for one observer may be seen as a magnetic field for another, or vice versa.
Magnets in use
Most people are familiar with simple horseshoe and bar magnets, and the magnets they stick on their refrigerator. A compass is made from a small free-spinning magnet that aligns itself with the Earth's own magnetic field.
Electromagnets are created by sending an electric current through a coil of wire that produces a magnetic field. They are often used in construction.
Moving a magnet through a coil of conducting wire can achieve the reverse effect. To generate electricity, a magnet is spun in the coil and a current is generated. Metal detectors operate on a similar principle. As a piece of metal passes through the detector, it generates a current and the alarm goes off.