Hello!
In our last lesson, we explored how to combine functions using arithmetic operations like addition and division. We saw that the domain of the new function is determined by the domains of the original functions, especially when division by zero is a risk.
Today, we're going to learn a completely different and very powerful way to combine functions: composition. Instead of performing arithmetic on two functions, we will feed the output of one function directly into the input of another. This is like an assembly line, where the product of one station becomes the raw material for the next. In IT, you might think of this as piping the output of one command into another, like grep "error" logfile.txt | wc -l, where the list of error lines from grep is fed into the wc (word count) command to count them.
Our goal is to compose two or more functions and determine the domain of the resulting composite function. This is a crucial skill that forms the foundation for many advanced topics in mathematics, including calculus.
1. What is Function Composition?
Function composition is the process of applying one function to the result of another. If we have two functions, and , the composite function "g of f of x" is written as or using the composition symbol, .
In this notation, is the inner function and is the outer function. We always evaluate the inner function first.
To get a formal introduction, let's look at a short guide from mathcentre.ac.uk, which you may find familiar in its style.
This guide, titled 'Composition of functions', provides a clear definition and notation for composite functions.
Please read sections 1 ('Introduction') and 2 ('Order of composition'). These sections will define the composite function gf(x) = g(f(x)) and highlight a very important property: the order of composition matters.
As the resource highlights, the key ideas are:
- To find , you substitute the entire expression for into every in the function .
- In general, is not the same as . The order is critical.
Let's do a quick example. Let and .
-
To find :
We substitute into . -
To find :
We substitute into .
Clearly, , so the order matters.
2. The Main Challenge: Finding the Domain
Just like with arithmetic operations, the domain is a central concern. An input is only valid for the composite function if it meets two conditions:
- must be in the domain of the inner function, .
- The output of the inner function, , must be in the domain of the outer function, .
This gives us a clear, two-step process for finding the domain of a composite function. The following webpage lays out this process very nicely.
Composition of Functions - Definition, Domain, ...
The article 'Composition of Functions' provides a step-by-step method for finding the domain of a composite function.
Read the section 'Domain of Composite Functions'. It clearly describes the process and provides a worked example with rational functions.
To summarise the process for finding the domain of :
- Find the domain of the inner function, . This gives you your initial set of allowed -values.
- Find the composite function, , and then find its domain. This gives you any additional restrictions.
- Combine the domains from Step 1 and Step 2. The final domain must satisfy both sets of restrictions.
Professor Leonard provides an excellent video explanation of why this process is so important. He explains that restrictions from the inner function must be carried forward, even if they seem to disappear after simplification.
Finding Domain of Composite Functions (Precalculus - College Algebra 49)
In this video, Professor Leonard demonstrates how to find the domain of composite functions, focusing on why restrictions from the inner function can't be ignored.
Watch the video from the beginning to 17:59. Pay close attention to the example with the rational functions (starting around 05:23). He gives a brilliant explanation for why a value like x=0 is excluded from the final domain, even though the simplified expression looks like it would allow it.
Let's use a classic example involving a square root, which is a common source of domain issues.

This image perfectly illustrates the rule: the restriction from the inner function (sqrt(x)) carries over to the final result.
3. A Formal Condition for Composition
So far, we've focused on how to find the domain once we've decided to compose functions. But we can also ask a more fundamental question: is it even possible to form a composite function?
For to be possible, the outputs of the inner function must be valid inputs for the outer function . More formally:
The range of the inner function must overlap with the domain of the outer function.
The following video introduces a technique from the A-Level curriculum that formalises this idea.
AS Level Math P1 - Composite Functions (Domain and Range)
This video from 'Mathlete by Saad' introduces the 'RIDO' technique (Range of Inner = Domain of Outer) to determine if a composition is valid.
Watch the segment from 15:48 to 19:08. This will explain why, for some functions with restricted domains, composition might not be possible at all.
This "RIDO" check is a great mental model. If the set of all possible outputs from the inner function doesn't contain anything the outer function can accept as an input, then the assembly line is broken, and the composition cannot be formed.
Test your understanding!
Let and .
Find the composite function and determine its domain using the two-step process.
Show answer
The composite function is .
-
Step 1: Find the domain of the inner function, .
The function is . The expression under the square root must be non-negative.
.
So, the initial domain restriction is . -
Step 2: Find the composite function and its domain.
Substitute into :
For this new expression, we have two conditions:
a) The term in the square root must be non-negative: .
b) The denominator cannot be zero: .
Combining these gives . -
Step 3: Combine the restrictions.
The restriction from Step 1 was .
The restriction from Step 2 was .
The intersection of these two sets (the values that satisfy both conditions) is .
The final domain for is .
Conclusion
In this lesson, we moved beyond simple arithmetic and learned the powerful technique of function composition.
Key Takeaways:
- Function composition, , involves using the output of an inner function, , as the input for an outer function, .
- Unlike arithmetic operations like addition, the order of composition is critical: and are generally different.
- The domain of a composite function is constrained by both the inner function's domain and any new restrictions created by the final composite expression.
- A simple way to find the domain of is to find the domain of the inner function , then find the domain of the simplified , and finally combine these restrictions.
Preview of the Next Lesson:
We've now seen a few examples (especially in Professor Leonard's video) where composing two functions in a certain way gives you back just . For example, and . Composing them gives (for ). When two functions "undo" each other like this, they have a special relationship: they are inverse functions. In our next lesson, we will explore exactly what it means for a function to have an inverse and how to find it.