A magnetic field is a region around a magnetic material or a moving electric charge within which the force of magnetism acts. It is produced by the motion of electric charges, such as electric currents, and the intrinsic magnetic moments of elementary particles associated with a fundamental quantum property, their spin.
Magnetic field lines are used to represent the direction and strength of a magnetic field. They are directed from the north pole to the south pole outside the magnet and from the south pole to the north pole inside the magnet. The density of the lines indicates the strength of the magnetic field, with closely spaced lines representing a stronger field.
The strength of a magnetic field is measured in units of tesla (T) or gauss (G). One tesla is equal to 10,000 gauss. The strength of a magnetic field decreases with distance from the source, following the inverse square law.
Magnetic fields have numerous practical applications, including in electric motors, generators, MRI machines, and magnetic compasses. They also play a crucial role in the behavior of charged particles in space, such as the Van Allen radiation belts.