Is there a commutative operation for which the inverse of the operation is also commutative?

For instance addition is commutative, but the inverse, subtraction, is not.

$$ 5+2 = 2+5\\ 5-2 \neq 2-5 $$

Same for multiplication/division:

$$ 5\times4 = 4\times5\\ 5/4 \neq 4/5 $$

So is there a group operation $\circ$ with the inverse $\circ^{-1}$ such that

$$ a\circ b = b\circ a\\ a\circ^{-1}b = b\circ^{-1}a $$


Solution 1:

On natural numbers, the bitwise XOR operation is commutative, and is its own inverse operation (the neutral element is$~0$).

Solution 2:

Note that $-$ (minus) is really just a short way of writing $+$ something negative.

In fact, what you call $\circ^{-1}$ is just the composition $$G \times G \xrightarrow{id \times inv} G \times G \xrightarrow{\cdot (mult)} G$$

So the condition you are asking for $a \circ^{-1} b= b \circ ^{-1} a$ is equivalent to the condition $a\circ b^{-1}=b \circ a^{-1}$.

But this is equivalent to $a = b \circ a^{-1} \circ b$. If you demand that $G$ is commutative, then this is equivalent to $a^2=b^2$, which for example is true if all elements have order $2$.

EDIT As Klaus Draeger points out below, the implication that all elements have order two does not need commutativity (see his comment). But then again, if all elements have order two, the group must be commutative...

Solution 3:

If we define $\circ^{-1}$ for a group, we have a neutral element $1$. Applying commutativity with b = 1 we get

$$1\circ^{-1} a = a \circ^{-1} 1$$ but this simplifies to $$a^{-1} = a$$

so each element is its own inverse.

Solution 4:

If $G$ is an abelian group, then $ab^{-1}=ba^{-1}$ for all $a,b\in G$ if and only if each element of $G$ has order at most $2$.