Composition of Functions (College Board AP® Precalculus): Study Guide

Roger B

Written by: Roger B

Reviewed by: Mark Curtis

Updated on

Composite functions

What is a composite function?

  • If  f and  g are functions, the composite function  fg is a function that

    • maps input values to output values

      • by using the output values of g as input values for  f

    • I.e., the input value is first 'fed into' g

      • then the output from g is 'fed into'  f to find the final output of the composite function

    • (fg)(x) can also be written as  f(g(x))

      • Read this as " f of g of x"

  • To find the output value of a composite function  f(g(x)) for a given input value

    • First find the output of the inner function g at the given input x

      • this gives g(x)

    • Then use that output as the input for the outer function  f

      • this gives  f(g(x))

    • E.g. if  f(x)=2x+3 and g(x)=x21, then to find  f(g(2))

      • First find g(2)

        • g(2)=221=3

      • then input that value into  f

        •  f(g(2))=f(3)=2(3)+3=9

Examiner Tips and Tricks

Be careful with the order of the functions in a composite function. The function on the right acts on the input first.

  • In (fg)(x)=f(g(x)), g acts on the input first, then the output of g is acted upon by  f

  • In (gf)(x)=g(f(x)),  f acts on the input first, then the output of  f is acted upon by g

What about the domain of a composite function?

  • The domain of the composite function fg is restricted to

    • those input values of g

    • for which the corresponding output value is in the domain of  f

  • If g(x) produces an output that is not in the domain of  f

    • then f(g(x)) is not defined at that input

How do you evaluate a composite function from tables, graphs, or formulas?

  • Values for the composite function fg can be calculated or estimated from graphical, numerical, analytical, or verbal representations of  f and g

  • The process is always the same

    • use output values from g as input values for  f

  • From a table

    • Look up g(x) in the table for g,

      • then look up  f at that value in the table for  f

    • E.g. if a table shows g(2)=5 and  f(5)=3

      • then f(g(2))=f(5)=3

  • From a graph

    • Read g(x) from the graph of g

      • then use that value as the input on the graph of  f

  • From a formula

    • Substitute the input into g to get a numerical value

      • then substitute that value into  f

  • Mixed representations

    • You may need to use different representations for  f and g

    • E.g. read g(x) from a table, then substitute into an analytical formula for  f

Examiner Tips and Tricks

Mixed representations for composite functions (e.g. one function in a table, the other as a formula) are very common on the AP® Precalculus exam.

If this occurs in a free response question, make sure you show the intermediate step clearly.

  • I.e. write down the value of the inner function before substituting into the outer function

  • This is often required to earn credit for supporting work

Properties of composite functions

Does the order of composition matter?

  • When the order doesn't matter for a mathematical operation, that operation is said to be commutative

    • For example, multiplication is commutative

      • 4×5=5×4=20

      • The order in which you multiply two numbers doesn't change the answer

  • The composition of functions is not commutative

    •  fg and gf are generally different functions

      • So  f(g(x)) and g(f(x)) generally have different values

    • E.g. if  f(x)=x2 and g(x)=x+3:

      •  f(g(1))=f(4)=16

      •  g(f(1))=g(1)=4

      • These are not equal

        • i.e. the order matters

  • Always pay close attention to which function is the inner function and which is the outer function

What is the identity function?

  • The identity function is the function defined by  f(x)=x

    • It maps every input to itself

      • the output is always equal to the input

  • When the identity function is composed with any function g

    • g(f(x))=g(x)

      • and  f(g(x))=g(x)

    • In both cases the result is just g

  • The identity function acts in composition the same way that 0 acts in addition and 1 acts in multiplication

    • It leaves the other function unchanged

Worked Example

The table gives values for the functions  p and q at selected values of x. Functions  p and q are defined for all real numbers. Let r be the function defined by r(x)=p(q(x)).

x

3

2

1

0

1

2

3

 p(x)

5

1

2

3

0

1

4

 q(x)

1

3

0

2

1

3

2

What is the value of r(0)?

(A) 2

(B) 1

(C) 2

(D) 3

Answer:

You are looking for the value of

r(0)=p(q(0))

From the table

q(0)=2

So

r(0)=p(2)=1

That is option (B)

(B) 1

Worked Example

The function  f is decreasing and is defined for all real numbers. The table gives values of  f(x) at selected values of x.

 x

2

1

0

1

2

 f(x)

18

9

4.5

2.25

1.125

The function g is given by g(x)=0.257x3+1.6x23.561.

The function h is defined by h(x)=(gf)(x)=g(f(x)). Find the value of h(1) as a decimal approximation, or indicate that it is not defined. Show the work that leads to your answer.

Answer:

You are looking for the value of

h(1)=g(f(1))

From the table

 f(1)=2.25

Therefore

h(1)=g(2.25)=0.257(2.25)3+1.6(2.25)23.561=1.611609375

Round to 3 decimal places

h(1)=1.612  (3 d.p.)

Examiner Tips and Tricks

When a question asks you to give an answer as a decimal approximation, remember that that means to give your answer accurate to three decimal places.

Unlock more, it's free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Build on this topic

Roger B

Author: Roger B

Expertise: Development Editor

Roger's teaching experience stretches all the way back to 1992, and in that time he has taught students at all levels between Year 7 and university undergraduate. Having conducted and published postgraduate research into the mathematical theory behind quantum computing, he is more than confident in dealing with mathematics at any level the exam boards might throw at you.

Mark Curtis

Reviewer: Mark Curtis

Expertise: Maths Content Creator

Mark graduated twice from the University of Oxford: once in 2009 with a First in Mathematics, then again in 2013 with a PhD (DPhil) in Mathematics. He has had nine successful years as a secondary school teacher, specialising in A-Level Further Maths and running extension classes for Oxbridge Maths applicants. Alongside his teaching, he has written five internal textbooks, introduced new spiralling school curriculums and trained other Maths teachers through outreach programmes.