Count of Binary Operations on Set

Theorem
Let $S$ be a set whose cardinality is $n$.

The number $N$ of possible different binary operations that can be applied to $S$ is given by:


 * $N = n^{\paren {n^2} }$

Proof
A binary operation on $S$ is by definition a mapping from the cartesian product $S \times S$ to the set $S$.

Thus we are looking to evaluate:
 * $N = \card {\set {f: S \times S \to S} }$

The domain of $f$ has $n^2$ elements, from Cardinality of Cartesian Product.

The result follows from Cardinality of Set of All Mappings.

Comment
The number grows rapidly with $n$:

$\begin{array} {c|rr} n & n^2 & n^{\paren {n^2} } \\ \hline 1 & 1 & 1 \\ 2 & 4 & 16 \\ 3 & 9 & 19 \ 683 \\ 4 & 16 & 4 \ 294 \ 967 \ 296 \\ \end{array}$

There are still only $4$ elements in a set, and already there are over $4$ thousand million different possible algebraic structures.