For a group $(G,\star)$, an element $x\in G$ is said to be *square* if there is $y\in G$ such that $x=y\star y$. 


My question is: For which kinds of group $G$, can we decide whether $x\in G$ is a square or not?


As for the multiplicative group $(\mathbb Z/n\mathbb Z)^\*$ (where $n$ is a prime or the production of some primes), we know that this problem is equivalent to the so-called quadratic residue problem, and we have methods for dealing with this problem. More specifically, if and only if the factorization of $n$ is known, we can identify a sqaure element efficiently.


How about for other groups? If we cannot hope for a general answer, can we answer this question for certain special groups?



For which kinds of group $G$, can we identify a square element efficiently?
For a finite group $G$, there is a long-standing answer to this question using character theory. If $\chi$ is an irreducible complex character of $G$, then its Frobenius-Schur indicator $\nu(\chi)$ is defined by $\nu(\chi) = \frac{1}{|G|} \sum\_{g \in G} \chi(g^{2}).$ It is known that $\nu(\chi) \in \{0,1,-1\},$ and that $\nu(\chi) = 0$ if $\chi$ is not real-valued,$\nu(\chi) = 1$ if $\chi$ is real-valued may be afforded by a representation over $\mathbb{R},$ while $\nu(\chi) = -1$ if $\chi$ is real-valued, but may not be afforded by any representation over $\mathbb{R}.$


It then follows from the orthogonality relations for group characters that for any $x \in G,$ the number of $g \in G$ such that $g^{2} = x$ is given by the formula $\sum\_{\chi \in {\rm Irr}(G)} \nu(\chi)\chi(x)$, where ${\rm Irr}(G)$ is the set of complex irreducible characters of $G$. Note that $x$ is a square in $G$ if and only if this expression is non-zero.


