Function Composition Calculator — (f∘g)(x)

Function Composition Calculator — (f∘g)(x)

Use this free function composition calculator to evaluate (f∘g)(x) = f(g(x)) and (g∘f)(x) at a chosen value, with each step shown and a graph of the composition.

Quick answer: To compose functions, put the inside function into the outside one: (f∘g)(x) = f(g(x)). Example: if f(x) = x² + 1 and g(x) = 2x − 3, then f(g(x)) = (2x − 3)² + 1 = 4x² − 12x + 10. Order matters: g(f(x)) = 2(x² + 1) − 3 = 2x² − 1. Enter f(x) and g(x) above to get the result with steps.

How composition works

To compute (f∘g)(x), first evaluate the inside function g, then apply f to the result. Order matters: (f∘g) and (g∘f) are usually different.

How to use it

  1. Enter f(x) and g(x).
  2. Enter the value of x.
  3. Press Compose.

Related: the Inverse Function Calculator and more free math calculators.

Worked Example: Finding f(g(x)) by Hand

Let f(x) = x² + 1 and g(x) = 2x − 3.

  1. Write the outside function with a blank: f( ) = ( )² + 1.
  2. Put g(x) in the blank: f(g(x)) = (2x − 3)² + 1.
  3. Simplify: (2x − 3)² = 4x² − 12x + 9, so f(g(x)) = 4x² − 12x + 10.

Evaluate at x = 2. Work from the inside out: g(2) = 2(2) − 3 = 1, then f(1) = 1² + 1 = 2. Check with the formula: 4(4) − 12(2) + 10 = 16 − 24 + 10 = 2. Both ways agree.

Now reverse the order. g(f(x)) = 2(x² + 1) − 3 = 2x² − 1. At x = 2: f(2) = 5 and g(5) = 7, and 2(4) − 1 = 7. Since 2 ≠ 7, f(g(2)) and g(f(2)) are different, which shows that order matters.

How to Find the Domain of a Composite Function

A number x is in the domain of f(g(x)) only if two things are true:

  • x is in the domain of g, so g(x) exists, and
  • g(x) is in the domain of f, so f can accept it.

Example: f(x) = √x and g(x) = x − 4. Then f(g(x)) = √(x − 4). The square root needs x − 4 ≥ 0, so the domain is x ≥ 4.

In the other order, g(f(x)) = √x − 4. Here x must be in the domain of √x, so the domain is x ≥ 0.

Do not judge the domain only from the simplified answer. If g(x) = √x and f(x) = x², then f(g(x)) simplifies to x, but the domain is still x ≥ 0, because g has to be defined first.

Frequently asked questions

How do you find the composition of two functions?

Substitute the inside function into the outside one. For f(x) = x + 5 and g(x) = 3x, (f∘g)(x) = f(3x) = 3x + 5. Reversing the order gives (g∘f)(x) = g(x + 5) = 3(x + 5) = 3x + 15. The two results are different, so always check which function goes inside before you start.

How do you do function composition step by step?

Work from the inside out. To find f(g(1)) for f(x) = x² − 2 and g(x) = x + 3, first evaluate the inside function: g(1) = 4. Then put that output into the outside function: f(4) = 16 − 2 = 14. You can also build the formula f(g(x)) = (x + 3)² − 2 first and then substitute x = 1 to check.

What is the difference between function operations and composition?

Function operations combine outputs: (f + g)(x) = f(x) + g(x) and (f · g)(x) = f(x) · g(x). Composition feeds one output into the other function. With f(x) = x − 1 and g(x) = x², the product is (f · g)(x) = x³ − x², but the composition is f(g(x)) = x² − 1. The small circle in f∘g signals composition, not multiplication.

How do you compose functions with a square root?

Substitute as usual, then check the domain, since the expression under the root must be zero or positive. For f(x) = √x and g(x) = x + 9, f(g(x)) = √(x + 9), so x ≥ −9. In the other order, g(f(x)) = √x + 9, which needs x ≥ 0. The two compositions have different domains as well as different formulas.

How to use the Function Composition Calculator for homework

The Function Composition Calculator is most useful when you treat it as a learning check, not just a shortcut to the final answer. Start by copying the original problem carefully, including signs, exponents, decimal points, fractions, parentheses, and units. Then enter the values in the same order the problem gives them. A small typing change can completely change the result, especially in algebra, precalculus and calculus problems.

Before you press the button to calculate, make a quick estimate or prediction. The estimate does not need to be exact. Its job is to help you notice impossible answers. If a distance becomes negative, a probability is bigger than 1, an angle looks too large, or a decimal point seems misplaced, go back and check the input before trusting the final result.

Before you enter the problem

  • Rewrite the problem in a clean line so every value is easy to see.
  • Use parentheses around grouped expressions, especially in fractions and exponents.
  • Keep units with the numbers while you work, even if the calculator only asks for the numbers.
  • Check whether the problem wants an exact value, a decimal approximation, or a rounded answer.
  • Look for restrictions such as positive values only, a chosen interval, or a required domain.

How to read the result

After the calculator gives a result, read more than the final line. If steps, tables, graphs, or intermediate values are shown, use them to understand how the answer was built. That is especially important when you are studying for a quiz or test, because teachers often give more credit for a correct process than for an unsupported number.

Try to identify the main idea behind the result. For example, ask yourself which formula was used, which operation changed the expression, which value controlled the graph, or which assumption made the answer possible. When you can explain that idea in your own words, the tool has helped you learn the skill instead of only checking one problem.

Common mistakes to avoid

MistakeHow to catch it
Typing the wrong signCompare each negative sign, subtraction symbol, and exponent with the original problem.
Rounding too earlyKeep extra decimal places until the final step, then round only as directed.
Forgetting parenthesesGroup numerators, denominators, powers, and multi-step expressions before calculating.
Ignoring unitsPut g(x) in parentheses before you substitute it into f.
Trusting an unreasonable resultUse estimation, a graph, or substitution to check whether the answer makes sense.

Turn the answer into practice

One good way to study is to solve the problem by hand first, then use the Function Composition Calculator, to check your work. If your answer is wrong, do not erase everything immediately. Find the first line where your work stops matching the calculator’s logic. That line is usually where the real misunderstanding happened.

  1. Work the problem on paper and circle your final answer.
  2. Use the calculator to check the result.
  3. If the answers match, write one sentence explaining the method.
  4. If they do not match, compare each step until you find the first difference.
  5. Redo a similar problem without the tool to make sure the correction sticks.

When to use a calculator and when to work by hand

Use the Function Composition Calculator when you want to check a long calculation, explore a pattern, test a graph, or confirm a result after practicing. Work by hand when the assignment asks for steps, when you are learning a new method, or when the test will not allow a digital tool. The strongest students use both: hand work to build understanding and calculators to check accuracy.

If you are preparing for a timed test, practice some problems without the tool and some with it. That balance helps you build speed while still understanding the math. Over time, the goal is to need the calculator less often for routine steps and use it more strategically for checking, exploring, and confirming your reasoning.

Quick accuracy checklist

Before you leave the page, use the Function Composition Calculator, result to answer three quick questions: What was the input? What rule, formula, or method connects the input to the result? What would change if one number in the problem changed? These questions turn a single calculator answer into a reusable math skill.

For homework, write the original problem, the calculator’s result, and one short explanation of the method in your notebook. For test review, cover the result and try to reproduce the setup on your own. If you can set up a similar problem without looking back at the calculator, you are much closer to owning the skill.

Related to This Article

What people say about "Composition of Functions Calculator: f(g(x)) Steps"?

No one replied yet.

Leave a Reply