The Hamiltonian for the two-site Hubbard model is as follows:
$H = - t \sum_{\sigma = \uparrow, \downarrow} (c_{1\sigma}^{\dagger} c_{2\sigma} + \text{h.c.}) + U \sum_{i=1,2}n_{i\uparrow}n_{i\downarrow}$
For homework, I need to diagonalize this Hamiltonian. I don't know how to proceed.
There are 16 possible "natural" basis states, i.e. $\lvert0\rangle$ (empty), $\lvert\uparrow\downarrow\rangle$, $\lvert\uparrow\rangle$, $\lvert\downarrow\rangle$ on each site. I could work out the matrix representation of the Hamiltonian and brute force the diagonalization, but I hope it can be done more elegantly. After searching online, I find that $H$ commutes with total $S_z$ and $N_{\uparrow}$, $N_{\downarrow}$, effectively creating blocks that I can diagonalize separately. How can I use this to solve this problem without resorting to numerical linear algebra?