
In
mathematics
Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, an operation is a
function from a
set to itself. For example, an operation on
real numbers
In mathematics, a real number is a number that can be used to measurement, measure a continuous variable, continuous one-dimensional quantity such as a time, duration or temperature. Here, ''continuous'' means that pairs of values can have arbi ...
will take in real numbers and return a real number. An operation can take zero or more input values (also called "''
operands''" or "arguments") to a well-defined output value. The number of operands is the
arity
In logic, mathematics, and computer science, arity () is the number of arguments or operands taken by a function, operation or relation. In mathematics, arity may also be called rank, but this word can have many other meanings. In logic and ...
of the operation.
The most commonly studied operations are
binary operation
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 ...
s (i.e., operations of arity 2), such as
addition
Addition (usually signified by the Plus and minus signs#Plus sign, plus symbol, +) is one of the four basic Operation (mathematics), operations of arithmetic, the other three being subtraction, multiplication, and Division (mathematics), divis ...
and
multiplication
Multiplication is one of the four elementary mathematical operations of arithmetic, with the other ones being addition, subtraction, and division (mathematics), division. The result of a multiplication operation is called a ''Product (mathem ...
, and
unary operations (i.e., operations of arity 1), such as
additive inverse
In mathematics, the additive inverse of an element , denoted , is the element that when added to , yields the additive identity, 0 (zero). In the most familiar cases, this is the number 0, but it can also refer to a more generalized zero el ...
and
multiplicative inverse
In mathematics, a multiplicative inverse or reciprocal for a number ''x'', denoted by 1/''x'' or ''x''−1, is a number which when Multiplication, multiplied by ''x'' yields the multiplicative identity, 1. The multiplicative inverse of a ra ...
. An operation of
arity
In logic, mathematics, and computer science, arity () is the number of arguments or operands taken by a function, operation or relation. In mathematics, arity may also be called rank, but this word can have many other meanings. In logic and ...
zero, or
nullary operation, is a
constant.
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,
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 mathematics, a partial function from a set to a set is a function from a subset of (possibly the whole itself) to . The subset , that is, the '' domain'' of viewed as a function, is called the domain of definition or natural domain ...
in place of a function.
Types of operation

There are two common types of operations:
unary and
binary. Unary operations involve only one value, such as
negation
In logic, negation, also called the logical not or logical complement, is an operation (mathematics), operation that takes a Proposition (mathematics), proposition P to another proposition "not P", written \neg P, \mathord P, P^\prime or \over ...
and
trigonometric functions. Binary operations, on the other hand, take two values, and include
addition
Addition (usually signified by the Plus and minus signs#Plus sign, plus symbol, +) is one of the four basic Operation (mathematics), operations of arithmetic, the other three being subtraction, multiplication, and Division (mathematics), divis ...
,
subtraction,
multiplication
Multiplication is one of the four elementary mathematical operations of arithmetic, with the other ones being addition, subtraction, and division (mathematics), division. The result of a multiplication operation is called a ''Product (mathem ...
,
division, and
exponentiation
In mathematics, exponentiation, denoted , is an operation (mathematics), operation involving two numbers: the ''base'', , and the ''exponent'' or ''power'', . When is a positive integer, exponentiation corresponds to repeated multiplication ...
.
Operations can involve mathematical objects other than numbers. The
logical values ''true'' and ''false'' can be combined using
logic operations, such as ''and'', ''or,'' and ''not''.
Vectors can be added and subtracted.
Rotation
Rotation or rotational/rotary motion is the circular movement of an object around a central line, known as an ''axis of rotation''. A plane figure can rotate in either a clockwise or counterclockwise sense around a perpendicular axis intersect ...
s can be combined using the
function composition operation, performing the first rotation and then the second. Operations on
sets include the binary operations ''
union'' and ''
intersection
In mathematics, the intersection of two or more objects is another object consisting of everything that is contained in all of the objects simultaneously. For example, in Euclidean geometry, when two lines in a plane are not parallel, their ...
'' and the unary operation of ''
complementation''. Operations on
functions include
composition and
convolution
In mathematics (in particular, functional analysis), convolution is a operation (mathematics), mathematical operation on two function (mathematics), functions f and g that produces a third function f*g, as the integral of the product of the two ...
.
Operations may not be defined for every possible value of its ''
domain''. For example, in the real numbers one cannot divide by zero or take square roots of negative numbers. The values for which an operation is defined form a set called its ''domain of definition'' or ''active domain''. The set which contains the values produced is called the ''
codomain
In mathematics, a codomain, counter-domain, or set of destination of a function is a set into which all of the output of the function is constrained to fall. It is the set in the notation . The term '' range'' is sometimes ambiguously used to ...
'', but the set of actual values attained by the operation is its codomain of definition, active codomain, ''
image
An image or picture is a visual representation. An image can be Two-dimensional space, two-dimensional, such as a drawing, painting, or photograph, or Three-dimensional space, three-dimensional, such as a carving or sculpture. Images may be di ...
'' or ''
range''. For example, in the real numbers, the squaring operation only produces non-negative numbers; the codomain is the set of real numbers, but the range is the non-negative numbers.
Operations can involve dissimilar objects: a vector can be multiplied by a
scalar to form another vector (an operation known as
scalar multiplication), and the
inner product
In mathematics, an inner product space (or, rarely, a Hausdorff pre-Hilbert space) is a real vector space or a complex vector space with an operation called an inner product. The inner product of two vectors in the space is a scalar, ofte ...
operation on two vectors produces a quantity that is scalar. An operation may or may not have certain properties, for example it may be
associative,
commutative
In mathematics, a binary operation is commutative if changing the order of the operands does not change the result. It is a fundamental property of many binary operations, and many mathematical proofs depend on it. Perhaps most familiar as a pr ...
,
anticommutative,
idempotent, and so on.
The values combined are called ''operands'', ''arguments'', or ''inputs'', and the value produced is called the ''value'', ''result'', or ''output''. Operations can have fewer or more than two inputs (including the case of zero input and infinitely many inputs
).
An operator is similar to an operation in that it refers to the symbol or the process used to denote the operation. Hence, their point of view is different. For instance, one often speaks of "the operation of addition" or "the addition operation," when focusing on the operands and result, but one switch to "addition operator" (rarely "operator of addition"), when focusing on the process, or from the more symbolic viewpoint, the function (where X is a set such as the set of real numbers).
Definition
An ''n''-ary operation ''ω'' on a
set ''X'' is a
function . The set is called the ''domain'' of the operation, the output set is called the ''
codomain
In mathematics, a codomain, counter-domain, or set of destination of a function is a set into which all of the output of the function is constrained to fall. It is the set in the notation . The term '' range'' is sometimes ambiguously used to ...
'' of the operation, and the fixed non-negative integer ''n'' (the number of operands) is called the ''
arity
In logic, mathematics, and computer science, arity () is the number of arguments or operands taken by a function, operation or relation. In mathematics, arity may also be called rank, but this word can have many other meanings. In logic and ...
'' of the operation. Thus a
unary operation has arity one, and a
binary operation
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 ...
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 -ary
relation that is
total on its ''n'' input domains and
unique on its output domain.
An ''n''-ary partial operation ''ω'' from is a
partial function
In mathematics, a partial function from a set to a set is a function from a subset of (possibly the whole itself) to . The subset , that is, the '' domain'' of viewed as a function, is called the domain of definition or natural domain ...
. An ''n''-ary partial operation can also be viewed as an -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
Cardinal or The Cardinal most commonly refers to
* Cardinalidae, a family of North and South American birds
**''Cardinalis'', genus of three species in the family Cardinalidae
***Northern cardinal, ''Cardinalis cardinalis'', the common cardinal of ...
,
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
In mathematics, specifically set theory, the Cartesian product of two sets and , denoted , is the set of all ordered pairs where is an element of and is an element of . In terms of set-builder notation, that is
A\times B = \.
A table c ...
of one or more copies of the codomain), although this is by no means universal, as in the case of
dot product
In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a Scalar (mathematics), scalar as a result". It is also used for other symmetric bilinear forms, for example in a pseudo-Euclidean space. N ...
, where vectors are multiplied and result in a scalar. An ''n''-ary operation is called an . An ''n''-ary operation where is called an external operation by the ''scalar set'' or ''operator set'' ''S''. In particular for a binary operation, is called a left-external operation by ''S'', and 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 ''ω'' is a mapping from a Cartesian power of a set into the set of subsets of that set, formally
.
See also
*
Finitary relation
In mathematics, a finitary relation over a sequence of sets is a subset of the Cartesian product ; that is, it is a set of ''n''-tuples , each being a sequence of elements ''x'i'' in the corresponding ''X'i''. Typically, the relation descri ...
*
Hyperoperation
*
Infix notation
*
Operator (mathematics)
In mathematics, an operator is generally a Map (mathematics), mapping or function (mathematics), function that acts on elements of a space (mathematics), space to produce elements of another space (possibly and sometimes required to be the same ...
*
Order of operations
References
{{DEFAULTSORT:Operation (Mathematics)
Elementary mathematics