Functions Masterclass

1. What is a Function?

Think of a function as a machine. You put a number in (the input, \(x\)), the machine does something to it (the rule), and a new number comes out (the output, \(f(x)\)).

Input (x) → [ FUNCTION MACHINE ] → Output f(x)
The Rule: \( f(x) = 2x + 3 \)
This means: "Multiply the input by 2, then add 3."

Find \( f(5) \):
This means the input is 5.
\( f(5) = 2(5) + 3 \)
\( f(5) = 10 + 3 = 13 \)

2. Inverse Functions: \( f^{-1}(x) \)

An inverse function does the exact opposite. It takes the output and sends it back to the input. We denote this as \( f^{-1}(x) \).

How to find \( f^{-1}(x) \):
  1. Write the function as \( y = \dots \)
  2. Rearrange the equation to make \( x \) the subject.
  3. Swap \( x \) and \( y \) at the very end to write in correct notation.
Find the inverse of \( f(x) = 3x - 5 \) Step 1: Write as y \( y = 3x - 5 \) Step 2: Rearrange for x Add 5: \( y + 5 = 3x \)
Divide by 3: \( \frac{y + 5}{3} = x \) Step 3: Write notation \( f^{-1}(x) = \frac{x + 5}{3} \)

3. Compound (Composite) Functions

This is when we stick two function machines together. \( fg(x) \) means you do \( g \) first, and then put the result into \( f \).

Input → [ g(x) ] → Result → [ f(x) ] → Final Output
Let \( f(x) = x^2 \) and \( g(x) = x + 2 \)
Calculate \( fg(3) \):
1. Work from the INSIDE out (or Right to Left). Do \( g(3) \) first.
\( g(3) = 3 + 2 = 5 \)

2. Put that result (5) into \( f \).
\( f(5) = 5^2 = 25 \)
Answer: 25
Finding an algebraic expression for \( fg(x) \):
This means put the whole equation of \( g(x) \) inside \( f(x) \).
\( f( \mathbf{x + 2} ) = (\mathbf{x + 2})^2 \)

Practice Questions & Solutions

Try these yourself, then click to reveal the solution.

Q1: If \( f(x) = 4x - 1 \), calculate \( f(5) \).
Substitute 5 into the expression.
\( 4(5) - 1 \)
\( 20 - 1 \)
Answer: 19
Q2: If \( g(x) = x^2 + 3 \), calculate \( g(-4) \).
Substitute -4. Be careful with squaring negatives!
\( (-4)^2 + 3 \)
\( 16 + 3 \)
Answer: 19
Q3: Find the inverse function \( f^{-1}(x) \) where \( f(x) = x + 7 \).
\( y = x + 7 \)
Rearrange for x: \( y - 7 = x \)
Swap notation.
Answer: \( f^{-1}(x) = x - 7 \)
Q4: Find the inverse function \( f^{-1}(x) \) where \( f(x) = 5x \).
\( y = 5x \)
Divide by 5: \( \frac{y}{5} = x \)
Answer: \( f^{-1}(x) = \frac{x}{5} \)
Q5: Find the inverse of \( h(x) = \frac{x - 2}{4} \).
\( y = \frac{x - 2}{4} \)
Multiply by 4: \( 4y = x - 2 \)
Add 2: \( 4y + 2 = x \)
Answer: \( h^{-1}(x) = 4x + 2 \)
Q6: \( f(x) = 2x \) and \( g(x) = x + 5 \). Calculate \( fg(3) \).
1. Do \( g(3) \) first: \( 3 + 5 = 8 \).
2. Put 8 into \( f \): \( f(8) = 2(8) \).
Answer: 16
Q7: Using the same functions as Q6, calculate \( gf(3) \).
1. Do \( f(3) \) first: \( 2(3) = 6 \).
2. Put 6 into \( g \): \( g(6) = 6 + 5 \).
Answer: 11
Q8: \( f(x) = x^2 \) and \( g(x) = 3x \). Find the expression for \( fg(x) \).
Put \( g(x) \) inside \( f(x) \).
Instead of \( x^2 \), we square the whole of \( g(x) \).
\( (3x)^2 \)
Answer: \( 9x^2 \)
Q9: \( f(x) = 2x + 1 \). Find an expression for \( ff(x) \).
Put the function inside itself.
\( 2(\mathbf{2x + 1}) + 1 \)
Expand: \( 4x + 2 + 1 \)
Answer: \( 4x + 3 \)
Q10: Challenge! \( f(x) = \frac{10}{x} \). Solve \( f(x) = 5 \).
Set the equation to 5.
\( \frac{10}{x} = 5 \)
Multiply by \( x \): \( 10 = 5x \)
Divide by 5: \( 2 = x \)
Answer: \( x = 2 \)