Algebra 2 (Common Core) • Building Functions

Verifying Inverse Functions by Composition

The definitive algebraic test for proving that two functions perfectly undo each other.

Algebra illustration with a variable, function graph, and equality symbol
Inside this lesson 10 sections 5 questions 10 figures

Section 1

Historical Context & Motivation

The idea that certain mathematical operations can be "reversed" is as old as arithmetic itself. When a child learns that adding 5 to a number can be undone by subtracting 5, they have encountered the concept of an inverse operation. The formalization of this idea into the language of functions, however, required centuries of mathematical development and several key breakthroughs in how mathematicians think about mappings between sets of numbers.

Understanding the history of inverse functions shows us why verification by composition became the gold standard for confirming that two functions truly reverse each other. It is not merely a classroom exercise — it is a foundational technique that underpins calculus, cryptography, and modern data science.

~1600s • Early Function Concept

Gottfried Wilhelm Leibniz and Johann Bernoulli began using the word "function" to describe expressions involving a variable. At this stage, a function was simply a formula, and the idea of "reversing" it meant solving an equation for the original variable.

1748 • Euler's Introductio

Leonhard Euler published Introductio in analysin infinitorum, which systematically treated functions as central objects in analysis. He explored logarithmic and exponential functions as inverses of each other, implicitly using composition to verify that ln(ex) = x and eln x = x.

1837 • Dirichlet's Definition

Peter Gustav Lejeune Dirichlet proposed the modern definition of a function as a rule that assigns each input exactly one output. This precision made it possible to rigorously define what it means for a function to be one-to-one — a prerequisite for having an inverse.

20th Century • Set Theory & Formalization

With the rise of set theory, mathematicians defined function composition as a binary operation on mappings. The concept of an identity function (the function that returns its input unchanged) gave inverse verification its elegant formulation: f composed with f⁻¹ must equal the identity.

Today • Algebra 2 & Beyond

Verifying inverses by composition is now a standard topic in Algebra 2 courses worldwide. The technique extends into linear algebra (matrix inverses), abstract algebra (group inverses), and applied fields like signal processing and encryption.

The central question that this lesson addresses is deceptively simple: Given two functions f and g, how can we prove — with absolute certainty — that g is the inverse of f? Guessing, graphing, or checking a few points is never enough. The answer lies in function composition, a technique that tests every possible input simultaneously.

Section 2

Core Principles & Definitions

Before we can verify that two functions are inverses, we need to understand four foundational ideas. Each builds on the previous one, creating a logical chain from the concept of a function all the way to the composition test.

1

One-to-One Functions

A function f is one-to-one (injective) if no two different inputs produce the same output. Formally: if f(a) = f(b), then a = b. Only one-to-one functions have inverses, because the reverse mapping must also be a function — each output must trace back to exactly one input.
2

Inverse Function f⁻¹

The inverse of a function f, written f⁻¹, is the function that "undoes" f. If f maps input a to output b, then f⁻¹ maps b back to a. The domain of f becomes the range of f⁻¹, and vice versa. Note: f⁻¹(x) does not mean 1/f(x).
3

Function Composition

Composition means feeding the output of one function into another. The notation (f ∘ g)(x) means "first apply g to x, then apply f to the result," which equals f(g(x)). Composition is the mechanism we use to test whether two functions undo each other.
4

The Identity Function

The identity function, I(x) = x, returns every input unchanged. It is the "do-nothing" function. When f and f⁻¹ are composed in either order, the result must be the identity function — the two transformations cancel out completely.
✦

Key Takeaway

Think of inverse functions like a lock and a key. The function f is the lock that scrambles your input into a coded output. The inverse f⁻¹ is the key that unscrambles it back to the original. Composition is the act of locking and then unlocking (or vice versa). If you end up with exactly what you started with — the "identity" — then the key truly fits the lock. Both directions must work: lock-then-unlock and unlock-then-lock.

Section 3

Visual Explanation

The best way to understand inverse verification is to see it as a "round-trip" journey. A value enters function f, gets transformed, then enters f⁻¹, and must arrive back at the starting point. The diagram below illustrates this round-trip for a specific pair of inverse functions: f(x) = 2x + 3 and f⁻¹(x) = (x − 3)/2.

ROUND-TRIP VERIFICATION: f(f⁻¹(x)) = x AND f⁻¹(f(x)) = xDIRECTION 1: f( f⁻¹(x) )x = 7inputapply f⁻¹f⁻¹(7)= (7−3)/2 = 2apply ff(2)= 2(2)+3 = 77= x ✓DIRECTION 2: f⁻¹( f(x) )x = 4inputapply ff(4)= 2(4)+3 = 11apply f⁻¹f⁻¹(11)= (11−3)/2 = 44= x ✓Both compositions return x → f and f⁻¹ are verified inverses.
Figure 1 — The round-trip test with specific numerical values, showing both directions of composition.

Notice that the diagram tests two specific inputs (x = 7 and x = 4) as illustrations, but the algebraic verification we perform in Section 4 will prove the result for all values of x simultaneously. This is the power of composition: rather than checking infinitely many individual numbers, we substitute the entire expression for one function into the other and simplify. If the algebra reduces to just "x," the proof is complete.

Also observe that both directions matter. It is theoretically possible for f(g(x)) to equal x while g(f(x)) does not, particularly when domains are restricted. A rigorous verification always checks both f(g(x)) = x and g(f(x)) = x.

Section 4

Mathematical Framework

The formal definition of inverse functions can be stated entirely in terms of composition. This section presents the key equations and then walks through the algebraic technique step by step.

Definition of Inverse Functions

f(f−1(x))=xANDf−1(f(x))=xf(f⁻¹(x)) = x AND f⁻¹(f(x)) = x

Two functions f and g are inverses of each other if and only if f(g(x)) = x for all x in the domain of g, and g(f(x)) = x for all x in the domain of f.

In shorthand notation using the composition symbol ∘, this becomes:

Composition Notation

(f∘f−1)(x)=xAND(f−1∘f)(x)=x(f ∘ f⁻¹)(x) = x AND (f⁻¹ ∘ f)(x) = x

Read "f composed with f⁻¹ of x" and "f⁻¹ composed with f of x." Both must equal the identity function I(x) = x.

The algebraic procedure for verification follows a clear pattern. Given two functions f(x) and g(x) that you suspect are inverses:

Step-by-Step Verification Method

Step1:Computef(g(x))—substituteg(x)intoeveryxinf(x).Step2:Simplify.Ifresult=x,thefirstdirectionpasses.Step3:Computeg(f(x))—substitutef(x)intoeveryxing(x).Step4:Simplify.Ifresult=x,theseconddirectionpasses.Step5:Ifbothpass,fandgareverifiedinverses.Step 1: Compute f(g(x)) — substitute g(x) into every x in f(x). Step 2: Simplify. If result = x, the first direction passes. Step 3: Compute g(f(x)) — substitute f(x) into every x in g(x). Step 4: Simplify. If result = x, the second direction passes. Step 5: If both pass, f and g are verified inverses.

Let us apply this to a concrete pair. Consider f(x) = 3x − 5 and g(x) = (x + 5)/3.

Direction 1: f(g(x))

f(g(x))=f((x+5)/3)=3⋅((x+5)/3)−5=(x+5)−5=x✓f(g(x)) = f((x + 5)/3) = 3 · ((x + 5)/3) − 5 = (x + 5) − 5 = x ✓

Direction 2: g(f(x))

g(f(x))=g(3x−5)=((3x−5)+5)/3=3x/3=x✓g(f(x)) = g(3x − 5) = ((3x − 5) + 5)/3 = 3x/3 = x ✓

Since both compositions simplify to x, we have conclusively verified that f and g are inverse functions. The beauty of this method is its generality: no matter how complex the functions are — involving radicals, fractions, or higher-degree expressions — the same two-direction composition test applies.

Section 5

Detailed Breakdown & Classification

Different families of functions require different algebraic strategies when verifying inverses by composition. The table below catalogs the most common function types encountered in Algebra 2, along with the typical inverse form and the key algebraic move needed during simplification.

Function TypeExample f(x)Inverse f⁻¹(x)Key Simplification Step
Linearf(x) = mx + bf⁻¹(x) = (x − b)/mCancel m by division; cancel b by subtraction
Rational Linearf(x) = (ax + b)/(cx + d)f⁻¹(x) = (dx − b)/(−cx + a)Cross-multiply, combine like terms, factor out x
Cubic / Cube Rootf(x) = x³ + kf⁻¹(x) = ∛(x − k)Cube and cube root cancel: (∛u)³ = u
Square Root (restricted)f(x) = √(x − h), x ≥ hf⁻¹(x) = x² + h, x ≥ 0Square and square root cancel with domain restriction
Exponential / Logarithmicf(x) = aˣf⁻¹(x) = log_a(x)Use alog_a(x) = x and log_a(aˣ) = x

The second major visual below shows how inverse functions relate graphically. Every pair of inverse functions exhibits a beautiful symmetry: their graphs are mirror images across the line y = x. This geometric property is a direct consequence of the composition identity — if f(a) = b, then f⁻¹(b) = a, meaning the points (a, b) and (b, a) are swapped.

xy1234−1−2123−1−2y = xf(x) = 2x + 1f⁻¹(x) = (x−1)/2(1, 3)(3, 1)(0, 1)(1, 0)f(x)f⁻¹(x)y = x (mirror line)
Figure 2 — The graphs of f(x) = 2x + 1 and f⁻¹(x) = (x − 1)/2 are reflections across y = x.

The graphical reflection property provides a useful visual check, but it is not a proof. Two curves might appear symmetric without actually being perfect inverses (especially with limited graphing resolution). The algebraic composition test remains the only rigorous verification method.

Section 6

Worked Example

Let us verify that f(x) = ∛(x − 4) and g(x) = x³ + 4 are inverse functions by performing both directions of composition.

Verifying f(x) = ∛(x − 4) and g(x) = x³ + 4

  1. 1

    Step 1 — Set Up Direction 1: f(g(x))

    We need to substitute g(x) = x³ + 4 into every occurrence of x in f(x) = ∛(x − 4). f(g(x)) = f(x³ + 4) = ∛((x³ + 4) − 4)
  2. 2

    Step 2 — Simplify Direction 1

    Inside the cube root, the +4 and −4 cancel: = ∛(x³ + 4 − 4) = ∛(x³) Since the cube root and the cube are inverse operations, ∛(x³) = x for all real numbers:
    = x ✓
  3. 3

    Step 3 — Set Up Direction 2: g(f(x))

    Now substitute f(x) = ∛(x − 4) into every occurrence of x in g(x) = x³ + 4. g(f(x)) = g(∛(x − 4)) = (∛(x − 4))³ + 4
  4. 4

    Step 4 — Simplify Direction 2

    Cubing a cube root yields the original radicand: = (x − 4) + 4 = x − 4 + 4
    = x ✓
  5. 5

    Step 5 — Conclusion

    Both f(g(x)) = x and g(f(x)) = x. Therefore, f(x) = ∛(x − 4) and g(x) = x³ + 4 are verified inverse functions. Notice how the cube root and cube operations cancel each other, while the constants +4 and −4 cancel as well — a hallmark of linear transformations within inverse pairs.

Section 7

Strengths, Limitations & Common Pitfalls

The composition method is the most powerful tool in your Algebra 2 toolkit for verifying inverses, but like any technique, it has both strengths and limitations that you should understand.

StrengthsLimitations & Pitfalls
Definitive proof: If both compositions equal x, the functions are provably inverses — no ambiguity.One direction isn't enough: Students often check only f(g(x)) and skip g(f(x)). Both are required for a complete proof.
Works for all function types: Linear, rational, radical, exponential, logarithmic — the same method applies.Domain restrictions: For functions like f(x) = x², the inverse only exists on a restricted domain (x ≥ 0). Composition may "work" algebraically but fail outside the valid domain.
Catches errors in inverse-finding: If you derived a candidate inverse and the composition doesn't simplify to x, you know there's an algebra mistake.Complex algebra: For rational functions with multiple terms, the simplification can be lengthy and error-prone.
No graphing tools needed: Pure algebraic method that works on paper.Confusing notation: Students sometimes compute f(x) × g(x) (multiplication) instead of f(g(x)) (composition).
Builds algebraic fluency: The substitution and simplification practice strengthens core skills.f⁻¹ ≠ 1/f: The notation f⁻¹(x) does not mean the reciprocal 1/f(x). This is the single most common misconception.
✦

Key Takeaway

Think of verifying by composition as running a "round-trip diagnostic." If you encrypt a message and then decrypt it, you should get the original message back. If either direction fails — encrypting the decrypted version or decrypting the encrypted version — then your encryption/decryption pair is broken. In function terms, a single-direction check is like testing only the "encrypt-then-decrypt" path and never testing "decrypt-then-encrypt." Always test both.

Section 8

Connection to Advanced Theory

The concept of verifying inverses by composition is not confined to Algebra 2 — it extends into nearly every branch of higher mathematics. Understanding this connection now will give you a significant head start when you encounter more abstract formulations later in your studies.

ConceptAlgebra 2 VersionAdvanced Version
Inverse elementf⁻¹ is the function that undoes fIn group theory, every element g has an inverse g⁻¹ such that g · g⁻¹ = e (the identity element)
IdentityI(x) = x, the identity functionThe identity matrix I in linear algebra: A × A⁻¹ = I
Composition testf(f⁻¹(x)) = x and f⁻¹(f(x)) = xMatrix inverse: verify A × B = I and B × A = I where B = A⁻¹
One-to-one requirementHorizontal line test; restrict domain if neededA matrix must have nonzero determinant (be "non-singular") to have an inverse
ApplicationSolving equations, undoing transformationsCryptography (RSA encryption), solving systems of equations, computer graphics transformations

In calculus, the inverse function theorem provides conditions under which a differentiable function has a differentiable inverse, and it uses the composition identity f(f⁻¹(x)) = x to derive the formula for the derivative of the inverse: (f⁻¹)′(x) = 1 / f′(f⁻¹(x)). This powerful result depends entirely on the same composition relationship you are learning now.

In linear algebra, finding the inverse of a matrix and verifying it through multiplication (the matrix analogue of function composition) is one of the most fundamental operations. The verification A × A⁻¹ = I is structurally identical to f(f⁻¹(x)) = x — the same principle, expressed in a different mathematical language.

Mastering the composition verification technique in Algebra 2 therefore gives you a conceptual framework that transfers directly into calculus, linear algebra, abstract algebra, and applied fields like data science and cryptography.

Section 9

Practice Problems

Work through these five problems in order. Each builds on the skills practiced in the previous one. Try to solve each completely before revealing the answer.

Question 1: Problem 1 — Conceptual

Explain in your own words why checking only one direction of composition (e.g., only f(g(x)) = x) is insufficient to prove that f and g are inverses. Can you think of a scenario where one direction might work but the other fails?
Show answer
Checking only one direction is insufficient because the definition of inverse functions requires both f(g(x)) = x and g(f(x)) = x. These are logically independent statements. A scenario where one works but the other fails typically arises with domain restrictions. For example, let f(x) = x² (all real numbers) and g(x) = √x (x ≥ 0). Then f(g(x)) = f(√x) = (√x)² = x for x ≥ 0, which appears to work. But g(f(x)) = g(x²) = √(x²) = |x|, which equals x only when x ≥ 0, not for negative values of x. Since g(f(−3)) = |−3| = 3 ≠ −3, the second direction fails, proving that f and g are not true inverses over all real numbers. Both directions must be verified on the appropriate domains.

Question 2: Problem 2 — Basic Verification

Verify by composition that f(x) = 5x − 8 and g(x) = (x + 8)/5 are inverse functions.
Show answer
Direction 1: f(g(x)) = f((x + 8)/5) = 5 · ((x + 8)/5) − 8 = (x + 8) − 8 = x. ✓ Direction 2: g(f(x)) = g(5x − 8) = ((5x − 8) + 8)/5 = 5x/5 = x. ✓ Since both compositions simplify to x, f and g are confirmed inverse functions. The 5 and ÷5 cancel each other, as do the −8 and +8 — this is the hallmark pattern for linear inverse pairs of the form f(x) = mx + b with f⁻¹(x) = (x − b)/m.

Question 3: Problem 3 — Intermediate

Determine whether f(x) = (2x + 3)/(x − 1) and g(x) = (x + 3)/(x − 2) are inverse functions by using composition.
Show answer
Direction 1: f(g(x)) = f((x + 3)/(x − 2)). Substitute into f: = (2 · (x+3)/(x−2) + 3) / ((x+3)/(x−2) − 1) Multiply numerator and denominator by (x − 2): Numerator: 2(x+3) + 3(x−2) = 2x+6+3x−6 = 5x Denominator: (x+3) − (x−2) = x+3−x+2 = 5 = 5x / 5 = x ✓ Direction 2: g(f(x)) = g((2x+3)/(x−1)). Substitute into g: = ((2x+3)/(x−1) + 3) / ((2x+3)/(x−1) − 2) Multiply numerator and denominator by (x − 1): Numerator: (2x+3) + 3(x−1) = 2x+3+3x−3 = 5x Denominator: (2x+3) − 2(x−1) = 2x+3−2x+2 = 5 = 5x / 5 = x ✓ Both compositions equal x, so f and g are verified inverses. The key technique for rational functions is to multiply the complex fraction's numerator and denominator by the inner denominator to clear the nested fraction.

Question 4: Problem 4 — Applied / Multi-Step

A temperature conversion function is given by C(x) = (5/9)(x − 32), which converts Fahrenheit to Celsius. Find the inverse function C⁻¹(x) (which should convert Celsius to Fahrenheit), and then verify your answer by composition in both directions.
Show answer
Finding the inverse: Start with y = (5/9)(x − 32). Swap x and y: x = (5/9)(y − 32). Solve for y: multiply both sides by 9/5 to get (9/5)x = y − 32, then y = (9/5)x + 32. So C⁻¹(x) = (9/5)x + 32. Verification, Direction 1: C(C⁻¹(x)) = C((9/5)x + 32) = (5/9)((9/5)x + 32 − 32) = (5/9)(9/5)x = (45/45)x = x. ✓ Verification, Direction 2: C⁻¹(C(x)) = C⁻¹((5/9)(x − 32)) = (9/5) · (5/9)(x − 32) + 32 = (x − 32) + 32 = x. ✓ The inverse function C⁻¹(x) = (9/5)x + 32 correctly converts Celsius to Fahrenheit. This real-world application demonstrates that inverse functions aren't just abstract algebra — they model the reversal of physical processes. The 5/9 and 9/5 are reciprocals that cancel upon composition, while the −32 and +32 cancel as additive inverses.

Question 5: Problem 5 — Critical Thinking

A student claims that f(x) = x² + 1 and g(x) = √(x − 1) are inverse functions because f(g(x)) = (√(x − 1))² + 1 = (x − 1) + 1 = x. Is the student's reasoning complete and correct? Explain thoroughly, considering both directions of composition and domain considerations.
Show answer
The student's reasoning is incomplete and ultimately incorrect (for unrestricted f). While the computation f(g(x)) = x is valid for x ≥ 1, the student made two critical errors: Error 1 — Only one direction checked: The student verified only f(g(x)) and never computed g(f(x)). Let's check: g(f(x)) = g(x² + 1) = √((x² + 1) − 1) = √(x²) = |x|. This equals x only when x ≥ 0. For example, g(f(−3)) = |−3| = 3, not −3. So g(f(x)) ≠ x for negative inputs. Error 2 — Domain of f not restricted: The function f(x) = x² + 1 is not one-to-one over all real numbers (it fails the horizontal line test because f(2) = f(−2) = 5). For f and g to be true inverses, f must be restricted to x ≥ 0. With this restriction, f: [0, ∞) → [1, ∞) and g: [1, ∞) → [0, ∞), and then g(f(x)) = √(x²) = x (since x ≥ 0 means |x| = x). Only under this domain restriction are the functions true inverses. This problem illustrates why both directions of composition must be checked and why domain restrictions are essential when working with non-one-to-one functions like quadratics.

Summary

Lesson Summary

Summary

Verifying inverse functions by composition is the definitive algebraic technique for proving that two functions perfectly undo each other. The method rests on four core ideas: a function must be one-to-one to have an inverse; the inverse function f⁻¹ reverses every input-output pair of f; composition f(g(x)) means substituting one function's entire expression into the other; and the identity function I(x) = x is the benchmark result that confirms cancellation. The verification requires checking both directions — f(f⁻¹(x)) = x and f⁻¹(f(x)) = x — because either direction can fail independently, especially when domain restrictions are involved.

The technique applies uniformly across linear, rational, radical, and exponential/logarithmic function families. Graphically, inverse functions are reflections across the line y = x, but this visual check is never a substitute for algebraic proof. The composition method you have learned here is structurally identical to the matrix inverse verification in linear algebra (A × A⁻¹ = I), the group inverse in abstract algebra, and the foundation of the inverse function theorem in calculus — making it one of the most transferable concepts in all of mathematics.

Varsity Tutors • Algebra 2 — Building Functions • Verifying Inverse Functions by Composition