NB: This part of Exercise 1.9.2 of "Fundamentals of Semigroup Theory," by John Howie. There is a similar question here but it doesn't ask for the specific definition below.
The Definition:
Definition: A semigroup $S$ is a group if there exists an $e$ in $S$ such that for all $a$ in $S$, $ea=a$ and for all $x$ in $S$ there exists an $y$ in $S$ such that $yx=e$.
The Problem:
Let $S$ be a semigroup. Show that $S$ is a group (as defined above) if and only if for all $a$ in $S$, $aS=S=Sa$.
Thoughts:
Fix $a\in S$. It is enough to show that both $\lambda_a: S\to S$, given by $s\mapsto as$, and $\rho_a: S\to S$, given by $s\mapsto sa$, are bijections.
Subproblem:
How do I show that $xe=x$ for any $x$ in $S$ given the definition above?
My Attempt:
I'm stumped.