Composition of Functions and their Inverses

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:


We came up with this:


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!



  1. 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. 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. 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.


    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

    1. 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.


  4. Sam,

    This approach totally blew up how I teach this, which I’m actually doing this week.

    I actually included the step-by-step idea with composition of functions, and today I introduced y = x as the identity function, whose steps only include “do nothing.”

    When doing the step listing idea this year, I threw out the usual “think of a function as a machine, think of compositions as stringing machines together.” Halfway through class a student asked to come to the board with their own explanation, and showed the class the machine thing.

    I’m also augmenting this approach by having the students do rules and inverses as listed steps first.

    Thanks so much for this.

  5. Back again on this same topic! So I sort of took the same track this time, but I noticed that when I did it last year, I was losing kids because I was lecturing about it a little too much.

    So I put all the big information into a pretty bare-bones worksheet, and threw ’em a few curveballs. No one noticed that the inverse of x^2 only spits out half the original’s graph, so we’ll have to talk about that tomorrow, but they were getting pretty angry that I wouldn’t just flat-out tell them how to find the inverse of 1/x, which is always fun.

    Again, it’s pretty bare-bones, but it beat the hell out of lecturing this stuff, which can be a slog:

      1. So I haven’t taught inverse functions in a few years, and I went back to the sheet I shared on here to give to a class this year. I think I will have to take some time to fuse the two together, but I came up with this supplement to that packet that students said really helped them understand what I was going for. I got the idea for this from yours and someone else’s worksheets that have the students do this stuff in a pointwise manner before they do the algebra.

  6. I think that one of the hardest ideas to get through is that the “x” in f(x) and f'(x) is not the same, that it just means input. So I think hammering this point home is very important.

  7. Let š‘“āˆ’1(š‘„)=āˆšš‘„āˆ’38+2š‘„3 , š‘”(š‘„)=š‘„3āˆ’5 ,š‘˜āˆ’1(10)+7=10 š‘Žš‘›š‘‘ ā„Ž(š‘„)=1š‘„2+9 then find:
    a. (š‘“+š‘”)(āˆšš‘„3) in the simplest form
    b. Domain of ā„Ž(š‘„) .
    c. (ā„Ž š‘œ š‘“)(š‘). (Z is the last digit in your ID)
    d. (š‘˜ š‘œ š‘”)(2).

Leave a Reply

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

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

Facebook photo

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

Connecting to %s