An atom has an electromagnetic moment, $\mu = -g\mu_B S$ where S is the electronic spin operator ($S=S_x,S_y.S_z$) and $S_i$ are the Pauli matrices, given below. The atom has a spin $\frac{1}{2}$ nuclear magnetic moment and the Hamiltonian of the system is
\begin{gather*} H = -\mu .B + \frac{1}{2}A_0S_z \end{gather*}
The first term is the Zeeman term, the second is the Fermi contact term and $A_0$ is a real number. Obtain the Hamiltonian in matrix form for a magnetic field, $B=B_x,B_y,B_z$. Show that when the atom is placed in a magnetic field of strength B, aligned with the z axis, transitions between the ground and excited states of the atom occur at energies:
\begin{gather*} E= g\mu_B B + \frac{1}{2}A_0 \end{gather*}
The Pauli Matrices are:
\begin{gather*} S_x = \frac{1}{2} \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} , \ S_y = \frac{1}{2} \begin{bmatrix} 0 & -i \\ i & 0 \end{bmatrix} , \ S_z = \frac{1}{2} \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix} \end{gather*}
Where do I even start for a solution to this problem I am unclear as to how to formulate the B matrix. If I can get that hopefully the second part will become apparent to prove