nLab
magma

A binary operation on a set S is a function from S×S to S. A magma is a set equipped with a binary operation on it.

The term ‘magma’ is from Bourbaki and intends to suggest the fluidity of the concept; special cases include semigroups, quasigroups, groups, and so on. The term ‘groupoid’ is also used, but here that word means something else.

More generally, in any monoidal category M, a magma object or magma in M is an object X of M equipped with a morphism m:XXX in M. Here the morphism from XX to X is a binary operation in M.