Sets on which composition of bijective functions is commutative. I have the following problem:

Let $X$ be a set and $F$ the set of all bijections $f: X\to X$. We consider the composition $f \circ g$ as a binary operation on $F$. Describe precisely for which sets $X$ this operation is commutative.

So, I get that $g$ must also be a bijection if it is a member of $F$, although $f$ and $g$ are not necessarily inverses of each other. I'm thinking the operation is commutative for the identity elements, since each $f$ and $g$ is an injection, but I'm not entirely sure if

*

*I'm 100% right about that, and there are absolutely no other sets.

*How to prove it rigorously.

Any assistance you could offer would be genuinely appreciated! Thanks.
 A: If $X$ has at least three elements $\{x,y,z\} \subset X$ then you can find two bijections $f$ and $g$ which do not commute. Just take $f$ to be the map which swaps $x$ and $y$ and $g$ be the map which swaps $y,z$.
For sets with $0$, $1$ or $2$ elements it is easy to see that bijections (i.e. permutations) do commute (by direct computation):


*

*the set of bijections of the emptyset has only one ($0!=1$) element (the empty map) and of course any bijection commutes with itself;

*the set of bijections of a set with one element has again only one ($1!=1$) element (the identity map);

*the set of bijections of a set with two elements has two ($2!=2$) elements: the identity and the swap of the two elements: of course they commute.

A: The set $F$ of all bijections $f:\ X\ \longrightarrow\ X$, equipped with composition as a binary operation, is the symmetry group of $X$, denoted by $S_X$. It is isomorphic to $S_n$, where $n=|X|$. So your question boils down to: For which $n$ is $S_n$ abelian? The answer is: Only for $n\in\{0,1,2\}$.
A: Consider the functions f:X->X to be permutations of X (this should remind you of a certain group of order n!) When is this group abelian?
