For a complex matrix $O\in \mathbb{C}^{n\times n}$ which satisfies $O^*O=I$, it can be viewed as a real affine variety in $ \mathbb{R}^{2 n^2}$. Let $U$ be the real part of $O$ and $V$ be the image part of $O$. Then $O=U+iV$ and $U^\top U + V^\top V =I$ and $U^\top V=V^\top U$. Therefore $\{O\in \mathbb{C}^{n\times n} : O^* O=I \} \cong \{ (U,V)\in \mathbb{R}^{n\times n} \times \mathbb{R}^{n\times n}:U^\top U + V^\top V =I \mbox{ and } U^\top V=V^\top U \}$.
I want to ask what is the dimension of $\{ (U,V)\in \mathbb{R}^{n\times n} \times \mathbb{R}^{n\times n}:U^\top U + V^\top V =I \mbox{ and } U^\top V=V^\top U \}$ as a real variety in $ \mathbb{R}^{2 n^2}$ ?
What's more, what is the dimension of $\{ (U,V)\in \mathbb{C}^{n\times n} \times \mathbb{C}^{n\times n}:U^\top U + V^\top V =I \mbox{ and } U^\top V=V^\top U \}$ as a complex variety in $ \mathbb{C}^{2 n^2}$?
Or in what textbook can i find the corresponding knowledge?
Thanks!