Functions Masterclass
1. Inputs and Outputs: What is a Function?
A function is like a mathematical machine. You put a number in (the input, usually $x$), the machine applies a mathematical rule to it, and spits a new number out (the output, usually written as $f(x)$).
Function Notation:
$f(x) = 3x + 2$
This is read as "f of x equals 3x plus 2". The rule is: multiply the input by 3, then add 2.
Example 1: Finding an output
If $f(x) = 5x - 4$, find the value of $f(3)$.
Step 1: Replace every $x$ with the number 3.
$f(3) = 5(3) - 4$
Step 2: Calculate.
$f(3) = 15 - 4$
$f(3) = 11$
Watch out for negative inputs!
If $g(x) = x^2$ and you need to find $g(-4)$, remember that a negative times a negative is a positive.
$g(-4) = (-4)^2 = 16$.
2. Inverse Functions $f^{-1}(x)$
An inverse function reverses the process. If a function turns a 2 into a 10, the inverse function will turn the 10 back into a 2. We write the inverse of $f(x)$ as $f^{-1}(x)$.
The 4-Step Method to find an Inverse Function:
- Write the equation with $y$ instead of $f(x)$.
- Rearrange the equation to make $x$ the subject.
- Swap the $x$ and the $y$ around.
- Replace $y$ with $f^{-1}(x)$.
Example 2: Find the inverse of $f(x) = \frac{x + 5}{2}$
Step 1: Write with y
$y = \frac{x + 5}{2}$
Step 2: Rearrange to make x the subject
Multiply both sides by 2: $2y = x + 5$
Subtract 5 from both sides: $2y - 5 = x$
Step 3 & 4: Swap and rewrite notation
$y = 2x - 5$
$f^{-1}(x) = 2x - 5$
3. Compound (Composite) Functions $fg(x)$
A compound function is what happens when you link two function machines together. The output of the first machine immediately becomes the input for the second machine.
The Right-to-Left Rule:
For $fg(x)$, you must work from the inside out (right to left). You apply function $g$ first, and then put that answer into function $f$.
Example 3: Working out a value for $fg(x)$
Let $f(x) = 2x$ and $g(x) = x + 4$. Find the value of $fg(3)$.
Step 1: Do the inner function first. Find $g(3)$.
$g(3) = 3 + 4 = 7$
Step 2: Put that answer into the outer function. Find $f(7)$.
$f(7) = 2(7) = 14$
Answer: $fg(3) = 14$
Example 4: Finding an algebraic expression for $fg(x)$
Using the same functions: $f(x) = 2x$ and $g(x) = x + 4$. Find an expression for $fg(x)$.
Method: Substitute the entirety of $g(x)$ into the $x$ of $f(x)$.
$f(g(x)) = 2(g(x))$
$f(x+4) = 2(x + 4)$
Expand the bracket: $2x + 8$
Answer: $fg(x) = 2x + 8$
Practice Questions & Solutions
Try these on a piece of paper first. Click the question to check your step-by-step solution!
Q1: If $f(x) = 4x - 7$, find the value of $f(5)$.
Substitute 5 in place of $x$.
$f(5) = 4(5) - 7$
$f(5) = 20 - 7$
Answer: 13
Q2: If $g(x) = x^2 + 3x$, find the value of $g(-2)$.
Substitute -2 carefully, using brackets for the negative number.
$g(-2) = (-2)^2 + 3(-2)$
$g(-2) = 4 - 6$
Answer: -2
Q3: Find the inverse function, $f^{-1}(x)$, for $f(x) = 3x + 8$.
Let $y = 3x + 8$
Subtract 8: $y - 8 = 3x$
Divide by 3: $\frac{y - 8}{3} = x$
Swap variables and rewrite notation:
Answer: $f^{-1}(x) = \frac{x - 8}{3}$
Q4: Find $h^{-1}(x)$ if $h(x) = \frac{x}{5} - 2$.
Let $y = \frac{x}{5} - 2$
Add 2: $y + 2 = \frac{x}{5}$
Multiply all by 5: $5(y + 2) = x$
Expand: $5y + 10 = x$
Answer: $h^{-1}(x) = 5x + 10$
Q5: Find the inverse of $f(x) = \frac{10}{x}$.
Let $y = \frac{10}{x}$
Multiply by $x$: $xy = 10$
Divide by $y$: $x = \frac{10}{y}$
Swap variables: $y = \frac{10}{x}$
Notice that this function is its own inverse!
Answer: $f^{-1}(x) = \frac{10}{x}$
Q6: Given $f(x) = 3x$ and $g(x) = x - 5$, calculate the value of $fg(8)$.
1. Find $g(8)$ first: $8 - 5 = 3$.
2. Put that result into $f$: find $f(3)$.
$f(3) = 3(3) = 9$.
Answer: 9
Q7: Using $f(x) = 3x$ and $g(x) = x - 5$, find the algebraic expression for $gf(x)$.
Notice this is $gf(x)$, not $fg(x)$. We must put $f$ into $g$.
$g(f(x)) = (f(x)) - 5$
Substitute $3x$ in place of $f(x)$.
Answer: $gf(x) = 3x - 5$
Q8: Let $f(x) = 2x + 1$. Find an expression for $ff(x)$.
This means putting the function into itself.
$f(f(x)) = 2(f(x)) + 1$
$f(2x + 1) = 2(2x + 1) + 1$
Expand the bracket: $4x + 2 + 1$
Simplify.
Answer: $ff(x) = 4x + 3$
Q9: Solve the equation $f(x) = 19$, where $f(x) = 5x - 6$.
Set the expression equal to 19 and solve for $x$.
$5x - 6 = 19$
Add 6: $5x = 25$
Divide by 5: $x = 5$
Answer: $x = 5$
Q10: Challenge! $f(x) = x^2$ and $g(x) = x + 3$. Solve the equation $fg(x) = 49$.
Step 1: Find the expression for $fg(x)$.
Put $g$ into $f$: $(x+3)^2$
Step 2: Set the equation to 49.
$(x+3)^2 = 49$
Step 3: Solve by square rooting both sides.
$x + 3 = 7$ OR $x + 3 = -7$
$x = 4$ OR $x = -10$
Answer: $x = 4$ or $x = -10$