58
$\begingroup$

Could someone please explain the mathematical difference between an operator (not in the programming sense) and a function? Is an operator a function?

$\endgroup$
5
  • 8
    $\begingroup$ Every operator is a function, but not all functions are operators. Precisely what qualifies a function to be an operator varies with the context -- it might be best to think of "operator" as a context-dependent shorthand for "function of the (particularly nice?) kind we're considering in this subdiscipline". $\endgroup$ Jul 8, 2012 at 21:26
  • $\begingroup$ Thanks @HenningMakholm. Could you please give an example? Is operator a function so frequently used that it is elevated to the status of an operator? Also, there are some properties of operators like associativity for which I am not aware of a counterpart in functions or relations. That makes me believe that oeprators might be fundamentally different from functions. Is that true? $\endgroup$
    – Nik
    Jul 8, 2012 at 21:28
  • $\begingroup$ @HenningMakholm Is not every function an unary operator? At least I see nothing prohibiting us from calling it such. $\endgroup$
    – user31373
    Jul 8, 2012 at 21:47
  • 1
    $\begingroup$ @Leonid: You can certainly choose to make the extra conditions on an operator void when you flesh out the concept for your field of choice. However, there are large areas of mathematics where an "operator" is usually understood to mean "linear transformation" (also known as "linear operator"), and under that convention not all functions are operators. $\endgroup$ Jul 8, 2012 at 21:49
  • $\begingroup$ According to Wikipedia an operator is a function whos domain and co-domain are vector spaces (or more generally modules). $\endgroup$
    – user73994
    Apr 23, 2013 at 16:16

11 Answers 11

25
$\begingroup$

Based on your comment it sounds like you're actually asking about operations, not operators. A binary operation on a set $S$ is a special kind of function; namely, it is a function $S \times S \to S$. That is, it takes as input two elements of $S$ and returns another element of $S$. We can denote such an operation by a symbol such as $a \star b$ and then demand various additional properties of this operation, such as

  • associativity: $(a \star b) \star c = a \star (b \star c)$,
  • commutativity: $a \star b = b \star a$

and so forth. On the other hand, an arbitrary function $f : A \to B$ between two sets only takes a single input and returns an output which is not necessarily of the same type, so one can't speak of associativity or commutativity for such a thing. One might call a function $f : A \to A$ a unary operation but one still can't speak of associativity or commutativity for such a thing.

$\endgroup$
6
  • 3
    $\begingroup$ On the other hand (noted because this seems to confuse the OP), we can also speak of associativity and commutativity in functional notation $f(f(a,b),c)=f(a,f(b,c))$ and $f(a,b)=f(b,a)$. It is conventional to use the word "operation" about $f$ whenever we're particularly interested in properties of this kind, but that linguistic convention does not express any fundamental difference in what the thing is. $\endgroup$ Jul 8, 2012 at 21:57
  • $\begingroup$ Thanks guys. I guess I now have a better understanding. So operations are also functions. $\endgroup$
    – Nik
    Jul 9, 2012 at 0:35
  • $\begingroup$ @Qiaochu Yuan, would you mind shortly explaining the difference between an operator and operation? $\endgroup$
    – bellpeace
    Nov 16, 2012 at 21:24
  • $\begingroup$ @bellpeace: this should be asked as a separate question, except that I think it has already been asked (use Google, not the built-in search). $\endgroup$ Nov 16, 2012 at 22:12
  • 2
    $\begingroup$ Not only are operations functions, but from what I gather, the converse is also true: all functions are operations. Every function is either a unary operation $f:S \to T$ or a $k$-ary operation $f:S_1 \times \cdots \times S_k \to T$. Would anyone disagree with this? $\endgroup$ Sep 1, 2014 at 6:49
10
$\begingroup$

It is a pity that mathematics (being the most exact of all sciences) has some inexact (non-standardized) terms when it comes to certain cases. The terms operator and function are used as synonymous in certain texts but the term operator is used in a a narrower sense (as a special kind of function) in other texts. Hence, it is impossible to say one usage is correct and the other is incorrect. In my view

  1. The reader of a text has to use a concept according to and only according to the definition given in that particular text (contextual meaning),
  2. International standards has to fix these kinds of problems in the future.
$\endgroup$
7
$\begingroup$

Let $A$ and $B$ be ant two sets. Then $f:A\rightarrow B$ is said to be a $\textbf{function}$, if every element of $A$ is mapped to a unique element of $B$. Here requirement for $A$ and $B$ is only arbitrary sets.

Let $V_1,V_2$ be any two vector spaces. A map or a function $T:V_1 \rightarrow V_2$ is an $\textbf{operator}$. Here minimum requirement of $V_1,V_2$ be vector spaces. i.e., some algebraic structure should be there in domain and co-domain.

$\endgroup$
1
  • $\begingroup$ This makes much more sense than the accepted answer. $\endgroup$
    – croraf
    May 1, 2021 at 22:36
3
$\begingroup$

To answer this question, may I suggest that everyone think like this: instead of asking "IS an operator a function?" or "What IS an operator?" etc. we reframe the question like this:

"How are the words 'operator' and 'function' (and, if you like, 'mapping', 'transformation') used when we are talking about mathematics?" [With the understanding that, despite the field being mathematics, we may find that these words are used ambiguously, inconsistently, to describe the same thing in some contexts and different things in others.... and that mathematical notation and vocabulary have emerged from historical usage, rather than being the result of conscious, top-down, rational decisions.]

Another way of approaching it -- really, the same idea as the above but starting from the other end, so to speak -- is to ask about the underlying mathematical reality (in this case, values which are being transformed to yield new values), to which the words "operator", "function" etc. are applied.

A footnote: at least one of the answers above implied that a function, unlike an operator, has only one input. Yes, this is how we start off learning about functions, but we quickly move on to functions of more than one input (those whose graphs describe surfaces, for example).

$\endgroup$
1
$\begingroup$

The difference between an operator and a function is simply that we've decided to call the operator an operator and we've decided to call the function a function. From a formal point of view, that's all there is to your question.

Any deeper meaning to the choice of words is merely a matter of convention -- when someone calls something an operator in some context, you know it is likely to be the sort of object that mathematicians call an operator in that context. So if you have familiarity with how mathematicians speak in a given context, you can infer a little bit more about what meaning the speaker is trying to convey.

In short, there is no difference in denotation; the only difference in the words is their connotation.

$\endgroup$
0
$\begingroup$

I.J. Maddox defines a function in set-theoretical terms as follows: "A function $f$ is defined to be a relation, suc that if $(x,y)\in f$ and $(x,z)\in f$ then $y=z$". He then adds that "four other terms for function are map,mapping, operator and transformation". There is a certain restriction imbedded in this definition, so it may be natural to think of an operator as a more general term, namely, as a relation free from this restriction.

$\endgroup$
2
  • $\begingroup$ I am a little confused about using the terms map, mapping, operator and transformation to a function. I guess mapping is just an assignment from a domain to a co-domain and function has additional constraints of being any-to-one and being defined for all elements of the domain. $\endgroup$
    – Nik
    Jul 9, 2012 at 0:37
  • 1
    $\begingroup$ I agree. A lot if it is a matter of preferred wording. One has to kkep in mind though what one aims to achieve by accepting certain terminology. If all restrictions are removed, you get an object so generic that hardly any useful statement can be made about its properties $\endgroup$
    – Valentin
    Jul 9, 2012 at 15:07
0
$\begingroup$

Incase of Operators co-domain need to be some vector space but in case of function range/codomain need not be vector space.

$\endgroup$
0
$\begingroup$

In Ch.6 of “Specifying systems”, Leslie Lamport distinguishes operators, as entities that take something (say a set), and give you back something (say another set). If the inputs don't form a set, then there does not exist a function that can serve as that operator, because a function must have a domain.

In other words, if an operator can be applied to any set, then the collection of all sets contains all the arguments that we can feed to it. However, in Zermelo-Fraenkel set theory, such a collection is not a set. (Some call it "too big" to be a set. In any case, this is the same issue that Russell's paradox concerns).

$\endgroup$
1
  • $\begingroup$ A relevant thread can be found at the TLA google group. $\endgroup$
    – 0 _
    Oct 26, 2015 at 7:46
0
$\begingroup$

Perhaps this can serve as an example for this discussion, if I'm interpreting the original question correctly, that is:

Use any OPERATIONS

$$1 \left\langle \,\Rule{1.4ex}{0ex}{0.4pt}\,\right\rangle 4 \left\langle \,\Rule{1.4ex}{0ex}{0.4pt}\,\right\rangle 9 \left\langle \,\Rule{1.4ex}{0ex}{0.4pt} \,\right\rangle = 16$$

Where $\,\left\langle \,\Rule{1.4ex}{0ex}{0.4pt}\,\right\rangle\,$ represents the space for an operator

MAKE THIS EQUATION TRUE


This example was posted in Facebook by Brilliant.org. One response that came repeatedly was:

$$1 + 4! - 9 = 16$$

This was immediately challenged by someone who stated that the factorial symbol $\,(!)\,$ represents a function rather than an operation and therefore the proposed answer violates the original requirement that specifies the use of operations. Nearly $400$ ensuing comments were posted in a debate about what constitutes an operator versus a function.

The debate expanded to include a debate on exponentiation (operation vs. function.)

I've Googled various sources on the web and the distinction between a mathematical operator vs. a mathematical function seems to be context dependent. Not as "cut and dried" as I had expected!

I hope this example is useful in terms of this discussion.

$\endgroup$
1
  • $\begingroup$ You are talking about operations, not operators. $\endgroup$ Dec 21, 2015 at 12:15
-1
$\begingroup$

An operator is a mapping from one vector space or module to another. where a function is a map from any arbitrary set to another

$\endgroup$
2
  • $\begingroup$ This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. $\endgroup$
    – BlackAdder
    Jul 21, 2014 at 14:21
  • 1
    $\begingroup$ @BlackAdder Looks like an (attempted) answer to me... $\endgroup$
    – user147263
    Jul 21, 2014 at 15:26
-1
$\begingroup$

I am very late to this interesting discussion, but let me share my own practical view on the difference between function and operator. An operator is normally an infix symbol which works on elements two at a time. A function is not so constrained - witness objections above to the factorial symbol, which is not infix and, at least conceptually, works on multiple elements simultaneously. In short, the difference between function and operator is notational and strongly conventional, not intrinsically mathematical.

$\endgroup$
1
  • $\begingroup$ This won't explain unary operators. $\endgroup$
    – Nik
    Sep 19, 2016 at 18:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.