Skip to lesson

Math · Algebra 2

Chapter 1: Functions and Transformations

Composition and Inverse Functions

Feed one function into another, then undo it.

Lesson
3
Time
About 22 minutes
0 of 22 done
Part 1 of 7Let's Learn

Step 1: Let's Learn

Read it, or press Listen and follow the words.

Try it first

A machine doubles the number you feed it and then adds 3. The number 17 comes out. Which number went in, and what has to be done to 17 to get back to it?

Stuck is fine. Let’s Learn shows the way next. Got it first time? You can jump ahead to Watch an Example.

Watch the idea first — 60 seconds. Then read on, and try it yourself in the next step.

Invert f(x) = 3x + 6

  1. 1y = 3x + 6the function
  2. 2x = 3y + 6swap x and y
  3. 3x − 6 = 3y− 6subtract 6 from both sides
  4. Answery = (x − 6)/3÷ 3f⁻¹(x) = (x − 6)/3

A composition runs the output of one function into the input of another: f(g(x)) means do g first, then f. The inverse of f sends every output back to the input it came from.

Computing a composition

f(x) = 2x + 1 and g(x) = x². f(g(3)) = f(9) = 19. g(f(3)) = g(7) = 49. Work from the inside out, and the order matters.

A composed formula

f(g(x)) = 2x² + 1: put x² wherever f has x. g(f(x)) = (2x + 1)²: put 2x + 1 wherever g has x. Usually different functions.

An inverse undoes

The inverse of f sends every output back to the input it came from. Written f⁻¹, the −1 is a name, not a power: f⁻¹(x) is not 1/f(x).

Finding one

Swap x and y, then solve for y. The swap is what reverses the roles of input and output. For y = 3x + 6: x = 3y + 6, so y = (x − 6)/3.

The check

A candidate is the inverse only if f(f⁻¹(x)) = x and f⁻¹(f(x)) = x. f(4) = 18 and f⁻¹(18) = 4: back where it started. Its graph is the reflection of f in the line y = x.

Not every function has one

If two inputs share an output, nothing can send that output back to both. y = x² sends 2 and −2 to 4, so it needs its domain restricted to x ≥ 0 before it has an inverse, √x.

Step 2: Try It Yourself

Tap and try it out.

Press Next step. Two compositions, then an inverse and its check.

f(x) = 2x + 1 and g(x) = x². Find f(g(x)), g(f(x)) and f⁻¹(x)

  1. 1f(g(x)) = 2(x²) + 1 = 2x² + 1x² goes wherever f has x
Step 0 of 4
A line and its inverse are mirror images across y = x. Change the slope and watch the reflection.
-10-10-5-5551010
y = 2x + 1

The slope is 2: for every 1 across, the line goes 2 up.

Step 3: In Real Life

Currency and tax

Convert dollars to euros, then apply a 20 percent tax: one function fed into another. The inverse converts the taxed euros back to dollars. Travel apps compose and undo these all day.

Step 4: Watch an Example

One step at a time.

Watch Maya Invert f(x) = 5x − 4

A fresh function, turned round by swapping x and y, then tested with a number and in symbols.

  1. Step 1

    Maya reads the chain first: an input is multiplied by 5, and then 4 is taken off what that gives. Writing the output as y turns the rule into an equation, y = 5x − 4, which is the same rule with a name for what comes out.

Watch Leo Compose Both Ways

f(x) = 2x − 3 and g(x) = x + 5, composed one way and then the other. Leo writes the first composition; you write the second and say what it shows.

  1. Step 1

    Leo starts from the inside. In f(g(x)) the g acts first, so whatever g gives is what f receives. Here g gives x + 5, so f is being fed x + 5 rather than x.

Watch Ana Take Two Roads to the Inverse

One function, f(x) = 4x + 7, inverted twice: once by running its chain backwards, once by swapping and solving.

  1. Step 1

    Ana takes the first road by naming what f does to an input, in order: it multiplies by 4, and then adds 7. Running that backwards means taking 7 off first and dividing by 4 second, which gives f⁻¹(x) = (x − 7)/4.

Step 5: Your Turn

Practice makes it stick.

The Pay Slip

Problem 1 of 2

Sam is paid $18 an hour plus a $40 bonus each week, so a week of h hours pays p(h) = 18h + 40 dollars. Deductions take 15 percent, so the take-home is n(p) = 0.85p. What is the take-home pay for a 30-hour week, in dollars?

dollars

The Print Run

Problem 2 of 2

A print shop charges $12 to set up a job and 40 cents a flyer, so n flyers cost c(n) = 0.4n + 12 dollars. A club was charged $60. How many flyers did it order?

flyers

In and Out

Inside first for a composition. Backwards along the chain for an inverse.

1 of 5

f(x) = 3x − 4 and g(x) = x + 6. What is f(g(2))?

2 of 5

Same two functions: f(x) = 3x − 4 and g(x) = x + 6. What is g(f(2))?

3 of 5

f(x) = 2x + 1 and h(x) = x − 3. Write f(h(x)) as one expression with no brackets.

4 of 5

f(x) = 8x − 3. Type f⁻¹(x).

5 of 5

f(x) = 7x + 2. What is f⁻¹(30)?

Whose Step?

One line in each piece of working is a slip. Find it, then put it right.

1 of 6

Dev worked out f(g(3)) for f(x) = x² and g(x) = 2x − 1. One line is a slip. Which?

Dev's working for f(g(3)), with f(x) = x² and g(x) = 2x − 1

  1. 1f(x) = x², g(x) = 2x − 1
  2. 2f(g(3)) = g(f(3))
  3. 3f(3) = 3² = 9, and g(9) = 2(9) − 1 = 17
  4. Answerf(g(3)) = 17

2 of 6

What is f(g(3)), worked in the right order?

3 of 6

Ravi wrote f(g(x)) for f(x) = x² and g(x) = x + 4, then used it at x = 1. One line is a slip. Which?

Ravi's working for f(g(x)), with f(x) = x² and g(x) = x + 4

  1. 1f(x) = x², g(x) = x + 4
  2. 2f(g(x)) = f(x) + 4
  3. 3f(g(x)) = x² + 4
  4. Answerf(g(1)) = 1² + 4 = 5

4 of 6

Write f(g(x)) for f(x) = x² and g(x) = x + 4, with no brackets.

5 of 6

Priya was inverting f(x) = 2x + 9. One line is a slip. Which?

Priya's inverse of f(x) = 2x + 9

  1. 1y = 2x + 9
  2. 2x = 2y + 9
  3. 3x/2 = y + 9÷ 2
  4. Answerf⁻¹(x) = x/2 − 9− 9

6 of 6

Write f⁻¹(x) for f(x) = 2x + 9.

Pick the Move

Choose the move that answers the question asked. Nothing here needs working all the way through.

1 of 2

f(x) = 7x − 8. Which of these finds f⁻¹(20) without writing the inverse formula at all?

2 of 2

f(x) = (x + 5)/3. Which chain undoes it?

Same Function?

Judge these without working anything all the way out. Testing one input is often enough to rule a line out.

1 of 2

f(x) = 2x and g(x) = x + 3. Select every expression equal to f(g(x)).

2 of 2

Select every pair where the second function undoes the first for every input.

Step 6: Quick Check

Show what you know.

Question 1 of 2

f(x) = x − 7. What is f⁻¹(3)?

Question 2 of 2

Why does y = x² have no inverse over all real numbers?

Ready for more?Optional. Past the lesson, for anyone who wants it.

Stretch 1 of 2

For which number k is f(x) = kx + 6 its own inverse?

Stretch 2 of 2

Using each of the numbers 2, 5 and 8 exactly once for a, b and c in f(x) = ax + b and g(x) = x + c, the composition f(g(x)) comes out as 2x + 18. Type g(x).

What You Learned

  • f(g(x)) means do g first, then f, and the order matters.
  • To find an inverse, swap x and y, then solve for y.
  • Verify by composing both ways; both must return x.
  • A function with a repeated output needs a restricted domain before it has an inverse.
For the grown-up

The misconception this lesson targets is that f⁻¹ means one divided by f, because the −1 looks like the exponent it is everywhere else in algebra. Its cousin is undoing a chain in the order it was built rather than in reverse: a function that multiplies and then adds is undone by subtracting and then dividing, not the other way about. Both slips survive a page of correct-looking working, and both are caught by the same one-line test — send a number through f, send the result through the candidate, and see whether the number you started with comes back. Asking for that test out loud is the most useful thing to do beside a student here. The third habit worth watching is reading f(g(x)) left to right: the function named first is the one that acts last.