TITLE: Are there any interesting semigroups that aren't monoids?
QUESTION [50 upvotes]: Are there any interesting and natural examples of semigroups that are not monoids (that is, they don't have an identity element)?
To be a bit more precise, I guess I should ask if there are any interesting examples of semigroups $(X, \ast)$ for which there is not a monoid $(X, \ast, e)$ where $e$ is in $X$. I don't consider an example like the set of real numbers greater than $10$ (considered under addition) to be a sufficiently 'natural' semigroup for my purposes; if the domain can be extended in an obvious way to include an identity element then that's not what I'm after.

REPLY [4 votes]: I don't know if this counts as interesting, but a simple example is what C programmers know as the comma operator: Ignore the first argument and return the second. Or written as multiplication rule: $ab=b$ for all $a,b\in S$. This is easily shown to be a semigroup, but as long as there are at least two elements in $S$, this is not a monoid, as with neutral element $e$ you'd have for all $a\in S$ the identity $a=ae=e$.