A binary operation on a set is a function from to . 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 , a magma object or magma in is an object of equipped with a morphism in . Here the morphism from to is a binary operation in .