In mathematics, and in particular universal algebra, the concept of an n-ary group (also called n-group or multiary group) is a generalization of the concept of a group to a set G with an n-ary operation instead of a binary operation. By an n-ary operation is meant any map f: Gn → G from the n-th Cartesian power of G to G. The axioms for an n-ary group are defined in such a way that they reduce to those of a group in the case n = 2. The earliest work on these structures was done in 1904 by Kasner and in 1928 by Dörnte; the first systematic account of (what were then called) polyadic groups was given in 1940 by Emil Leon Post in a famous 143-page paper in the Transactions of the American Mathematical Society. The easiest axiom to generalize is the associative law. Ternary associativity is the polynomial identity (abc)de = a(bcd)e = ab(cde), i.e. the equality of the three possible bracketings of the string abcde in which any three consecutive symbols are bracketed. (Here it is understood that the equations hold for all choices of elements a, b, c, d, e in G.) In general, n-ary associativity is the equality of the n possible bracketings of a string consisting of n + (n − 1) = 2n − 1 distinct symbols with any n consecutive symbols bracketed. A set G which is closed under an associative n-ary operation is called an n-ary semigroup. A set G which is closed under any (not necessarily associative) n-ary operation is called an n-ary groupoid. The inverse axiom is generalized as follows: in the case of binary operations the existence of an inverse means ax = b has a unique solution for x, and likewise xa = b has a unique solution. In the ternary case we generalize this to abx = c, axb = c and xab = c each having unique solutions, and the n-ary case follows a similar pattern of existence of unique solutions and we get an n-ary quasigroup. An n-ary group is an n-ary semigroup which is also an n-ary quasigroup. In the 2-ary case, there can be zero or one identity elements: the empty set is a 2-ary group, since the empty set is both a semigroup and a quasigroup, and every inhabited 2-ary group is a group.