TITLE: Is the subset of squares of a group a subgroup?
QUESTION [6 upvotes]: Let $G$ be a group and
$$S:=\{g^2 \mid g\in G\}$$
the subset of all squares of $G$. Is $S$ then a subgroup? I would say no since I don't see why $g^2h^2$ should be a square in the non-abelian case. But I didn't find any counter-example. Even if we take $G=S_4$ (a very non-abelian group) I computed $S=A_4$.

REPLY [6 votes]: OK. Let us give some fact:
1) If $G$ is an Abelian group and $H = \{g^2| g \in G\}$, then $H$ is a subgroup. (easy exercise)
2) If $G$ is a dihedral group $D_n$, then the squares forms a subgroup (group of rotations).
So, if you want to take an counter-example, please take a non-abelian group.
For example, $G = SL(2,\mathbb{Z}_3)$, the group of  $2\times 2$  matrices with entries in $\mathbb{Z}_3$ and determinant 1 (mod 3). Now, you know that there are 24 such matrices. They give 10 squares. Finally, check that
$$\begin{pmatrix}1 &1 \\0 &1\end{pmatrix}^2 \begin{pmatrix}1 &0 \\1 &1\end{pmatrix}^2 = \begin{pmatrix}2 &2 \\2 &1\end{pmatrix},$$ which is not square.