Electromagnetic field
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, 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, with the magnitude of the force 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.
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 charge particle of charge q and velocity vector v is given by the Lorentz Force Law: F = q(E + v×B).
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.