TheInfoList In
mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). It has no generally ...
, an operation is a
function Function or functionality may refer to: Computing * Function key A function key is a key on a computer A computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations automatically. Modern comp ...
which takes zero or more input values (called ''
operand In mathematics an operand is the object of a mathematical operation, i.e., it is the object or quantity that is operated on. Example The following arithmetic expression shows an example of operators and operands: :3 + 6 = 9 In the above example, ...
s'') to a well-defined output value. The number of operands (also known as arguments) is the
arity Arity () is the number of arguments In logic Logic (from Ancient Greek, Greek: grc, wikt:λογική, λογική, label=none, lit=possessed of reason, intellectual, dialectical, argumentative, translit=logikḗ)Also related to (''logo ...
of the operation. The most commonly studied operations are
binary operation In mathematics, a binary operation or dyadic operation is a calculation that combines two elements (called operands) to produce another element. More formally, a binary operation is an Operation (mathematics), operation of arity two. More specif ...
s (i.e., operations of arity 2), such as
addition Addition (usually signified by the plus symbol ) is one of the four basic operations of arithmetic Arithmetic (from the Ancient Greek, Greek wikt:en:ἀριθμός#Ancient Greek, ἀριθμός ''arithmos'', 'number' and wikt:en:τική#An ...
and
multiplication Multiplication (often denoted by the cross symbol , by the mid-line dot operator , by juxtaposition, or, on computers, by an asterisk ) is one of the four elementary Operation (mathematics), mathematical operations of arithmetic, with the ... , and
unary operation In mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). It ...
s (i.e., operations of arity 1), such as
additive inverse In mathematics, the additive inverse of a number A number is a mathematical object A mathematical object is an abstract concept arising in mathematics. In the usual language of mathematics, an ''object'' is anything that has been (or could be) ...
and
multiplicative inverse Image:Hyperbola one over x.svg, thumbnail, 300px, alt=Graph showing the diagrammatic representation of limits approaching infinity, The reciprocal function: . For every ''x'' except 0, ''y'' represents its multiplicative inverse. The graph forms a r ... . An operation of arity zero, or
nullary operation Arity () is the number of arguments In logic and philosophy, an argument is a series of statements (in a natural language), called the premises or premisses (both spellings are acceptable), intended to determine the degree of truth of another st ...
, is a
constant Constant or The Constant may refer to: Mathematics * Constant (mathematics) In mathematics, the word constant can have multiple meanings. As an adjective, it refers to non-variance (i.e. unchanging with respect to some other Value (mathematics ...
. The
mixed product In geometry Geometry (from the grc, γεωμετρία; ''wikt:γῆ, geo-'' "earth", ''wikt:μέτρον, -metron'' "measurement") is, with arithmetic, one of the oldest branches of mathematics. It is concerned with properties of space tha ...
is an example of an operation of arity 3, also called
ternary operationIn mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). It ha ...
. Generally, the arity is taken to be finite. However,
infinitary operation In mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). It ...
s 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 place of a function.

Types of operation There are two common types of operations: unary and
binary Binary may refer to: Science and technology Mathematics * Binary number In mathematics and digital electronics, a binary number is a number A number is a mathematical object used to counting, count, measurement, measure, and nominal ...
. Unary operations involve only one value, such as
negation In logic Logic (from Ancient Greek, Greek: grc, wikt:λογική, λογική, label=none, lit=possessed of reason, intellectual, dialectical, argumentative, translit=logikḗ)Also related to (''logos''), "word, thought, idea, argume ... and
trigonometric function In mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). I ... s. Binary operations, on the other hand, take two values, and include
addition Addition (usually signified by the plus symbol ) is one of the four basic operations of arithmetic Arithmetic (from the Ancient Greek, Greek wikt:en:ἀριθμός#Ancient Greek, ἀριθμός ''arithmos'', 'number' and wikt:en:τική#An ...
,
subtraction Subtraction is an arithmetic operation that represents the operation of removing objects from a collection. Subtraction is signified by the minus sign, . For example, in the adjacent picture, there are apples—meaning 5 apples with 2 taken awa ... ,
multiplication Multiplication (often denoted by the cross symbol , by the mid-line dot operator , by juxtaposition, or, on computers, by an asterisk ) is one of the four elementary Operation (mathematics), mathematical operations of arithmetic, with the ... ,
division Division or divider may refer to: Mathematics *Division (mathematics), the inverse of multiplication *Division algorithm, a method for computing the result of mathematical division Military *Division (military), a formation typically consisting o ...
, and
exponentiation Exponentiation is a mathematical operation, written as , involving two numbers, the '' base'' and the ''exponent'' or ''power'' , and pronounced as " raised to the power of ". When is a positive integer An integer (from the Latin wikt: ...
. Operations can involve mathematical objects other than numbers. The logical values ''true'' and ''false'' can be combined using
logic operation In mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). It ...
s, such as ''and'', ''or,'' and ''not''.
Vectors Vector may refer to: Biology *Vector (epidemiology), an agent that carries and transmits an infectious pathogen into another living organism; a disease vector *Vector (molecular biology), a DNA molecule used as a vehicle to artificially carr ...
Rotation A rotation is a circular movement of an object around a center (or point) of rotation. The plane (geometry), geometric plane along which the rotation occurs is called the ''rotation plane'', and the imaginary line extending from the center an ... s can be combined using the
function composition In mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). ...
operation, performing the first rotation and then the second. Operations on sets include the binary operations '' union'' and ''
intersection The line (purple) in two points (red). The disk (yellow) intersects the line in the line segment between the two red points. In mathematics, the intersection of two or more objects is another, usually "smaller" object. Intuitively, the inter ...
'' and the unary operation of ''
complementation A complement is often something that completes something else, or at least adds to it in some useful way. Thus it may be: * Complement (linguistics), a word or phrase having a particular syntactic role ** Subject complement, a word or phrase addi ...
''. Operations on
function Function or functionality may refer to: Computing * Function key A function key is a key on a computer A computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations automatically. Modern comp ...
s include
composition Composition or Compositions may refer to: Arts * Composition (dance), practice and teaching of choreography * Composition (music), an original piece of music and its creation *Composition (visual arts) The term composition means "putting togethe ...
and
convolution In mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). ...
. Operations may not be defined for every possible value of its ''
domain Domain may refer to: Mathematics *Domain of a function, the set of input values for which the (total) function is defined **Domain of definition of a partial function **Natural domain of a partial function **Domain of holomorphy of a function *Doma ...
''. 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 Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). It ... '', but the set of actual values attained by the operation is its codomain of definition, active codomain, ''
image File:TEIDE.JPG, An Synthetic aperture radar, SAR radar imaging, radar image acquired by the SIR-C/X-SAR radar on board the Space Shuttle Endeavour shows the Teide volcano. The city of Santa Cruz de Tenerife is visible as the purple and white a ...
'' or ''
range Range may refer to: Geography * Range (geographic), a chain of hills or mountains; a somewhat linear, complex mountainous or hilly area (cordillera, sierra) ** Mountain range, a group of mountains bordered by lowlands * Range, a term used to ...
''. 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 Scalar may refer to: *Scalar (mathematics), an element of a field, which is used to define a vector space, usually the field of real numbers *Scalar (physics), a physical quantity that can be described by a single element of a number field such as ...
to form another vector (an operation known as
scalar multiplication 250px, The scalar multiplications −a and 2a of a vector a In mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry ... ), and the
inner product In mathematics, an inner product space or a Hausdorff space, Hausdorff pre-Hilbert space is a vector space with a binary operation called an inner product. This operation associates each pair of vectors in the space with a Scalar (mathematics), ...
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 In mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). ...
,
commutative In mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). I ...
,
anticommutative In mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). It h ...
,
idempotent Idempotence (, ) is the property of certain operations in mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), an ...
, 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 switches to "addition operator" (rarely "operator of addition"), when focusing on the process, or from the more symbolic viewpoint, the function .

Definition

An ''n''-ary operation ''ω'' from to ''Y'' is a
function Function or functionality may refer to: Computing * Function key A function key is a key on a computer A computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations automatically. Modern comp ...
. The set 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 Arity () is the number of arguments In logic Logic (from Ancient Greek, Greek: grc, wikt:λογική, λογική, label=none, lit=possessed of reason, intellectual, dialectical, argumentative, translit=logikḗ)Also related to (''logo ...
'' of the operation. Thus a
unary operation In mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). It ...
has arity one, and a
binary operation In mathematics, a binary operation or dyadic operation is a calculation that combines two elements (called operands) to produce another element. More formally, a binary operation is an Operation (mathematics), operation of arity two. More specif ...
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 to ''Y'' is a
partial function . 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 may refer to: Christianity * Cardinal (Catholic Church), a senior official of the Catholic Church * Cardinal (Church of England), two members of the College of Minor Canons of St. Paul's Cathedral Navigation * Cardina ...
, 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 Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). I ...
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'' is often also used more generally to mean a symmetric bilinear form, for example for a pseudo-Euclidean space. is an algebraic operation that takes two equal-length seque ...
, where vectors are multiplied and result in a scalar. An ''n''-ary operation is called an internal operation. 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 In mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). I ... , where two vectors are added and result in a vector. An example of an external operation is
scalar multiplication 250px, The scalar multiplications −a and 2a of a vector a In mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry ... , where a vector is multiplied by a scalar and result in a vector. 