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.