# Hamiltonian in explicit Spin z basis

For a time independent Hamiltonian

$$H = \frac{\mu}{\hbar}(\vec{S_1} + \vec{S_2})*\vec{B}$$

and $$B= (0,0,B_0)^T$$, $$\vec{S}= \frac{\hbar}{2}\vec{\sigma}$$

I want to find the explicit Hamiltonoperator in the Basis $$\{|s_z\rangle_1 \otimes |s_z\rangle_2 \} = \{|++\rangle,|+-\rangle,|-+\rangle,|--\rangle\}$$

I know about the pauli matrices and and I also know from intuition that my solution is

$$H = \frac{\hbar B_0}{2} \begin{pmatrix} 1 & & & \\ &0 & & \\ &&0& \\ &&&-1\end{pmatrix}$$

Sadly I cant seem to wrap my head around getting from the 2 dimensional Pauli matrices to this form. In my Quantumtheory script it says something about $$\vec{S_1} + \vec{S_2} = \vec{S_1}\otimes \hat1_2 + \hat1_1 \otimes \vec{S_2}$$, but I'm not sure how to write the unit matrices down. I'm pretty sure I'm lacking some general understanding here, any help is welcome!

Thanks in advance for any hints to clear this up for me.

You can work it out from the explicit basis you wrote: $$\{|s_z\rangle_1 \otimes |s_z\rangle_2 \} = \{|++\rangle,|+-\rangle,|-+\rangle,|--\rangle\}$$.
How would $$S_1^z$$ act on this basis, for example? $$S_1^z|\pm, \pm'\rangle = \pm \hbar/2 |\pm, \pm'\rangle$$. It doesn't care about the second spin! so we can treat it as some product with $$I_2$$ the identity operating on the second spin.
If we would have like to write it in matrix, we would get $$S_1^z = \frac{\hbar}{2} \begin{pmatrix} 1 & & & \\ &1 & & \\ &&-1& \\ &&&-1\end{pmatrix}$$ which is the Kronecker product of $$\hbar/2\sigma_z$$ and the identity, which is written as $$\hbar/2\sigma_z\otimes I$$. Similarly, $$S_2^z$$ will be $$I\otimes \hbar/2 \sigma_z$$, which is
$$S_2^z = \frac{\hbar}{2} \begin{pmatrix} 1 & & & \\ &-1 & & \\ &&1& \\ &&&-1\end{pmatrix}$$
and similarly for the other spin components. So for example $$S_1^x = \frac{\hbar}{2} \begin{pmatrix} 0 & &1 & \\ &0 & &1 \\ 1&&0& \\ &1&&0\end{pmatrix}$$ etc.