βš™οΈ Functions

Grade 8 Β· Cambridge Lower Secondary Stage 8

What you'll learn

  • Understand function notation f(x) and f: x β†’ y
  • Find outputs for given inputs (evaluate functions)
  • Identify domain and range
  • Work with composite functions fg(x) and gf(x)
  • Find inverse functions f⁻¹(x)

Quick start

A function is like a machine: you put a number in, it does something to it, and gives you a number out. We write f(x) to mean "the output when x goes in".

πŸ“– Learn

1. Function Notation

A function takes an input, applies a rule, and produces an output. We use f(x) (read "f of x") to describe the rule:

f(x) = 2x + 3

This means "multiply the input by 2 then add 3". Other names for the function letter are g, h, etc.

Alternative notation: f: x ↦ 2x + 3 means exactly the same thing β€” x maps to 2x + 3.
Evaluating: To find f(4), substitute x = 4: f(4) = 2(4) + 3 = 11
Finding x: If f(x) = 15, solve 2x + 3 = 15 β†’ x = 6
πŸ’‘ f(x) is NOT f Γ— x. It is a rule applied to x, like a machine label.

2. Domain and Range

The domain is the set of allowed input values. The range is the set of possible output values.

Example: f(x) = 2x + 3 with domain {1, 2, 3, 4}
Outputs (range): f(1)=5, f(2)=7, f(3)=9, f(4)=11 β†’ range = {5, 7, 9, 11}
Domain restriction: Sometimes we say "x β‰₯ 0" or "x is an integer" to limit inputs.
πŸ’‘ Think of domain as the ingredient list and range as the possible finished products from that ingredient list.

3. Mapping Diagrams

A mapping diagram shows how each input maps to exactly one output. For a function, each input has exactly ONE arrow going out of it.

One-to-one: Each input β†’ unique output (e.g. f(x) = 2x + 3)
Many-to-one: Different inputs β†’ same output (e.g. f(x) = xΒ², where f(2) = f(βˆ’2) = 4)
One-to-many is NOT a function β€” each input must give exactly one output.
πŸ’‘ Vertical line test: if a vertical line crosses a graph more than once, it is NOT a function.

4. Composite Functions

A composite function applies one function, then feeds the result into another.

fg(x) means "apply g first, then f to the result"
Example: f(x) = 2x + 1 and g(x) = xΒ²
fg(x): First g(x) = xΒ², then f(xΒ²) = 2xΒ² + 1
gf(x): First f(x) = 2x+1, then g(2x+1) = (2x+1)Β²
fg(3): g(3) = 9, then f(9) = 19
⚠️ fg(x) β‰  gf(x) in general! Order matters β€” apply right-to-left.

5. Inverse Functions

The inverse function f⁻¹(x) reverses what f does. If f(a) = b, then f⁻¹(b) = a.

ff⁻¹(x) = x and f⁻¹f(x) = x
How to find f⁻¹:
1. Write y = f(x) e.g. y = 3x βˆ’ 2
2. Swap x and y: x = 3y βˆ’ 2
3. Rearrange for y: y = (x + 2) Γ· 3
4. Write as f⁻¹(x) = (x + 2) / 3
⚠️ f⁻¹(x) does NOT mean 1/f(x). The βˆ’1 is NOT a power here.
πŸ’‘ The graph of f⁻¹ is a reflection of f in the line y = x.

✏️ Worked Examples

Example 1 – Evaluating a Function

Given f(x) = 4x βˆ’ 7, find: (a) f(3)   (b) f(βˆ’2)   (c) the value of x when f(x) = 13

Step 1 (a): Substitute x = 3: f(3) = 4(3) βˆ’ 7 = 12 βˆ’ 7 = 5
Step 2 (b): Substitute x = βˆ’2: f(βˆ’2) = 4(βˆ’2) βˆ’ 7 = βˆ’8 βˆ’ 7 = βˆ’15
Step 3 (c): Set f(x) = 13: 4x βˆ’ 7 = 13 β†’ 4x = 20 β†’ x = 5

Example 2 – Domain and Range

g(x) = xΒ² βˆ’ 1, domain = {βˆ’2, βˆ’1, 0, 1, 2}. Find the range.

Step 1: g(βˆ’2) = 4 βˆ’ 1 = 3
Step 2: g(βˆ’1) = 1 βˆ’ 1 = 0
Step 3: g(0) = 0 βˆ’ 1 = βˆ’1
Step 4: g(1) = 1 βˆ’ 1 = 0  (same as g(βˆ’1))
Step 5: g(2) = 4 βˆ’ 1 = 3  (same as g(βˆ’2))
Range: {βˆ’1, 0, 3} β€” list each value once even if reached twice.

Example 3 – Composite Functions

f(x) = 3x + 2 and g(x) = x βˆ’ 5. Find: (a) fg(x)   (b) gf(x)   (c) fg(4)

Step 1 (a) fg(x): Apply g first: g(x) = x βˆ’ 5
Step 2: Apply f to result: f(x βˆ’ 5) = 3(x βˆ’ 5) + 2 = 3x βˆ’ 15 + 2 = 3x βˆ’ 13
Step 3 (b) gf(x): Apply f first: f(x) = 3x + 2
Step 4: Apply g to result: g(3x + 2) = 3x + 2 βˆ’ 5 = 3x βˆ’ 3
Step 5 (c): fg(4) using fg(x) = 3x βˆ’ 13: 3(4) βˆ’ 13 = 12 βˆ’ 13 = βˆ’1 βœ“
πŸ’‘ Or directly: g(4) = βˆ’1, then f(βˆ’1) = 3(βˆ’1) + 2 = βˆ’1 βœ“

Example 4 – Inverse Functions

f(x) = 5x + 3. Find f⁻¹(x) and verify f⁻¹(18) works correctly.

Step 1: Write y = 5x + 3
Step 2: Swap x and y: x = 5y + 3
Step 3: Rearrange: x βˆ’ 3 = 5y β†’ y = (x βˆ’ 3) / 5
Step 4: f⁻¹(x) = (x βˆ’ 3) / 5
Verify: f(3) = 5(3) + 3 = 18, so f⁻¹(18) should give 3
Check: f⁻¹(18) = (18 βˆ’ 3) / 5 = 15 / 5 = 3 βœ“

🎨 Visualizer

βš™οΈ Function Machine

Enter coefficients for f(x) = ax + b and an input value.

πŸ—ΊοΈ Mapping Diagram Builder

Choose a function and domain to see the mapping.

πŸ”— Composite Function Calculator

f(x) = ax + b   g(x) = cx + d. Calculates fg(x) and gf(x).

πŸ”„ Inverse Function Finder

Enter f(x) = ax + b. See f⁻¹(x) step-by-step.

Exercise 1 – Evaluating Functions

f(x) = 3x + 2. Find the value of each expression.

Exercise 2 – Domain and Range

g(x) = 2x βˆ’ 1. Domain given. Find the output (range value) for each input.

Exercise 3 – Composite Functions

f(x) = 2x + 1   g(x) = x βˆ’ 3. Evaluate each composite.

Exercise 4 – Inverse Functions

Find f⁻¹(x) for each function, then evaluate as directed. Enter numerical answers.

Exercise 5 – Mixed Practice

Mixed questions on all function topics.

πŸ“ Practice – 20 Questions

πŸ† Challenge – 8 Questions

Harder problems β€” think carefully!