A magnetic field is a vector field that describes the magnetic influence on moving electric charges, electric currents, and magnetic materials. It is produced by moving electric charges and the intrinsic magnetic moments of elementary particles associated with a fundamental quantum property known as spin. The field is represented mathematically by a function assigning a vector to each point of space, and it can be illustrated using vectors or field lines. Magnetic fields force moving electrically charged particles in a circular or helical path, and they are a component of the electromagnetic force, one of the four fundamental forces of nature