There are two common types of operations: unary and binary.
Unary operations involve only one value, such as negation and trigonometric functions.
[3] Binary operations, on the other hand, take two values, and include addition, subtraction, multiplication, division, and exponentiation.
[6][7][8] Operations on functions include composition and convolution.
Operations can involve dissimilar objects: a vector can be multiplied by a scalar to form another vector (an operation known as scalar multiplication),[13] and the inner product operation on two vectors produces a quantity that is scalar.
[14][15] An operation may or may not have certain properties, for example it may be associative, commutative, anticommutative, idempotent, and so on.
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.