Open Source Physics spin state program models a particle with spin 1/2 in a magnetic field.

The Hamiltonian for a system with spin in a magnetic field depends on the interaction between the magnetic dipole moment
**u** and the magnetic field **B**.

H = - **u ^{.} B**

If **B** is in the z-direction and has magnitude B_{0} and if the particle has spin 1/2 (that
is, an electron in a uniform magnetic field B_{0}) then the Hamiltonian can be written

H = - e B_{0} S_{z}/( m c)

where the spin operator S_{z} is h_bar/2 times the following matrix:

1 | 0 |

0 | -1 |

It is easy to write down the Hamiltonian eigenvalues and the eigenfunctions. Why? What are the eigenvalues?