Teaching domain and range incorrectly

What’s wrong with these high-school math questions?

  1. State the domain of the function f(x)=\frac{1}{x}.
  2. Where is the function f(x)=\ln(x) undefined?
  3. State the range of the function f(x)=x^2.

As a math teacher, I’ve asked these questions before too. But I always ask them with a bit of a cringe. Do you see what’s wrong with them?

Domain

A function is only well-defined when it is defined with its domain. A function f is an association between two sets A and B that assigns only one element of B to each element of A. The set A is called the domain and the set B is sometimes called the codomain. If  f is a function mapping elements from A into B, then we often write f:A\to B. For instance, consider the function f:\mathbb{R}\to\mathbb{R} defined by

f(x)=e^x

The domain of this function is \mathbb{R}, since that’s how the function is defined. Notice I explicitly gave the domain right before defining the function rule. Technically, this must always be done when defining any function, ever.

We might ask a student, “What is the domain of f(x)=e^x?” But this is a poor question. The function rule isn’t well-defined by itself. There are many possible domains for this function, like the set of integers \mathbb{Z}, the set of positive reals \mathbb{R}^+, or rational numbers between 20 and 30. What a teacher probably means is, “What is the largest possible subset of \mathbb{R} that could be used as the domain of f(x)=e^x?” In this case, the answer is \mathbb{R}.

So I hope you see why question (1) at the beginning of this post is not a very precise question. Likewise, question (2) is not very precise either. “Where is \ln{x} undefined?” has multiple answers. The answer the teacher is looking for is (-\infty,0]. The question would be better worded, “What real values cannot be in the domain of \ln{x}?”

 

Range

What about the range? The codomain in the example f(x)=e^x is also \mathbb{R}. But the range of f is (0,\infty). The range of a function is defined to be the set of all y\in B such that there exists an x\in A with f(x)=y.

But the range depends on the choice of domain. So asking questions like (3), “State the range of the function f(x)=x^2” aren’t well defined for all the same reasons as above. The desired answer is probably [0,\infty). But the domain of f(x)=x^2 could be the integers, in which case the range is the non-negative integers. We’re not told. So in the case of (3), the more precise question would read, “State the range of the function f(x)=x^2 with x\in\mathbb{R}.”

 

Should we change our teaching?

Maybe. But maybe not. I think I’ll still ask the questions in the imprecise way I started this post. Using the more precise questions would be unnecessarily confusing for most students. But we as teachers should be aware of our slightly incorrect usage, and be ready to give a more precise and thoughtful answer to students who ask.

That being said, I think there’s room for more set theory and basic topology at the high school level. I’m a bit sad I didn’t learn the words onto, surjective, one-to-one, injective, bijective, image, and preimage until very late in my post-high-school studies. I’m not sure all students are ready for such language, but we shouldn’t ever shy away from using precise language. That’s part of what makes us mathematicians.

I ❤ precise language!

9 thoughts on “Teaching domain and range incorrectly

    • Yes, I’ve heard math friends talk about category theory, but I don’t know anything about it. Thanks, Dan, for the recommendation. It’s now on my wish list! 🙂

  1. OK, So either I’m missing a link or you’ve got a mistake in your range for f(x) = c**x. (The range should be (infinity,infinity), not 0,infinity) no? What about f(3) with c = -1? or am I missing why c can not be negative.

  2. Pingback: Inverse functions and the horizontal line test « Random Walks

  3. Pingback: Looking back on 299 random walks | Random Walks

  4. From your explanation though, it looks like you’re calling the pre-image the “domain” ? Aren’t these different things? If I have a function f(x) = 1/x which maps from R to R, shouldn’t the domain be R, but the pre-image be R – {0}, or are you suggesting that I can’t define a function f: R to R as f(x) = 1/x ?

    • Yes, you are correct. I’m suggesting that you can’t define a function f:\mathbb{R}\to\mathbb{R} as f(x)=1/x, since it makes no sense to define this function at zero. It’s kind of like promising something and not carrying through on your promise! When you say let f:\mathbb{R}\to\mathbb{R}, you’re kind of saying, “Okay everyone, I’m about to define a function for every real number.” If you say you’re about to that, you should do it.

      The pre-image usually refers to a subset of the domain that is of interest. So, for example, you might speak about a transformation of the plane f:\mathbb{R}^2\to\mathbb{R}^2 with the domain being all of \mathbb{R}^2. We’re often also interested in what happens to a particular geometric figure in the plane (some triangle of interest, say), which we refer to as the “pre-image.” It’s important to note, however, that every point in the plane undergoes the transformation you defined, though.

      You can also consider the entire domain as the pre-image, in which case the range is the image of the domain. (And remember that the range and “codomain” are only the same if the function is surjective.)

      Did I just add clarity, or confuse? I hope I helped!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s