A binary operation on a set$S$ is a function$(-)\cdot (-) \colon S \times S \to S$ from the Cartesian product$S \times S$ to $S$. A magma (or binary algebraic structure, or, alternatively, a mono-binary algebra) $(S,\cdot)$ is a set equipped with a binary operation on it.

A magma is called

unital if it has a neutral element$1$, hence an element $1 \in S$ in that $1 \cdot x = x = x \cdot 1$ Some authors mean by ‘magma’ what we call a unital magma (cf. Borceux-Bourn Def. 1.2.1).

commutative if the binary operation takes the same value when its two arguments are interchanged: $x \cdot y = y \cdot x$;

associative if the binary operation satisfies the associativity condition $(x \cdot y) \cdot z = x \cdot (y \cdot z)$.

More generally, in any multicategory$M$, a magma object or magma in $M$ is an object$X$ of $M$ equipped with a multimorphism$m: X, X \to X$ in $M$. Here the multimorphism from $X$ and $X$ to $X$ is a binary operation in $M$. In particular, for $M$ a monoidal category, a magma structure on $X$ is a morphism$m\colon X \otimes X \to X$; and in a closed category, a magma structure on $X$ is a morphisms $m\colon X \to [X, X]$.

Properties

The Eckmann-Hilton argument holds for unital magma structures: two compatible ones on a set must be equal, associative and commutative.

Literature

The wikipedia entry magma is quite useful, having a list and a table of various subclasses of magmas, hence of binary algebraic structures.