Spin quantum number

# Overview
In atomic physics, the spin quantum number is a quantum number that parameterizes the intrinsic angular momentum (or spin angular momentum, or simply spin) of a given particle. The spin quantum number is the fourth of a set of quantum numbers (the principal quantum number, the azimuthal quantum number, the magnetic quantum number, and the spin quantum number) which describe the unique quantum state of an electron and is designated by the letter s.

# Derivation
As a quantized angular momentum, (see angular momentum quantum number) it holds that
where
Given an arbitrary direction z (usually determined by an external magnetic field) the spin z-projection is given by
where ms is the secondary spin quantum number, ranging from s to +s in steps of one. This generates 2s+1 different values of ms.
The allowed values for s are non-negative integers or half-integers. Fermions (such as the electron, proton or neutron) have half-integer values, whereas bosons (e.g. photon, mesons) have integer spin values.

# Algebra
The algebraic theory of spin is a carbon copy of the Angular momentum in quantum mechanics theory.
First of all, spin satisfies the fundamental commutation relation:
where  lmn is the (antisymmetric) Levi-Civita symbol. This means that is impossible to know two coordinates of the spin at the same time because of the restriction of the Uncertainty principle.
Next, the eigenvectors of S^2 and S_z satisfy:
where  S_\pm = S_x \pm \mathrm{i} S_y  are the creation and annihilation (or "raising" and "lowering" or "up" and "down") operators.

# Electron spin
Early attempts to explain the behavior of electrons in atoms focused on solving the Schrodinger wave equation for the hydrogen atom, the simplest possible case, with a single electron bound to the atomic nucleus.  This was successful in explaining many features of atomic spectra.
The solutions required each possible state of the electron to be described by three "quantum numbers", n, l, and m.  These were identified as, respectively, the electron "shell" number, n, the "orbital" number, l, and the "orbital angular momentum" number m.  Angular momentum is a so-called "classical" concept measuring the momentum of a mass in circular motion about a point.  The shell numbers start at 1 and increase indefinitely.  Each shell of number n contains n2 orbitals. Each orbital is characterized by its number l, where l takes integer values from 0 to n-1, and its angular momentum number m, where m takes integer values from +l to -l. By means of a variety of approximations and extensions, physicists were able to extend their work on hydrogen to more complex atoms containing many electrons.
Atomic spectra measure radiation absorbed or emitted by electrons "jumping" from one "state" to another, where a state is represented by values of n, l, and m.  So called "selection rules" limit what "jumps" are possible.  Generally a jump or "transition" is only allowed if all three numbers change in the process.  This is because a transition will only be able to cause the emission or absorption of electromagnetic radiation if it involves a change in the electromagnetic dipole of the atom.
However, it was recognized in the early years of quantum mechanics that atomic spectra measured in an external magnetic field (see Zeeman effect) cannot be predicted with just n, l, and m.  A solution to this problem was suggested in early 1925 by George Uhlenbeck and Samuel Goudsmit, students of Paul Ehrenfest (who rejected the idea), and independently by Ralph Kronig, one of Lande's assistants.  Uhlenbeck, Goudsmit, and Kronig introduced the idea of the self-rotation of the electron, which would naturally give rise to an angular momentum vector in addition to the one associated with orbital motion (quantum numbers l and m).
A spin angular momentum, characterized by a quantum number s = 1/2, is an intrinsic property of electrons.  In the pattern of other quantized angular momenta, it gives a total spin angular momentum:
where
The energy of any wave is the frequency multiplied by Planck's constant.  When the electron was being described by wavefunctions in Dirac's equation, it was found that the spin property of all fundamental particles is a multiple \hbar. If this multiple is even the particle is a boson and if it is odd the particle is a fermion.
The hydrogen spectra fine structure is observed as a doublet corresponding to two possibilities for the z-component of the angular momentum, where for any given direction z:
which solution has only two possible z components for the electron.  In the electron, the two different spin orientations are sometimes called "spin-up" or "spin-down".
The spin property of an electron would classically give rise to magnetic moment which was a requisite for the fourth quantum number. The electron spin magnetic moment is given by the formula:
where
and by the equation:
where
When atoms have even numbers of electrons the spin of each electron in each orbital has opposing orientation in different directions.  However, many atoms have an odd number of electrons or an arrangement of electrons in which the number of "spin-up" and "spin-down" orientations are not the same. These atoms or electrons are said to have unpaired spins which are detected in electron spin resonance.

# Detection of spin
When the spectral lines of the hydrogen spectrum are examined at very high resolution, they are found to be closely-spaced doublets. This splitting is called fine structure and was one of the first experimental evidences for electron spin. The direct observation of the electron's intrinsic angular momentum was achieved in the Stern-Gerlach experiment.

# Dirac equation solves spin
When the idea of electron spin was first introduced in 1925, even Wolfgang Pauli had trouble accepting Ralph Kronig's model.  The problem was not that a rotating charged particle would have given rise to a magnetic field, but that the electron was so small that the equatorial speed of the electron would have to be greater than the speed of light for the magnetic moment to be of the observed strength.
In 1930, Paul Dirac developed a new version of the Schrodinger Wave Equation which was relativistically invariant, and predicted the magnetic moment correctly, and at the same time treated the electron as a point particle. In the Dirac equation all four quantum numbers including the additional quantum number s arose naturally during its solution.