Group-subsets of monoids with different identities

Let $G$ be your favourite group. Consider the monoid $M_G$ with set $G\cup \{e\}$, where $e$ is a new letter acting as $eg=g=ge$ for all $g\in G$ (and let $G<M_G$ inherit the group operation from $G$).

Then we can view $G<M_G$ as a group, with a different identity element to $e\in M_G$.

For example, if you start with $G$ the trivial group, then $M_G$ can be viewed as $\{0, 1\}$ under multiplication inherited from $\mathbb{R}$ (here, $0$ corresponds to the trivial group, and $1=e$ is the added identity).


You could take a disjoint union of as many different groups as you like, together with an extra element $0$, and make all products between elements in different groups equal to $0$.


This is a well-studied area, related to the Green's relation $\mathcal H$. Let $M$ be a monoid. Define the relation $\mathcal H$ on $M$ by $$ a \mathrel{\mathcal H} b \iff aM = bM \text{ and }Ma = Mb $$ In other words, $a$ and $b$ generate the same right ideal and the same left ideal. Now, if $e$ is an idempotent, its $\mathcal H$-class is a subgroup of $M$ with identity $e$ and it is the largest subgroup of $M$ containing $e$.

In your case, the idempotent is the matrix $\pmatrix{1/2 &1/2\\1/2 &1/2}$.