I understand that a function is defined as a correspondence between two sets, the domain and the range.

While the definitions of the domain of a function and the range of a function are said to be contained within the definition of a function.

Now, when a measurement varies over time we say that it is a function of time. Why is it not generally acceptable to replace the word "measurement" with range and the word "time" with domain, and say that the range is a function of the domain, the same way as we say y is a function of x?

  • 6
    $\begingroup$ The domain and range are sets, not functions or variables. When we informally talk about "measurement" as a function of "time", by "measurement" we don't mean the range of the function, we mean the function that maps to the thing that is measured. By "time" we don't mean the domain of the function, we mean the variable $t$. $\endgroup$ – user137731 Jan 8 '16 at 3:57
  • 3
    $\begingroup$ Because otherwise, $f(x) = x^2$ and $g(x) = x^4$, would be the "same function", by your definition, since they both have the same domain and range. The difference is how each number is associated, not what the entiretly of the numbers associated are. $\endgroup$ – Nicolas Bourbaki Jan 8 '16 at 3:58
  • 1
    $\begingroup$ “My satisfaction with the meal is a function of how good it tastes.” That’s casual everyday language. In the sense that the range shrinks when you shrink the domain, the range depends on the domain, so you could say that the one was a function of the other. But that would be mixing casual everyday language with the precise mathematical language in which we define the notion of function, a sure source of confusion to the perplexed. $\endgroup$ – Lubin Jan 8 '16 at 4:38
  • 2
    $\begingroup$ @Lubin I can't think of a better way to make connections between what I know and what is new to me than to associate it to casual experience :) $\endgroup$ – user685252 Jan 8 '16 at 5:40
  • $\begingroup$ @Lubin However, it's not true in the everyday usage. In the everyday usage, "y is a function of x" means that y is fully specified by x, i.e. x is enough information to determine y. It might be that your satisfaction with a meal is a fully determined by how good it tastes, and is independent of other factors, like portion size, how hungry you are, etc. But the range of a function is not fully determined by the domain. There are functions with the same domain and different ranges. If you wanted to use the everyday usage accurately, you could say that the range was a function of the graph. $\endgroup$ – Joshua Meyers Jan 8 '16 at 11:45

10 Answers 10


Update: I think there are mathematical concepts that do what I think you really want to do. There is some confusion about terminology, however.

Suppose we have a function from one set (the domain) to another set (the codomain); for example, let's consider the function $f: \mathbb R \to \mathbb R$ such that for any $x \in \mathbb R$, we define $f(x) = x + 2$. This function "maps" any point on the real number line to a point $2$ units away in the positive direction.

We may want to use this function $f$ to define a transformation that takes arbitrary subsets of $\mathbb R$ to subsets of $\mathbb R$, rather than only acting on one member of $\mathbb R$ at a time. With a slight abuse of notation, we can write $f(A) = \{ x \mid x = f(y), y \in A \}.$ (I call this an "abuse of notation" because we are really using the same name, $f$, for two objects; the "$f$" on the right side of the equation is a function that we are using in order to define a new object, also called $f$, on the left side of the equation.)

The effect of this definition is that $f(A)$ is the set of numbers that you would get if you could move the entire set of numbers, $A$, exactly $2$ units in the positive direction (assuming the original function $f$ is defined as above). The resulting set, $f(A)$, is a function of the set $A$ to which we apply the transformation.

If this is what you're looking for, we have merely a difference in terminology. For the transformation that takes arbitrary sets of real numbers ($A$) to other sets of real numbers ($f(A)$), I would probably call each set $A$ simply a "set" or possibly a "preimage" (rather than a "domain") and I would call $f(A)$ the "image of $A$" rather than the "range of a function".

So a simple function $f : \mathbb R \to \mathbb R$ does indeed give rise to a transformation such that the image, $f(A)$, of any set of real numbers, $A$, under this transformation is a function of the preimage, $A$. I think that is the function you are looking for.

If I were looking for a domain and range, I would take the power set of $\mathbb R$ (the set of all subsets of $\mathbb R$) as both the domain and codomain of the transformation; and if you use the word "range" to mean "codomain", as many people do, I would call the power set of $\mathbb R$ the range of the transformation as well. I do not think this is what you wanted.

If we must consider the question exactly as written, using standard meanings of the words "domain" and "range", my previous answer (below) may throw some light on the difficulty of trying to do this.

Why is it not generally acceptable to replace the word "measurement" with range and the word "time" with domain, and say that the range is a function of the domain?

Why shouldn't we replace the word "grass" with "museum" and the word "green" with "early", so we can say, "The museum is always earlier on the other side of the fence"?

Rather than ask why we cannot just replace one word with another in any way we choose, you might want to think about how to justify that we could replace the word "measurement" with "range" and the word "time" with "domain" and still write things that make sense.

The domain of a function consists of all possible values of the function's parameter(s), sometimes called the independent variable(s), each of which could be a "time" but very often is not. The range of a function consists of all possible values (which you might call measurements) of the function. (The "possible" values are either the members of the set we said the function values could come from, or just the set containing each value the function actually takes on when we apply it to some member of the domain, depending on whether you really mean codomain or image when you write "range".)

In what way does one "measurement" replace all the values in the entire range of the function, and in what way does one "time" replace the entire set of parameter values in the domain of the function?

Part of the definition of a function is its domain. If you change the domain, you have a different function.

There is a legitimate way to write something that looks like what you tried to write, but it requires thinking about functions that are very different from any function you would encounter in high school or even most college math courses. The secret is that a function is just a relation between sets, and functions themselves are objects that can be organized into sets, so it is possible to have a function that either acts on functions in its domain, or produces functions in its range, or both. But I suspect that this is not at all the sort of thing you wanted to do.

  • $\begingroup$ Unfortunately, my textbook does not state what an independent and dependent variable are :( $\endgroup$ – user685252 Jan 8 '16 at 5:46
  • $\begingroup$ Your textbook probably calls these things by different names. Some people think of them as "input" and "output" variables. The important thing is that the domain and range of a function are always sets, often sets with a very large number of members. $\endgroup$ – David K Jan 8 '16 at 5:59

You are at the driving range, if you like golf. You have a bucket of balls that you hit into the field in front of you. Where the balls land (a "measurement", if you will) is a function of how you hit the balls. The domain of this function is the bucket of balls and the "range" is where each of the balls lands. In this case the range has zilch to do with the bucket of balls sitting in front of you, but only on how you hit the balls. Thus it is meaningless to say that where the balls land depends on the fact that you have a bucket of balls to begin with.

  • 5
    $\begingroup$ So, it is the dependent variable that is a function of the independent variable and not their domains, right? $\endgroup$ – user685252 Jan 8 '16 at 4:20
  • $\begingroup$ @user303542, yes, that's right. $\endgroup$ – goblin Jan 8 '16 at 17:44
  • 1
    $\begingroup$ Isn't the domain of this function the set of all possible ways in which one can hit a golf ball, rather than the bucket of balls? If you always hit any (ideal) ball in exactly the same way, it will always land in the exact same spot. And I would think the range isn't where each of your balls happen to land (otherwise it would indeed be a function of how you happened to hit that day), but rather the set of all possible locations a ball could land. $\endgroup$ – Carl Leth Jan 8 '16 at 19:14
  • $\begingroup$ @CarlLeth Yeah, I think it would make more sense to have the domain be how you hit the balls, rather than the balls themselves. But you could define a "subfunction" whose domain is the ways in which you actually did hit one of the balls (rather than all the possible ways you could hit a ball), and in that case the range would be the locations where balls actually landed. $\endgroup$ – David Z Jan 8 '16 at 19:46
  • $\begingroup$ @CarlLeth, the function in this example is how you hit each ball. For example, if I have two balls $b_1,b_2$, and I hit them, say, 80 yards and 95 yards, respectively, then the function $h$ takes the values $h(b_1)=80$, and $h(b_2)=95$. Thus $B=\{b_1,b_2\}$ is the domain, $\{80,95\}$ is the range (or image if you want to be pedantic), and the function is $h$, how you've hit these two balls. The set of all possible ways one can hit the balls in the bucket corresponds to the set of all real-valued functions whose domain is the bucket $B$; this set is very different. $\endgroup$ – charlestoncrabb Jan 8 '16 at 21:06

All the other answers are perfectly correct. Let me point out, however, that a common abuse of notation can lead to a sense in which the range is meaningfully a function of the domain!

Although the domain and range (well, codomain) are supposed to be made explicit when defining a function, it's quite common in natural language to just say e.g. $$\mbox{"let $f(x)=x^2$."}$$ Maybe the domain $\mathbb{R}$ is clear from context, but other domains - $\mathbb{C}$, $\mathbb{Z}$, all real numbers between $\pi$ and $17$ - would also make sense.

Arguably, when speaking quickly like this what we have is a kind of meta-function: if you tell me what domain your function $f(x)=x^2$ has, then I know what function you have in mind; but there's not an obvious "right" domain for it to have. So, in this sense, the range is a function of the domain. If the domain is $\mathbb{C}$, the range is $\mathbb{C}$; if the domain is $[0, 3]$, the range is $[0, 9]$; etc.

On the one hand, this is very silly, and is really only an issue because we were unclear in our language: we said something like "let $f(x)=x^2$" rather than "let $f(x)=x^2$ for $x\in\mathbb{R}$," etc. On the other hand, this is actually not silly at all: there are plenty of times we have a "definable" function with a variable "domain", in a very precise way. However, this happens much later on down the mathematical road. For now, you should not think of the range as a function of the domain.

  • $\begingroup$ Thank you, I thought this notion would logically fit in somewhere :) $\endgroup$ – user685252 Jan 8 '16 at 6:45
  • 1
    $\begingroup$ Why do you call this an "abuse" and "very silly"? It seems perfectly reasonable. Let $g(S)$ be the range of the function $f$ where $f(x) = x^2$ for $x \in S$. "The range of $f$ is a function of its domain" just means that there exists some function which maps domains of $f$ to ranges of $f$. That function is called $g$. The domain of $g$ is all valid domains over which $f$ can be defined. $\endgroup$ – Carl Leth Jan 8 '16 at 19:53
  • 1
    $\begingroup$ @CarlLeth The abuse of notation is not being precise when describing $f$. The analysis that follows is very silly because clearly it's not what the speaker intended - they (almost certainly) were describing a specific $f$, with a clear domain! I did not mean that this analysis is silly in all contexts, just that the OP should not think that this is what is going on most of the time. Of course there are contexts where this is not silly at all, but they're probably not where the OP is working right now; that's the point of my final paragraph. $\endgroup$ – Noah Schweber Jan 8 '16 at 23:16

I suggest that you have a look at the wikipedia articles domain, image and codomain/target set. As described in the articles range may refer to image or codomain.

Consider the function $f\colon X\to Y$. $X$ is the domain and $Y$ is the codomain. Not everything in $Y$ might be "hit" by the function. The image of the function is defined as $\{ \, y \in Y \, | \, y = f(x) \text{ for some } x \in A \, \}$.

Example:$f\colon \mathbb{R}\to \mathbb{R}, f(x) = x^2$

The domain and the codomain are $\mathbb{R}$. But the image is $[0,\infty)$.


Here is another interpretation of your question, where your statement is true:

Consider a function $f:X\to Y$, where $X$ is the domain and $Y$ the codomain (which means that, for any $x$ in $X$, we know that $f(x)$ is an element of $Y$ - but it may not be true that every element of $y$ is the image of some $x$ in $X$).

Now, denote by ${\mathcal P}(X)$ the powerset of $X$. Then, to every function $f$ can be associated a function $\overline{f}:{\mathcal P}(X)\to{\mathcal P}(Y)$, defined by $\overline{f}(A)=\{ y\in Y\ |\ \exists a\in A, y=f(a)\ \}$

Finally, we can restrict the function $f$ to a subset $A$ of $X$. If we denote $f_{|A}$ such restriction, then its domain is $A$ and its range is $\overline{f}(A)$. Here, the range is indeed a function of the domain!

Note: I used the term function in a quite broad (but frequent in set theory) sense. Some would call $\overline{f}$ an application since its input are not numbers.


One thing the answers so far haven't touched on is the practical meaning of the sentence "the variable $y$ is a function of the variable $x$." What is the point of saying such a thing?

We use this language specifically to convey the idea that the value of $x$ uniquely determines the value of $y$. The point, then, is to tell us that there is a very special relationship between the two variables, for in general the value of one variable does not uniquely determine the value of another. This shows why the words that fill in the blanks in the sentence $$\text{"______ is a function of ______}"$$ should be variables, not sets.

Here is a mathematical example. In general the value of $x^2$ does not uniquely determine the value of $x$. (If I tell you the value of $x^2$ is 4, you have no way of telling whether the value of $x$ is $-2$ or $2$.) So we say that $x$ is not a function of $x^2$. (We could repair the situation if we restricted our interest only in positive or only in negative values of $x$.) Contrast with the converse but seemingly trivial scenario that $x^2$ is a function of $x$. If $x$ is 4, it must be that $x^2$ is 16. The value of $x$ does uniquely determine the value of $x^2$.

Here is a more interesting mathematical example. The value of the expression $\frac{x+y}{x-y}$ is uniquely determined by the values of $x$ and $y$ (so long as we throw out the meaningless case where $x=y$), so we could say that $\frac{x+y}{x-y}$ is a function of $x$ and $y$. But notice that if $y\neq0$, $$\frac{x+y}{x-y}=\frac{\frac{x}{y}+1}{\frac{x}{y}-1}$$ This shows that in most cases, the value of $\frac{x+y}{x-y}$ really depends only on the ratio of $x$ to $y$. So if we throw out cases where $x=y$ and $y=0$, we could say $\frac{x+y}{x-y}$ is a function of $\frac{x}{y}$. This particular example is important in many fields, including projective geometry (and algebraic geometry more generally) and differential equations.

Here is a more "applied" example, the sort of thing a scientist might say. The pressure of an ideal gas is not a function solely of temperature, because in general the temperature does not uniquely determine the pressure. Even if you set the temperature to be some fixed value, the pressure could change if other factors change. What other factors matter? That is an empirical question. It turns out that for an ideal gas, the pressure is a function of the temperature, volume, and number of moles. This discovery is the content of the ideal gas law.


Now, when a measurement varies over time we say that it is a function of time. Why is it not generally acceptable to replace the word "measurement" with range and the word "time" with domain, and say that the range is a function of the domain?

Making those replacements: "When a range varies over the domain, we say that it is a function of the domain." This looks correct, but to be clear, we would now talking about the entire range that varies according to the entire domain.

Here is an example of what this would look like. Let $a \in \mathbb R$, and define a function $$f_a : [a,a+1] \to [a+10,a+11]\quad \text{where } f_a(x) = x+10.$$

So each of these functions determines a line segment with slope $1$ over an interval that depends on $a$. If you glued all of them together, you'd get the line $y = x+10$ with domain and range $\mathbb R$. But because we've defined $f_a$ as a function of $a$, the range can be said to be a function of the domain. (The domain and range of that function both consist of all intervals of length $1$ in $\mathbb R$.)

The reason that your statement doesn't work for ordinary functions is that the domain and range typically don't vary; they are sets established before the function is defined. Time changes, but the "set of all times over which we take our measurements" does not change.


If you push your metaphor to the end you get: "the range is a function of the function". This makes sense if you want to express the fact that the range of a function depends only on the function.

However your statement "the range is a function of the domain" is incorrect since many function have the same domain but different range.

  • 1
    $\begingroup$ I think what the OP is getting at is if you fix one expression to define a function with -- e.g. you declare that you want $f(x)=x^2$, then you still need to choose a domain before you actually have a concrete function. And each such choice of domain will imply a particular set as the range for the function. So "the range of $f:X\to\mathbb R : x\mapsto x^2$" is indeed a function of $X$! $\endgroup$ – hmakholm left over Monica Jan 8 '16 at 17:47
  • $\begingroup$ @HenningMakholm I think you've probably guessed OP's intention correctly; some of us have just been getting a little hung up on the specific terminology OP used. I have edited my answer accordingly. $\endgroup$ – David K Jan 8 '16 at 19:12

A function is only defined when all of its inputs produce one output, and not more.

However, we can easily find functions with identical domains that have different ranges. For example, the domain of the function $y=x^2$ is $(-\infty,\infty)$, and the domain of the function $y=x$ is also $(-\infty,\infty)$. However, these two functions have different ranges, being $[0,\infty)$ and $(-\infty,\infty)$ respectively.

Since two identical domains produced different ranges, we therefore cannot say that the range is a function of the domain, just like we cannot say that y is a function of x for the equation $y^2+x^2=4$ (a circle).


To say that "b is a function of a" means (in antiquated terminology) that b is some mathematical combination of a. Can you say one set (the range) is some mathematical combination of another set (the domain) ? I think not.

  • $\begingroup$ Difficulties with "function definitions" often arise from confusing a function (an action) with its values (members of the range). $\endgroup$ – c.sidney Jan 8 '16 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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