Composite functions and transformations AI HL

A composite function applies one function and then another, and an inverse function undoes a function, which is only possible when the function is one-to-one on its domain. Transformations then show how a change to the equation of a curve translates, reflects or stretches its graph, and the order of two transformations matters. In an exam the calculator checks the work: it evaluates a composite at a point, solves an equation by graph, and shows the minimum or the asymptote of a transformed curve.

Formulas at a glance

None of the rules on this page is in the formula booklet, so learn them. They are definitions and rules that you apply to the function in the question.

Composite function: apply gg first, then ff

(f∘g)(x)=f(g(x))(f\circ g)(x)=f(g(x))

Not in the booklet

Inverse function undoes the function

f−1(f(x))=x=f(f−1(x))f^{-1}(f(x))=x=f(f^{-1}(x))

Not in the booklet

Finding an inverse

Write y=f(x)y=f(x), swap xx and yy, then solve for yy

Not in the booklet

Translations

y=f(x)+by=f(x)+b moves up bb; y=f(x−a)y=f(x-a) moves right aa

Not in the booklet

Reflections

y=−f(x)y=-f(x) in the xx-axis; y=f(−x)y=f(-x) in the yy-axis

Not in the booklet

Vertical stretch, scale factor pp

y=pf(x)y=pf(x)

Not in the booklet

Horizontal stretch, scale factor 1q\dfrac1q

y=f(qx)y=f(qx)

Not in the booklet

Which method to use

Decide whether the question is about combining or undoing functions, or about moving a graph, then work out which part of the equation changes the graph.

The question hasUseNotes
A value such as (f∘g)(a)(f\circ g)(a)Find g(a)g(a) first, then put the result into ffThe function nearest to the input is applied first. In general f(g(x))f(g(x)) and g(f(x))g(f(x)) differ
A function written as a composite, and the two parts are wantedLook for the inner part that is worked out first and call it g(x)g(x); what is done to it afterwards is ffCheck by composing: f(g(x))f(g(x)) must give the original
An equation such as (f∘g)(x)=k(f\circ g)(x)=kForm f(g(x))f(g(x)) in terms of xx, then solve by hand or graph both sides on the calculatorCheck every solution lies in the domain of gg
The inverse function f−1f^{-1}Write y=f(x)y=f(x), swap xx and yy, then solve for yyCheck that f−1(f(x))=xf^{-1}(f(x))=x. The domain of f−1f^{-1} is the range of ff
An inverse is wanted but the function is not one-to-oneRestrict the domain so that each output has one input, then find the inverseState the restriction, for example one side of the vertex of a quadratic
A new equation such as y=f(x)+by=f(x)+b or y=f(x−a)y=f(x-a)A translation: up bb, or right aaThe change inside the brackets moves the graph the opposite way to the sign
A new equation such as y=−f(x)y=-f(x), y=f(−x)y=f(-x), y=pf(x)y=pf(x) or y=f(qx)y=f(qx)A reflection in the xx-axis, a reflection in the yy-axis, a vertical stretch with factor pp, or a horizontal stretch with factor 1q\dfrac1qA change to xx acts on the horizontal direction and a change to the whole function acts vertically
Two or more transformations in one equationApply them in the order the arithmetic is done on ff: a stretch (multiply) before a translation (add), changing xx and yy of each point in turnOnly transformations in the same direction depend on their order, but then a stretch followed by a translation is a different curve from the translation followed by the stretch

Section 1 of 2 AHL2.7

Composite and inverse functions

The composite function (f∘g)(x)=f(g(x))(f\circ g)(x)=f(g(x)) applies gg first and then ff to the result, so changing the order changes the answer. The inverse function f−1f^{-1} reverses ff and exists only where ff is one-to-one. To find it, swap xx and yy and rearrange, restricting the domain if needed.

Composition and inverses

None of this is in the formula booklet. The notation, the inverse relationship and the need to restrict the domain so that an inverse exists are all knowledge you apply yourself.

Making an inverse exist

Restrict the domain so ff is one-to-one

Not in the formula booklet, but part of the AHL2.7 content. A many-to-one function like f(x)=x2f(x)=x^2 needs a restricted domain before f−1f^{-1} is a genuine function.

Key terms

What is the domain of a function?

The domain is the set of input values for which the function is defined. It may be restricted by the context or stated in the question.

e.g. For f(x)=xf(x)=\sqrt{x}, the domain is x≥0x\ge0.

What is the range of a function?

The range is the set of output values that the function takes. The domain of f−1f^{-1} is the range of ff.

e.g. For f(x)=x2f(x)=x^2 with x∈Rx\in\mathbb{R}, the range is f(x)≥0f(x)\ge0.

What does one-to-one mean?

A function is one-to-one when each output comes from exactly one input. Only a one-to-one function has an inverse.

e.g. f(x)=x2f(x)=x^2 is not one-to-one on all real numbers since f(2)=f(−2)=4f(2)=f(-2)=4, but it is one-to-one when x≥0x\ge0.

What happens when you compose a function with its inverse?

Applying a function and then its inverse returns the original input, so f(f−1(x))=xf(f^{-1}(x))=x and f−1(f(x))=xf^{-1}(f(x))=x on the appropriate domains.

e.g. If f(x)=2x+1f(x)=2x+1 then f−1(x)=x−12f^{-1}(x)=\dfrac{x-1}{2}, and f(f−1(x))=2×x−12+1=xf(f^{-1}(x))=2\times\dfrac{x-1}{2}+1=x.

Worked example, step by step

The question Calculator needed [6 marks]

A circular ripple spreads across a pond. At time tt seconds after it starts, its radius in metres is r=g(t)=0.5+0.4t,t≥0.r=g(t)=0.5+0.4t,\qquad t\ge0. The area in square metres of a circle of radius rr is A=f(r)=πr2A=f(r)=\pi r^2.

(a) Find (f∘g)(3)(f\circ g)(3), the area of the ripple after 3 seconds.

(b) Find the time at which the area of the ripple is 20 m220\text{ m}^2.

(c) Find g−1(r)g^{-1}(r).

Worked solution: worked example

Answer: (a) 9.08 m29.08\text{ m}^2 (b) 5.065.06 seconds (c) g−1(r)=2.5r−1.25g^{-1}(r)=2.5r-1.25

Step 1 - Understand the composite.

(f∘g)(t)=f(g(t))(f\circ g)(t)=f(g(t)): first gg turns the time into a radius, then ff turns the radius into an area. So (f∘g)(t)=π(0.5+0.4t)2.(f\circ g)(t)=\pi(0.5+0.4t)^2.

Why? The function written next to the input, gg, is applied first. The composite takes a time straight to an area.

Step 2 - Evaluate at t=3t=3.

g(3)=0.5+0.4(3)=1.7g(3)=0.5+0.4(3)=1.7, then (f∘g)(3)=f(1.7)=π(1.7)2=9.08 m2.(f\circ g)(3)=f(1.7)=\pi(1.7)^2=9.08\text{ m}^2. M1 - Find g(3)=1.7g(3)=1.7 and substitute into ff A1 - 9.089.08

Why? Work out the inner value first and keep it on the calculator for the next step. The result is the area after 3 seconds.

Step 3 - Solve (f∘g)(t)=20(f\circ g)(t)=20.

Enter y=π(0.5+0.4x)2y=\pi(0.5+0.4x)^2 and y=20y=20 on the calculator, with x≥0x\ge0, and find the intersection: t=5.06 seconds.t=5.06\text{ seconds}. M1 - Form π(0.5+0.4t)2=20\pi(0.5+0.4t)^2=20 A1 - t=5.06t=5.06

Why? By hand, 0.5+0.4t=20/π0.5+0.4t=\sqrt{20/\pi}. The negative square root is rejected because a radius cannot be negative. This is the domain restriction: ff only has an inverse when r≥0r\ge0.

Step 4 - Find the inverse of gg.

Write r=0.5+0.4tr=0.5+0.4t and solve for tt: t=r−0.50.4⇒g−1(r)=2.5r−1.25.t=\dfrac{r-0.5}{0.4}\quad\Rightarrow\quad g^{-1}(r)=2.5r-1.25. M1 - Solve r=0.5+0.4tr=0.5+0.4t for tt A1 - g−1(r)=2.5r−1.25g^{-1}(r)=2.5r-1.25

Why? The inverse undoes gg: it takes a radius back to the time. Check: g−1(1.7)=2.5(1.7)−1.25=3g^{-1}(1.7)=2.5(1.7)-1.25=3, the original time.

Marks (6):
M1 Find g(3)=1.7g(3)=1.7 and substitute into ff
A1 9.089.08
M1 Form π(0.5+0.4t)2=20\pi(0.5+0.4t)^2=20
A1 t=5.06t=5.06
M1 Solve r=0.5+0.4tr=0.5+0.4t for tt
A1 g−1(r)=2.5r−1.25g^{-1}(r)=2.5r-1.25

Now you try: enter your answers to be marked

These are real practice questions. Type your answer in each box and press Mark it. The worked solution and mark scheme appear straight away, and your first attempt is the one that counts. Use the keyboard for powers, roots and trig, and the working box for your notes.

1
Easy
No calc
[2 marks]
Given f(x)=2x+5f(x)=2x+5 and g(x)=x2−3g(x)=x^{2}-3, find (f∘g)(3)(f\circ g)(3).
[2]
Fractions & powers
Other

Worked solution: practice question 1

2
Medium
Calculator
[4 marks]
Let f(x)=x+2f(x)=x+2 and g(x)=x2−1g(x)=x^{2}-1.

(a) Solve (g∘f)(x)=8.(g\circ f)(x)=8.
[4]
Fractions & powers
Other

Worked solution: practice question 2

3
Hard
No calc
[5 marks]
Given f(x)=x2f(x)=x^{2} and g(x)=2x−1g(x)=2x-1, solve (f∘g)(x)=(g∘f)(x)(f\circ g)(x)=(g\circ f)(x).
[5]
Fractions & powers
Other

Worked solution: practice question 3

Your score so far: 0 out of 11 marks

Common mistakes

  • Forgetting to restrict the domain when finding an inverse. If the original function isn't one-to-one over its stated domain, f−1f^{-1} doesn't exist there - the restriction has to be stated as part of the answer, not left implicit.
  • Applying the functions in the wrong order. (f∘g)(x)(f\circ g)(x) means gg acts first - swapping the order gives (g∘f)(x)(g\circ f)(x), which is generally a different function entirely.
  • Confusing f−1(x)f^{-1}(x) with 1f(x)\dfrac{1}{f(x)}. The inverse function reverses ff; it is not the reciprocal. Writing f−1(x)f^{-1}(x) as 1/f(x)1/f(x) is one of the most common notation slips at this level.

Try some questions on composite and inverse functions

Section 2 of 2 AHL2.8

Graph transformations

Graph transformations change the equation of y=f(x)y=f(x) in fixed ways: f(x)+bf(x)+b and f(x−a)f(x-a) translate the graph, pf(x)pf(x) and f(qx)f(qx) stretch it, and −f(x)-f(x) and f(−x)f(-x) reflect it. When several are combined, the order in which they are applied affects the final graph. It covers describing a sequence of transformations and applying it to points.

Transformations of y=f(x)y=f(x)

These apply to every function type in the SL and AHL syllabus, including ones built to model real-life situations. None of this is in the formula booklet - you're expected to know the effect of each rule on the graph.

Key terms

What does y = f(x) + b do to a graph?

It translates the graph vertically by bb units: upwards when b>0b>0 and downwards when b<0b<0. Every yy-coordinate changes by bb and the xx-coordinates stay the same.

e.g. y=x2+3y=x^2+3 is the graph of y=x2y=x^2 moved up 33 units.

What does y = f(x - a) do to a graph?

It translates the graph horizontally by aa units, to the right when a>0a>0. The direction is opposite to the sign inside the bracket.

e.g. y=(x−2)2y=(x-2)^2 is y=x2y=x^2 moved 22 units to the right, so its vertex is at (2,0)(2,0).

How do you reflect a graph?

The graph of y=−f(x)y=-f(x) is the reflection of y=f(x)y=f(x) in the xx-axis, and y=f(−x)y=f(-x) is its reflection in the yy-axis.

e.g. If (3,2)(3,2) is on y=f(x)y=f(x), then (3,−2)(3,-2) is on y=−f(x)y=-f(x) and (−3,2)(-3,2) is on y=f(−x)y=f(-x).

What is a vertical stretch?

The graph of y=pf(x)y=pf(x) is a stretch parallel to the yy-axis with scale factor pp. Each yy-coordinate is multiplied by pp, and points on the xx-axis stay where they are. A horizontal stretch y=f(qx)y=f(qx) has scale factor 1q\dfrac1q: each xx-coordinate is multiplied by 1q\dfrac1q, and points on the yy-axis stay where they are.

e.g. If (2,5)(2,5) is on y=f(x)y=f(x), then (2,15)(2,15) is on y=3f(x)y=3f(x).

Worked example, step by step

The question Calculator needed [5 marks]

A designer models the profile of a bowl by the curve y=f(x)y=f(x), where f(x)=x2−2x+4f(x)=x^2-2x+4. The profile of a larger bowl is the curve y=2f(x−3)+1.y=2f(x-3)+1.
(a) Describe the two transformations that map the graph of y=f(x)y=f(x) onto the graph of y=2f(x−3)+1y=2f(x-3)+1, in the order they are applied.

(b) The curve y=f(x)y=f(x) has its minimum point at (1,3)(1,3) and passes through (4,12)(4,12). Find the coordinates of the corresponding points on y=2f(x−3)+1y=2f(x-3)+1.

Worked solution: worked example

Answer: (a) A vertical stretch with scale factor 22, then a translation by (31)\begin{pmatrix}3\\1\end{pmatrix} (b) (4,7)(4,7) and (7,25)(7,25)

Step 1 - Compare with the general form.

The new equation has the form y=pf(x−a)+by=pf(x-a)+b with p=2p=2, a=3a=3 and b=1b=1.

Why? The x−3x-3 inside the bracket changes the horizontal position. The 22 multiplies the whole function, and the +1+1 is added at the end.

Step 2 - Describe the transformations in order.

First a vertical stretch with scale factor 22, then a translation by the vector (31)\begin{pmatrix}3\\1\end{pmatrix}: 33 units to the right and 11 unit up. A1 - Vertical stretch with scale factor 22 A1 - Translation (31)\begin{pmatrix}3\\1\end{pmatrix}

Why? The order matters. The stretch is applied first because 2f(x)2f(x) is formed before 11 is added. Translating up by 11 first and then stretching would give 2(f(x)+1)=2f(x)+22(f(x)+1)=2f(x)+2, a different curve, because the stretch would double the shift.

Step 3 - Find the image points.

A point (x,y)(x,y) on y=f(x)y=f(x) moves to (x+3, 2y+1)(x+3,\ 2y+1). The minimum point (1,3)(1,3) goes to (4, 2(3)+1)=(4,7)(4,\ 2(3)+1)=(4,7), and (4,12)(4,12) goes to (7, 2(12)+1)=(7,25)(7,\ 2(12)+1)=(7,25). M1 - Apply (x,y)→(x+3, 2y+1)(x,y)\to(x+3,\ 2y+1) A1 - (4,7)(4,7) A1 - (7,25)(7,25)

Why? The translation to the right adds 33 to every xx-coordinate. The vertical stretch doubles every yy-coordinate before 11 is added.

Step 4 - Check on the calculator.

Enter y=2((x−3)2−2(x−3)+4)+1y=2\bigl((x-3)^2-2(x-3)+4\bigr)+1 and use the minimum tool: the minimum point is (4,7)(4,7). Evaluating at x=7x=7 gives y=25y=25.

Why? The calculator agrees with the image points, so the description of the transformations is consistent with the equation.

Marks (5):
A1 Vertical stretch with scale factor 22
A1 Translation (31)\begin{pmatrix}3\\1\end{pmatrix}
M1 Apply (x,y)→(x+3, 2y+1)(x,y)\to(x+3,\ 2y+1)
A1 (4,7)(4,7)
A1 (7,25)(7,25)

Now you try: enter your answers to be marked

1
Medium
No calc
[3 marks]
State the range of f(x)=3x+4f(x)=3^{x}+4.
[3]
Fractions & powers
Other

Worked solution: practice question 1

2
Medium
No calc
[3 marks]
Consider y=ln⁡(x−2).y=\ln(x-2).
(a) Find the domain.
[2]
(b) State the equation of the vertical asymptote.
[1]
Fractions & powers
Logs
Other

Worked solution: practice question 2

Your score so far: 0 out of 6 marks

Common mistakes

  • Getting the sign backwards on a horizontal translation. y=f(x−a)y=f(x-a) shifts the graph aa units in the positive xx direction - the minus sign inside the brackets produces a shift to the right, which feels the wrong way round on first meeting it.
  • Applying a stretch and a translation in the wrong order. In y=3f(x)+2y=3f(x)+2 the graph is stretched first and then moved up 22. Moving it up 22 first and then stretching would give y=3(f(x)+2)=3f(x)+6y=3\bigl(f(x)+2\bigr)=3f(x)+6, a different curve.
  • Mixing up stretch scale factor with the value qq. In y=f(qx)y=f(qx) the horizontal stretch scale factor is 1q\dfrac{1}{q}, not qq itself - a large qq compresses the graph towards the yy-axis rather than stretching it out.

Try some questions on graph transformations

Using your GDC

The exact key presses for the TI-84 Plus CE, Casio fx-CG50, Casio fx-CG100 and TI-Nspire CX, with what the screen shows. Pick your calculator.

Evaluate a function at a point

Used in: Composite and inverse functions

How to evaluate a function at a point on a TI-84 Plus CE

Call the function from the home screen

Press Y= and type the function into Y1: X,T,θ,n ^ 3 − 2 X,T,θ,n + 1.

Y1=X^3-2X+1

Press 2nd mode (QUIT) to return to the home screen. Press vars, then ▶ to open the Y-VARS menu, choose 1:Function and then 1:Y1. Use this menu rather than typing the letter Y and the number 1.

Type the x-value in brackets, ( 2 . 5 ), and press enter.

f(2.5)=11.625f(2.5) = 11.625, which is 11.611.6 to 3 significant figures.

Y1(2.5)
11.625
Another way: the table

Press 2nd window (TBLSET) and set Indpnt to Ask, then press 2nd graph (TABLE). The table is empty. Type 2 . 5 and press enter: the Y1 column fills in.

X | Y1
2.5 | 11.625
Another way: trace the graph

Press graph to draw the graph, then trace. Type 2 . 5 (an X= prompt appears) and press enter. The cursor jumps to that x-value and the bottom of the screen shows the point.

X=2.5
Y=11.625

Y1( from the Y-VARS menu is the exact route: the answer is the function's value, not a cursor position. Use the table when you want several values.

The full guide: Evaluate a function at a point

Enter a function and draw its graph

Used in: Composite and inverse functions, Graph transformations

How to enter a function and draw its graph on a TI-84 Plus CE

Enter the function in Y= and draw it

Press Y=. If there are old functions, move to each one with ▲ or ▼ and press clear to erase it. A function is only drawn while the = sign beside it is highlighted.

Plot1 Plot2 Plot3
\Y1=
\Y2=
\Y3=

With the cursor next to Y1=, type X,T,θ,n x² − 4 X,T,θ,n + 3. The calculator uses X,T,θ,n for xx.

Plot1 Plot2 Plot3
\Y1=X²-4X+3
\Y2=
\Y3=

Press window and set Xmin = −2, Xmax = 6, Ymin = −2, Ymax = 8, leaving Xscl and Yscl as 1. For a negative number use the (−) key, not the subtraction key.

WINDOW
Xmin=-2
Xmax=6
Xscl=1
Ymin=-2
Ymax=8
Yscl=1

Press graph.

The curve is an upward-opening parabola. It meets the yy-axis at y=3y = 3.

Draw more than one function, or hide one

Type the next function next to Y2= (press ▼ to reach it) and press graph again: every function whose = sign is highlighted is drawn. To keep a function but not draw it, move onto its = sign with ◀ and press enter, so the highlight disappears. Press enter again to turn it back on.

If the graph is blank or cut off

Press zoom and choose 6:ZStandard to draw with the standard window, or choose 0:ZoomFit, which keeps your Xmin and Xmax and sets Ymin and Ymax so the whole curve fits. Choosing a window by hand is in set a good viewing window.

For a graph that contains sin, cos or tan, check the angle mode first: press mode and see switching between degrees and radians.

If the graph does not appear, the cause is usually the window, not the function. Look at the window values before you retype anything.

The full guide: Enter a function and draw its graph

See the full list of GDC guides for every calculator task.

Syllabus content covered

CodeSyllabus content
AHL2.7Composite functions in context. The notation (f∘g)(x)=f(g(x))(f\circ g)(x)=f(g(x)). Inverse function f−1f^{-1}, including domain restriction. Finding an inverse function. f(f−1(x))=x=f−1(f(x))f(f^{-1}(x))=x=f^{-1}(f(x)).
AHL2.8Transformations of graphs. Students will be expected to be able to perform transformations on all functions from the SL and AHL section of this topic, and others in the context of modelling real-life situations. Translations: y=f(x)+by=f(x)+b; y=f(x−a)y=f(x-a). Reflections: in the xx-axis y=−f(x)y=-f(x), and in the yy-axis y=f(−x)y=f(-x). Vertical stretch with scale factor pp: y=pf(x)y=pf(x). Horizontal stretch with scale factor 1q\dfrac1q: y=f(qx)y=f(qx). Composite transformations. Students should be made aware of the significance of the order of transformations.

Official IB source: Mathematics: applications and interpretation subject brief (PDF, ibo.org).

Quick questions

What order do you apply the functions in (f o g)(x)?

The inner function acts first. (f∘g)(x)=f(g(x))(f\circ g)(x) = f(g(x)) means you evaluate g(x)g(x) first, then substitute that result into ff.

Does a horizontal stretch move points closer to or further from the y-axis?

A horizontal stretch with scale factor 1q\dfrac{1}{q}, given by y=f(qx)y=f(qx), moves points closer to the yy-axis when q>1q>1 and further away when 0<q<10<q<1 - the scale factor and the value of qq act in opposite directions.

How do you find the domain of an inverse function?

It is the range of the original function. If f(x)=x2+3f(x)=x^2+3 with x≥0x\ge0, the range of ff is f(x)≥3f(x)\ge3, so the domain of f−1f^{-1} is x≥3x\ge3.

How do I find the image of a point under several transformations?

Apply each transformation to the coordinates in turn. If (4,5)(4,5) is on y=f(x)y=f(x), then on y=2f(x)+1y=2f(x)+1 the xx-coordinate is unchanged and the yy-coordinate is 2×5+1=112\times5+1=11, giving (4,11)(4,11).

How do you evaluate a composite function at a number?

Work from the inside out. If f(x)=5x−1f(x)=5x-1 and g(x)=x+2g(x)=x+2, then g(4)=6g(4)=6 and (f∘g)(4)=f(6)=29(f\circ g)(4)=f(6)=29.

Why does f(x - 3) move the graph to the right?

The output of f(x−3)f(x-3) at xx equals the original output at x−3x-3, so each point must be 33 units further right to get the same value. A point of ff at x=0x=0 appears at x=3x=3 on y=f(x−3)y=f(x-3).

Is (f o g)(x) the same as (g o f)(x)?

Not usually. If f(x)=x+1f(x)=x+1 and g(x)=2xg(x)=2x, then f(g(x))=2x+1f(g(x))=2x+1 but g(f(x))=2x+2g(f(x))=2x+2.

What happens to an asymptote under a transformation?

It is transformed in the same way as the rest of the graph. The graph of y=2xy=2^x has the asymptote y=0y=0, so y=2x+4y=2^x+4 has the asymptote y=4y=4.

Ready to practise properly?

Practice questions on every section, marked instantly like the real exam.