Binary operation

In mathematics, a binary operation on a set is a function of two variables which assigns a value to any pair of elements of the set: principal motivating examples include the arithmetic and elementary algebraic operations of addition, subtraction, multiplication and division.

Formally, a binary operation $$\star$$ on a set S is a function on the Cartesian product


 * $$S \times S \rightarrow S \,$$ given by $$(x,y) \mapsto x \star y, \,$$

using operator notation rather than functional notation, which would call for writing $$\star(x,y)$$.

Properties
A binary operation may satisfy further conditions.
 * Commutative: $$x \star y = y \star x$$
 * Associative: $$(x \star y) \star z = x \star (y \star z)$$
 * Alternative: $$(x \star y) \star y = x \star (y \star y)$$
 * Power-associative: $$(x \star x) \star x = x \star (x \star x)$$

Special elements which may be associated with a binary operations include:
 * Neutral element I: $$I \star x = x \star I = x$$ for all x
 * Absorbing element O: $$O \star x = x \star O = O$$ for all x