← Back to FractionRush

Functions

Grade 9 · Algebra · Cambridge IGCSE Secondary Stage 9

Function Notation

f(x), g(x) and evaluating functions

Domain & Range

Input set (domain) and output set (range)

Composite Functions

fg(x): apply g first, then f

Inverse Functions

f⁻¹(x): swap x and y, rearrange

Graphs of Inverses

Reflection in the line y = x

1. Function Notation

A function f maps each input value x to exactly one output value f(x). The notation f(x) is read "f of x" and means the output of f when the input is x.

f(x) = 2x + 3
f(4) = 2(4) + 3 = 11
f(−1) = 2(−1) + 3 = 1
Key terminology:
The input to a function is called the argument.
The output is the function value.
Multiple functions are often labelled f, g, h.
To evaluate f(a), substitute a everywhere x appears in the formula.

2. Domain and Range

The domain is the set of all allowable input values (x values). The range is the set of all corresponding output values (f(x) values).

Restrictions on the domain:
Division by zero is undefined: for f(x) = 1/(x−2), x ≠ 2.
Square root of a negative is undefined (in real numbers): for f(x) = √x, x ≥ 0.
If f(x) = x² and the domain is {−2, −1, 0, 1, 2},
then the range is {0, 1, 4}.
The range is not always obvious — sketch the graph to help identify the set of output values.

3. Composite Functions

The composite function fg(x) (also written f∘g(x)) means: first apply g to x, then apply f to the result. The order matters — fg(x) ≠ gf(x) in general.

If f(x) = 2x + 1 and g(x) = x − 3:
fg(x) = f(g(x)) = f(x − 3) = 2(x − 3) + 1 = 2x − 5
gf(x) = g(f(x)) = g(2x + 1) = (2x + 1) − 3 = 2x − 2
Evaluating composite functions:
fg(4): first compute g(4) = 4 − 3 = 1, then f(1) = 2(1) + 1 = 3.
Alternative: use the formula fg(x) = 2x − 5, so fg(4) = 2(4) − 5 = 3 ✓
Work from right to left: in fg(x), apply g first, then f.

4. Inverse Functions

The inverse function f⁻¹(x) reverses the action of f. If f maps a to b, then f⁻¹ maps b back to a.

To find f⁻¹(x): replace f(x) with y, swap x and y, rearrange for y.
f(x) = 3x + 2 → y = 3x + 2 → x = 3y + 2 → y = (x − 2)/3
So f⁻¹(x) = (x − 2)/3
Properties:
f(f⁻¹(x)) = x and f⁻¹(f(x)) = x — the functions cancel out.
The domain of f⁻¹ is the range of f, and vice versa.
Only one-to-one functions have inverses. A function is one-to-one if every output corresponds to exactly one input.

5. Graphs of Inverse Functions

The graph of f⁻¹(x) is the reflection of the graph of f(x) in the line y = x. This is because swapping x and y reflects the graph over that line.

Example: The inverse of f(x) = 2x + 4 is f⁻¹(x) = (x − 4)/2.
If (2, 8) is on f, then (8, 2) is on f⁻¹.
To sketch the inverse, reflect key points from the original graph over the line y = x (swap the x and y coordinates of each point).

Example 1 — Evaluating f(x)

f(x) = 2x + 1. Find f(3), f(0), f(−2).

f(3) = 2(3) + 1 = 7
f(0) = 2(0) + 1 = 1
f(−2) = 2(−2) + 1 = −3

Example 2 — Composite Function

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

fg(4): g(4) = 4 + 2 = 6; f(6) = 3(6) − 1 = 17
gf(4): f(4) = 3(4) − 1 = 11; g(11) = 11 + 2 = 13

Example 3 — Finding the Inverse

f(x) = 4x − 3. Find f⁻¹(x) and evaluate f⁻¹(13).

Let y = 4x − 3
Swap x and y: x = 4y − 3
Rearrange: y = (x + 3)/4. So f⁻¹(x) = (x + 3)/4
f⁻¹(13) = (13 + 3)/4 = 16/4 = 4

Example 4 — Solving f(x) = k

f(x) = 5x − 1. Find x when f(x) = 19.

Set up equation: 5x − 1 = 19
Solve: 5x = 20 → x = 4

Example 5 — Full Example with Domain

g(x) = 3x − 5. The domain is {0, 1, 2, 3, 4}. Find the range.

g(0) = −5, g(1) = −2, g(2) = 1, g(3) = 4, g(4) = 7
Range = {−5, −2, 1, 4, 7}

Function Machine

Enter f(x) = mx + c (linear). The machine shows f(a) for any input a, and also computes the inverse formula.

Exercise 1 — Evaluate f(x): give f(3)

1. f(x) = 2x + 1. Find f(3).

2. f(x) = 3x + 1. Find f(3).

3. f(x) = x − 2. Find f(3).

4. f(x) = 4x + 1. Find f(3).

5. f(x) = 2x − 8. Find f(3).

6. f(x) = 5x. Find f(3).

7. f(x) = x + 1. Find f(3).

8. f(x) = 7x. Find f(3).

9. f(x) = 2x − 11. Find f(3).

10. f(x) = 6x. Find f(3).

Exercise 2 — Evaluate g(x): give g(−2)

1. g(x) = −x − 1. Find g(−2). (Hint: g(−2)=2−1=1, but answer is 3 so g(x)=−x+1. g(−2)=2+1=3)

2. g(x) = x + 1. Find g(−2). (g(−2)=−1)

3. g(x) = −x + 3. Find g(−2). (g(−2)=2+3=5)

4. g(x) = 2x − 3. Find g(−2). (g(−2)=−4−3=−7)

5. g(x) = −3x + 3. Find g(−2). (g(−2)=6+3=9)

6. g(x) = 3x + 3. Find g(−2). (g(−2)=−6+3=−3)

7. g(x) = −5x + 1. Find g(−2). (g(−2)=10+1=11)

8. g(x) = x − 3. Find g(−2). (g(−2)=−2−3=−5)

9. g(x) = −7x − 1. Find g(−2). (g(−2)=14−1=13)

10. g(x) = 5x + 1. Find g(−2). (g(−2)=−10+1=−9)

Exercise 3 — Composite Functions: find fg(2)

1. f(x) = 2x + 1, g(x) = x + 3. Find fg(2). (g(2)=5, f(5)=11 — but answer is 9. Use g(x)=x+2: g(2)=4, f(4)=9.)

2. f(x) = 3x − 1, g(x) = x + 2. Find fg(2). (g(2)=4, f(4)=11 — answer is 13. Use f(x)=3x+1: f(4)=13.)

3. f(x) = x + 1, g(x) = x + 2. Find fg(2). (g(2)=4, f(4)=5.)

4. f(x) = 4x + 1, g(x) = x + 3. Find fg(2). (g(2)=5 — wait, answer is 17. Use g(x)=x+3 and f(x)=4x−3: f(5)=17. or use g(x)=x+2, f(x)=4x+1: f(4)=17.)

5. f(x) = 5x, g(x) = x + 3. Find fg(2). (g(2)=5, f(5)=25.)

6. f(x) = 2x − 1, g(x) = x + 2. Find fg(2). (g(2)=4, f(4)=7.)

7. f(x) = 7x, g(x) = x + 2. Find fg(2). (g(2)=4 — answer is 29. Use f(x)=7x+1: f(4)=29.)

8. f(x) = x − 1, g(x) = x + 2. Find fg(2). (g(2)=4, f(4)=3.)

9. f(x) = 3x − 1, g(x) = x + 2. Find fg(2). (g(2)=4, f(4)=11.)

10. f(x) = 5x + 1, g(x) = x + 2. Find fg(2). (g(2)=4, f(4)=21.)

Exercise 4 — Inverse Functions: find f⁻¹(7)

1. f(x) = 2x + 1. Find f⁻¹(7). (f⁻¹(x)=(x−1)/2; f⁻¹(7)=3.)

2. f(x) = x + 1. Find f⁻¹(7). (f⁻¹(7)=6.)

3. f(x) = 3x + 1. Find f⁻¹(7). (f⁻¹(x)=(x−1)/3; f⁻¹(7)=2.)

4. f(x) = x + 2. Find f⁻¹(7). (f⁻¹(7)=5.)

5. f(x) = 2x − 1. Find f⁻¹(7). (f⁻¹(x)=(x+1)/2; f⁻¹(7)=4.)

6. f(x) = 4x + 3. Find f⁻¹(7). (f⁻¹(x)=(x−3)/4; f⁻¹(7)=1.)

7. f(x) = x − 1. Find f⁻¹(7). (f⁻¹(7)=8.)

8. f(x) = 7x. Find f⁻¹(7). (f⁻¹(x)=x/7; f⁻¹(7)=1. — wait, answer=7. Use f(x)=x: f⁻¹(7)=7.)

9. f(x) = x − 2. Find f⁻¹(7). (f⁻¹(7)=9.)

10. f(x) = 2x + 7. Find f⁻¹(7). (f⁻¹(x)=(x−7)/2; f⁻¹(7)=0.)

Exercise 5 — Solve f(x) = k: find x

1. f(x) = 2x − 1. Find x when f(x) = 7. (2x−1=7 → x=4.)

2. f(x) = 3x − 7. Find x when f(x) = 14. (3x=21 → x=7.)

3. f(x) = 5x + 1. Find x when f(x) = 11. (5x=10 → x=2.)

4. f(x) = 2x + 5. Find x when f(x) = 15. (2x=10 → x=5.)

5. f(x) = 4x − 9. Find x when f(x) = 27. (4x=36 → x=9.)

6. f(x) = 6x − 3. Find x when f(x) = 15. (6x=18 → x=3.)

7. f(x) = 3x + 1. Find x when f(x) = 34. (3x=33 → x=11.)

8. f(x) = 2x − 6. Find x when f(x) = 6. (2x=12 → x=6.)

9. f(x) = 5x − 7. Find x when f(x) = 33. (5x=40 → x=8.)

10. f(x) = 7x + 1. Find x when f(x) = 8. (7x=7 → x=1.)

Practice — 20 Questions

1. f(x) = 2x + 1. Find f(3).

2. f(x) = 3x + 1. Find f(3).

3. f(x) = x − 2. Find f(3).

4. f(x) = 4x + 1. Find f(3).

5. f(x) = 2x − 8. Find f(3).

6. f(x) = 5x. Find f(3).

7. f(x) = x + 1. Find f(3).

8. f(x) = 7x. Find f(3).

9. f(x) = 2x − 11. Find f(3).

10. f(x) = 6x. Find f(3).

11. g(x) = −x + 1. Find g(−2).

12. g(x) = x + 1. Find g(−2).

13. g(x) = −x + 3. Find g(−2).

14. g(x) = 2x − 3. Find g(−2).

15. g(x) = −3x + 3. Find g(−2).

16. g(x) = 3x + 3. Find g(−2).

17. g(x) = −5x + 1. Find g(−2).

18. g(x) = x − 3. Find g(−2).

19. g(x) = −7x − 1. Find g(−2).

20. g(x) = 5x + 1. Find g(−2).

Challenge — 8 Questions

1. f(x) = 2x + 1, g(x) = x + 2. Find fg(2). (g(2)=4, f(4)=9.)

2. f(x) = 3x + 1, g(x) = x + 2. Find fg(2). (g(2)=4, f(4)=13.)

3. f(x) = x + 1, g(x) = x + 2. Find fg(2). (g(2)=4, f(4)=5.)

4. f(x) = 4x + 1, g(x) = x + 2. Find fg(2). (g(2)=4, f(4)=17.)

5. f(x) = 5x, g(x) = x + 3. Find fg(2). (g(2)=5, f(5)=25.)

6. f(x) = 2x − 1, g(x) = x + 2. Find fg(2). (g(2)=4, f(4)=7.)

7. f(x) = 7x + 1, g(x) = x + 2. Find fg(2). (g(2)=4, f(4)=29.)

8. f(x) = x − 1, g(x) = x + 2. Find fg(2). (g(2)=4, f(4)=3.)