Inverse functions and the horizontal line test

I have a small problem with the following language in our Algebra 2 textbook. Do you see my problem?

Horizontal Line Test

If no horizontal line intersects the graph of a function f more than once, then the inverse of f is itself a function.

Here’s the issue: The horizontal line test guarantees that a function is one-to-one. But it does not guarantee that the function is onto. Both are required for a function to be invertible (that is, the function must be bijective).

Example. Consider f:\mathbb{R}\to\mathbb{R} defined f(x)=e^x. This function passes the horizontal line test. Therefore it must have an inverse, right?

Wrong. The mapping given is not invertible, since there are elements of the codomain that are not in the range of f. Instead, consider the function f:\mathbb{R}\to (0,\infty) defined f(x)=e^x. This function is both one-to-one and onto (bijective). Therefore it is invertible, with inverse f^{-1}:(0,\infty)\to\mathbb{R} defined f(x)=\ln{x}.

This might seem like splitting hairs, but I think it’s appropriate to have these conversations with high school students. It’s a matter of precise language, and correct mathematical thinking. I’ve harped on this before, and I’ll harp on it again.

Fibonacci joke

“I feel like this year’s Fibonacci conference will be as big as the last two combined!”

[Hat tip: Tim Chase]

In related Fibonnaci news, here are three recent blog posts having to do with Fibonacci:

 

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!

Physics of Angry Birds

A nice projectile motion application, suitable for almost any level of high school math.

Here’s an excerpt of the Wired.com article by Rhett Allain:

You know the game, I know you know. Angry Birds. I have an attraction to games like this. You can play for just a little bit at a time (like that) and each time you shoot, you could get a slightly different result. Oh, you don’t know Angry Birds? Well, the basic idea is that you launch these birds (which are apparently angry) with a sling shot. The goal is to knock over some pigs. Seriously, that is the game.

But what about the physics? Do the birds have a constant vertical acceleration? Do they have constant horizontal velocity? Let’s find out, shall we? Oh, why would I do this? Why can’t I just play the dumb game and move on. That is not how I roll. I will analyze this, and you can’t stop me.

 

[Hat tip: Tony Sanders]


 

PEMDAS Problems

Inspired by this post at Education Week, by David Ginsburg, and a fruitful discussion in the comments, I thought I’d make my own post about the order of operations. I feel the need to do this because of my own experiences teaching Algebra 1 and correcting the habits of Algebra 2, Precalculus, and Calculus students. The problem is often with their misunderstanding of the ubiquitous “PEMDAS” approach to order of operations (parentheses, exponentiation, multiplication, division, addition, subtraction).

The classic example given by those who have discussed this before is an expression like the following. This example shows the problem with instructing students to simply “add then subtract”:

8-4+1

You can easily see that blindly following PEMDAS would give you an answer of 3, not 5. In reality, addition and subtraction can be done in any order, provided that you think of the expression this way:

8+(-4)+1

I have to constantly reinforce in my students the notion that the “-” goes with the 4. It owns it. That’s the right way to think of it, since subtraction (and division) are just shorthand for addition by the additive inverse (and multiplication by the multiplicative inverse). That’s right kids, subtraction is an illusion. The typical Real Analysis approach is to use the field axioms to define the properties of addition. Here they are:

  1. If x and y are in the field, so is x+y (closure).
  2. x+y=y+x (commutativity)
  3. (x+y)+z=x+(y+z)=x+y+z (associativity)
  4. There exists an element 0 such that 0+x=x for all x (identity)
  5. For each x there is an element called -x such that x+(-x)=0 (inverse)

There are almost identical ones for multiplication, and then one more axiom for distribution. Just listing the field axioms for addition  helps us in the discussion of order of operations. As I said above, subtraction is never really mentioned. We only later define x-y to mean x+(-y).

Similarly, division is an illusion. Or more precisely, it is defined in terms of multiplication. We define x/y to mean x\cdot(1/y).

The other important thing to notice is that addition and multiplication are binary operations, meant to be functions of two variables. So the expression x+y+z is defined to mean (x+y)+z=x+(y+z).

But the problems with PEMDAS don’t stop with multiplication and addition. There are many other issues with the order of operations as well. We lie to students when we just tell them they’ll encounter those limited operations in tidy situations. Here’s a perfectly legitimate expression with which PEMDAS would flounder:

-2^{3^2}+\left|\frac{2\sin{0}+3!}{2-\sqrt{9}}\right|\pmod{3}

The reason the expression is so difficult for PEMDAS is because PEMDAS doesn’t acknowledge the existence of other functions or grouping symbols, and ignores the possibility of nested exponentiation.

As another somewhat related example, I often have Calculus students who evaluate the following expression incorrectly (because they misuse their calculator):

e^{(0.05)(10)}

And some high school students at every level still struggle with evaluating these expressions:

  • -2^2
  • Given f(x)=-x^2+x, evaluate f(-2).

The wikipedia article on Order of Operations is very clear on all this, but I wanted to just highlight some of the common misconceptions. For more, feel free to check out that article. I’m in no way recommending that PEMDAS be removed from math curriculum, but that it be used with great care. And by the way, the expression above evaluates to 1.

 

Math vocabulary sometimes makes sense

This is the first guest post from John Chase’s dad, also a math teacher.  Thanks, son, for letting me post to your blog.

Gene Chase:  I was taking a shower today when I figured out why I always confused the words “sequence” and “series.”  2, 3, 4, 5, … is a sequence; 2+3+4+5 is a series.  Until today, I thought that my confusion was because “series” and “sequence” both begin with “s.”  Now I see the real problem!  Teachers would say “sum the following series.”  They should have said “evaluate the following series,” since the series is already a sum.

Comment from John Chase:   In non-mathematical contexts we don’t differentiate between the two. We think of “television series” and a “series” of cars in a line at an intersection. How mathematically sloppy!

Gene Chase:  Yes, usually mathematical language is general language made more precise, not less precise.  For example, if you tell a story elliptically, you leave things out of it; if you tell the story parabolically, you give an analog of the story; if you tell the story hyperbolically, you embellish it.  The corresponding geometric figures have eccentricities which are either between 0 and 1 (ellipse), precisely equal to 1 (parabola), or greater than 1 (hyperbola).

This makes sense when you remember that “elliptic” is Greek for “defective,” “para” is Greek for “along side,” and “hyper” is Greek for “beyond.”