In abstract algebra, a groupoid, also called a magma, is an algebraic structure that has a single closed, binary operation defined on it and no other axioms. If the groupoid is represented *M *and its binary operator generically represented as •, then

for all *a*, *b* in *M*, *a* • *b* is also in *M*.

In mathematical notation, this is:

∀ *a*, *b* ∈ *M*: *a* • *b* ∈ *M*

This requirement is known as the **magma axiom** or **closure axiom**.