A magnetic field is a vector field that describes the magnetic influence of electric charges in relative motion and magnetized materials. The effects of magnetic fields are commonly seen in permanent magnets, which pull on magnetic materials and attract or repel other magnets. Magnetic fields surround and are created by magnetized material and by moving electric charges such as those used in electromagnets. They exert forces on nearby moving electrical charges and torques on nearby magnets. In addition, a magnetic field that varies with location exerts a force on magnetic materials. Both the strength and direction of a magnetic field vary with location. As such, it is described mathematically as a vector field.