# How to determine if a group H is a normal subgroup of group G?

A subgroup $$H$$ of the group $$G$$ is normal group in $$G$$ if and only if $$\displaystyle ghg^{-1}\in H$$ for all $$\displaystyle g\in G$$ and $$\displaystyle h\in H$$. How to use MMA to know the group $$H$$ is a normal group of group $$G$$? Such as:

G = SymmetricGroup;
H = AlternatingGroup;

• g = GroupElements[SymmetricGroup]; h = GroupElements[AlternatingGroup]; conj[x_] := PermutationProduct[#, x, InversePermutation[#]] & /@ g Brute fprcing: Union[Flatten[conj /@ h]] == Sort[h] yields True May 16 at 8:43
• @ubpdqn Yes, I note your solution here. But RandomSample[Sort[GroupElements[AlternatingGroup]]]===GroupElements[AlternatingGroup] will return False. You need a parameter Less like my answer in following. And I use the PermutationReplace to get the conjugate is more concise than yours. :)
– yode
May 16 at 9:10
• Not sure I understand but I'll accept your point May 16 at 9:12

IsNormalQ[H_, G_] := Sort[DeleteDuplicates[Catenate[

IsNormalQ[H_, G_] := ContainsExactly[