Binary operation
Mathematical operation with two operands

In mathematics, a binary operation or dyadic operation is a kind of binary function, i.e. given a pair of input values (called operands), it produces an output value. For example, addition is a binary operation: . A binary operation is an operation of arity two.
Some definitions require the two inputs and the output to be elements of the same set.
Binary operations are usually written using infix notation such as rather than by functional notation of the form
. Multiplication and exponentiation are frequently written without operator, but with exponents as superscript.
In abstract algebra, a binary operation on a set is a mapping of the elements of the Cartesian product
to
:
If the mapping is total, is a magma. However, if
is a partial mapping, then
is a partial binary operation, which can be one of the operations in a partial algebra on
, such as the partial groupoid
.
A binary operation on a set
may be viewed as a ternary relation on
, that is, the set of triples
in
for all
and
in
.
Binary operations are the keystone of most structures that are studied in algebra, in particular in semigroups, monoids, groups, rings, fields, and vector spaces.
01Examples
Arithmetic operations like addition (), subtraction (
), and multiplication (
or, using juxtaposition,
) are binary operations on numbers. Division (
or
) is only a partial binary operation on the set of rational numbers and the set of real numbers, because division by zero is undefined, but a (total) binary operation on the set of positive real numbers.
Union (), intersection (
), and set difference (
) are binary operations on sets. There are 16 binary operations on binary variables, such as 'AND', 'OR', and 'XOR'.
If a broad definition of "binary operation" is used, such that the inputs and output do not have to be from the same set, then scalar multiplication () is an binary operator from a scalar and a vector to a vector, and dot product (
) is a binary operator from two vectors to a scalar.
Function composition () is a binary operation on compatible functions.
02Properties
Ways to classify binary operations include:
- The commutative property:
- The associative property:
- Having an identity element
:
- Each element of
having an inverse element:
- Each element of
Sources and credits
This article is adapted from the Wikipedia article “Binary operation”, written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.
Images, from Wikimedia Commons:
- Binary operations as black box.svg by Talonnn, CC0
Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.