<s>[INST] Diagonal element of traceless hermitian matrix? In physics, we are familiar with a set of traceless hermitian matrices named Pauli matrices:
$$
{\displaystyle {\begin{aligned}\sigma _{1}=\sigma _{\mathrm {x} }&={\begin{pmatrix}0&1\\1&0\end{pmatrix}}\\\sigma _{2}=\sigma _{\mathrm {y} }&={\begin{pmatrix}0&-i\\i&0\end{pmatrix}}\\\sigma _{3}=\sigma _{\mathrm {z} }&={\begin{pmatrix}1&0\\0&-1\end{pmatrix}}\\\end{aligned}}}
$$
I notice that the above matrices are written in basis $\left( \begin{array}{c}
 1\\
 0\\
\end{array} \right) $ and $\left( \begin{array}{c}
 0\\
 1\\
\end{array} \right) $, but if we change basis into $\frac{1}{\sqrt{2}}\left( \begin{array}{c}
 1\\
 1\\
\end{array} \right) $ and $\frac{1}{\sqrt{2}}\left( \begin{array}{c}
 1\\
 -1\\
\end{array} \right) $, then $\sigma_z$ become $$\frac{1}{2}\left( \begin{array}{c}
 1\\
 1\\
\end{array} \right) \left( \begin{matrix}
 1&  1\\
\end{matrix} \right) -\frac{1}{2}\left( \begin{array}{c}
 1\\
 -1\\
\end{array} \right) \left( \begin{matrix}
 1&  -1\\
\end{matrix} \right) =\left( \begin{matrix}
 0&  1\\
 1&  0\\
\end{matrix} \right) ,$$showing that the diagonal elements vanish.
My question is, for a single traceless hermitian matrix $H$, can we always find a unitary $u$ such that diagonal element of $u^{\dagger}Hu$ are all zeros? Furthermore, can the diagonal elements run over all possibilities as long as they satisfy sum up to zero?
 [/INST] Yes. Let $H$ be any $n\times n$ traceless Hermitian matrix and $UDU^\ast$ be its unitary diagonalisation. Let $Q$ be a real orthogonal matrix whose last column is $\frac{1}{\sqrt{n}}(1,1,\ldots,1)^T$. The last diagonal element of $H':=Q^TU^\ast HUQ=Q^TDQ$ is then the mean of all diagonal elements of $H$, which is zero. Since $H'$ is real symmetric, we can do the similar to the leading principal $(n-1)$-rowed submatrix of $H'$ and continue recursively to obtain ultimately a real symmetric matrix with a zero diagonal.
</s>