# Can a binary operation have an identity element when it is not associative and commutative?

I tried getting the answers in similar questions, everyone says that it's not necessary, but if $e$ is the identity element for any binary operation $*$, which is not associative and commutative, how can

$$a*e=a=e*a$$

when it is not commutative, i.e. $a*b \ne b*a$?

Even if we get a value by solving $a*e=a$. Will we get the same value by solving $e*a=a$ ? Please provide an example.

• If $\ast$ has both a left identity $l$ and a right identity $r$, then $l = l \ast r = r$. – Travis Jun 20 '17 at 12:54
• See the wikipedia article on quasigroups, and specifically the section on loops. It has the additional assumption of divisibility, and as such left and right inverses, but is otherwise exactly what you're looking for. The examples section includes such familiar things as the integers with the subtraction operation and the non-zero rationals, reals or complex numbers with division. – Arthur Jun 21 '17 at 9:03

## 6 Answers

Asserting that the operation $$*$$ is not commutative means that there are elements $$a$$ and $$b$$ such that $$a*b\neq b*a$$. It does not mean that $$a*b\neq b*a$$ for any two distinct elements $$a$$ and $$b$$. Therefore, an operation may well not be commutative and, even so, to have an identity element. There is no contradiction here.

For an example of a non-commutative and non-associative algebraic structure with an identity element, take, for instance, the octonions.

An operation is commutative if for any $a$ and $b$, we have $ab=ba$. Finding one pair $a,b$ such that $ab=ba$ doesn't prove the operation is commutative; this has to hold for every pair.

Consider the set $\{a,b,c\}$ whose binary operation $\cdot$ is given by the following: $$a\cdot a = a\,\,\,\,\,\,\,\,\,\,\, a\cdot b=b\,\,\,\,\,\,\,\,\,\,\,a\cdot c=c$$ $$b\cdot a = b\,\,\,\,\,\,\,\,\,\,\, b\cdot b=b\,\,\,\,\,\,\,\,\,\,\,b\cdot c=c$$ $$c\cdot a = c\,\,\,\,\,\,\,\,\,\,\, c\cdot b=b\,\,\,\,\,\,\,\,\,\,\,c\cdot c=a$$ This operation has $a$ as an identity element. However, it is not commutative (since $b\cdot c\neq c\cdot b$) and it is not associative (since $b\cdot(c\cdot c)=b\neq a =(b\cdot c)\cdot c$).

It is possible. $*$ not being commutative means that $a*b\neq b*a$ for some $a,b$, not for all of them. So you may have $a*e=e*a=a$ without contradicting that $*$ is not commutative.

Actually, given any set $S$ and operation $*$ on it (so possibly neither associative nor commutative), we can simply extend this with a new symbol $\color{red}0$ (i.e., $\color{red}0\notin S$) and on the set $S':=S\cup\{\color{red}0\}$ define an operation $\color{red}*$ by $$x\color{red}*y:=\begin{cases}x&\text{if }y=\color{red}0\\ y&\text{if }x=\color{red}0\\x*y&\text{otherwise} \end{cases}$$ Then $\color{red}*$ is not associative/commutative if $*$ is not associative/commutative. But $\color{red}0$ is neutral.

• Nice. Since all operators with identity can be viewed as arising from this process and because the probability that a randomly choses operator on a set with $n$ elements is either commutative or associative tends to $0$ as $n \rightarrow \infty$, you can show that most operators with identity are neither associative nor commutative. – John Coleman Jun 21 '17 at 13:21

Without looking for esoteric and/or ad hoc examples, there is one you are certainly familiar with. The identity matrix is the identity element for matrix multiplication, which is not commutative. We have $A\,I=I\,A=A$ while in general $A\,B \neq B\,A$.

• This is nice, because although the OP mentioned nonassociativity, the only property invoked in her/his argument is noncommutativity. Therefore matrix addition is a good, familiar example. – Ben Crowell Jun 20 '17 at 21:45

Isn't subtraction a binary function which has an identity ($x-0=x$) although it is not commutative ($5-0 > 0-5$) or associative ($5-(4-3) > (5-4)-3$)?

• Zero is only a right-identity for subtraction. $0 - x = x$ fails. – Zach Effman Jun 20 '17 at 18:45
• Besides, in abstract algebra, subtraction is literally addition. – Obinna Nwakwue Jun 21 '17 at 14:12
• @ObinnaNwakwue, I think one has to be careful with such a statement. Subtraction is literally defined in terms of addition (and additive inverses), but it is not literally addition, any more than multiplication of natural numbers is literally addition because it is defined in terms of it. – LSpice Jun 21 '17 at 22:12
• Yeah, you are right there. – Obinna Nwakwue Jun 22 '17 at 1:53