First of all, let me begin by saying that my question is in the context of mathematics only and not computer science or anything.

  1. Are operations and functions, the same thing?

I read the definition of operations on Wikipedia https://en.m.wikipedia.org/wiki/Operation_(mathematics) and it defines operations as a function, from which I can conclude that all operations are certain type of functions.

But this brings me to ask, "Are all functions, operations too?" Now before you tell me to refer to the definition which I've already done, I still ask this because honestly I don't quite feel like I've understood the language.

  1. Is there a difference between the use of words operators and operations, or are they synonymous?

The reason I ask these 2 questions is because I've heard quite a few times that operators (or operations, I'm sorry, I'm not sure which of the two exactly was it) and functions are not the same from my professors in high school and now that I look up, I keep wondering what they could've meant by that?

Again, this happened in a certain Algebra (Math) lecture, and this has nothing to do with the terminologies of computer science.


1 Answer 1


Every operation is a type of function. Not every function is a type of operation. An "operator" is a type of operation, hence a type of function. But not every operation is an operator.

If $A$ and $B$ are sets, a function $f$ from $A$ to $B$ is a subset of $A\times B$ that satisfies the following two conditions:

  1. For each $a\in A$ there exists $b\in B$ such that $(a,b)\in f$; and
  2. For each $a\in A$, if $b,b'\in B$ are such that $(a,b)\in f$ and $(a,b')\in f$, then $b=b'$.

If $f$ is a function, and $(a,b)\in f$, we denote this by writing $f(a)=b$. If $f$ is a function from $A$ to $B$, we denote this by writing $f\colon A\to B$.

If $A$ is a set and $n$ is an ordinal (think finite number, but you can do it more generally), then an $n$-ary operation on $A$ is a function $f\colon A^n\to A$. Note in particular that for a function to be an operation, there must exist a set $A$ such that the domain of $f$ is of the form $A^n$ for some ordinal $n$, and the codomain of $f$ is the set $A$.

An operator is a $1$-ary operation, that is a function $f\colon A\to A$. However, that type of nomenclature is usually reserved for specific circumstances, such as a linear function from a vector space to itself rather than in general.

The function mapping $\mathbb{Q}$ to $\mathbb{R}$ by sending $a\in\mathbb{Q}$ to $a\sqrt{2}\in \mathbb{R}$ is a function, but not an operation.

The function mapping $\mathbb{R}^2\to\mathbb{R}$ by sending $(a,b)$ to $a+b$ is a (binary) operation on $\mathbb{R}$, but not an operator on $\mathbb{R}$.

The function $T\colon \mathbb{R}\to\mathbb{R}$ given by $T(x)=2x+1$ is a (unary) operation on $\mathbb{R}$. It is also a function from $\mathbb{R}$ to itself; it is also an operator on $\mathbb{R}$, though we don't usually refer to it that way.

  • $\begingroup$ Thank you Arturo for this lovely answer. This makes everything so perfectly clear. I'll write it down in my notes now. $\endgroup$
    – William
    Dec 18, 2019 at 10:14
  • $\begingroup$ I have a few questions regarding this answer. Is it okay to use this notation, $R : A \to B$ for any relation $R$, which may not necessarily be a function? Second : are terms "functions" and "mappings" synonymous? Or are "mappings" and "relations" synonyms? Or is the word "mapping" a completely different thing? Thank you again! $\endgroup$
    – William
    Dec 18, 2019 at 10:20
  • 1
    $\begingroup$ @William: It is very uncommon to use the notation "$A\to B$" for relations that are not functions. One could, but it is bound to be confusing. It is more common to use $R\subseteq A\times B$ for an arbitrary relation. "Function" and "Map" is usually synonymous. $\endgroup$ Dec 18, 2019 at 18:47
  • 1
    $\begingroup$ @ArturoMagidin what about in the case when the domain and range are not explicitly stated but the function is still called an operator/operation? Like the 'derivative operator'. $\endgroup$
    – KraZZ
    Jul 15, 2021 at 11:23
  • 2
    $\begingroup$ @KraZZ: That's a (partial) operator on the set of functions. $\endgroup$ Jul 15, 2021 at 13:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .