## Every semigroup is isomorphic to a multiplicative subsemigroup of some ring

Show that every semigroup is isomorphic to a multiplicative subsemigroup of some ring. Exhibit a semigroup which is not isomorphic to the (entire) multiplicative semigroup of any ring.

Let $S$ be a semigroup and let $R$ be a ring. Let $R[S] = \{ r : S \rightarrow R\ |\ r_s = 0\ \mathrm{for\ all\ but\ finitely\ many}\ s \in S\}$. That is, $R[S]$ is the set of all functions $S \rightarrow R$ which vanish everywhere except for a finite subset of $S$.

Given $f,g \in R[S]$, we define $f+g$ and $f \cdot g$ as follows.

1. $(f+g)(s) = f(s) + g(s)$
2. $(f \cdot g)(s) = \sum_{tu = s} f(t)g(u)$

In the definition of $\cdot$, if the summation is empty, then $(f \cdot g)(s) = 0$ as usual.

We claim that $(R[S], +, \cdot)$ is a ring.

1. ($+$ is associative) For all $s \in S$, we have $((f+g)+h)(s) = (f+g)(s) + h(s)$ $= f(s) + g(s) + h(s)$ $= f(s) + (g+h)(s)$ $= (f+(g+h))(s)$. So $(f+g)+h = f+(g+h)$.
2. (A $+$-identity exists) Define $0 : S \rightarrow R$ by $0(s) = 0_R$ for all $s \in S$. Now $(f+0)(s) = f(s) + 0(s)$ $= f(s) + 0$ $= f(s)$, so that $f+0 = f$. Similarly, $0 + f = f$.
3. (Every element has a $+$-inverse) Given $f$, define $\overline{f} : S \rightarrow R$ by $\overline{f}(s) = -f(s)$. Then $(f + \overline{f})(s) = f(s) + \overline{f}(s)$ $= f(s) - f(s) = 0$ $= 0(s)$. So $f + \overline{f} = 0$. Similarly, $\overline{f} + f = 0$. We will denote the additive inverse of $f$ by $-f$.
4. ($+$ is commutative) We have $(f+g)(s) = f(s) + g(s)$ $= g(s) + f(s)$ $= (g+f)(s)$.
5. ($\cdot$ is associative)
 $((f \cdot g) \cdot h)(s)$ = $\displaystyle\sum_{tu = s} (f \cdot g)(t) h(u)$ = $\displaystyle\sum_{tu = s} \left(\displaystyle\sum_{vw = t} f(v)g(w)\right) h(u)$ = $\displaystyle\sum_{tu = s} \displaystyle\sum_{vw = t} f(v)g(w)h(u)$ = $\displaystyle\sum_{vwu = s} f(v)g(w)h(u)$ = $\displaystyle\sum_{vt = s} \displaystyle\sum_{wu = t} f(v) g(w) h(u)$ = $\displaystyle\sum_{vt = s} f(v) \left( \displaystyle\sum_{wu = t} g(w) h(u) \right)$ = $\displaystyle\sum_{vt = s} f(v) (g \cdot h)(t)$ = $(f \cdot (g \cdot h))(s)$

So $f \cdot (g \cdot h) = (f \cdot g) \cdot h$.

6. ($\cdot$ distributes over $+$ from the left)
 $(f \cdot (g + h))(s)$ = $\displaystyle\sum_{tu = s} f(t) (g+h)(u)$ = $\displaystyle\sum_{tu = s} f(t)(g(u) + h(u))$ = $\displaystyle\sum_{tu = s} \left( f(t) g(u) + f(t) h(u) \right)$ = $\displaystyle\sum_{tu = s} f(t) g(u) + \displaystyle\sum_{tu = s} f(t)h(u)$ = $(f \cdot g)(s) + (f + h)(s)$ = $((f \cdot g) + (f \cdot h))(s)$

So $f \cdot (g + h) = (f \cdot g) + (f \cdot h)$

7. ($\cdot$ distributes over $+$ from the right) Similar to the proof for left distributivity.
8. (If $S$ has a left identity, then $R[S]$ has a left identity) If $e \in S$ is a left identity, define $\overline{e} : S \rightarrow R$ by $\overline{e}(e) = 1$ and $\overline{e}(s) = 0$ if $s \neq e$. Now $(\overline{e} \cdot f)(s) = \sum_{tu = s} \overline{e}(t) f(u)$. If $t \neq e$, then $\overline{e}(t) = 0$, and if $t = e$, then $u = s$. (The pair $(e,s)$ is certainly in the index set of the summation.) So this is equal to $f(s)$. Hence $\overline{e} \cdot f = f$.
9. (If $S$ has a right identity, then $R[S]$ has a right identity) Similar to the proof for left identity.

So $R[S]$ is a ring. Rings of this type are called semigroup rings, and their elements are typically written as ‘polynomials’ in the elements of $S$ with coefficients from $R$. Addition and multiplication are then carried out as usual for polynomials – multiply the semigroup elements (preserving order) with their coefficients, and then collect like terms.

Given $s \in S$, we define $\varphi_s : S \rightarrow R$ by $\varphi_s(t) = 1$ if $t = s$ and 0 otherwise. We claim that the map $\Phi : S \rightarrow R[S]$ given by $s \mapsto \varphi_s$ is a semigroup homomorphism. Indeed, $\Phi(st)(a) = \varphi_{st}(a) = 1$ if $a = st$ and $0$ otherwise. Now $(\varphi_s \cdot \varphi_t)(a) = \sum_{uv = a} \varphi_s(u) \varphi_t(v)$. If $u \neq s$, then $\varphi_s(u) = 0$, and if $v \neq t$, then $\varphi_t(v) = 0$. So $(\varphi_s \cdot \varphi_t)(a) = 1$ if $a = st$ and $0$ otherwise. Hence $\Phi(st) = \Phi(s) \cdot \Phi(t)$.

So every semigroup can be embedded in the multiplicative semigroup of a ring. However, not every semigroup is isomorphic to the full multiplicative semigroup of some ring, as we argue. Note that every multiplicative semigroup of a ring has a zero. So any semigroup without a zero cannot be the multiplicative semigroup of a ring.