Skip to content

Paper Together: sit a paper in a room with your friends.See how it works

Inverse & composite functions: worked examples and method

Higher · Grade 7 · Non-calculator

This page sets out the method for inverse & composite functions in the order you would use it, then walks through the full lesson explanation. For three complete worked examples with the slips that cost marks, see the Inverse & composite functions topic page.

Key facts

The method, step by step

Method: Inside out for composites

When you see or , start with the function nearest the (or the number).

  1. Work out (or of the number) first.
  2. Substitute that whole result into wherever has an — use brackets.
  3. Expand and simplify if an expression is required.
  4. Check the order: would mean first, then .

Method: Swap and rearrange for inverses

When asked for , treat it as a rearranging question.

  1. Write with the expression.
  2. Rearrange to make the subject.
  3. Swap the letters: replace with and every with .
  4. Check with a number: if then should be 2.

How the lesson explains it

Inverse

The inverse undoes the operations in reverse order.

Linear inverse

f(x)=2x+3 has inverse (x-3)/2.

Composite

f(g(x)) means do g first, then f.

Numbers

f(x)=x² and g(x)=x+2 give f(g(4)) = 6² = 36.

The other order

g(f(x)) is not the same as f(g(x)) when the functions differ.

Keep the brackets

f(x)=2x+1 and g(x)=x+3 give f(g(x))=2(x+3)+1=2x+7.

Substitute, do not multiply the rules

Take f(x)=2x+1 and g(x)=x^2-3. Then f(4)=2(4)+1=9 and g(4)=16-3=13. The composite fg(x) is not the product (2x+1)(x^2-3). It is f applied to the output of g: f(x^2-3)=2(x^2-3)+1=2x^2-6+1=2x^2-5. At x=2, g(2)=1 and f(1)=3, and 2(4)-5=3. The two routes match.

Order matters. gf(x)=g(2x+1)=(2x+1)^2-3=4x^2+4x+1-3=4x^2+4x-2. That is not 2x^2-5. When a question writes fg(3), do g(3) on a first line and f of that number on the second. When it writes fg(x), keep x as a letter and simplify the algebra. Mixing a number and an expression in the same answer is a sign that the two questions have been blurred.

Method: 1. Read the notation before you substitute. fg(4) is a number. 2. Apply the inside function first. 3. Then apply the outside function to that output. 4. Do not multiply the two rules together unless the notation says f(x)× g(x).

Build the inverse by reversing steps

The rule f is "multiply by 2, then add 1". The inverse is "subtract 1, then divide by 2", so f^-1(x)=(x-1)/2. In algebra: let y=2x+1, swap to make x the subject, x=(y-1)/2, then rename y as x. Check with the pair you already know. f(4)=9 and f^-1(9)=(9-1)/2=4. If the check does not return the original input, the inverse steps are in the wrong order.

A square needs care. If h(x)=(2x+3)^2, then h(x)=25 means 2x+3=± 5, so x=1 or x=-4. The inverse of a square is not a single-valued function on every input, which is why solving h(x)=25 has two answers. Do not write f^-1(x)=1/(2x+1) for f(x)=2x+1. That is the reciprocal of the output, and f(4)=9 would be sent to 1/9, not back to 4.

Method: 1. Write the rule as a list of steps. 2. Undo those steps in reverse order. 3. Swap the letters so the inverse is written in x. 4. Check that the inverse sends an output back to the input you started with.

Solve an equation in function notation

To solve gf(x)=6 with the functions above, write g(2x+1)=6. That is (2x+1)^2-3=6, so (2x+1)^2=9. Square root both sides: 2x+1=3 or 2x+1=-3. Then x=1 or x=-2. Check both in the original composite. f(1)=3 and g(3)=9-3=6. f(-2)=-4+1=-3 and g(-3)=9-3=6. Both work. Dropping the negative square root keeps only half the solutions.

An equation such as f(x)=f^-1(x) means the output of f equals the output of the inverse at the same input. With f(x)=2x+1 and f^-1(x)=(x-1)/2, set 2x+1=(x-1)/2. Multiply by 2: 4x+2=x-1, so 3x=-3 and x=-1. Check: f(-1)=-1, and f^-1(-1)=(-1-1)/2=-1. They meet. This is ordinary algebra after the functions have been written as expressions.

Method: 1. Write both sides as ordinary expressions. 2. Then solve the equation in the usual way. 3. A square can give two solutions. Keep both if both work. 4. Substitute each solution back into the function equation.

Read the notation before you start

f^2(x) in some books means ff(x), the function applied twice, not (f(x))^2. At this level a question that wants a square will usually write (f(x))^2 or f(x)× f(x). If you see f^-1, it is an inverse. If you see fg(4), it is a number. If you see fg(x), it is an expression. Underline which of the three you have been asked for, because the mark scheme is looking for that object and not a neighbour of it.

A linear inverse is one of the most checkable results in the topic. Pick any input, run f, run the inverse, and demand the same input back. Do it once on the paper. For a composite, pick x=2 or x=0, work out the inside function, then the outside, and compare with the simplified expression. Those two numbers are worth more than a second look at the algebra, because they do not repeat the same slip.

Method: 1. f^-1 is an inverse, not a reciprocal. 2. fg(x) is an expression. fg(4) is a number. 3. ff(x) means apply f twice, which is not automatically (f(x))^2. 4. Underline which of those the question asked for before you start.

Composite functions as full expressions

A composite function such as gf(x) means do f first, then put the result into g. To find the expression, write f(x) in place of every x in g. With f(x)=3x+2 and g(x)=x^2-4, the function g squares and subtracts 4, so gf(x)=(3x+2)^2-4. Expanding the square gives 9x^2+12x+4-4, which simplifies to 9x^2+12x. Put the whole of f(x) in a bracket, because squaring only the 3x loses the middle term.

Order matters: fg(x) is a different function. Here fg(x)=3(x^2-4)+2=3x^2-10. Exam questions often print the target and ask you to show it: "show that fg(x)=4x^2+2x-2". Start from the definition, write the substitution line, expand, and collect like terms. The substitution line is a method mark on its own. A check with one number, such as x=2 in both the original and the final form, takes seconds and catches most slips.

Method: 1. Decide which function acts first. The one nearest to x goes first. 2. Replace each x in the outer function with the whole inner expression, in brackets. 3. Expand brackets carefully, especially squares, and collect like terms. 4. Check the final form with one number substituted into both versions.

Tip: Say it out loud: gf of x means "g of f of x", so f is done first.

Inverse functions that involve fractions or brackets

To find an inverse, write y=f(x), rearrange to make x the subject, then swap the letters. For f(x)=(3x+2)/5, write y=(3x+2)/5. Multiply by 5: 5y=3x+2. Subtract 2: 5y-2=3x. Divide by 3: x=(5y-2)/3. Now swap to get f^-1(x)=(5x-2)/3. The inverse undoes the steps of f in reverse order: f multiplied by 3, added 2 and divided by 5; f^-1 multiplies by 5, subtracts 2 and divides by 3.

To find a single value such as f^-1(8), you can either find the whole inverse and substitute 8, or solve f(x)=8 directly. Both give the same answer. To check an inverse, test that f(f^-1(x))=x. For f(x)=(3x+2)/5, substituting gives dfrac3×(5x-2)/3+25=(5x-2+2)/5=x, which works. If a question says "show that f^-1(6) is not an integer", calculate the exact value as a fraction and say it is not a whole number.

Method: 1. Write y=f(x) and rearrange to make x the subject. 2. Swap x and y in the answer to write f^-1(x). 3. For a single value, solve f(x)=value as an equation. 4. Check by working out f(f^-1(x)) or by testing one number.

Functions with unknown constants

Some questions give functions with letters, such as f(x)=3x+a and g(x)=ax-2, and tell you fg(x)=12x+b. Work out fg(x) in terms of a first: f(ax-2)=3(ax-2)+a=3ax-6+a. Compare the coefficients of x on both sides: 3a=12, so a=4. Then compare the constants: -6+a=b, so b=-2. Matching coefficients is the technique, and it is worth writing out "compare x terms" and "compare constants" as separate lines.

A similar question gives two values and asks for the function. If f(x)=cx+d with f(2)=7 and f(6)=19, set up two equations: 2c+d=7 and 6c+d=19. Subtract the first from the second to get 4c=12, so c=3, and then d=1. Check by putting x=6 into 3x+1 to get 19. These questions look unfamiliar but use only simultaneous equations or coefficient matching.

Method: 1. Build the composite or the set of equations with the letters kept in. 2. Match the coefficients of x, then the constant terms. 3. Solve for each unknown in turn. 4. Check by substituting your values back into the original information.

Solving equations that involve composite functions

To solve gf(x)=15 with f(x)=4x-1 and g(x)=x^2+2x, first find gf(x) as an expression: (4x-1)^2+2(4x-1)=16x^2-8x+1+8x-2=16x^2-1. Then set it equal to 15: 16x^2=16, so x^2=1 and x=1 or x=-1. Do not forget the negative solution when you take a square root. Check both values: f(1)=3 and g(3)=15, and f(-1)=-5 and g(-5)=15.

An equation such as fg(x)=gf(x) asks you to find both composites, set them equal, and solve. Often the x^2 terms cancel and you are left with a linear equation. Another common form is "given that gf(x)=2fg(x), show that 3x^2+12x-5=0", where you build both expressions, form the equation, collect everything on one side, and tidy up. State each stage so the marker can follow the algebra to the printed result.

Method: 1. Find the composite as an expression in x and simplify it. 2. Write it equal to the number or to the other expression. 3. Rearrange to a linear or quadratic equation and solve it. 4. Substitute each solution back to check, and give both solutions when there are two.

Remember

Keep going with Inverse & composite functions

Practise free

Start free

AQA-style and Edexcel-style questions. Yumio is not affiliated with, endorsed by or connected to AQA, Pearson Edexcel or any other exam board.

Next topicPractise free