This tool composes two functions in both orders, finds their inverses where an inverse exists and checks the result by going forward and back. It helps students who know the notation but lose marks on the order of the functions or on the domain.
Composite and inverse function explorer
You keep mixing up which function goes first when two functions are combined.
Everything you enter stays on this device.
How do I use it?
- Choose the type of function f: linear (px + q), square (px² + q) or reciprocal (p/x + q). Enter p and q.
- Choose its domain: all real numbers, x ≥ 0 only, or x ≤ 0 only. Do the same for g.
- Enter an input value x. The starting example is f(x) = 2x + 1 and g(x) = x² with x = 3.
- Press Work it out and read the composition steps, then the inverse section.
- Change the domain of g to x ≥ 0 and press the button again to see an inverse appear.
How does the tool work?
Every value is computed directly from the rule you entered. The tool never guesses a formula.
For f(g(x)), it finds g(x) first, then puts that value into f. For g(f(x)), it finds f(x) first, then puts that value into g. If any step is outside a domain, uses a square root of a negative number or divides by zero, the tool says the value is undefined.
An inverse is offered only when the function is one-to-one on the domain you chose. The rule for each family is:
- Linear: f⁻¹(y) = (y − q) ÷ p.
- Square on x ≥ 0: f⁻¹(y) = √((y − q) ÷ p). On x ≤ 0 the square root takes a minus sign.
- Reciprocal: f⁻¹(y) = p ÷ (y − q), with y ≠ q.
The domain of the inverse is the range of the original function, and the tool prints it.
What does a worked example look like?
Take f(x) = 2x + 1 and g(x) = x², with x = 3. For f(g(3)), g(3) = 9 and then f(9) = 19.
For g(f(3)), f(3) = 7 and then g(7) = 49. The two answers, 19 and 49, are different, so the order matters.
For the inverse, f⁻¹(y) = (y − 1) ÷ 2. The check gives f(3) = 7 and f⁻¹(7) = 3, which returns to the start. For g on all real numbers the tool reports no single inverse, because g(3) = g(−3) = 9.
What can the tool not tell you?
It covers three families of function only, and it is not a general symbolic solver. It does not produce a simplified formula for f(g(x)), and it does not cover exponential, logarithmic or trigonometric functions.
It also cannot decide the domain for an exam question. Always read the domain stated in the question and write it in your answer, because the composite and the inverse both depend on it.
How does it connect to the lessons?
Begin with finding composite functions in the correct order. Then move to finding inverse functions with domain restrictions, and try the functions practice.
The reciprocal family links to solving inverse variation problems and to finding the inverse of a two by two matrix. The square family connects to the quadratic functions practice.
If you want a teacher to go through the gaps, see Additional Mathematics tuition. A one-hour trial class (from RM50) is a real taught lesson.
Common questions
Why do f(g(x)) and g(f(x)) give different answers?
f(g(x)) applies g first and then f, while g(f(x)) applies f first. Different first steps give different values in general. The tool shows both for the same input so you can see the difference.
Why does x² have no inverse unless I restrict the domain?
Two different inputs such as 3 and −3 give the same output 9. An inverse must return one input for each output, so the tool asks you to restrict the domain to x ≥ 0 or x ≤ 0 first.
What does the tool do with division by zero?
It stops and reports the value as undefined, because dividing by zero has no answer. The same applies when an input is outside the domain you chose or when a square root would need a negative number.
Does the tool keep what I type?
No. Everything stays on your device and nothing is sent anywhere. There is no account, so the tool is safe to use on a shared phone or computer.
If the order of functions or the domain still trips you up, a teacher in a one-to-one lesson can work through your own examples and show where the rule breaks down.
- Online one-to-one lessons for your child with an experienced teacher.
- Your first class is a one-hour trial, from RM50. The fee is agreed before you book.
- Happy with the teacher? Continue with lessons of about 1.5 hours. If not, ask for another teacher.