Need to find example for non-abelian group $G$ for which $A \subset G,\;A=\{g\in G \mid g^{-1}=g\}$ is not a subgroup of $G$.

Can you please help me find such a $G$?


Take $S_3$, the symmetric group of permutations on $\{1, 2, 3\}$:

Let $A$ be the set of all elements of $g \in S_3$ such that $g = g^{-1}$:

Then $A = \{e = (1), (1, 2), (1, 3), (2, 3)\} \subset S_3 = \{(1), (1, 2), (1, 3), (2, 3), (1, 2, 3), (1, 3, 2)\}$.

$A$ contains the identity permutation $(1) = e$, and each element in $A$ is its own inverse, by definition of $A$.

However, $(1, 3)(2, 3) = (1, 3, 2) \notin A$, so $A$ fails to be a subgroup of $S_3$ because it is not closed under permutation composition (which is the group operation on $S_3$).

Edit: Indeed, as Jacob points out in a comment below, $|A| = 4,\,$ whereas $\,6 = |S_3|$, so by Lagrange's Theorem, since $4$ does not divide $6$, $A \nleq S_3$.


A symmetric group is an easy answer. Take $S_3$, then the permutations $(1 \ 2)$ and $(2 \ 3)$ are each their own inverse (I'm using cycle notation, btw), but their product $(1 \ 2)(2 \ 3) = (1 \ 2 \ 3)$ is not.


The first non-abelian you learn at least I learnt is $S_n$ the symmetric group. Ok let's start from here.

The relation $g^2=e$ means that $A$ contain all the $2$-element swaps. Now we know that any permutation can be written as a composition of $2$-element swap permutations.

Therefore if it was closed under composition i.e. a property of a group then $A$ would be equal to $S_n$ but now we know that $S_n$ has elements which are not of order $2$, take for instance a cycle of length more than 2,(which a property that all the elements of $A$ have) and you reach a contradiction.