Composite functions work by feeding one function’s output into another function’s input, then writing the result as a single new rule.
Composite functions sound scarier than they are. You’re not learning a new kind of math so much as learning a clean way to “chain” two rules together.
Think of it like a two-step machine. One machine does something to x, then the next machine takes that result and does its own thing. Your job is to write the single rule that matches what the two machines do back-to-back.
This skill shows up in algebra, precalculus, calculus, coding, science formulas, and word problems where one quantity depends on another. Once it clicks, it feels routine.
What Composite Functions Mean In Plain Math
Suppose you have two functions, f and g. A composition uses one function inside the other.
The notation looks like this: (f ∘ g)(x). Read it as “f of g of x.”
That means: first compute g(x). Then plug that whole result into f( ). So you get f(g(x)).
Don’t Let The Symbol ∘ Mess With You
The little circle is not multiplication. It’s a signal that says “do this one after that one.”
Also, order matters. In general, f(g(x)) is not the same as g(f(x)). Same two functions, different chain, different answer.
Quick Notation Check
- (f ∘ g)(x) = f(g(x)) means “g first, then f.”
- (g ∘ f)(x) = g(f(x)) means “f first, then g.”
Inputs, Outputs, And Why Order Changes Everything
Every function has an input slot and an output result. When you compose, the inner function produces the value that becomes the outer function’s input.
If the inner function can’t accept a certain input, the composition breaks there. If the outer function can’t accept the inner output, the chain breaks there too.
So composing functions is two jobs at once: write the new rule, then make sure the allowed x values still make sense.
How To Do Composite Functions Step By Step
Here’s the method that stays steady no matter what the functions look like.
Step 1: Identify The Inner Function
In f(g(x)), the inner function is g(x). That whole expression is what you’ll substitute into f.
Step 2: Rewrite f(x) With A Blank Slot
Take the formula for f(x) and treat x like a placeholder. You’re about to replace it with something else.
Step 3: Substitute g(x) Everywhere x Appears In f(x)
This is the core move. Put parentheses around the entire inner function when you drop it in. Parentheses save you from sign and exponent mistakes.
Step 4: Simplify Carefully
Combine like terms, distribute only when needed, and watch exponents. Keep your work readable so you can spot mistakes.
Step 5: Check The Domain
Start with the domain of the inner function. Then make sure the inner output lands inside the domain rules of the outer function.
Mini Example With Polynomials
Let f(x) = 2x + 5 and g(x) = x2 – 1.
Compute (f ∘ g)(x):
- Write: f(g(x)) = 2(g(x)) + 5
- Substitute: 2(x2 – 1) + 5
- Simplify: 2x2 – 2 + 5 = 2x2 + 3
Since both functions are polynomials, the domain stays all real numbers.
Mini Example Where Order Flips The Result
Use the same f and g.
Compute (g ∘ f)(x) = g(f(x)):
- Write: g(f(x)) = (f(x))2 – 1
- Substitute: (2x + 5)2 – 1
- Simplify: 4x2 + 20x + 25 – 1 = 4x2 + 20x + 24
Different expression, same two originals. That’s why order can’t be guessed.
Function Types That Change Domain In A Composition
Many classroom compositions use polynomials because they behave nicely. Real practice includes square roots, fractions, logs, and trig, where the domain needs attention.
A fast way to stay safe is to know the common “domain blockers” that show up again and again.
These refresher notes help when you’re composing mixed function types. If you want a second explanation with extra practice items, Khan Academy’s page on composite functions lays out the idea with worked examples.
| Function Type | Typical Form | Domain Watch-Out |
|---|---|---|
| Linear | ax + b | All real inputs |
| Quadratic | ax2 + bx + c | All real inputs |
| Rational | (p(x)) / (q(x)) | Denominator can’t be 0 |
| Square Root | √(expression) | Inside must be ≥ 0 (real-number setting) |
| Absolute Value | |expression| | All real inputs |
| Exponential | a · bx | All real inputs |
| Logarithmic | log(expression) | Inside must be > 0 |
| Trigonometric | sin(x), cos(x), tan(x) | tan(x) breaks where cos(x)=0 |
Doing Composite Functions With Domain Checks
This is the part that separates “I can substitute” from “I can finish the problem.” The algebra can be clean and you can still get marked down if the domain is wrong.
Domain Check Pattern That Works Each Time
- Write the inner output: that’s g(x) in f(g(x)).
- List the inner restrictions (like “denominator not 0” or “inside the log positive”).
- List the outer restrictions that depend on its input.
- Apply the outer restrictions to the inner output.
- Combine restrictions into one final domain statement.
Example: A Root Outside A Rational Inner Function
Let f(x) = √x and g(x) = (x – 1)/(x + 2).
Find (f ∘ g)(x) = f(g(x)):
- Substitute: f(g(x)) = √((x – 1)/(x + 2))
Now The Domain
- Inner restriction: x + 2 ≠ 0 so x ≠ -2.
- Outer restriction: the input to √ must be ≥ 0.
- So require: (x – 1)/(x + 2) ≥ 0, with x ≠ -2.
That last inequality takes a sign chart or interval test. The main point: you don’t just say “x ≥ 0” because the input to √ is not x anymore. It’s a fraction in x.
Example: A Log Outside A Shifted Quadratic
Let f(x) = ln(x) and g(x) = x2 – 4.
Then (f ∘ g)(x) = ln(x2 – 4).
The domain rule for ln is “inside is positive,” so:
- x2 – 4 > 0
- (x – 2)(x + 2) > 0
- So x < -2 or x > 2.
Notice how the outside function (ln) forces a restriction that didn’t exist for g alone.
OpenStax also explains composition and domain in a textbook-style format that’s handy when you want the “why” behind the restriction steps: Composition of Functions.
How To Compose From Tables And Graphs
Not every problem gives you neat formulas. Sometimes you get a table of values or a graph. The idea stays the same: inner output becomes outer input.
Composing From A Table
If a table gives g(2) = 7 and another table gives f(7) = -1, then:
- (f ∘ g)(2) = f(g(2)) = f(7) = -1
That’s it. You don’t need formulas if the needed values exist in the tables.
Composing From A Graph
From a graph, read g(x) by locating x on the horizontal axis, then reading the y-value. That y-value becomes the “new x” you feed into f.
This is where domain shows up in a sneaky way: even if x sits in the visible part of the g graph, the resulting y-value might land outside the part of the f graph you’re given. Then (f ∘ g)(x) is undefined at that x (based on the provided data).
Common Slip-Ups And How To Catch Them Fast
Most composition mistakes fall into a few predictable buckets. If you know them, you can spot them in your own work in seconds.
| Slip-Up | What It Looks Like | Fix |
|---|---|---|
| Wrong order | Writing g(f(x)) when asked for f(g(x)) | Read “f of g of x” aloud before you start |
| Missing parentheses | f(g(x)) becomes 2x2 – 1 instead of 2(x2 – 1) | Wrap the inner function in parentheses every time you substitute |
| Exponent confusion | (f(x))2 written as f(x2) | Square the whole output only when the formula says ( )2 |
| Domain ignored | Answer given with no restrictions on x | Check inner limits, then apply outer limits to the inner output |
| Over-simplifying early | Canceling factors that can be zero before domain work | Keep restrictions visible, then simplify |
| Mixing notation | Writing fg(x) and meaning f(g(x)) | Use ∘ or parentheses so the grader sees composition |
| Assuming “all reals” | Using polynomial logic on logs, roots, or fractions | Scan for denominators, even roots, and logs |
| Evaluating when asked to write a rule | Giving a number instead of a formula | Check whether the prompt asks for (f ∘ g)(x) or (f ∘ g)(2) |
Practice Set With Answers You Can Self-Check
Try these in order. They build from easy substitution to domain-aware composition. Work them out on paper first, then compare.
Practice 1: Linear Into Absolute Value
Let f(x) = |x| and g(x) = 3x – 4.
(f ∘ g)(x) = |3x – 4|
Practice 2: Quadratic Into Linear
Let f(x) = x – 9 and g(x) = x2 + 2x.
(f ∘ g)(x) = (x2 + 2x) – 9 = x2 + 2x – 9
Practice 3: Rational Into Rational
Let f(x) = 1/(x – 5) and g(x) = (x + 1)/(x – 2).
(f ∘ g)(x) = 1/(((x + 1)/(x – 2)) – 5)
Domain notes:
- Need x ≠ 2 so g exists.
- Need g(x) ≠ 5 so the outer denominator isn’t 0.
Practice 4: Root With A Shift
Let f(x) = √(x + 3) and g(x) = 2x – 7.
(f ∘ g)(x) = √((2x – 7) + 3) = √(2x – 4)
Domain: 2x – 4 ≥ 0 so x ≥ 2 (real-number setting).
Quick Self-Check Before You Submit
Run this quick checklist and you’ll catch most errors before they cost points.
- Did you match the order in the prompt, not the order you “felt” was right?
- Did you substitute the entire inner expression, wrapped in parentheses?
- Did you simplify without breaking the meaning of the expression?
- Did you state domain restrictions when logs, roots, or fractions show up?
- If the question asked for a value at a point, did you evaluate at that point at the end?
Once you’ve done a handful of these, composition turns into pattern work. Read the order, swap the inner into the outer, clean it up, then finish with domain.
References & Sources
- Khan Academy.“Composite Functions Review.”Walkthrough of composition notation, substitution steps, and sample problems.
- OpenStax.“Composition of Functions.”Textbook explanation of composing functions and handling domain restrictions.