# $A$ is a subsemigroup of $S$ if and only if $A^{2}\subset A$

Question:

Show that $A$ is a subsemigroup of $S$ if and only if $A^{2}\subset A$. The subset here may not necessarily be proper.

My approach,

Suppose $A$ is a subsemigroup of $S$, then for all $x,x\in A, x^{2}\in A$. Does this mean that, $A^{2}\subset A$ since $(x,x)\in A^{2}$?. I am not sure!

Conversely, suppose $A^{2}\subset A$, then for any $(x,x)\in A^{2}$, $x^2\in A$ since $A^{2}\subset A$. This implies $A$ is a subsemigroup of $S$.

I am trying to convince myself with this proof, but it seems to me that what I did is not a good approach. Can somebody help me?

-

First, note that here $A^2$ is not the set of pairs of elements of $A$. Instead, it represents the set of all products of two elements of $A$. (Recall that in general, if $R$ and $T$ are subsets of a semigroup $S$, then $RT = \{rt\mid r\in R, t \in T\}$; here we have $R=T=A$).
So the fact that $x\in A$ implies $x^2\in A$ is one part, but not all that is needed to show that $A^2 = \{aa'\mid a,a'\in A\}$ is contained in $A$ when $A$ is a subsemigroup.
Conversely, if you assume that $A^2\subseteq A$, you are assuming that for all $a,a'\in A$, you have $aa'\in A^2\subseteq A$. This should easily lead to $A$ being a subsemigroup.
How do you show $A^{2}$ is contained in $A$? In you fifth line I think the set $A^{2}$ is not well defined. I think we must have $a,a^{'}\in A$ not $a,a\in A$ –  Hassan Muhammad Nov 17 '11 at 15:45
It is a typo in line 5 and your revision is correct. The key point to realize is that $A^2 \subset A$ is logically equivalent to the statement 'the set $A$ is closed under the semigroup multiplication' (which said more precisely, is the statement that the product of any two elements in $A$ is in $A$). –  Michael Joyce Nov 17 '11 at 15:59