When I was learning statistics I noticed that a lot of things in the textbook I was using were phrased in vague terms of "this is a function of that" e.g. a statistic is a function of a sample from a distribution. I realized that while I know the definition of a function as a relation and I have an intuitive notion of what "function of" means, it's unclear to me how you transform this into a rigorous definition of "function of". So what is the actual definition of "function of"?
-
1Very much the same question over at mathoverflow, posed some years later with other interesting answers. – Michael Bächtold Aug 21 '18 at 06:41
-
2@MichaelBächtold thank you! That post on mathoverflow is much better posed than what I had asked ~7 years ago and does contain some really interesting answers. I'm pleased to see someone else finding a similar confusion about this topic. Could you post that link in a response so I can make that the accepted answer? – mgriisser May 23 '20 at 01:38
7 Answers
The modern approach is, as you say, to view a function as a relation. Thus $f\subseteq A\times B$ is a function if it satisfies that if $(a,b)\in f$ and $(a,b')\in f$ then $b=b'$. It is then common to write $f(a)=b$ instead of $(a,b)\in f$.
This is a way to formalize the notion of $f$ defining its output as a function of its input. If you like then, this is the actual definition of 'function of'.
It is helpful to keep in mind the long history of the development of the notion of function. During the early days of the calculus a function $f:\mathbb R \to \mathbb R$ was vaguely defined to mean something like: f is a process that transforms the input $x$ to some output $f(x)$ and moreover $f$ does so in a very smooth way (almost always differentiable).
This historical approach to function, while not rigorous, is more in-line with $y$ being a function of $x$. The modern approach of a function as a relation, while very rigorous, is more static. This may be viewed as a shortcoming of this rigorous definition. However, the formalization of function is simple enough and easily allows abuse of concepts to actually think of a function as some process while it is formally not.
This situation is somewhat similar to the definition of a random variable. A random variable is nothing but a function with a particular domain and codomain. Thus, according to the relational definition, it is a very static thing. Nonetheless, we think of a random variable as a highly variable thing, even as if its value is not yet known or is uncertain. However, this formalization of random variable within the rigorous confines of measure theory is highly useful, allowing one to correctly argue about uncertain events. This goes to show just how powerful the modern axiomatization is - there is enough flexibility in the interpretation of the notion of function to accomodate many situations.

- 443

- 79,840
- 7
- 141
- 236
-
I'm not sure this answers my question. I still don't understand how from this we can determine whether a function is or is not a "function of" a given quantity. – mgriisser Dec 24 '12 at 21:52
-
formally, a function f is a function of x\in A precisely when f is a relation from A to some set B such that the axiom for function-hood is satisfied. – Ittay Weiss Dec 24 '12 at 21:54
-
I don't see an actual definition of "function of" in this answer. It also misrepresents the historical development of the concept of function. See here to get an idea why. – Michael Bächtold Apr 14 '19 at 10:28
"$y$ is a function of $x$" means the value of $y$ is determined by that of $x$. For example, to say that the area of a circle is a function of the radius implies that all circles with the same radius have the same area.
-
+1. I'd add: it also implies that circles with different radii will generally have different areas. – ruakh Dec 25 '12 at 05:29
-
5@ruakh : NO!!! It does not imply that at all! To say that is to say that the function is one-to-one. To say only that it's a function does not imply that it's one-to-one. – Michael Hardy Dec 25 '12 at 19:22
-
Michael's definition is definitely what it means in this context. But, a statistic in general, does not require the constraint given by @ruakh . This a restricted type of statistic (and function), in fact it is usually the case that statistics are given by surjective functions. – Lucas Dec 25 '12 at 19:26
-
1@Lucas : Your point escapes me. What does surjectivity have to do with it? Whether a function is surjective depends on what the target set is. I don't see what it has to do with the present topic. – Michael Hardy Dec 25 '12 at 19:35
-
@MichaelHardy: That's why I said "will generally have". (My point being, you'd never say that the area of a unit circle is a function of the dimension of the n-space it's embedded in.) – ruakh Dec 25 '12 at 19:39
-
@MichaelHardy by surjective I meant, non-injective and surjective (i.e. a surjection but not a bijection). I admit this is probably not the formally correct way of speaking. In other words, I meant it in the "would you like tea or coffee? Tea!" sense. Rather than the "would you like tea or coffee? Yes!" sense. – Lucas Dec 25 '12 at 19:56
-
1@Lucas : I don't see that it even makes sense to speak that way informally. If you mean "not injective", then "not injective" conveys that idea. "Surjective" certainly does not. – Michael Hardy Dec 25 '12 at 20:01
-
@MichaelHardy It is very common in every day speech (not formal languages) to assume a shared disjunctive judgment - i.e. that "tea or coffee" refers to either tea or coffee, not both. Similarly, although the classes of "surjective" and "injective" are not formally disjoint, an informal assumption about disjoint categories when we use natural language allows us to informally use terms like "neither", "surjective","injective" and "both" as referring to disjoint categories. This disjunction is not explicit, and thus assumed and informal, but it is something we (must) do all the time to talk. – Lucas Dec 25 '12 at 20:35
-
1@Lucas : I am well aware of all that, but it makes no sense in this case. It's like asking "Is the new Secretary of State a woman or a Protestant?". – Michael Hardy Dec 25 '12 at 21:50
-
@MichaelHardy If there was a special, well known, term for protestant women (think "bijection"), it would make sense to say "neither", "woman", "Protestant", or "both". Let's put it this way, when I use the word "Catholic" I generally don't mean the pope, (1) because most Catholics are not the pope, but more importantly for the point here (2) because if I meant the pope, I would say "the pope". It does not make no sense absolutely, especially to anyone who has been taught surjective, injective and bijective as the basic way of classifying functions. Assume: If it is a bijection I would say so. – Lucas Dec 27 '12 at 06:56
-
@MichaelHardy I am aware that this particular way of speaking is a constant source of confusion, I can think of whole bodies of literature that are founded such misunderstandings. – Lucas Dec 27 '12 at 06:58
-
1This indeed captures the right intuition, but it's not a rigorous definition as the question asked for. – Michael Bächtold Apr 14 '19 at 10:30
There certainly is a discrepancy between the formal set-theoretic definition ("giving" a function by giving its graph), and the informal use. Another important aspect of the informal use of "function" in practice is to ascertain when one thing $y$ is not "a function of" another thing $x$, which ordinarily means that "when $x$ changes", but everything else is "kept constant", $y$ does not change. A synonymous phrase is "$y$ does not depend on $x$".
How to ascertain whether $y$ "depends on/is a function of" $x$? There is no universal algorithm, and unless the relationship or lack thereof is described adequately, even specific examples are not resolvable. This is especially true of physical measurements, where correlation and causality are not always easy to distinguish.
In purely mathematical situations, often there is some difficulty in "finding" a thing $y$, and one is interested in being able to use "the same $y$" while other things in the environment/context vary. Giving upper bounds or lower bounds or counting something... with an outcome independent of, that is, not a function of, some other thing $x$... is a simpler story. It is not always obvious whether or not this is possible, so it is reasonable to ask the question.
In introductory physical science and engineering discussions, it is typically mathematically useful insofar as it simplifies things to assume (tentatively? heuristically? as a good approximation?) that one thing is independent of another, that is, "is not a function of". The archetype for this is a situation in which one will differentiate implicitly, but, if everything depends on all parameters, a uselessly complicated expression comes out. Using some experimental/physical sense about the physical realities often allows a practically useful approximation by declaring that this doesn't depend on that.

- 52,465
-
I think the problem with this definition of "$y$ does not depend on $x$" is that "everything else" is not well defined. For instance: suppose to have 3 variables $x,y,z$ that satisfy $z=x+y$. Is $y$ independent of $x$? – Michael Bächtold Apr 14 '19 at 10:53
-
@paulgarrett - Hi Paul, I understand this is an old question so I hope you don't mind me asking: would you agree that saying "$y$ depends on $x$" is the same as saying "$y$ is a function of $x$"? This may already be answered in your writing above, but I just wanted to be make sure. – Taylor Rendon Nov 21 '22 at 13:53
-
1@MathDoctor, yes, saying "$y$ depends on $x$" would mostly mean "$y$ is a function of $x$ (and possibly a function of $z$, ... as well)". Though, sure, "depends on" does not necessarily exclude the possibility that $y$ is constant "as a function of $x$", and we might compute that $dy/dx=0$ to verify this. A pedantic person might say that "taking the derivative" does not make sense unless $y$ is some kind of function of $x$... but this is more semantics than mathematics. So, if $y=z^3$ expresses $y$'s "dependence on" $x$ and $z$, ... – paul garrett Nov 21 '22 at 19:19
To answer this question, we must first ask ourselves "what is a variable?" What do I mean when I say that "$x$ is a real number-valued variable"?
I'm going to try and describe one useful approach.
We might think of $x$ as being a placeholder for an unknown but specific number. Or maybe a notation for expressing functions. But it is also useful to be able to consider the variable $x$ as simply being a real number, and not really any different from other real numbers like 0, 1, or $\pi$.
"But what is it's value?" you might ask. That's easy: it's value is $x$. "Is it positive, zero, or negative?" That one's easy too: the answer is "yes". Or more informatively, the truth value of the statement "$x$ is positive" is a variable too.
To distinguish modes of thought, let's reserve the term "real number" for the way we normally think, and use the term "scalar" to refer to real numbers in this new mode of thought.
If you can't wrap your head around this mode of thought, there are alternative semantics for this idea*: you can imagine there is some secret collection of "states", and every real number in this generalized sense is actually a real-valued function whose domain is the collection of states. e.g. in a physics context, the states might be the points in configuration space, and the scalars things like "temperature" or "the $x$-coordinate of the 17th particle".
The measure-theoretic notion of a random variable, or the analytic notion of a scalar field are very much examples of this sort of thing. (Which is why I chose the term "scalar")
Once you can wrap your head around scalars, you can imagine relationships between them. Just as $1$ and $2$ satisfy the relationship $1 + 1 = 2$, our real numbers $x$ and $y$ might satisfy the relationship $x + x = y$, or some more general sort of relationship $f(x,y) = 0$ for an ordinary function $f$. In this case, we say that $x$ and $y$ are functionally related. In the special case we can write $y = f(x)$, then we can say $y$ is a function of $x$.
(Why did I emphasize "ordinary" function? Just like it is useful to form the idea of $x$ being a variable number in the way I've described above, it is also useful to think of variable function in the same way; I wanted to emphasize that we are not doing that in the above paragraph)
If you are stuck thinking of scalars as functions of states, the notation $f(x,y)$ really means the function that sends the state $P$ to the number $f(x(P), y(P))$. A similar sort of composition happens when our scalars are random variables.
*: For those who know such things, I'm describing the internal logic of the topos of sheaves on a discrete space.
-
This should be the top upvoted answer, in an ideal world where mathematicians understand the distinction between a "function" and a "function of". – Michael Bächtold May 23 '20 at 07:25
A function $f$ is called "a function of $x$", if, for each $x$ (in some domain $X$), there is a unique corresponding output, denoted by $f(x)$.
So a statistic is a function of a sample from a distribution means that, given a sample $S$, a statistic takes that sample $S$ and spits out a unique statistic value $f(S)$.

- 22,445
- 3
- 51
- 82
-
1I would say "$f(x)$ is a function of $x$" or "$f$ is a function". – Michael Hardy Dec 25 '12 at 00:29
-
This answer is unfortunately wrong. For instance: you would never call the function that maps very number to its square "a function of $x$". Or if you would, why would you not also call it a function of $y$ or of $z$ etc? – Michael Bächtold Apr 14 '19 at 10:33
Very much the same question was asked several years later on mathoverflow and received a few interesting answers, including one from a fields medalist.

- 1,032
-
7+ years later accepting this answer because I think the linked question both phrases the question better than my own and contains some very thorough and interesting answers. – mgriisser May 23 '20 at 14:34
Let $A$ and $B$ be sets. A relation between $A$ and $B$ is some set $S \subseteq A \times B$. A function on $A$ is a relation between $A$ and $B$ where $B$ is an arbitrary set (call this relation $S \subseteq A \times B$), and if $(a,b) \in S$ and $(a,c) \in S$, then $b=c$.
For example, if we say $f$ is a function of time, and we take time to be any non-negative real number, then we have that $f$ is a subset of $\mathbb{R}_{\geq 0} \times A$ where $A$ is some arbitrary set.

- 3,214