Is a semigroup $G$ with left identity and right inverses a group?

Let $G$ have at least two elements, one of which I’ll call $e$. Define the binary operation $*$ on $G$ by $x*y=y$ for all $x,y\in G$; it’s easily checked that $*$ is associative. Clearly $e*x=x$ for all $x\in G$, so $e$ is a left identity. And $x*e=e$ for each $x\in G$, so $e$ is a right inverse for each element of $G$ (with respect to the left identity $e$). Clearly $G$ has no two-sided identity, so it isn’t a group.

Of course this is a bit odd, since I can pick any element of $G$ to be the left identity, and it then becomes the right inverse of every element.


A concrete counterexample, found in John B. Frayleigh's "A First Course In Abstract Algebra", seventh edition:

Let $\Bbb R^*$ be the set of all real numbers except $0$. Define $*$ on $\Bbb R^*$ by letting $a*b$ $=$ $\lvert a \lvert b$, for all $a, b$ $\in$ $\Bbb R^*$.

Verify that this is a semigroup, contains a left identity, and a right inverse for every element in $\Bbb R^*$, but not a left inverse for every element (consider negative values), and no right identity.


Consider a group of any set of integers containing 1 with the product a*b = b. Then 1 is a left identity, since 1*b = b. (In fact, every number is a left identity). And 1 is a right inverse for everything, since a*1 = 1, the identity element. (Associativity is easy.) But this is obviously not a group.