TITLE: Proving a binary operation on $\mathbb{Z}$ gives a semigroup
QUESTION [5 upvotes]: Let $x\circ y= x +y-xy, \quad (x,y) \in \mathbb{Z}$
where $\circ$ is a binary operation on $\mathbb{Z}$, prove that this is a semigroup.
My Work
To prove we have to check two things:

$\mathbb{Z}$ is closed under $\circ$
$\circ$ is associative on $\mathbb{Z}$

For the first one, since we are only adding, subtractive and multiplying integers, the results will always be integers. Hence $\mathbb{Z}$ is closed under $\circ$.
For the second, I just have to show that $(x\circ y) \circ z =x\circ(y\circ z)$.
RHS: $(x\circ y) \circ z =(x+y-xy)\circ z= x+y-xy+z-zx-zy+xyz$
LHS: $x\circ(y\circ z)=x\circ (y+z-yz)=x +y-xy+z-zx-zy+xyz$
Hence RHS$=$LHS.
Therefore $(\mathbb{Z},\circ)$ is a semigroup.

Is this correct? And is there a better way to show that it's closed?

REPLY [6 votes]: Perhaps it is instructive to see how these exercises arise. This also gives a handy solution: once you have the general setup described below, there is really nothing to prove.
Consider the map $\varphi : \Bbb{Z} \to \Bbb{Z}$ given by $\varphi(x) = 1 - x$.
Note that $\varphi^{2} = \mathbf{1}_{\Bbb{Z}}$, so that $\varphi$ is bijective, and $$\varphi(x) \varphi(y) = (1 - x) (1 - y) = 1 - x - y + xy  = 1 - (x + y - xy) = \varphi(x \circ y),$$
so that
$$
x \circ y = \varphi^{-1}(\varphi(x) \varphi(y)).
$$
(Ok, I know $\varphi^{-1} = \varphi$ in this particular case.) So $(\Bbb{Z}, \circ)$ is obtained through transport of structure from $(\Bbb{Z}, \cdot)$,
and
$$
\varphi: (\Bbb{Z}, \circ) \to (\Bbb{Z}, \cdot)
$$
is an isomorphism. The structure of a monoid of $(\Bbb{Z}, \cdot)$ carries over to $(\Bbb{Z}, \circ)$ verbatim, you are really verifying the familiar axioms in $(\Bbb{Z}, \cdot)$, only indirectly via $\varphi$. In particular, the identity of $(\Bbb{Z}, \circ)$ is $\varphi^{-1}(1) = 0$, where $1$ is the identity of $(\Bbb{Z}, \cdot)$.
By the way, this circle operation (or a slight variation thereof) plays an important role in the theory of the Jacobson radical.