Katana VentraIP

Operation (mathematics)

In mathematics, an operation is a function which takes zero or more input values (also called "operands" or "arguments") to a well-defined output value. The number of operands is the arity of the operation.

Not to be confused with Operator (mathematics).

The most commonly studied operations are binary operations (i.e., operations of arity 2), such as addition and multiplication, and unary operations (i.e., operations of arity 1), such as additive inverse and multiplicative inverse. An operation of arity zero, or nullary operation, is a constant.[1][2] The mixed product is an example of an operation of arity 3, also called ternary operation.


Generally, the arity is taken to be finite. However, infinitary operations are sometimes considered,[1] in which case the "usual" operations of finite arity are called finitary operations.


A partial operation is defined similarly to an operation, but with a partial function in place of a function.

Definition[edit]

An n-ary operation ω from X1, …, Xn to Y is a function ω: X1 × … × XnY. The set X1 × … × Xn is called the domain of the operation, the set Y is called the codomain of the operation, and the fixed non-negative integer n (the number of operands) is called the arity of the operation. Thus a unary operation has arity one, and a binary operation has arity two. An operation of arity zero, called a nullary operation, is simply an element of the codomain Y. An n-ary operation can also be viewed as an (n + 1)-ary relation that is total on its n input domains and unique on its output domain.


An n-ary partial operation ω from X1, …, Xn to Y is a partial function ω: X1 × … × XnY. An n-ary partial operation can also be viewed as an (n + 1)-ary relation that is unique on its output domain.


The above describes what is usually called a finitary operation, referring to the finite number of operands (the value n). There are obvious extensions where the arity is taken to be an infinite ordinal or cardinal,[1] or even an arbitrary set indexing the operands.


Often, the use of the term operation implies that the domain of the function includes a power of the codomain (i.e. the Cartesian product of one or more copies of the codomain),[16] although this is by no means universal, as in the case of dot product, where vectors are multiplied and result in a scalar. An n-ary operation ω: XnX is called an internal operation. An n-ary operation ω: Xi × S × Xni − 1X where 0 ≤ i < n is called an external operation by the scalar set or operator set S. In particular for a binary operation, ω: S × XX is called a left-external operation by S, and ω: X × SX is called a right-external operation by S. An example of an internal operation is vector addition, where two vectors are added and result in a vector. An example of an external operation is scalar multiplication, where a vector is multiplied by a scalar and result in a vector.


An n-ary multifunction or multioperation ω is a mapping from a Cartesian power of a set into the set of subsets of that set, formally ω: XnP(X).[17]

Finitary relation

Hyperoperation

Infix notation

Operator

Order of operations