# How the matrix representation of a Hamiltonian affects the eigenvalues?

Suppose we're given the following Hamiltonian: $$\hat{H}=\frac{\omega}{\hbar} \left(\hat{S}_+^2+\hat{S}_-^2\right)$$ Suppose also that we measure $$\vec{S}^2$$ and get $$6\hbar^2$$, i.e. reduced to the $$s=2$$ subspace, and want to find all the possible energies (aka the eigenvalues of the Hamiltonian operator in the relevant basis).

Obviously the relevant basis consists of the eigenstates $$\{|2,m\rangle\}$$ of the spin projection operator. I calculated the matrix elements of $$\hat{H}$$ in this basis and got the following $$5\times 5$$ matrix:

$$\hat{H}=\hbar \omega \begin{pmatrix} ~ & |2,2\rangle & |2,1\rangle & |2,0\rangle & |2,-1\rangle & |2,-2\rangle\\ |2,2\rangle & 0 & 0 & 2\sqrt{6} & 0 & 0\\ |2,1\rangle & 0 & 0 & 0 & 6 & 0\\ |2,0\rangle & 2\sqrt{6} & 0 & 0 & 0 & 2\sqrt{6}\\ |2,-1\rangle & 0 & 6 & 0 & 0 & 0\\ |2,-2\rangle & 0 & 0 & 2\sqrt{6} & 0 & 0 \end{pmatrix}$$

It can be shown that the eigenvalues are $$E=\pm 4 \sqrt{3} \hbar \omega, \pm 6\hbar \omega , 0$$, which is indeed correct. However calculating them was a little bit tedious.

Now, it turns out that there exists a simpler matrix representation of $$\hat{H}$$ in the same basis. It has to do with the special structure of the Hamiltonian which has both raising and lowering operators squared. This naturally splits the basis into two groups: $$\{ |2,2\rangle, |2,0\rangle,|2,-2\rangle \}$$ and $$\{ |2,1\rangle, |2,-1\rangle \}$$ which are closed under the actions of $$\hat{S}^2_{\pm}$$. We can thus re-order the basis and get the following block-diagonal form

$$\hat{H}=\hbar \omega \begin{pmatrix} ~ & |2,1\rangle & |2,-1\rangle & |2,2\rangle & |2,0\rangle & |2,-2\rangle\\ |2,1\rangle & 0 & 6 & 0 & 0 & 0\\ |2,-1\rangle & 6 & 0 & 0 & 0 & 0\\ |2,2\rangle & 0 & 0 & 0 & 2\sqrt{6} & 0\\ |2,0\rangle & 0 & 0 & 2\sqrt{6} & 0 & 2\sqrt{6}\\ |2,-2\rangle & 0 & 0 & 0 & 2\sqrt{6} & 0 \end{pmatrix}$$

which is very convenient because now in order to find the eigenvalues we can analyze two smaller matrices. Thankfully, the eigenvalues turn out to be the same.

Question: we know from linear algebra that, in general, swapping/changing the order of rows/columns (which is exactly what happened here) changes the eigenvalues. However in this case the eigenvalues remained the same. I understand the physical reason behind it, but how can it be justified mathematically? Suppose we knew nothing about the structure of the Hamiltonian (or, alternatively, weren't smart enough to recognize that the basis can be conveniently broken into two "special" subgroups). Is there a mathematical way of finding the "best" ordering of basis vectors such that the matrix representation of a given operator assumes a block-diagonal form? And is there a mathematical justification for why the eigenvalues remain the same after we change the order of rows/columns? Maybe it has to do with the fact that the matrix (operator) is symmetric (Hermitian)?

• Do you know that if a normal operator is diagonal in two different bases, then the eigenvalues (and their multiplicities) stay the same? – Qmechanic Sep 17 '20 at 18:23
• @Qmechanic - I know that eigenvalues are independent of the choice of basis if that's what you mean. – grjj3 Sep 17 '20 at 18:33

Your 2 matrices only differ by the same rearrangement of rows and columns, which does not change the eigenvalues. To be precise, let $$P$$ be the permutation that takes $$\{|2,2\rangle,|2,1\rangle , |2,0\rangle , |2,-1\rangle , |2,-2\rangle)\}$$ to $$\{|2,1\rangle , |2,-1\rangle , |2,2\rangle, |2,0\rangle , |2,-2\rangle)\}$$.
$$P$$ can be constructed by considering for instance \begin{align} |2,2\rangle\mapsto \left(\begin{array}{c}1\\ 0\\0 \\ 0 \\0 \end{array}\right) \end{align} etc, so that the first column of $$P$$ would be $$(0,0,1,0,0)^\top$$ and P would take $$(1,0,0,0,0)^\top \to (0,0,1,0,0)^\top$$.
Then your matrices are related by the similarity transformation $$P\hat H_1 P^{-1}= \hat H_2$$ and thus the eigenvalues of both are the same. Alternatively your matrices are related by a change of basis generated by $$P$$, so they both have the same eigenvalues.
(NB: I hope I have my $$P^{-1}$$ and $$P$$ in the right place, but the argument is sound.)