P1.2.8 - Composite and inverse functions

P1.2.8 - Composite and inverse functions

Functions let us describe a process that takes an input and produces exactly one output. This lesson builds the language Edexcel uses for functions, then shows how to combine functions, reverse them, and understand the graph of an inverse. The main thread is simple: keep track of the direction of the mapping.

Functions as mappings

A function is a mapping from a domain to a range. In this specification, the inputs usually come from \mathbb{R} or from a stated subset of \mathbb{R}, and the outputs are real numbers.

Function, domain, and range

A function assigns each input in its domain to exactly one output. The domain is the set of allowed inputs, and the range is the set of outputs actually produced by the function.

Edexcel uses both function notation and mapping notation. For example,

f:x2x+3,xRf : x \mapsto 2x+3, \quad x \in \mathbb{R}

means that the function f takes an input x and maps it to 2x+3. The same rule can be written as

f(x)=2x+3.f(x)=2x+3.

There are two important types of function in this lesson:

TypeMeaningExample idea
one-oneeach output comes from one input onlyf(x)=2x+3
many-onetwo or more inputs can give the same outputf(x)=x^2, with domain \mathbb{R}

[DIAGRAM: asset_name: Lesson p1.2.8: Composite functions, inverse functions, and their graphs - diagram 01; asset_slug: p1_2_8_understand_and_use_composite_functions_inverse_functions_and_their_graphs__diagram_01; recommended_method: drawn_math; description: Draw two side-by-side mapping diagrams. Left diagram labelled one-one: inputs 1, 2, 3 each map to distinct outputs 4, 5, 6. Right diagram labelled many-one: inputs -2 and 2 both map to output 4, while input 3 maps to output 9. Use clean arrows with arrowheads and labels domain and range.]
Diagram

The many-one case is still a valid function because each input has only one output. It is not one-one because an output can be reached in more than one way. That distinction becomes essential when we try to reverse a function.

Worked example: classify this function.

p:xx2+1,xR.p : x \mapsto x^2+1, \quad x \in \mathbb{R}.

Every real input is allowed, so the domain is \mathbb{R}. Since x^2 \ge 0, the smallest possible value of x^2+1 is 1, so the range is

p(x)1.p(x)\ge 1.

This function is many-one because, for example,

p(2)=5andp(2)=5.p(2)=5 \quad \text{and} \quad p(-2)=5.

Two different inputs give the same output.

Composite functions

A composite function is made by doing one function and then another. The order matters.

Composite function

For Edexcel, fg means "do g first, then f". Therefore (fg)(x)=f(g(x)).

This notation is easy to misread. The letters are written as fg, but the action starts with the function nearest to x:

fg(x)=f(g(x)).fg(x)=f(g(x)).

[DIAGRAM: asset_name: Lesson p1.2.8: Composite functions, inverse functions, and their graphs - diagram 02; asset_slug: p1_2_8_understand_and_use_composite_functions_inverse_functions_and_their_graphs__diagram_02; recommended_method: drawn_math; description: Draw a horizontal composition pipeline: input x enters a box labelled g, output g(x) enters a box labelled f, final output f(g(x)) = fg(x). Include a small caption fg means do g first, then f. Use thin arrows with arrowheads and no decorative colour. Also show a small domain check note under the middle arrow: g(x) must be allowed as an input to f.]
Diagram

Worked example: let

f:x2x+3,g:xx21.f:x \mapsto 2x+3,\qquad g:x \mapsto x^2-1.

Find fg(x) and gf(x).

For fg(x), do g first:

fg(x)=f(g(x))=f(x21).fg(x)=f(g(x))=f(x^2-1).

Now put x^2-1 into the rule for f:

fg(x)=2(x21)+3=2x2+1.fg(x)=2(x^2-1)+3=2x^2+1.

For gf(x), do f first:

gf(x)=g(f(x))=g(2x+3).gf(x)=g(f(x))=g(2x+3).

Now put 2x+3 into the rule for g:

gf(x)=(2x+3)21=4x2+12x+8.gf(x)=(2x+3)^2-1=4x^2+12x+8.

So fg(x) and gf(x) are different functions. Function composition is not usually commutative.

Composite functions Continued

When domains are restricted, the inner function must produce an output that the outer function can accept. For example, if

f(x)=x,g(x)=x4,f(x)=\sqrt{x}, \qquad g(x)=x-4,

then

fg(x)=f(g(x))=x4.fg(x)=f(g(x))=\sqrt{x-4}.

This composite is defined only when x-4 \ge 0, so its domain is x \ge 4. The domain is not an afterthought; it is part of the function.

Inverse functions

An inverse function reverses a one-one function. If f sends a to b, then f^{-1} sends b back to a.

Inverse function

If f^{-1} exists, then f^{-1}f(x)=x and ff^{-1}(x)=x, with each expression used on the appropriate domain.

The notation f^{-1}(x) means the inverse function of f. It does not mean 1/f(x).

Worked example: find the inverse of

f(x)=2x+1x3,x3.f(x)=\frac{2x+1}{x-3}, \qquad x\ne 3.

Start by writing y=f(x):

y=2x+1x3.y=\frac{2x+1}{x-3}.

Now rearrange to make x the subject:

y(x3)=2x+1y(x-3)=2x+1 xy3y=2x+1xy-3y=2x+1

Collect the terms involving x on one side:

xy2x=3y+1xy-2x=3y+1

Factorise:

x(y2)=3y+1.x(y-2)=3y+1.

So

x=3y+1y2.x=\frac{3y+1}{y-2}.

Now swap the letter y back to the usual input letter x for the inverse:

f1(x)=3x+1x2,x2.f^{-1}(x)=\frac{3x+1}{x-2}, \qquad x\ne 2.

The restriction x\ne 2 for the inverse comes from the denominator of the inverse expression, and also matches the fact that 2 is not in the range of the original function.

Domains, ranges, and graphs of inverses

For inverse functions, domain and range swap roles:

Original function fInverse function f^{-1}
domain of frange of f^{-1}
range of fdomain of f^{-1}

The graph rule is just the coordinate version of the same idea. If (a,b) lies on y=f(x), then (b,a) lies on y=f^{-1}(x). Swapping coordinates reflects the graph in the line y=x.

[DIAGRAM: asset_name: Lesson p1.2.8: Composite functions, inverse functions, and their graphs - diagram 03; asset_slug: p1_2_8_understand_and_use_composite_functions_inverse_functions_and_their_graphs__diagram_03; recommended_method: drawn_math; description: Draw coordinate axes showing y=f(x)=x^2, restricted to x >= 0, and y=f^{-1}(x)=sqrt(x). Include the dashed reflection line y=x. Mark and label the swapped points (2,4) on f and (4,2) on f^{-1}. Show a subtle dashed omitted left branch of y=x^2 labelled not in domain to emphasise the restriction. Use direct labels where possible. No decorative colour.]
Diagram

Worked example: define

f:xx2+1,x0.f:x \mapsto x^2+1,\qquad x\ge 0.

The domain of f is x\ge 0. Since the smallest value of x^2+1 is 1, the range is

f(x)1.f(x)\ge 1.

To find the inverse, write

y=x2+1.y=x^2+1.

Then

x2=y1.x^2=y-1.

Because the original domain is x\ge 0, we must take the positive square root:

x=y1.x=\sqrt{y-1}.

Therefore

f1(x)=x1,x1.f^{-1}(x)=\sqrt{x-1}, \qquad x\ge 1.

The domain of f^{-1} is x\ge 1, which is the range of f. The range of f^{-1} is f^{-1}(x)\ge 0, which is the domain of f.

This also explains why the domain restriction mattered. If the original function had been x^2+1 for all real x, the inverse would need to send a value such as 5 back to both 2 and -2, which is not allowed for a function.

Using composites and inverses together

In exam-style questions, composite and inverse notation often appear together. The safest method is to translate the notation into words before doing any algebra.

Worked example: let

f(x)=2x5,g(x)=x2+1,x0.f(x)=2x-5,\qquad g(x)=x^2+1,\quad x\ge 0.

Find fg^{-1}(10).

The notation means

fg1(10)=f(g1(10)).fg^{-1}(10)=f(g^{-1}(10)).

So we first need g^{-1}(10). Since

g(x)=x2+1,x0,g(x)=x^2+1,\quad x\ge0,

we have

g1(x)=x1.g^{-1}(x)=\sqrt{x-1}.

Then

g1(10)=101=3.g^{-1}(10)=\sqrt{10-1}=3.

Now apply f:

f(3)=2(3)5=1.f(3)=2(3)-5=1.

Therefore

fg1(10)=1.fg^{-1}(10)=1.

Notice the structure: the inverse is applied first because it is nearest to the input 10, then f is applied.

Explain It Back

Use this as a self-explanation check after the section above. It is for diagnosing what you can already explain, not for learning new material from scratch.

The final habit is to check whether an expression makes sense on its domain. For example, f^{-1}f(x)=x is true for inputs in the domain of f, while ff^{-1}(x)=x is true for inputs in the domain of f^{-1}. The algebraic identity and the domain statement work together.