What is the difference between functions and operations?

In summary, the conversation discusses the difference between functions and operations in a mathematical sense. Both have inputs and outputs, but the main distinction is that functions map a domain to a codomain, while operations are performed within the same domain. There is also mention of function operators, which seem to be a type of operator that "maps" one relation to another. However, the precise definition of a function operator is not clear. It is also noted that terms in mathematics may have different meanings in different contexts.
  • #1
rvadd
7
0
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
 
Mathematics news on Phys.org
  • #2
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
rvadd said:
This question is fairly simple: what is the difference between functions and operations.
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.
rvadd said:
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
 
  • #4
jedishrfu said:
not sure in what context but in programming operators work with one or two arguments
Or even three, such as the conditional operator (?:) in C, C++, C#, Java, and other C-based languages
jedishrfu said:
whereas a function can work with none, one, two...n arguments. Both return one object.
 
  • #5
Mark44 said:
Or even three, such as the conditional operator (?:) in C, C++, C#, Java, and other C-based languages

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
Mark44 said:
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.

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
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 [itex]\in[/itex] 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
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
rvadd said:
Wonderful, thank you Best Pokemon. Such concision and clarity should be on Wikipedia.

So operations are performed within the same domain
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.
rvadd said:
, whereas functions map a domain to a codomain. So, the corresponding difference between a function operator
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.
rvadd said:
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?

Let's go back to the examples of your first post in this thread:
f=a+b vs. f(x,y)=x+y

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:
  • #10
Mark44 said:
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 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.

Mark44 said:
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.

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.

Mark44 said:
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.

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
rvadd said:
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.

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

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.

It's certainly not epistemologically unsound.

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

See universal algebra.
 
  • #12
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
rvadd said:
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.
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.
rvadd said:
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...

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.
 

FAQ: What is the difference between functions and operations?

1. What is the difference between a function and an operation?

A function is a mathematical relationship between inputs and outputs, where each input has a unique output. An operation is a mathematical action performed on one or more inputs to produce a final result.

2. How are functions and operations used in mathematics?

Functions are used to describe relationships between variables, while operations are used to manipulate those variables to find a desired result. Both are essential in solving mathematical problems and understanding concepts.

3. Can a function also be considered an operation?

No, a function and an operation serve different purposes in mathematics. A function describes a specific relationship between inputs and outputs, while an operation is a general action or calculation performed on inputs.

4. Are all operations considered functions?

No, not all operations can be considered functions. While all functions can be seen as operations, not all operations are functions because they may not have a unique output for each input.

5. How can functions and operations be applied in real-world situations?

Functions and operations are widely used in fields such as engineering, physics, and economics to model and solve real-world problems. For example, functions can be used to analyze the relationship between variables in a system, while operations can be used to manipulate those variables to optimize a desired outcome.

Similar threads

Back
Top