# Number of distinct equivalence classes under *-congruence and T-congruence

Let me first state the definition

Let $A,B\in\mathbb{C}^{n\times n}$. If there exists a nonsingular matrix $S$ s.t.

(a) $B=SAS^*$, then $B$ is said to be *-congruent or conjuctive to $A$.

(b) $B=SAS^T$, then $B$ is said to be T-congruent or congruent to $A$.

It is easy to see that both *-congruence and T-congruence are equivalence relations. Also, the triplet $(i_{+}(A),i_{-}(A),i_0(A))$ in which $i_{+}(A)$, $i_{-}(A)$ and $i_{0}(A)$ is the number of positive, negative and zero eigenvalues of $A$, respectively, is called the inertia of $A$. Also, $\mathrm{rank}(A)=i_{+}(A)+i_{-}(A)$.

The question I have is the following:

How many disjoint equivalent classes under *-congruence are there in the set of $n\times n$ complex Hermitian matrices? In the set of $n\times n$ real symmetric matrices?

Sylvester's Theorem (4.5.8 in Horn and Johnson's Matrix Analysis book) says

Hermitian matrices $A,B\in\mathbb{C}^{n\times n}$ are *-congruent if and only if they have the same inertia.

Based on this, for the 1st part of the question I tried to count cases for $(i_{+}(A),i_{-}(A),i_0(A))$, for a Hermitian matrix $A$ as a representative of its equivalence class. So for $i_0(A)=0$, the possible values of $i_{+}(A)$ are $i_{+}(A)=(0,1,\dots,n)$ and the corresponding values of $i_{-}(A)$ are $i_{-}(A)=(n,n-1,\dots,0)$. I did the same thing for all values of $i_0(A)=0,1,\dots,n$ and then summing all the possibilities, the number of disjoint classes we can have is $$(n+1)+n+\dots+1=\frac{(n+2)(n+1)}{2}$$

At this point, I will cite Thm.4.5.12 which says

Symmetric matrices $A,B\in\mathbb{C}^{n\times n}$ are T-congruent if and only if they have the same rank.

Hence, for the 2nd part of the questions I took all cases for $i_0(A)=0,1,\dots,n$ and for each of them we are only interested in the sum $i_{+}(A)+i_{-}(A)=\mathrm{rank}(A)$ and not each of them independently. So the number of disjoint classes in this case is only $$0+1+\dots+n=n+1$$ Are the above results correct?