# Hermitian Matrices with Repeated Eigenvalues has Codimension 3?

It is sometimes claimed that

the space of $n\times n$ Hermitian matrices with at least one repeated eigenvalue has codimension 3.

The proof of this in dimension two is very simple: by diagonalizing a $2\times 2$ Hermitian matrix $H$, we easily conclude that if $H$ has the same eigenvalue twice, then $H$ must be a constant multiple of the $2\times 2$ identity matrix, and this space has dimension 1, versus 4 for the space of $2\times 2$ Hermitian matrices.

However, I'm having difficulties with (what I believe to be) the standard demonstration of this in higher dimensions (provided in the paper "On the Behaviour of Eigenvalues in Adiabatic Processes" by Von Neumann and Wigner). From what I can tell, the demonstration (outline) goes goes as follows:

1. An $n\times n$ Hermitian matrix $H$ can be written as $UDU^*$, where $U$ is unitary and $D$ is diagonal and contains the eigenvalues, say in increasing order.
2. The decomposition $UDU^*$ is not unique, but if we have $WDW^*$ for another unitary matrix $W$, then we can write $W=UV$, where $V$ commutes with $D$, and so one could argue we can fix $U$ and $D$, and then write $H=(UV)D(UV)^*$, where $V$ can be any unitary matrix that commutes with $D$.
3. Thus, the number of real parameters one needs to specify the matrix $H$ would be $n^2+f-v$, where $n^2$ is the number of real parameters to specify a fixed unitary matrix $U$, $f$ is the number of parameters to specify the real eigenvalues of $D$, and $v$ is the number of parameters to specify $V$.
4. We can show that, if $f$ is the number of eigenvalues of $H$, and $g_1,\ldots,g_f$ are the multiplicities of the eigenvalues (i.e., $g_1+\cdots+g_f=n$), then $v=g_1^2+g_2^2+\cdots+g_f^2$.
5. Therefore, if there is a repeated eigenvalue ($g_i\geq 2$ for at least one $i$), the number of parameters will be at most $n^2-3$, hence the space of Hermitian matrices with repeated eigenvalues has codimension 3.

My problems with this are the following:

• In the case of $2\times 2$ matrices, it is clear that the space of Hermitian matrices with repeated eigenvalues is a vector space, as it consists of the multiples of the identity matrix. However, it is not at all clear to me that this is the case in higher dimensions.
• In step 3. above, I don't understand how one just removes the parameters used to specify $V$ from the total amount of parameters. If it were argued that we have double counted some parameters and that we must now remove them, this would be fine, but it seems that we start with $n^2+f$ parameters and that we then somehow remove parameters that are completely unrelated to the previous ones.
• Finally, I'm not sure I understand the connection between parameters and dimension. While it is true that Unitary matrices can be specified with $n^2$ numbers, we can't say that the space of Unitary matrices has dimension $n^2$ because unitary matrices do not form a linear subspace. So, I'm not sure how this business of counting parameters rigorously coincides with dimension of subspaces.
• In the statement "the space of $n\times n$ Hermitian matrices with at least one repeated eigenvalue has codimension 3", the word dimension does not refer to dimensions of linear subspaces, but instead to dimensions of (nonlinear) submanifolds and varieties. The argument you give is using fairly standard techniques to determine the dimension of this variety. Jun 24, 2015 at 14:38
• @JimBelk Could you perhaps briefly describe how this parameter counting can be made into a rigorous determination of the codimension? Apr 3, 2016 at 20:18

Let $K_n$ be the set of hermitian matrices of dimension $n$. Note that $E_n=\{H\in K_n|card(spectrum(H))\leq n-1\}$ is a REAL algebraic set and $dim(E_n)$ is the greatest dimension of its components. A component of maximal dimension is obtained by considering $F_n=\{H\in K_n|card(spectrum(H))= n-1\}$. We consider the function $f:(U,D)\in U(n)\times DR\rightarrow UDU^*\in F_n$ where $DR=\{diag((\lambda_i)_i)|\lambda_i\in\mathbb{R},\lambda_1=\lambda_2\}$. The stabilizer, $R=\{V\in U(n)|VD=DV\}=\{V\in U(n)|V=diag(T_2,\mu_3,\cdots,\mu_n)\}\approx U(2)\times (S_1)^{n-2}$, has real dimension $2^2+1+\cdots+1=n+2$; thus we obtain the real dimension $dim(F_n)=dim(U(n)\times DR)-dim(R)=n^2+(n-1)-(n+2)=n^2-3$.
Remark. $E_n=\{H\in K_n|discrim(\det(H-xI_n),x)=0\}$. Note that $p(H)=discrim(\det(H-xI_n),x)\in\mathbb{Z}[(u_{ij})_{ij}]$ where the $u_{ij}$ are the $n^2$ real parameters that define $K_n$. The previous result says that $p=0$ can be decomposed in $3$ independent real algebraic relations.