Let $G$ be a finite group, and $k$ be a field of characteristic zero (not necessarily algebraically closed!). Let $\rho : G \to \mathrm{End}\_k \left(k^n\right)$ be a irreducible representation of $G$ over $k$. Consider the vector space


$S=\left\lbrace H\in \mathrm{End}\_k\left(k^n\right) \mid \rho\left(g\right)^T H\rho\left(g\right)=H\text{ for any }g\in G\right\rbrace$


$=\left\lbrace \sum\limits\_{g\in G}\rho\left(g\right)^T H\rho\left(g\right)\mid H\in \mathrm{End}\_k\left(k^n\right)\right\rbrace$


and its subspace


$T=\left\lbrace H\in S\mid H\text{ is a symmetric matrix}\right\rbrace$.


It is easy to show that, if we denote our representation of $G$ on $k^n$ by $V$, then the elements of $S$ uniquely correspond to homomorphisms of representations $V\to V^{\ast}$ (namely, $H\in S$ corresponds to the homomorphism $v\mapsto\left(w\mapsto v^THw\right)$), while the elements of $T$ uniquely correspond to $G$-invariant quadratic forms on $V$ (namely, $H\in T$ corresponds to the quadratic form $v\mapsto v^THv$).


**(1)** In the case when $k=\mathbb C$, Schur's lemma yields $\dim S\leq 1$, with equality if and only if $V\cong V^{\ast}$ (which holds if and only if $V$ is a real or quaternionic representation). Thus, $\dim T\leq 1$, and it is known that this is an equality if and only if $V$ is a real representation. (Except of the equality parts, this all pertains to the more general case when $k$ is algebraically closed of zero characteristic).


**(2)** In the case when $k=\mathbb R$, it is easily seen that $T\neq 0$ (that's the famous nondegenerate unitary form, which in the case $k=\mathbb R$ is a quadratic form), and I think I can show (using the spectral theorem) that $\dim T=1$. As for $S$, it can have dimension $>1$.


**(3)** I am wondering what can be said about other fields $k$; for instance, $k=\mathbb Q$. If $k\subseteq\mathbb R$, do we still have $\dim T=1$ as in the $\mathbb R$ case? In fact, $T\neq 0$ can be shown in the same way.



Invariant quadratic forms of irreducible representations
There are certainly examples over $k=\mathbb{Q}$ where $\dim T\ge2$.
Let's take the cyclic group $G$ of order $5$ and the representation
space
$$V=\{(a\_0,\ldots,a\_4)\in\mathbb{Q}^5:a\_0+\cdots +a\_4=0\}$$
where $G$ acts by cyclic permutation. Two linearly independent
elements of $T$ are given by
$$\left(\begin{array}{rrrrr}
2&-1&0&0&-1\\\
-1&2&-1&0&0\\\
0&-1&2&-1&0\\\
0&0&-1&2&-1\\\
-1&0&0&-1&2\end{array}\right)
$$
and
$$\left(\begin{array}{rrrrr}
2&0&-1&-1&0\\\
0&2&0&-1&-1\\\
-1&0&2&0&-1\\\
-1&-1&0&2&0\\\
0&-1&-1&0&2\end{array}\right)
$$
(these define quadratic forms on $V$ since they annihilate the all-one
vector).


The point here is that this representation splits into two over
$\mathbb{R}$. I think the dimension of $T$ in general will be
the number of irreducible representations it splits into over
$\mathbb{R}$.


