# Number of free real parameters in Hermitian vs unitary matrix

There seems consensus that the number of free real parameters of an $$n \times n$$ Hermitian matrix $$M$$ is $$n^2$$; see e.g. this post and also this short note.

On the other hand, such a matrix has a spectral decomposition $$M = U D(\lambda) U^*$$, where $$U$$ is an $$n\times n$$ unitary matrix, $$U^*$$ its adjoint, and $$D(\lambda)$$ is the diagonal matrix with entries $$\lambda \in \mathbb{R}^n$$. There are also posts, such as this one, suggesting that the number of free real parameters of an $$n\times n$$ unitary matrix is also $$n^2$$. Yet for "generic" Hermitian matrices $$M$$, the entries of $$\lambda$$ are distinct, and the spectral decomposition $$M = U D(\lambda) U^*$$ will be unique. Thus, specifying $$M$$ would seem to uniquely specify $$n^2 + n$$ real parameters, implying that the number of free real parameters of $$M$$ should be $$n^2 + n$$.

I suspect I'm missing something basic that would resolve this apparent discrepancy. Any suggestions would be appreciated!

(I'm also interested in the rank $$r$$ version of this question; specifying $$r$$ orthonormal vectors (by the same logic as the above post), and specifying a rank $$r$$ Hermitian matrix both appear to require $$2nr - r^2$$ real parameters, yet the Hermitian matrix also specifies $$r$$ eigenvalues.)

• The decomposition $UDU^\ast$ is not unique. In fact, $UDU^\ast=U\Lambda D\Lambda^\ast U^\ast$ for every diagonal matrix $\Lambda$ whose diagonal entries lie on the unit circle. So, one can always assume that the top row of $U$ is real. This saves up $n$ real parameters for the imaginary parts of the entries on the top row. Jan 19, 2022 at 21:22
• Aha, I had failed to see that eigenvectors are only unique up to a phase. (For others: see this post.) Thank you! Jan 20, 2022 at 3:37

I think you can refer to the literature about the Lie group and Lie algebra. Particularly, any unitary $$U$$ can be uniquely represented by its derivative $$H$$ in the Riemman space in the exponential formula, namely, $$U=e^{-itH}$$, where $$t$$ is a fixed constant and $$H$$ is a Hermitian matrix. In this regard, it is easy to see that a unitary $$U$$ has the same free real parameters as the Hermitian matrix $$H$$.