Functions
What is a Function?
A function is a rule that assigns exactly one output to every input. Think of it as a machine: feed in a value, get out a single value.
Notation: f(x) = 2x + 1
- f is the function name
- x is the input (independent variable)
- f(x) is the output (dependent variable), read as "f of x"
The key rule: every input must give exactly one output. An input cannot produce two different outputs.
Function Notation
Different letters can name functions: f, g, h are common.
- f(x) = 3x - 2
- g(t) = t² + 1
- h(n) = 5/n
f(4) means "evaluate f when x = 4": f(4) = 3(4) - 2 = 10
Evaluating Functions
Substitute the input value for the variable and calculate:
f(x) = 2x + 1:
- f(3) = 2(3) + 1 = 6 + 1 = 7
- f(-2) = 2(-2) + 1 = -4 + 1 = -3
- f(0) = 2(0) + 1 = 1
g(x) = x² - 3x + 1:
- g(-2) = (-2)² - 3(-2) + 1 = 4 + 6 + 1 = 11
Always put negative inputs in brackets to avoid sign errors.
Domain and Range
Domain: the set of all allowed input values Range: the set of all possible output values
For f(x) = x²:
- Domain: all real numbers (you can square any number)
- Range: x² ≥ 0, so range is all values ≥ 0
For f(x) = √x:
- Domain: x ≥ 0 (you cannot take the square root of a negative real number)
- Range: f(x) ≥ 0
For f(x) = 1/x:
- Domain: all real numbers except x = 0 (division by zero is undefined)
- Range: all real numbers except 0
Composite Functions
A composite function applies one function inside another. f(g(x)) means: apply g first, then apply f to the result.
Example: f(x) = x², g(x) = 3x
- f(g(2)): first find g(2) = 3(2) = 6, then f(6) = 6² = 36
Example: f(x) = 2x + 3, g(x) = x - 1
- f(g(4)): first g(4) = 4 - 1 = 3, then f(3) = 2(3) + 3 = 9
Note: f(g(x)) and g(f(x)) usually give different results — order matters.
Types of Functions
| Type | Example | Graph shape |
|---|---|---|
| Linear | f(x) = 2x + 1 | Straight line |
| Quadratic | f(x) = x² | Parabola (U-shape) |
| Cubic | f(x) = x³ | S-shaped curve |
| Exponential | f(x) = 2ˣ | Rapid growth curve |
| Reciprocal | f(x) = 1/x | Hyperbola |
| Square root | f(x) = √x | Half-parabola |
The Vertical Line Test
A graph represents a function if every vertical line drawn crosses the graph at most once.
- A straight line y = 2x + 1: passes the test ✓ (it is a function)
- A circle x² + y² = 9: fails the test ✗ (a vertical line through the centre crosses at two points)
- A vertical line x = 3: fails the test ✗ (every point on it has the same x but different y)
Mappings and Arrow Diagrams
A function can also be shown as an arrow diagram (mapping diagram) with inputs on the left and outputs on the right.
A valid function: every input arrow points to exactly one output. Not a function: one input arrow splits to point at two outputs.
Allowed: two different inputs can point to the same output (e.g., f(x) = x² maps both 3 and -3 to 9).
Common Mistakes
- Confusing f(x) with f × x: f(x) is notation for a function output, not multiplication.
- Wrong order in composite functions: f(g(x)) applies g first. Do not apply f first.
- Ignoring domain restrictions: always check for division by zero or square roots of negatives.
- Assuming the range equals the domain: for f(x) = x², the domain is all reals but the range is only non-negative values.
Tips and Tricks
- For composite functions, work from the inside out: in f(g(x)), evaluate g first.
- When sketching a function type, identify key features: y-intercept (set x = 0), x-intercept (set f(x) = 0).
- Linear functions have the form f(x) = mx + c, where m is the gradient and c is the y-intercept.
- If you need to find an input given an output, you are solving an equation: if f(x) = 7 and f(x) = 2x + 1, solve 2x + 1 = 7 → x = 3.
Questions & comments
Comments are public and are checked before they appear. Please don’t post your full name, email, phone number, school, or anything else that identifies you. How we use this.
Loading comments…