DoAssignment.ca

D2.5 · Compose functions algebraically and determine domains

Learn to compose functions algebraically and determine domains through clear examples and targeted practice.

Ontario Grade 12 Mathematics

Characteristics of Functions

Ontario Grade 12 Mathematics — Study topic D2.5

A function takes an input and follows a rule to produce an output. A composition uses the output of one function as the input of another. The order matters: one function acts on the original input, and the other acts on that result. In this lesson, you will compose functions algebraically and identify the inputs for which each composition is defined.

What you will learn

1. Prerequisite bridge: functions and domain restrictions

A function rule might be f(x)=x2+3f(x)=x^2+3. The symbol xx is the input, and f(x)f(x) is the output. A function’s domain is the set of inputs for which its rule gives a defined real-number output.
Some rules restrict the input. A rational expression cannot have a zero denominator. A square root needs its radicand—the expression inside the root—to be zero or positive. A logarithm needs a positive argument. These restrictions matter when functions are composed because an inner function’s output becomes an input to the outer function.
A polynomial such as p(x)=x2−4p(x)=x^2-4 allows every real number as an input. For r(x)=1x−3r(x)=\frac{1}{x-3}, the input 33 is excluded because it makes the denominator zero. Keep the original function restrictions in view even after simplifying a composition.
radicand≥0\text{radicand}\geq 0

2. Plain language and symbolic composition

To compose functions, feed the output of one function into another. The notation (f∘g)(x)(f\circ g)(x) means f(g(x))f(g(x)). Read it as “ff of gg of xx.” The function gg acts first; then ff acts on the result.
For example, if g(x)=x+2g(x)=x+2 and f(x)=3xf(x)=3x, then gg changes xx to x+2x+2. The function ff then multiplies that result by 33. So (f∘g)(x)=3(x+2)=3x+6(f\circ g)(x)=3(x+2)=3x+6. In the reverse order, (g∘f)(x)=3x+2(g\circ f)(x)=3x+2. The two compositions do not generally have the same rule.
A useful way to organize the process is input, inner function, outer function, final output. To find a composition algebraically, replace the outer function’s input with the entire inner function rule. Use parentheses around the replacement so that every part of the inner rule is included.
(f∘g)(x)=f(g(x))(f\circ g)(x)=f(g(x))

3. Determine the domain of a composition

A composition is defined only when two conditions are met. First, the original input must be allowed in the inner function. Second, the inner function’s output must be allowed as an input to the outer function. Check the inner function’s domain, then apply the outer function’s restrictions to the inner output.
For a square-root outer function, require its radicand to be non-negative after substitution. For a rational outer function, require its denominator to be nonzero after substitution. For a logarithmic outer function, require its argument to be positive after substitution. Include restrictions from the inner function as well.
The domain rule for a composition can be written as a set of allowed inputs. The input must belong to the inner function’s domain, and the inner function’s output must belong to the outer function’s domain.
Simplifying can make a rule look less restricted than the original composition. Do not use a simplified expression to restore an input that was excluded by an original function rule. Keep a record of every restriction, and combine them at the end.
When a restriction is an inequality involving a rational expression, identify values that make its numerator or denominator zero. Test the intervals between those values. A value that makes the denominator zero remains excluded. \operatorname{Dom}(f° g)=\{x∈\operatorname{Dom}(g):g(x)∈\operatorname{Dom}(f)\}

4. Apply the process in either order

In a composition problem, name the order before substituting. For each order, identify the inner rule, substitute it into the outer rule, and then check the domain. If the inner function is a square root, use its radicand restriction. If the outer function is rational, make sure its substituted denominator is not zero.
A composition’s rule and domain answer different questions. The rule gives the output for an allowed input. The domain states which inputs are allowed. Write them separately so neither is mistaken for the other.

Order of operations in a composition

CompositionFirst function usedThen function used
(f∘g)(x)(f\circ g)(x)ggff
(g∘f)(x)(g\circ f)(x)ffgg

Worked example

Two orders, two domains

Let f(x)=x+1f(x)=\sqrt{x+1} and g(x)=x−2x+1g(x)=\frac{x-2}{x+1}. Find both compositions and the domain of each.
  1. Compose ff after gg
    In (f∘g)(x)(f\circ g)(x), use the full rule for gg as the input to ff. The square root requires its radicand to be non-negative. The inner function gg is also undefined when its denominator is zero.
    (f∘g)(x)=x−2x+1+1(f\circ g)(x)=\sqrt{\frac{x-2}{x+1}+1}
  2. Simplify and restrict
    Combine the terms inside the root. The denominator restriction excludes x=−1x=-1. For the square root, solve the resulting rational inequality. Its critical values are −1-1 and 12\frac12. Testing the intervals shows the expression is non-negative when x<−1x<-1 and when x≥12x\geq\frac12.
    (f∘g)(x)=2x−1x+1(f\circ g)(x)=\sqrt{\frac{2x-1}{x+1}}
  3. Compose gg after ff
    Now ff acts first. Its square root requires x+1≥0x+1\geq0. Substitute its output into the numerator and denominator of gg. The new denominator is a square root plus 11, which is at least 11 for every allowed input, so it is never zero.
    (g∘f)(x)=x+1−2x+1+1(g\circ f)(x)=\frac{\sqrt{x+1}-2}{\sqrt{x+1}+1}
Answer: For (f∘g)(x)(f\circ g)(x), the rule is 2x−1x+1\sqrt{\frac{2x-1}{x+1}} and the domain is (−∞,−1)∪[12,∞)(-\infty,-1)\cup[\frac12,\infty). For (g∘f)(x)(g\circ f)(x), the rule is x+1−2x+1+1\frac{\sqrt{x+1}-2}{\sqrt{x+1}+1} and the domain is [−1,∞)[-1,\infty).
Check: For the first composition, x=−1x=-1 is excluded by gg, and x=12x=\frac12 is included because the radicand is zero. For the second, the square root allows x=−1x=-1, and the denominator is positive for every allowed input.

Common mistakes and how to avoid them

Treating (f∘g)(x)(f\circ g)(x) as though ff acts first because it is written first.
Correction: Read the composition as f(g(x))f(g(x)). The inside function gg acts first.
Checking only the visible denominator or root in the simplified composition.
Correction: Check the restrictions of both original functions. Keep any excluded input even if algebraic simplification hides it.
Using a strict inequality for a square-root radicand.
Correction: A square-root radicand may equal zero, so use a non-negative condition and include valid boundary values.
Assuming the two orders have the same rule or domain.
Correction: Form each order separately. The inner function changes both the substitution and the restrictions.

Lesson summary

Check your understanding

Question 1

If f(x)=x2+1f(x)=x^2+1 and g(x)=x−3g(x)=x-3, which expression is (f° g)(x)?
  1. (x−3)2+1(x-3)^2+1
  2. (x2+1)−3(x^2+1)-3
  3. x2−3+1x^2-3+1
  4. (x−3)+1(x-3)+1
Show answer and explanation
(x−3)2+1(x-3)^2+1
In f(g(x))f(g(x)), substitute the entire rule x−3x-3 into the input of ff. This gives (x−3)2+1(x-3)^2+1.

Question 2

Let f(x)=xf(x)=\sqrt{x} and g(x)=x+4g(x)=x+4. What is the domain of (f° g)(x)?
  1. [−4,∞)[-4,\infty)
  2. (0,∞)(0,\infty)
  3. (−∞,−4](-\infty,-4]
  4. (−∞,∞)(-\infty,\infty)
Show answer and explanation
[−4,∞)[-4,\infty)
The composition is x+4\sqrt{x+4}. Its radicand must satisfy x+4≥0x+4\geq0, so x≥−4x\geq-4.

Question 3

Let f(x)=1xf(x)=\frac{1}{x} and g(x)=x−2g(x)=x-2. Which input is excluded from the domain of (f° g)(x)?
  1. x=2x=2
  2. x=−2x=-2
  3. x=0x=0
  4. No input is excluded
Show answer and explanation
x=2x=2
The composition is 1x−2\frac{1}{x-2}. Its denominator is zero at x=2x=2, so that input is excluded.

Key terms

Composition
A function formed by using the output of one function as the input of another.
Domain
The set of inputs for which a function is defined.
Inner function
The function applied first in a composition; it appears inside the other function’s input.
Radicand
The expression inside a radical, such as x+1x+1 inside x+1\sqrt{x+1}.

Continue through MHF4U

View the complete MHF4U Ontario Grade 12 Mathematics curriculum and lessons

About this lesson and its review

Published by DoAssignment. This AI-assisted lesson follows Ontario Grade 12 Mathematics (MHF4U), expectation D2.5. It is a study resource, not an official curriculum publication.

Before publication, the draft is checked for structure, mathematical or chemical notation, calculations, course boundaries, and readability, and then requires administrator approval. Errors can still occur, so corrections are welcomed.

Official curriculum reference

Report a correction or ask a question