For the vector space $M\_{n,n}(\mathbb{C})$ of $n\times n$ matrices we know that the subset 


$$M\_{2r}:= \{A\in M\_{n,n}(\mathbb{C}) \mid \mbox{rank} (A) = 2r \}$$


is a manifold of dimension $2n(2r)-(2r)^2$ (see [this question](https://math.stackexchange.com/questions/518202/what-is-the-codimension-of-matrices-of-rank-r-as-a-manifold)).


If I now take a look at Hermitian $n \times n$ matrices of rank $2r$ with exactly $r$ positive and $r$ negative eigenvalues, how can I determine the dimension of this manifold?



Dimension (manifold) of matrices with exact $r$ positive and $r$ negative eigenvalues
A Hermitian matrix of rank $r$ can be represented uniquely as $U D U^\ast,$ where $U$ is an $n\times r$ matrix with orthogonal rows of unit length, and $D$ is an $r\times r$ matrix (this is the singular value decomposition, if you want to think of it that way). The (complex) dimension of the space of $U$ is $n-1 + n-2 + \dotsc+ n-r$ the (real) dimension of the space of $D$s is $r$, for a total of 
$$(2n -r -1)r + r = 2n r - r^2$$ real dimensions, near as I can tell.


