A **binary operation** is an operation with arity two, involving two operands.

A binary operation on a set is a function that maps elements of the Cartesian product:

## Examples

In the set of real numbers, and in any field for that matter:

- Addition ();
- Subtraction ();
- Multiplication ();
- While not a binary operation in the strictest sense, as division by zero is undefined, division () is commonly thought of as an operation.

## Notation

Because a binary operation on a set is also a function from to , and therefore a relation and a subset of the cartesian product , the following notations are valid:

- , when viewing as a set;
- , when viewing as a relation;
- , when viewing as a function;

However, we will adopt the preferred notation as an alternative to the function notation . **One should not confuse** this preferred notation to the relation notation; the preferred notation for binary operations is an expression for a value in the codomain, while the relation notation is an expression of a statement.