The quantum numbers are not sufficient to fully characterize the physical state of the electrons in an atom. In 1926, Otto Stern and Walther Gerlach carried out an experiment that could not be explained in terms of the three quantum numbers and showed that there is, in fact, another quantum-mechanical degree of freedom that needs to be included in the theory.
The experiment is illustrated in the figure below:
It is known that a current loop in a nonuniform magnetic field experiences a net force. This is illustrated below:
The fact that the beam splits into 2 beams suggests that the electrons in the atoms have a degree of freedom capable of coupling to the magnetic field. That is, an electron has an intrinsic magnetic moment arising from a degree of freedom that has no classical analog. The magnetic moment must take on only 2 values according to the Stern-Gerlach experiment. The intrinsic property that gives rise to the magnetic moment must have some analog to an angular momentum and hence, must be a property that, unlike charge and mass, which are simple numbers, is a vector property. This property is called the spin, , of the electron. As the expression above suggests, the intrinsic magnetic moment of the electron must be propertional to the spin
In quantum mechanics, spin share numerous features in common with angular momentum, which is why we represent it as a vector. In particular, spin is quantized, i.e. we have certain allowed values of spin. Like angular momentum, the value of the magnitude squared of spin is fixed, and one of its components is as well. For an electron, the allowed values of are
For an electron in a uniform magnetic field , the energy is determined by the spin :
Now, when the electron is placed in a nonuniform magnetic field, with the field increasing in strength toward the north pole of the field source, the spin-down () electrons have their bar-magnet poles oriented such that the south pole points toward the north pole of the field source, and these electrons will be attracted toward the region of stronger field. The spin-up () electrons have their bar-magnet north poles oriented toward the north pole of the field source and will be repelled to the region of weaker field, thus causing the beam to split as observed in the Stern-Gerlach experiment.
The implication of the Stern-Gerlach experiment is that we need to include a fourth quantum number, in our description of the physical state of the electron. That is, in addition to give its principle, angular, and magnetic quantum numbers, we also need to say if it is a spin-up electron or a spin-down electron.
Note that we have added spin into the our quantum theory as a kind of a posteriori consideration, which seems a little contrived. In fact, the existence of the spin degree of freedom can be derived in a very natural way in the relativistic version of quantum mechanics, where it simply pops out of the relativistic analog of the Schrödinger equation, known as the Dirac equation.