Relations and Functions
Functions and their graphs
Decide whether a relation is a function and find the domain and range of a real function.
A function f : A → B is a special relation in which every element of A has exactly one image in B. Two things can go wrong:
- An element of A has no image (its arrow is missing). Then it is not a function.
- An element of A has two or more images (its arrows split apart). Then it is not a function either.
- Two elements of A sharing the same image is fine: arrows may meet. So the whole of A is the domain, but the range may be smaller than B.
In roster form: every element of A must appear as a first element, and no two pairs may share a first element. On A = {1, 2, 3}, {(1, 2), (2, 2), (3, 5)} is a function, while {(1, 2), (1, 3), (2, 4), (3, 1)} is not, since 1 has two images.
We write y = f(x): x is the input from the domain, f(x) its output. When A is infinite we give the rule as a formula.
To find the pre-images of a value k, solve f(x) = k and keep only solutions that lie in the domain. For f : Z → Z, f(x) = x² – 4x:
- Pre-images of 5: x² – 4x – 5 = 0, so (x – 5)(x + 1) = 0, giving 5 and –1.
- Pre-image of –4: (x – 2)² = 0, giving 2 only.
- Pre-images of 1: x² – 4x – 1 = 0 gives x = 2 ± √5, not integers, so 1 has no pre-image in Z.
Standard real functions to know:
| Function | Rule | Domain | Range |
|---|---|---|---|
| Identity | f(x) = x | R | R |
| Constant | f(x) = c | R | {c} |
| Square | f(x) = x² | R | [0, ∞) |
| Reciprocal | f(x) = 1/x | R – {0} | R – {0} |
| Modulus | f(x) = abs(x) | R | [0, ∞) |
| Signum | 1 if x > 0, 0 if x = 0, –1 if x < 0 | R | {–1, 0, 1} |
| Greatest integer | [x] = the greatest integer ≤ x | R | Z |
The modulus makes any number non-negative: abs(5) = 5 and abs(–5) = 5. The greatest integer rounds down to an integer: [5.8] = 5 and [7] = 7, but [–3.4] = –4, because –4 is the greatest integer not above –3.4 (–3 is bigger). Its graph is a staircase, which is why it is also called the step (or floor) function.
The domain of a formula is every real x where it makes sense: no zero in a denominator and no negative under a square root.
- 1/(x + 2): x ≠ –2, so the domain is R – {–2}.
- √(x – 5): need x – 5 ≥ 0, so [5, ∞). But 1/√(x – 5) also needs the root non-zero, so (5, ∞).
- √(x – 1) + √(6 – x): need x ≥ 1 and x ≤ 6, so [1, 6].
For the range, ask how small and how large f(x) can get. Since x² ≥ 0, f(x) = x² + 2 is at least 2: range [2, ∞). And 5 – x² is at most 5: range (–∞, 5].
Practise this lesson
Questions that get harder as you improve, a Tutor that helps without giving the answer away, and progress you can see. Free for every learner.
No account, no email address. Opens the real product.