Semigroups and solutions of equation It is easy to prove: in a finite semigroup if for all $a$ and $b$, $ax=b$ and $ya=b$ has unique solution. then it is group. But if in a finite semigroup, if for all $a$ and $b$, $ax=b$ and $ya=b$ has solution(not necessarily unique given) would it be a group?
 A: The answer is yes and relies on the properties of Green's relations and Green's theorem, which states that if $H$ is an $\mathcal{H}$-class of a semigroup $S$, then either $H^2 \cap H = \emptyset$ or $H$ is a subgroup of $S$. In particular, the $\mathcal{H}$-class of an idempotent is a subgroup of S.
Let $S$ be a nonempty finite semigroup. Then $S$ contains an idempotent $e$. Now, for all $a \in S$, there exists a pair $(x,y) \in S^2$ such that $ax = e$ and $ya = e$ and another pair $(s,t) \in S^2$ such that $es = a$ and $te = a$. This implies that, for all $a \in S$, $e \mathrel{\mathcal{R}} a$ and $e \mathrel{\mathcal{L}} a$, whence $e \mathrel{\mathcal{H}} a$. Therefore, $S$ is equal to the $\mathcal{H}$-class of $e$, which is a group, as any $\mathcal{H}$-class containing an idempotent.
A: Here is a short self-contained proof.
Suppose $S$ is a semigroup (finite or infinite, but of course nonempty) such that, for any $a,b\in S$, each of the equations $ax=b$ and $ya=b$ has at least one solution in $S$. We will show that $S$ is a group. (In fact this is how groups are defined in some textbooks. If memory serves, this is how they are defined in a book by Kurosh.)
Choose elements $a\in S$ and $e\in S$ such that $ae=a$.
Consider any $x\in S$. Choose $y\in S$ so that $ya=x$. Then
$$xe=yae=ya=x.$$
Thus $e$ is a right identity element.
For any element $x\in S$ there is an element $x'\in S$ such that $xx'=e$, and an element $x''\in S$ such that $x'x''=e$. Then
$$x'x=x'xe=x'xx'x''=x'ex''=x'x''=e,$$
that is, $x'$ is a two-sided inverse of $x$ with respect to $e$.
Finally, for any $x\in S$ we have
$$ex=xx'x=xe=x,$$
so $e$ is a two-sided identity element. This completes the proof that $S$ is a group.
