A magnet produces a vector field, the magnetic field, at all points in the space around it. It can be defined by measuring the force the field exerts on a moving charged particle, such as an electron.