# Functions vs. Operations

1. Jan 25, 2013

This question is fairly simple: what is the difference between functions and operations. Both seem to have inputs and outputs. Both can input/output scalars, vectors, functions, functionals, etc. I think the sticking point might be mapping, but I'm not sure.

E.g. f=a+b vs. f(x,y)=x+y

2. Jan 25, 2013

### Staff: Mentor

not sure in what context but in programming operators work with one or two arguments whereas a function can work with none, one, two...n arguments. Both return one object.

3. Jan 25, 2013

### Staff: Mentor

You need to be more specific here on what you mean by "operations," a term that has lots of meanings. Do you mean operator, which is a mapping between a vector space and itself.

4. Jan 25, 2013

### Staff: Mentor

Or even three, such as the conditional operator ( in C, C++, C#, Java, and other C-based languages

5. Jan 25, 2013

### Staff: Mentor

Yeah, I forgot that one as I seldom use it. I always considered it syntactic sugar.

As an aside, if you use Scala (better java than Java) then you have unlimited operators as you can define them yourself. Currently the Scala operator set as the following operators:

http://jim-mcbeath.blogspot.com/2008/12/scala-operator-cheat-sheet.html

6. Jan 25, 2013

You are correct, I should be more specific. The question is in a strictly mathematical sense (no computer language syntax). I'll give more examples of what I mean:

Basic Operations: arithmetic, logical, set
Functions: polynomial, transcendental
Operators: differential, integral, composition(?)

I suppose my question now becomes three-fold. What is the difference between all of these? Operations generally take on a binary or unary form. And I realize that examples of ternary and other n-ary operations are usually only seen in computer science, but in terms of mathematics, why are they distinguished from functions? Functions are defined using operations and operators are defined using functions. The distinction here seems to be a bit clearer, but not entirely: can operators simply be functions of functions (a complicated composition of sorts)?

Here is an quote from Wikipedia:
"On the set of real numbers R, f(a,b) = a + b is a binary operation since the sum of two real numbers is a real number."
Are basic operations a type of function then? And operators another type of function?

7. Jan 25, 2013

### Best Pokemon

According to the Oxford Concise Dictionary of Mathematics, these are the definitions of operator, operation and function:

operator: A symbol used to indicate that a mathematical
operation is to be performed on one or more quantities. So √
is an operator acting on one quantity, and ∩ is an operator
which requires two.

operation: An operation on a set S is a rule that associates
with some number of elements of S a resulting element. If this
resulting element is always also in S, then S is said to be
closed under the operation. An operation that associates with
one element of S a resulting element is called a *unary
operation; one that associates with two elements of S a
resulting element is a *binary operation.

function: A function f from S to T, where S and T are
non-empty sets, is a rule that associates with each element of
S (the domain) a unique element of T (the codomain). Thus it
is the same thing as a *mapping. The word 'function' tends to
be used when the domain S is the set R of real numbers, or
some subset of R, and the codomain T is R (see REAL
FUNCTION). The notation f: S → T, read as 'f from S to T', is
used. If x $\in$ S, then f(x) is the image of x under f. The subset
of T consisting of those elements that are images of elements
of S under f, that is, the set {y | y = f(x), for some x in S}, is
the range of f. If f(x) = y, it is said that f maps x to y, written f:
x ? y. If the graph of f is then taken to be y = f(x), it may be
said that y is a function of x. When x = a, f(a) is the
corresponding value of the function.

8. Jan 25, 2013

Wonderful, thank you Best Pokemon. Such concision and clarity should be on Wikipedia.

So operations are performed within the same domain, whereas functions map a domain to a codomain. So, the corresponding difference between a function operator and a function must be that while a function maps a domain to a codomain, the function operator "maps" one relation (a mapping of a domain to a codomain) to another?

Could anyone clarify the definition of such an operator?

9. Jan 26, 2013

### Staff: Mentor

I think you're reading something into what BP said that isn't there. "Operation" is such a broad word that I think it's pointless to try to attach a specific meaning to it, as you seem to be doing. In the quoted definition, it says that an operation on a set S is a rule that ... A set can contain anything.
I have no idea what a "function operator" is. Although it is a good idea to have definitions for the terms used in mathematics, not all terms have precise definitions. Terms that are more specific are defined using terms that are less specific until you get down to the most fundamental terms, which we don't try to nail down. "Operation" would be one of these, IMO, as would "number" and some others.

Other words have different meanings in different contexts. For example, "linear" in the context of linear equations could refer to a straight line, but "linear" in the context of transformations on vector spaces means something else entirely.
Let's go back to the examples of your first post in this thread:
Both equations involve the operation of addition. Using computer science terminology, both equations involve the addition operator, +.

The first equation says that a variable f is equal to the sum of two other variables, a and b. The second equation says that f is a function (or map) from the plane (R2) to the reals (R). The domain here is the entire real plane (I'm assuming that all variables are real numbers, something you didn't explicitly state), and the codomain is the entire real line.

In these examples, the terms "operator" and "operation" are bit players without much of a role. The more important player is the term "function."

Last edited: Jan 26, 2013
10. Jan 26, 2013

I think you are right, I misread the definition. It says an operation only stays on set S if the set S is considered closed under the operation.

Perhaps, then, I am overly philosophical because it is precisely these fundamental terms that I believe need to be nailed down the most. Is there a consensus that these terms are not in the fine print of mathematics? This seems like such a simple lemma to include.

Contextual meaning is important for sure and my oversimplifications seem to fail in this regard. But surely there is a specific definition in some specific context that I seek! To think that math is epistemologically unsound in any regard as not providing concrete definitions is beyond my belief (which is why I thought this would be an easy question).

So a closer reading of PB's post reveals that both are "rules". Besides that, I found another Wiki article stating:
"The familiar binary operations of arithmetic, addition and multiplication, can be viewed as functions from R×R to R. This view is generalized in abstract algebra, where n-ary functions are used to model the operations of arbitrary algebraic structures. For example, an abstract group is defined as a set X and a function f from X×X to X that satisfies certain properties."

I feel the answer I am seeking lies deep within abstract algebra...

11. Jan 26, 2013

### pwsnafu

We have definitions of terms we care about: relations and functions.

It's certainly not epistemologically unsound.

See universal algebra.

12. Jan 26, 2013

### Studiot

We tend to use the terms 'function' and 'operator' to represent different ideas although the boundaries between the ideas are often blurred into insignificance.

However sometimes we wish to distinguish two (or more) different processes that occur within the same statement so we use operator for one and function for the other, although it could be argued that either could be employed twice.

For example consider the difference operator Δxi.

This provides an output equal to the difference between values of x in some table of values of x for x= some function of some other variable, that does not appear explicitly in the operand.

13. Jan 26, 2013

### Staff: Mentor

Yes, perhaps you are being overly philosophical. From a mathematical perspective, there's not much profit in precise definitions of very basic and generic terms such as operation, number, point, and so on.

For example, a circle is usually defined as the set of all points that are equidistant from a fixed point. Do we then need to provide definitions of each word used in this definition? If so, do those definitions have to provide definitions of the words used in those definitions? At some point you need to stop, otherwise you have an infinitely long chain of terms and definitions.
I doubt it. All the quote is saying is that we can view the ordinary arithmetic operations as functions that take pairs of numbers as input, and produce a single number as output. If you have an operation that takes triples (or more) as input, and produces a single number as output. I am oversimplifying a bit, as the sets involved don't necessarily need to be numbers.