Example of a weak inverse that is not an inverse 
In the theory of semigroups, a weak inverse of an element $x$ in a semigroup $(S, \cdot)$ is an element $y$ such that $y \cdot x \cdot y = y$.

What is an example of this that is not also an inverse?
 A: Consider a set $X$ and call $S$ the monoid of the partial functions $g:X\dashrightarrow X$, i.e. $S$ is the set of functions with codomain $X$ and domain a subset of $X$, endowed with restricted composition $f\circ g:=f\circ \left.g\right\rvert_{g^{-1}[\operatorname{dom} f]}$. Then, the empty function $\varnothing:\varnothing \to X$ is a weak inverse of all elements (even of those which do have an inverse).
If $X\ne\varnothing$, then the empty function is not an actual inverse of any function.
More generally, an absorbing element in any semigroup has the same property.
A: Let $S$ be a semigroup and let $x \in S$. A weak inverse of $x$ is an element $y$ such that $yxy = y$. It is an inverse of $x$ if it also satisfies the equality $xyx = x$. In particular, every idempotent is its own inverse.
Let $S = \{a, 0\}$ be the commutative semigroup defined by $a^2 = 0$ and $0^2 = a0 = 0$. Then $0$ is a weak inverse of $a$, since $0a0 = 0$, but is not an inverse of $a$ since $a0a = 0 ≠ a$.
Finally observe that if $y$ is a weak inverse of $x$, then $xyx$ is an inverse of $y$ since $(xyx)y(xyx) = x(yxy)xyx = xyxyx = xyx$ and $y(xyx)y = yxyxy = yxy$.
