Definition:Operation
Contents |
Informal Definition
An operation (or operator) is an object, identified by a symbol, which can be interpreted as a process which, from a number of objects, creates a new object.
Formal Definition
n-Ary Operation
An $n$-ary operation is a mapping $\circ$ from a cartesian product of $n$ sets $S_1 \times S_2 \times \ldots \times S_n$ to a universal set $\mathbb U$:
- $\circ: S_1 \times S_2 \times \ldots \times S_n \to \mathbb U: \forall \left({s_1, s_2, \ldots, s_n}\right) \in S_1 \times S_2 \times \ldots \times S_n: \circ \left({s_1, s_2, \ldots, s_n}\right) = t \in \mathbb U$
An $n$-ary operation needs to be defined for all tuples in $S_1 \times S_2 \times \ldots \times S_n$.
Arity
The number of operands an operator takes is called its arity or its valency.
The following terminology is common:
- A $0$-ary operation is called a constant operation.
- A $1$-ary (resp. $2$-ary, resp. $3$-ary) operation is called a unary (resp. binary, resp. ternary) operation.
- An $n$-ary operation for some natural number $n$ is called finitary.
Operation on a Set
An $n$-ary operation on a set $S$ is an operation where the domain is the cartesian space $S^n$ and the codomain is $S$:
- $\circ: S^n \to S: \forall \left({s_1, s_2, \ldots, s_n}\right) \in S^n: \circ \left({s_1, s_2, \ldots, s_n}\right) = t \in S$
An $n$-ary operation on $S$ needs to be defined for all tuples in $S^n$.
Operand
An operand is one of the objects on which an operator generates its new object.
Unary Operation
A unary operation is the special case of an operation where the operation has exactly one operand.
Thus, a unary operation on a set $S$ is a mapping whose domain and codomain are both $S$.
Binary Operation
A binary operation is the special case of an operation where the operation has exactly two operands.
A binary operation is a mapping $\circ$ from the Cartesian product of two sets $S \times T$ to a universe $\mathbb U$:
- $\circ: S \times T \to \mathbb U: \circ \left ({s, t}\right) = y \in \mathbb U$
If $S = T$, then $\circ$ can be referred to as a binary operation on $S$.
Note that a binary operation is a special case of a general operator, i.e. one that has two operands.
If $\circ$ is a binary operation on $S$, then for any $T \subseteq S$, $\circ \left ({x, y}\right)$ is defined for every $x, y \in T$. So $\circ$ is a binary operation on every $T \subseteq S$.
Infix Notation
A far more common alternative to the notation $\circ \left ({x, y}\right) = z$, which works for a binary operation, is to put the symbol for the operation between the two operands: $z = x \circ y$.
This is called infix notation.
Product
For a given operation $\circ$, let $z = x \circ y$.
Then $z$ is called the product of $x$ and $y$.
This is an extension of the normal definition of product that is encountered in conventional arithmetic.
Nomenclature
Some authors use the term (binary) composition or law of composition for (binary) operation.
Most authors use $\circ$ for composition of relations (which, if you think about it, is itself an operation) as well as for a general operation. To avoid confusion, some authors use $\bullet$ for composition of relations to avoid ambiguity.
Some authors use $\intercal$ (or a variant) called truc (pronounced trook, French for trick or technique
Comment
It can be seen that, in the same way that a mapping can be seen as a way of "transforming" one element into to another, an operation does the same thing, just with a larger number of operands.
In fact, as we have just defined it, we see that an operation is a generalisation of the concept of the mapping, or (if you like) a mapping is just an operation with only one operand.
There is another way to view an operation. Instead of viewing it as the act of combining two things in a certain way to get a third, we can look upon it as doing something to the first thing with the second to turn it into the third.
Thus, $\circ \left ({a, b}\right)$ can be interpreted as $\circ_b \left ({a}\right)$, where $\circ_b$ is defined as the mapping which performs "$\circ_b$" on a single operand.
For example, take the statement "$1 + 2 = 3$", where the symbol $+$ represents the familiar binary operation of addition of numbers. Thus, we can either view $+$ as being the operation that takes $1$ and $2$ and maps them onto $3$, or we can say that we take $1$, and then we do something to it: we "add $2$", and this turns the $1$ into $3$.
In the case of addition, in a certain sense the first interpretation comes to mind more easily than the second, but if we take the statement "$3 - 2 = 1$", it's more natural to think of this as "doing something" to $3$, that is, to take $2$ off it, to change it into something smaller, that is, $1$.
Both interpretations are equally valid, but depending on the circumstances, one may be more appropriate than the other.
Examples
An example of an operator, from conventional arithmetic, is "$+$", as in, for example, "$2 + 3 = 5$". The operands (in this particular instance) are $2$ and $3$.
References
- ↑ T.S. Blyth: Set Theory and Abstract Algebra (1975):
The symbol $\intercal$ is called truc ("trook") and is French for "thingummyjig"! The idea it conveys is that what we call our law of composition does not matter, for what we are really interested in are sets of objects and mappings between them.
Sources
- B. Hartley and T.O. Hawkes: Rings, Modules and Linear Algebra (1970): $\S 1.1$
- H. Jerome Keisler and Joel Robbin: Mathematical Logic and Computability (1996): Appendix $\text{A}.8$