In mathematics, a binary operation or dyadic operation is a rule for combining two elements (called operands) to produce another element. More formally, a binary operation is an operation of arity two.
More specifically, a binary operation on a set is a binary operation whose two domains and the codomain are the same set. Examples include the familiar arithmetic operations of addition, subtraction, and multiplication. Other examples are readily found in different areas of mathematics, such as vector addition, matrix multiplication, and conjugation in groups.
An operation of arity two that involves several sets is sometimes also called a binary operation. For example, scalar multiplication of vector spaces takes a scalar and a vector to produce a vector, and scalar product takes two vectors to produce a scalar. Such binary operations may also be called binary functions.
Binary operations are the keystone of most structures that are studied in algebra, in particular in semigroups, monoids, groups, rings, fields, and vector spaces.
More precisely, a binary operation on a set [math]\displaystyle{ S }[/math] is a mapping of the elements of the Cartesian product [math]\displaystyle{ S \times S }[/math] to [math]\displaystyle{ S }[/math]:[1][2][3]
The closure property of a binary operation expresses the existence of a result for the operation given any pair of operands.[4]
If [math]\displaystyle{ f }[/math] is not a function but a partial function, then [math]\displaystyle{ f }[/math] is called a partial binary operation. For instance, division of real numbers is a partial binary operation, because one can't divide by zero: [math]\displaystyle{ \frac{a}{0} }[/math] is undefined for every real number [math]\displaystyle{ a }[/math]. In both model theory and classical universal algebra, binary operations are required to be defined on all elements of [math]\displaystyle{ S \times S }[/math]. However, partial algebras[5] generalize universal algebras to allow partial operations.
Sometimes, especially in computer science, the term binary operation is used for any binary function.
Typical examples of binary operations are the addition ([math]\displaystyle{ + }[/math]) and multiplication ([math]\displaystyle{ \times }[/math]) of numbers and matrices as well as composition of functions on a single set. For instance,
Many binary operations of interest in both algebra and formal logic are commutative, satisfying [math]\displaystyle{ f(a,b)=f(b,a) }[/math] for all elements [math]\displaystyle{ a }[/math] and [math]\displaystyle{ b }[/math] in [math]\displaystyle{ S }[/math], or associative, satisfying [math]\displaystyle{ f(f(a,b),c)=f(a,f(b,c)) }[/math] for all [math]\displaystyle{ a }[/math], [math]\displaystyle{ b }[/math], and [math]\displaystyle{ c }[/math] in [math]\displaystyle{ S }[/math]. Many also have identity elements and inverse elements.
The first three examples above are commutative and all of the above examples are associative.
On the set of real numbers [math]\displaystyle{ \mathbb R }[/math], subtraction, that is, [math]\displaystyle{ f(a,b)=a-b }[/math], is a binary operation which is not commutative since, in general, [math]\displaystyle{ a-b \neq b-a }[/math]. It is also not associative, since, in general, [math]\displaystyle{ a-(b-c) \neq (a-b)-c }[/math]; for instance, [math]\displaystyle{ 1-(2-3)=2 }[/math] but [math]\displaystyle{ (1-2)-3=-4 }[/math].
On the set of natural numbers [math]\displaystyle{ \mathbb N }[/math], the binary operation exponentiation, [math]\displaystyle{ f(a,b)=a^b }[/math], is not commutative since, [math]\displaystyle{ a^b \neq b^a }[/math] (cf. Equation xy = yx), and is also not associative since [math]\displaystyle{ f(f(a,b),c) \neq f(a,f(b,c)) }[/math]. For instance, with [math]\displaystyle{ a=2 }[/math], [math]\displaystyle{ b=3 }[/math], and [math]\displaystyle{ c=2 }[/math], [math]\displaystyle{ f(2^3,2)=f(8,2)=8^2=64 }[/math], but [math]\displaystyle{ f(2,3^2)=f(2,9)=2^9=512 }[/math]. By changing the set [math]\displaystyle{ \mathbb N }[/math] to the set of integers [math]\displaystyle{ \mathbb Z }[/math], this binary operation becomes a partial binary operation since it is now undefined when [math]\displaystyle{ a=0 }[/math] and [math]\displaystyle{ b }[/math] is any negative integer. For either set, this operation has a right identity (which is [math]\displaystyle{ 1 }[/math]) since [math]\displaystyle{ f(a,1)=a }[/math] for all [math]\displaystyle{ a }[/math] in the set, which is not an identity (two sided identity) since [math]\displaystyle{ f(1,b) \neq b }[/math] in general.
Division ([math]\displaystyle{ \div }[/math]), a partial binary operation on the set of real or rational numbers, is not commutative or associative. Tetration ([math]\displaystyle{ \uparrow\uparrow }[/math]), as a binary operation on the natural numbers, is not commutative or associative and has no identity element.
Binary operations are often written using infix notation such as [math]\displaystyle{ a \ast b }[/math], [math]\displaystyle{ a+b }[/math], [math]\displaystyle{ a \cdot b }[/math] or (by juxtaposition with no symbol) [math]\displaystyle{ ab }[/math] rather than by functional notation of the form [math]\displaystyle{ f(a, b) }[/math]. Powers are usually also written without operator, but with the second argument as superscript.
Binary operations are sometimes written using prefix or (more frequently) postfix notation, both of which dispense with parentheses. They are also called, respectively, Polish notation [math]\displaystyle{ \ast a b }[/math] and reverse Polish notation [math]\displaystyle{ a b \ast }[/math].
A binary operation [math]\displaystyle{ f }[/math] on a set [math]\displaystyle{ S }[/math] may be viewed as a ternary relation on [math]\displaystyle{ S }[/math], that is, the set of triples [math]\displaystyle{ (a, b, f(a,b)) }[/math] in [math]\displaystyle{ S \times S \times S }[/math] for all [math]\displaystyle{ a }[/math] and [math]\displaystyle{ b }[/math] in [math]\displaystyle{ S }[/math].
For example, scalar multiplication in linear algebra. Here [math]\displaystyle{ K }[/math] is a field and [math]\displaystyle{ S }[/math] is a vector space over that field.
Also the dot product of two vectors maps [math]\displaystyle{ S \times S }[/math] to [math]\displaystyle{ K }[/math], where [math]\displaystyle{ K }[/math] is a field and [math]\displaystyle{ S }[/math] is a vector space over [math]\displaystyle{ K }[/math]. It depends on authors whether it is considered as a binary operation.
Original source: https://en.wikipedia.org/wiki/Binary operation.
Read more |