How could I understand this sentence: How could I understand this sentence:
For any subgroup $H$ of a group $G$ we have $H^2=HH=H$. However, in general, the same is not true for subsemigroups of semigroups.
Thanks a lot!
 A: For any subgroup $H$, $H^2 = H$.  Prove that.  For semigroups with identity it seems to be true as well.  Let $S$ be a subsemigroup with identity.  Then $S\cdot S \supset S$ since there is $1$ in $S$.  And the reverse inclusion holds because $S$ is closed under the binary operation.  If your subsemigroup doesn't have to contain $1$, then take for instance the semigroup $ T = \{a^k : k=1,2\dots\}$ on the letter $a$.  It's closed under concatenation but multiplying by itself, then the first element becomes $a^2$.  In other words it doesn't contain $a^1$, so $T\cdot T \subset T$, but not the reverse.
A: Here the expression $HH$ means $\{h_1h_2:h_1,h_2\in H\}$ (and similarly for products of distinct subgroups of a group). The notation $H^2$ is unfortunate because it could be confused with the set of squares of elements of $H$, i.e. $\{h^2:h\in H\}$ (which can be proper in $H$), but here it means $HH$.
The statement $HH=H$ is a consequence subgroups being closed under the group operation and containing the identity - each condition is important for one direction of inclusion. Indeed if a subsemigroup also contains a semigroup identity then $HH=H$ still holds for the same reasons. 
However semigroups and subsemigroups need not have identities so that not every element of the subsemigroup can be recovered as a product internal to $H$. In particular, the even integers under multiplication $G=H=2\Bbb Z$ have $HH=4\Bbb Z\subsetneq 2\Bbb Z=H$ properly contained. More generally in any semigroup where $H=\{a,a^2,a^3\cdots\}$ is an infinite set, we have $HH=aH\subsetneq H$ proper too.
A: The minimal counterexample. Take $S = \{a, 0\}$ with $xy = 0$ for all $x, y \in S$. Then $S^2 = \{0\} \not= S$.
