Algebra • Composite Functions

Domain of Composite Function Calculator

Determine the exact domain of the composite function (f ∁ g)(x) = f(g(x)). Evaluates inner function restrictions, outer function constraints, and their mathematical set intersection.

|
Last Updated: September 2026
|
Verified Accurate: Real Analysis & Set Theory
Interactive Calculator

Composite Function Domain Calculator

Composition Direction: (f ∁ g)(x) = f(g(x))

Supported patterns: sqrt(...), 1/(...), polynomial terms.

Inner Domain (g)
(-∞, ∞)
Composite Domain
[3, ∞)
Final Domain of (f ∁ g)(x)
Interval Notation:
[3, ∞)
Set-Builder Notation:
{ x ∈ ℝ | x ≥ 3 }
Evaluated Expression: f(g(x)) = √(2x - 6)
Condition 1 (Inner Domain): All Real Numbers
Condition 2 (Outer on Inner): 2x - 6 ≥ 0 ⇒ x ≥ 3
Domain Intersection: Cond 1 ∩ Cond 2
Crucial Rule: You cannot merely simplify f(g(x)) first and inspect the simplified formula. Values outside the domain of the inner function g(x) can never enter the machine!

Step-by-Step Two-Stage Intersection Proof

Domain Analysis
Direct Answer & Overview
Verified Educational Guide

How to Find the Domain of a Composite Function

The domain of a composite function (f ∘ g)(x) consists of all real numbers x such that x is in the domain of the inner function g, and the resulting value g(x) is in the domain of the outer function f. Mathematically, Domain(f ∘ g) = { x ∈ Domain(g) | g(x) ∈ Domain(f) }. You must never simplify the composite formula before checking restrictions, because algebraic cancellation often hides critical points where the inner function is undefined.

Primary Mathematical Formula The Set-Theoretic Definition of Composite Function Domain
Standard Equation
ƒ(x)
Q.E.D.
Domain(f∘g)={x∈Domain(g)∣g(x)∈Domain(f)}\text{Domain}(f \circ g) = \{ x \in \text{Domain}(g) \mid g(x) \in \text{Domain}(f) \}
Both conditions must hold simultaneously; take the mathematical intersection of the two solution sets.
Exact Formula
Input Parameters
Required
1
Outer function f(x): Governs the final stage and constrains the output of g(x).
2
Inner function g(x): Receives the initial input x and governs first-stage validity.
Expected Outputs
Calculated
Inner Function Domain: The initial allowable set of inputs x.
Composite Restrictions: Values of x where g(x) violates the domain of f.
Final Domain: Exact representation in interval notation and set-builder notation.
Worked Numerical Example
Instant Verification
Find the domain of (f ∘ g)(x) where f(x) = √x and g(x) = 2x - 6
→ Step 1: Domain of g(x) = 2x - 6 is all real numbers (-∞, ∞). Step 2: Outer function f(u) = √u requires u ≥ 0. Setting g(x) ≥ 0 gives 2x - 6 ≥ 0 => 2x ≥ 6 => x ≥ 3. Step 3: Intersect (-∞, ∞) with [3, ∞).
Domain(f ∘ g) = [3, ∞) or { x ∈ ℝ | x ≥ 3 }.

What Is the Domain of a Composite Function?

In mathematics, a composite function is formed when the output of one function becomes the input of another. Denoted by the circle operator (f ∁ g)(x), it is evaluated from the inside out as f(g(x)). To calculate specific output values at given points, you can use our Composite Function Evaluator, or reverse-engineer compound expressions with our Decomposition of Composite Function Calculator.

The domain of any function is the complete set of allowable real input values x for which the function produces a well-defined real number. For composite functions, however, determining this set is uniquely nuanced because an input x must survive a sequential two-stage journey through two distinct mathematical machines.

Domain(f ∁ g) = { x ∈ Domain(g) | g(x) ∈ Domain(f) }

An input x is valid if and only if it is acceptable to g, AND its output g(x) is acceptable to f.

The Two-Stage Function Pipeline

To visualize why finding the domain requires two separate tests, imagine a manufacturing pipeline with two connected conveyor belts:

Stage 1: Raw Input (x)

The number x is fed directly into the inner machine g. If x causes division by zero or a negative radical inside g, the machine jams immediately. x is disqualified.

Stage 2: Intermediate (g(x))

If machine g processes x successfully, it outputs the number g(x). This value is immediately delivered as the raw input to the outer machine f.

Stage 3: Final Output f(g(x))

The value g(x) must meet all domain requirements of f. If f cannot accept g(x), that initial input x is disqualified.

The Cardinal Rule: Why You Cannot Simplify First

The single most frequent error in advanced algebra and precalculus is simplifying the algebraic expression for f(g(x)) before determining its domain.

Consider the famous counterexample:

Let f(x) = 1/x and g(x) = 1/x.
If you compose and simplify first: f(g(x)) = 1 / (1/x) = x.
The expression "x" looks like a simple linear polynomial whose domain is all real numbers (-∞, ∞).
BUT THIS IS WRONG! What happens when you test x = 0?
g(0) = 1/0, which is completely undefined! Because g(0) does not exist, f(g(0)) cannot exist.
Correct Domain: All real numbers except zero: (-∞, 0) U (0, ∞).

Algebraic simplification creates a "ghost" or removable discontinuity that masks the reality that the inner function blew up at x = 0. Always analyze domains before cancelling terms!

Common Algebraic Domain Restrictions

In real-valued functions, domain restrictions arise almost exclusively from three algebraic operations that are forbidden or undefined over the real numbers:

÷0

1. Division by Zero (Rational Fractions)

Any denominator must never equal zero. For any term P(x) / Q(x), set the condition Q(x) ≠ 0 and exclude those roots from the domain. When working with rational fractions and factoring, our Divide Algebraic Expressions Calculator provides step-by-step polynomial reduction.

ó0

2. Even Radicals (Square Roots, 4th Roots)

The radicand of any even root must be non-negative: radicand ≥ 0. (Note: If the square root is in a denominator, it must be strictly positive: radicand > 0). To simplify roots before checking, see our Simplifying Radical Expressions Tool and Division of Radical Expressions Calculator.

ln>0

3. Logarithmic Arguments

Logarithms are only defined for strictly positive arguments: argument > 0 (verify log evaluations on our Logarithm Calculator).

Step-by-Step Domain Finding Algorithm

To find the domain of (f ∁ g)(x) systematically, execute these three steps:

Step 1: Find Domain of g(x)

Inspect the inner function g(x) in isolation. Identify any values of x that make g(x) undefined (such as dividing by zero or taking the square root of a negative). Let this set of allowable numbers be Set A.

Step 2: Apply Outer Function Restrictions to g(x)

Inspect the outer function f(u). Determine what restrictions exist on its dummy variable u. Replace u with the complete formula for g(x) and solve the resulting inequality or exclusion for x. Let this set be Set B.

Step 3: Intersect Set A and Set B

Find the set intersection: Domain = Set A ∩ Set B. The final domain includes only values of x that belong to both sets. Express this result in interval notation.

Interval vs. Set-Builder Notation

Standard academic tests and calculus courses demand fluency in both interval and set-builder notation. If you need to interconvert representations, our Interval to Inequality Converter and Inequality to Interval Notation Tool provide automatic formatting:

Condition Description Inequality Form Interval Notation Set-Builder Notation
All real numbers greater than or equal to a x ≥ a [a, ∞) { x ∈ ℝ | x ≥ a }
All real numbers strictly greater than a x > a (a, ∞) { x ∈ ℝ | x > a }
Excluding a single number c x ≠ c (-∞, c) ∪ (c, ∞) { x ∈ ℝ | x ≠ c }
Closed bounded interval between a and b a ≤ x ≤ b [a, b] { x ∈ ℝ | a ≤ x ≤ b }

Step-by-Step Graded Worked Examples

Example 1: Radical Outer, Linear Inner Difficulty: Fundamental

Find the domain of (f ∁ g)(x) where f(x) = √x and g(x) = 3x - 12.

Step 1: Inner function g(x) = 3x - 12 is a polynomial. Domain(g) = (-∞, ∞).
Step 2: Outer function f(u) = √u requires u ≥ 0.
Step 3: Substitute g(x) ≥ 0 → 3x - 12 ≥ 0 → 3x ≥ 12 → x ≥ 4.
Step 4: Intersect (-∞, ∞) with [4, ∞).
Conclusion: Domain = [4, ∞) or { x ∈ ℝ | x ≥ 4 }.
Example 2: Rational Outer, Quadratic Inner Difficulty: Intermediate

Find the domain of (f ∁ g)(x) where f(x) = 5 / (x - 9) and g(x) = x².

Step 1: Inner function g(x) = x² has no fractions or radicals → Domain(g) = (-∞, ∞).
Step 2: Outer function f(u) = 5 / (u - 9) requires denominator u - 9 ≠ 0 → u ≠ 9.
Step 3: Substitute u = g(x) → x² ≠ 9 → x ≠ 3 and x ≠ -3.
Step 4: Intersect (-∞, ∞) with the exclusions x ≠ ±3.
Conclusion: Domain = (-∞, -3) ∪ (-3, 3) ∪ (3, ∞).
Example 3: Radical Outer, Rational Inner Difficulty: Advanced

Find the domain of (f ∁ g)(x) where f(x) = √x and g(x) = 2 / (x - 5).

Step 1: Inner function g(x) = 2 / (x - 5) requires x - 5 ≠ 0 → x ≠ 5. Domain(g) = (-∞, 5) ∪ (5, ∞).
Step 2: Outer function f(u) = √u requires u ≥ 0 → 2 / (x - 5) ≥ 0.
Step 3: Since numerator 2 > 0, the fraction is ≥ 0 if and only if denominator x - 5 > 0 → x > 5.
Step 4: Intersect {x ≠ 5} with {x > 5} → Strictly x > 5.
Conclusion: Domain = (5, ∞). Notice 5 is excluded with a round parenthesis!

Common Traps and Conceptual Pitfalls

Confusing (f ∘ g)(x) with (g ∘ f)(x)

Function composition is non-commutative: f(g(x)) ≠ g(f(x)) in general. Swapping the inner and outer functions alters both the algebraic formula and the domain completely.

Forgetting the Inner Function Restriction

Checking only the simplified composite formula and ignoring values where g(x) was originally undefined. If x cannot enter g, it can never enter f(g(x)).

Including Zero Denominators in Radicals

Setting x - 5 ≥ 0 when the square root appears in a denominator. While radicals normally allow zero (≥ 0), a denominator cannot equal zero, requiring strict positivity (> 0).

Using Square Brackets for Infinity

Writing [a, ∞]. Infinity is an unbounded mathematical concept, not a reachable number, and must always be bounded with an open round parenthesis: [a, ∞).

Fact-Checked & Verified • Computational Accuracy Standards
Updated September 2026 • Editorial Policy
Authored By
Sanjay Samanta

Lead Developer & Founder of Basic Math Tools. Specializes in browser-native computational algorithms and applied mathematics.

Reviewed & Verified By
Academic Review Board

Mathematics & curriculum specialists. Audited against standard algebraic and arithmetic principles.

Found an error or have an improvement suggestion? Report a calculation issue

Frequently Asked Questions

How do you find the domain of a composite function (f ∘ g)(x)?
Finding the domain of (f ∘ g)(x) requires a two-step intersection test: 1) Find the domain of the inner function g(x) and determine any excluded x-values; 2) Find the domain of the outer function f(u) and set g(x) to satisfy those conditions; 3) The domain of (f ∘ g)(x) is the intersection of these two solution sets.
Why can you not simplify f(g(x)) before finding its domain?
Simplifying algebraically often conceals domain restrictions (creating removable discontinuities or holes). For example, if f(x) = 1/x and g(x) = 1/x, the composition simplifies to f(g(x)) = x, which looks like all real numbers. However, x = 0 is undefined in g(x) and cannot enter the composition. The domain must be x ≠ 0.
What happens if a number is in the domain of f but not g?
The number cannot be in the domain of (f ∘ g)(x). Because the input must first pass through g, if g cannot evaluate the number, the composite machine halts immediately and no output can ever be passed to f.
How do square roots affect the domain of composite functions?
When the outer or inner function contains an even root such as a square root, the entire expression inside the radical (the radicand) must be greater than or equal to zero (radicand ≥ 0) to avoid imaginary numbers.
How do fractions and rational expressions affect composite domains?
Any value that causes a denominator to equal zero must be strictly excluded from the domain. This applies both to denominators inside the inner function g(x) and any new denominators formed when g(x) is substituted into f.
How do you write composite domains in interval notation?
Use parentheses ( ) for excluded endpoints and infinities, and square brackets [ ] for included boundary values. Join disjoint intervals with the union symbol U. For instance, all real numbers except 2 is written as (-∞, 2) U (2, ∞).