The answer is completely described by the Frobenius–Schur indicator, $$v_2(\chi) = \frac{1}{|G|}\sum_{g\in G} \chi(g^2)$$
which is covered in chapter 4 of Isaacs's Character Theory of Finite Groups. In particular, we have the Frobenius–Schur theorem, as given on page 58 of Isaacs's CToFG:
Theorem: If $\chi$ is an irreducible (ordinary, complex) character of the finite group $G$, then $$v_2(\chi) = \begin{cases}
1 & \chi \text{ is the character of an irreducible real representation} \\
0 & \chi \text{ takes complex values } \\
-1 & \text{otherwise}
\end{cases}$$
If $v_2(\chi)=1$, $\chi$ is the character of a real representation. If $v_2(\chi)=0$, then $\chi + \bar \chi$ is the character of a real representation. If $v_2(\chi)=-1$, then $2\chi = \chi + \bar \chi$ is the character of a real representation.
The following is Lemma 9.18 (more or less) in Isaacs's CToFG:
Proposition: If $\chi$ is a (ordinary, complex) character of the finite group $G$, then $\chi + \overline{\chi}$ is the character of a real representation of $G$. More generally, if $K \leq F$ are fields of characteristic 0 and $\chi$ is the character of a (ordinary) $F$-representation of $G$, then for every $\sigma \in \operatorname{Gal}(F/K)$, $\chi^\sigma = g \mapsto \sigma(\chi(g))$ is the character of a (ordinary) $F$-representation of $G$, and $$\sum_{\sigma \in \operatorname{Gal}(F/K)} \chi^\sigma$$ is the character of a $K$-representation.
Proof: If $\chi$ is the character of the representation $X$, then consider the representation $X \otimes_{\mathbb{C}} \mathbb{C}_\mathbb{R} \cong X \oplus \bar X$ obtained by replacing the complex entries $a+bi$ of $X$ with the block matrices $\begin{bmatrix} a & b \\ -b & a \end{bmatrix}$. The resulting matrix has trace $\chi(g) + \bar\chi(g)$, since we replace each diagonal entry $a+bi$ with a matrix of trace $2a$. The general case is similar: just choose a $K$-basis of $F$, and write out the associated matrix representation of $f \in F$ in its action on the $K$-vector space $F$. $\square$
Since you mention GAP, I'll mention the indicators of a character table are computed using Indicator( chartable, 2)
and that since every complex, ordinary representation of $G$ is a representation over the field CF(Exponent(G))
, the $\sigma$ appearing in the Galois group are given by chi -> GaloisCyc(chi,k)
for $k$ relatively prime to $G$. In particular, $k=-1$ is complex conjugation. To compute the matrices of the $K$-representation from the $F$-representation as described in the proof, you can use BlownUpMat(Basis(AsVectorSpace(K,F)),mat)
.
The function RationalizedMat
can be applied to a character table to compute some smaller sums where one needs to multiple by the so called Schur index as in Geoff Robinson's answer: for example, it would take a real character and leave it real, even if its indicator were $-1$. However, for Brauer characters (where the Schur indices are always 1), it can be very handy.
At any rate, chapters 4, 9, and 10 of Isaacs's textbook are great for understanding how characters work over different fields of characteristic 0 and how that relates to the power maps of the character table.
Best Answer
There is a book around 1968-71 which is a conference proceedings of a Conference in Oxford (maybe "Oxford Symposium on Finite Group Theory", edited by M.B. Powell and G. Higman), in which an article by Higman himself outlines how to characterize the alternating group $A_{n}$ by its character table. In it, a result implicit in Brauer's development of modular representation theory, they note the following result: let $R$ be a ring of algebraic integers containing all entries of the character table of a finite group $G$. Let $p$ be a rational prime divisor of $|G|$, and let $\pi$ be a prime ideal of $R$ containing $p$. Then two elements $x,y \in G$ have $G$- conjugate $p^{\prime}$-parts if and only if $\chi(x) \equiv \chi(y)$ (mod $\pi$) for each irreducible character in $G$. I won't give here the orthogonality relations from modular character theory which imply this result. Recall that we may write uniquely $x = uv = vu$ where the order of $u$ is a power of $p$ and the order of $v$ is prime to $p$. The element $v$ is known as the $p^{\prime}$ (or sometimes $p$-regular) part of $x$.
Applying this with $p =2$, for example, we see that $g_{2}$ has the same $2^{\prime}$-part as $g_{1}= e$, so that the order of $g_{2}$ is a power of $2$. Similarly, the order of $g_{3}$ is a power of $2$. Likewise, the order of $g_{4}$ is a power of $3$. As for $g_{5}$ and $g_{6}$, this depends of course what $\alpha$ is. You would normally need to be told this. However, I think you can see from the other character values that $g_{5}$ and $g_{6}$ have to have order a power of $7$. With a little more thought, $g_{4}$ has order $3$. Looking at centralizer orders (there must be an involution somewhere!), we see that $g_{2}$ has order $2$. Looking at centralizer orders again, the Sylow $2$-subgroup is non-Abelian of order $8$ and $g_{3}$ must have order $4$. In fact, $g_{5}$ and $g_{6}$ each have order $7$.
(I should also have noted above that continuing the above argument, Higman notes that it is possible to determine the prime divisors of the order of each element of $G$ from its character table).
Actually, as noted in the comments below, this argument is "overkill"for this particular problem, though this more general argument has its own interest.