## Electron spin and the Zeeman Hamiltonian
Now we include the spin inside our Schrödinger equation, the spin-operator is defined as,
$\mathbf{S} = \frac{1}{2} \boldsymbol{\sigma}$
$\boldsymbol{\sigma}$ is the so-called Pauli matrix, for our 3D case,
$\sigma_x = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, \quad \sigma_y = \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}, \quad \sigma_z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}$
and the magnetic moment of the electron, or the spin angular momentum can be calculated by
$\boldsymbol{\mu} = -\frac{1}{2} g \mu_B \boldsymbol{\sigma} = -g \mu_B \mathbf{S}$
$\mu_B = \frac{e \hbar}{2 m_e}$, called Bohr's magnetron, whose value is $5.788\times 10^{-5} eV/T$; $g=2.0023$, called g-factor, the effective value could be greatly different from 2.
The wavefunctions of spin are described by two-component spinors, $| \chi \rangle = \begin{pmatrix} \chi_0 \\ \chi_1 \end{pmatrix}$, they are the eigenvectors of the function, $\chi_0^2 + \chi_1^2 = 1$.
And with the magnetic moment, the moments in external field $\mathbf{B}$ can easily be calculated as $\mathbf{M}=\boldsymbol{\mu}\times \mathbf{B}$; it’s a torque acts on the electron and leads to precession about the magnetic field axis.
The Hamiltonian is given as:
$H = -\boldsymbol{\mu} \cdot \mathbf{B} = \frac{1}{2} \mu_B g \, \boldsymbol{\sigma} \cdot \mathbf{B} = -\mu_B g \, \mathbf{S} \cdot \mathbf{B}$