Functions

Maths · Algebra and graphs. The idea in plain words, the rules to remember, the mistake to avoid and a worked example, written and checked by Mega Lecture.

Test this topic freeAll Maths topics

The idea

A function is a rule that changes each input into one output. f(x) = 3x − 5 means "multiply by 3, then subtract 5". To find f(2), replace every x with 2. The set of allowed inputs is the domain and the set of outputs is the range.

The inverse function f−1(x) undoes f. It takes an output back to its input.

A composite function uses one function after another. fg(x) means f(g(x)): work out g first, then put the result into f. The order matters, so fg(x) and gf(x) are usually different.

In simpler words

A function is a machine with a rule inside. You put a number in, the rule changes it, and a new number comes out. The inverse function is the machine run backwards: it takes the output and gives the input back. A composite function like fg(x) is two machines in a row. The one written nearest to x goes first, so you do g and then f.

An everyday comparison

A function is like a vending machine: press a code and one snack comes out, never two. The inverse is the returns slot that gives your coin back for the snack. A composite is two machines in a line, where the snack from the first machine is dropped into the second. The comparison stops at order: with real machines you choose which to visit first, but in fg(x) the order is fixed, g then f.

Rules to remember

Common mistake

fg(x) is not f(x) × g(x), and it is not f first. The function nearest to x is done first, so in fg(x) you do g and then f.

In the exam

For f(a), write the formula with a in place of every x, then the answer. For the inverse, write y = f(x), show each rearranging step until x is the subject, then write f−1(x) = ... with x in place of y. For fg(x), write f(g(x)), substitute the whole expression for g(x) into f, expand and simplify. To solve f(x) = k, write the formula = k and solve, stating x. Check an inverse by showing f−1(f(x)) = x.

Worked example

f(x) = 4x − 3 and g(x) = x + 5. Find fg(x) and f−1(x).

  1. fg(x) = f(x + 5) = 4(x + 5) − 3 = 4x + 20 − 3 = 4x + 17.
  2. For the inverse write y = 4x − 3, so y + 3 = 4x and x = (y + 3)/4.
  3. Replace y with x: f−1(x) = (x + 3)/4.
  4. Check: f(2) = 5 and f−1(5) = (5 + 3)/4 = 2.

Answer: fg(x) = 4x + 17 and f⁻¹(x) = (x + 3)/4

Ask about this

Type what you are stuck on. The helper finds the explanation, worked examples and the notes to read, free and instant.

Read the full notes

Keep going

← Sketching curvesCoordinates →Take a Maths test