Instead, magnetism in ordinary matter is due to two sources. First, electric currents create magnetic fields according to Ampère's law. Second, many elementary particles have an intrinsic magnetic moment, the most important of which is the electron magnetic dipole moment, which is related to its quantum-mechanical spin.