Composition of Functions and their Inverses

14 Apr

In Algebra II, we have been talking about inverses, and compositions. We finally got to the point where we are asking:

what is f^{-1}(f(x)) and what is f(f^{-1}(x))?

Last year, to illustrate that both equaled x, I showed them a bunch of examples, and I pretty much said… by the property of it working out for a bunch of different examples… that it was true. However, that sort of hand-waving explanation didn’t sit well with me. Not that there are times when handwaving isn’t appropriate, but this was something that they should get. If they truly understand inverse functions, they really should understand why both compositions above should equal x.

So today in class, we started reviewed what we’ve covered about inverses… I told them it’s a “reversal”… you’re swapping every point of a function (x,y) with (y,x). That reversal graphically looks like a reflection over the line y=x. Of course, that makes sense, because we’re replacing every y with an x — and that’s the equation that does that. My kids get all this. Which is great. They even get, to some degree, that the domains and ranges of functions and their inverses get swapped because of this.

But then when I say:

f(x) means you plug in x and you get out y… but then when you plug that new y into your f^{-1}(y) you’ll be getting x out again”

their eyes glaze over and I sense fear.

So I came up with this really great way to illustrate exactly what inverses are and how the work… on the ground. I put up the following slide and we talked about what actually we were doing when we inputted an x value into both the function and the inverse:

comp1

We came up with this:

comp2

We then talked about how we noticed that the two sides were “opposites.” Add 1, subtract 1. Multiply by 2, divide by 2. Cube, cube root. And, importantly, that they were in the opposite order.

Then we calculated f^{-1}(f(3)):

Starting with the inner function: f(3)

(1) cube: 27
(2) multiply by 2: 54
(3) add 1: 55

Then we plugged that into the outer function: f^{-1}(55)

(1) subtract 1: 54
(2) divide by 2: 27
(3) cube root: 3

This way, the students could actually see how a composition of a function and its inverse actually gives you the original input back. They could see how each step in the function was undone by the inverse function.

I don’t know… maybe this is common to how y’all teach it. But it was such a revelation for me! I loved teaching it this way because the concept became concrete.[1]

[1] I remember reading some blog some months ago that was talking about solving equations, and how each step in an attempt to get x alone was like unwrapping a present. I like that analogy, even though the particular post and blog eludes me. But in those terms, this is like wrapping a present, and then unwrapping it!


5 Responses to “Composition of Functions and their Inverses”

  1. David Petersen April 14, 2009 at 6:11 pm #

    I teach about “function machines.” There is a slot for an input (domain) and a chute (range) for an output. We start with the “x^2 Machine.” You can put numbers in and it’ll spit out that number squared. “Some things are not in the domain of this function…me for example. If I walk into the machine, it doesn’t know how to do Petersen Squared (although that would make a cool superhero team).”

    We then talk about all the other function operations as manipulations of these machines. Composing functions is rigging them so that the chute from one goes right into the slot of another. Inverse functions are hitting the “reverse” button on them. So, with those concepts in mind, we have two duplicate machines connected to one another where the chutes (or slots, depending on which order you’re doing) are glued in the middle and one of them runs in reverse.

    For something like your example, we might break down the original function into composite functions and draw the machine connection diagram.

    I think the visualization hits home with some of the kids. I like your analytic view, too, though. The pattern is easily seen with the words/steps.

  2. David Cox April 14, 2009 at 7:03 pm #

    Sam, you nailed it on this one. As I was reading, I kept thinking of the present digression…I’m glad you mentioned it. This concept really hit home for me when I learned that you can exchange x and y and just solve for y to find the inverse function (which sticks with the solving for x idea). Nice work, thanks for sharing it.

  3. vlorbik April 17, 2009 at 8:11 pm #

    lots of good stuff here lately.

    i call “invert each step and
    reverse the order” the
    “shoes and socks” theorem.
    i forget where i learned to do so.
    it appears to be well-known.

    (f\circ g)^{-1} = g^{-1} \circ f^{-1}.

  4. J.P. McCarthy May 12, 2010 at 11:41 pm #

    Nice blog, this post however is very flawed. The inverse of f is only defined as a function for injective (1-1) functions. For example f(x)=sin(x) is a function which has for example 0s at the k\pi for k\in\Z.

    Now “f^{-1}(x)” is defined as a multi-valued mapping.

    f^{-1}(x)={y:f(y)=x}

    Indeed f^{-1}(0)=k\pi. So let x=0
    f(x)=0 and f^{-1}(f(x))=k\pi; NOT 0.

    Now f(f^{-1}(0))=0.

    f(f^{-1}(x)=x but f^{-1}(f(x)) not necessarily x.

    A simpler example, f(x)=x^2:

    f(f^{-1}(1)=1 but f^{-1}(f(x)) plus or minus 1

    • samjshah May 13, 2010 at 12:06 am #

      Hi @J.P.

      Thanks for your comment. We definitely talk about 1 to 1 functions — and my students know that they can’t find f^{-1} if f(x)=x^2. I harp on this point a lot!

      I just wanted to highlight what’s going on for simple 1 to 1 functions.

      Best,
      Sam

Leave a Reply