# Associative, but non-commutative binary operation with a identity and inverse [closed]

Can there really be an associative, but non-commutative binary operation with a identity and inverse?

• Welcome to Math.SE! to make your question more useful to the community, it might be helpful why you seem to doubt that this is possible. Jun 3 '15 at 9:14
• Such a structure is called a (non-commutative) group. Jun 3 '15 at 9:36

Yes, matrix multiplication: given two square matrices $A,B$ with non-zero determinant (so elements of $GL(n,\mathbb{R})$) of any size, we know that $AB$ does not have to be equal to $BA$, but $A(BC) = (AB)C$, the identity matrix serves as an identity and $A^{-1}$ is defined uniquely.
• For any set $X$, you can define a binary operation $\circ$ on the set of mappings $f:X\to X$ as $(f\circ g)(x) = f(g(x))$ (composition). This operation, in general is not commutative, but it is associative and has an inverse.
• On the set of all invertible matrices of size $n\times n$, the standard binary operation of multiplying matrices is not commutative. It has an inverse, and is associative.
• For any $n$, the set of all permutations of $n$ elements has a non-commutative (if $n>2$) associative operation with an inverse.
In fact, most groups studied in group theory are non-abelian (meaning their operation is not commutative). For any $n$, the number of finite groups of size at most $n$ is much larger than the number of finite Abelian groups of size at most $n$.