Functions

A function is a rule that takes an input and produces an output. We will start with simple number machines, then learn a short way to write their rules.

Function machines, including working backwards to find an input, are Foundation and Higher skills. Formal function notation and composite/inverse functions form the Higher route for AQA/Pearson. OCR requires the corresponding concepts but asks without formal f(x) or gf(x) notation, so each method here is also explained in words.

What is a function?

Think of a function as a number machine. The input is the number you put in. The rule tells you what to do. The output is the result.

Input → rule → output. The arrows mean “go to the next step”.

Here is a one-step machine. Its rule is “add 4”. Follow the arrows from top to bottom.

A one-step function machineInput 3. Add 4. Output 7. Follow the arrows downwards. Input3 RuleAdd 4 Output7

The input is 3. Work out 3 + 4. The output is 7.

If you put 3 into this same machine again, the output is still 7. The same input must give the same output.

A machine can have more than one step. Always follow its instructions in order.

Example Question:

A machine says: multiply by 2, then add 3.

The input is 5. What is the output?

Try the two steps separately. Example 1 shows the working.

Exam Tip

First decide what the question gives you: the input or the output.

If you know the input, follow the rule forwards.

If you know the output, undo the steps in reverse order.

Key idea

f(3) asks for an output. Put 3 into the rule.

f(x) = 11 asks for an input. Find the number that gives output 11.

For f(x) = 2x + 3, these answers are f(3) = 9 and x = 4.

Check your input

In Example 6, we found x = 4 when the output was 11. Check by following the original rule forwards:

f(4) = 2 × 4 + 3

f(4) = 8 + 3

f(4) = 11

The output matches 11, so the input is correct.

Higher — inverse functions and composite rules

Worked example — Write an inverse function

An inverse function undoes a function. For f(x) = 3x − 4, the original steps are “multiply by 3, subtract 4”.

Reverse them: add 4, then divide by 3.

f⁻¹(x) = (x + 4)/3. Read this as “f inverse of x”. The −1 is inverse-function notation; it does not mean 1/f(x).

Find f⁻¹(11): (11 + 4)/3 = 5. Check forwards: f(5) = 3 × 5 − 4 = 11.

You can also rearrange y = 3x − 4 to x = (y + 4)/3. Rename the input y as x when writing f⁻¹(x).

Worked example — Find a composite rule

Let f(x) = 2x + 3 and g(x) = x − 4. Find fg(x), meaning f(g(x)).

Start with g(x) = x − 4. Put this whole expression into f in place of its input.

f(g(x)) = 2(x − 4) + 3.

Expand and simplify: 2x − 8 + 3 = 2x − 5.

In the other order, g(f(x)) = (2x + 3) − 4 = 2x − 1. The rules differ.

When an inverse needs a restriction

The rule h(x) = x² sends both 2 and −2 to 4. From output 4 alone, you cannot choose a unique original input.

If the allowed inputs are restricted to x ≥ 0, the inverse is h⁻¹(x) = √x, for x ≥ 0.

The allowed inputs are called the domain. An inverse function must return just one output for each allowed input. Use any restriction given in the question.

Further practice — Higher functions

10. If f(x) = 4x + 7, find f⁻¹(x) and then f⁻¹(19).

Undo adding 7 by subtracting 7, then undo multiplying by 4 by dividing by 4.

f⁻¹(x) = (x − 7)/4.

f⁻¹(19) = (19 − 7)/4 = 3. Check: f(3) = 12 + 7 = 19.

11. If f(x) = 3x + 1 and g(x) = x − 2, find fg(x) and gf(x).

fg(x) = f(g(x)) = 3(x − 2) + 1 = 3x − 5.

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

Each time, the inside function is applied first.

12. The function h(x) = x² has allowed inputs x ≥ 0. Find h⁻¹(25) and explain why you do not give −5.

The inverse uses the non-negative square root: √25 = 5.

−5 also squares to 25, but it is not an allowed input of h. The restriction makes the inverse unambiguous.

Frequently Asked Questions

What does f(x) mean?

It means the output of function f when the input is x. Read it as “f of x”.

Does f(x) mean f multiplied by x?

No. The letter f names the rule. The brackets contain the input.

Can a function have a negative input?

Yes, if the rule allows it. For f(x) = 2x + 3, negative inputs work in exactly the same way. Keep their signs when substituting.

How do I know whether to find an input or an output?

In f(3), the input 3 is already given: find the output. In f(x) = 11, the output 11 is given: solve for the input x.

Why do we use different function names?

The names identify different rules. Always check the definition given in the question; f does not have one fixed rule across all maths questions.

Higher: which function goes first in fg(x)?

It means f(g(x)), so g goes first. Its output becomes the input to f. Writing the full brackets can help you see the order.

Scroll to Top