What is the group that leaves \begin{equation} Y = \bigoplus_{j=1}^{k} \alpha_j \mathbb{I}_{2n_j\times 2n_j} \end{equation} invariant under congruence ($Y = XYX^T$) where $\alpha_j \in \mathbb{R}$ and $\alpha_j \neq 0$?
I have toyed with different variations of the special orthogonal group; my misunderstandings of how matrix groups relate to representations are fleshed out here.
Answer from Matt Biesecker in comments. Sylvester's Law taken from wiki.
Sylvester's Law of Inertia:
Given some non-singular real symmetric matrix $A$, the group of matrices that satisfy \begin{equation} XAX^T = A. \end{equation} is $\operatorname{O}(p,q)$ where $p$ and $q$ are the number of postive and negative eigenvalues of $A$ respectively.
Proof:
Real symmetric matrices can be diagonalised by congruence by an orthogonal matrix, so we know that there exists $Q$ such that \begin{equation} A = QEQ^T \end{equation} where $E$ is the diagonal matrix of eigenvalues. Given $W$ such that $W_{ii} = (\sqrt{|E_{ii}|})^{-1}$ we obtain \begin{equation} E = WDW^T \end{equation} where $D$ is a diagonal matrix of $1$s and $-1$s. Thus \begin{equation} XAX^T = (XQW)D(XQW)^T = (QW)D(QW)^T. \end{equation} and so \begin{equation} \left((QW)^{-1}X(QW)\right)D\left((QW)^{-1}X(QW)\right)^T = D. \end{equation} The group that preserves $D$ under congruence is $\operatorname{O}(p,q)$ by definition. Thus the group of $X$ matrices is isomorphic to $\operatorname{O}(p,q)$.
Relation to question:
$Y$ is a nonsingular real symmetrix matrix.