Ordered pairs and Cartesian product
An ordered pair (a, b) has a first place and a second place. (a, b) = (c, d) only when a = c and b = d. So (2, 3) ≠ (3, 2).
The Cartesian product A × B = {(a, b) : a ∈ A, b ∈ B}. In step 1 of the 3D, each arrow is one pair.
- n(A × B) = n(A) × n(B). If A or B is empty, A × B = ∅.
- A × B ≠ B × A in general.
- R × R = {(x, y) : x, y ∈ R} is the whole coordinate plane.
- A × A × A = {(a, b, c) : a, b, c ∈ A} is a set of ordered triplets. R × R × R is 3D space.
Relation, domain, co-domain, range
A relation R from A to B is any subset of A × B. We write (a, b) ∈ R or a R b. It is chosen by some rule, like 'b = a + 3'.
- Domain: the set of all first elements of R.
- Range: the set of all second elements (the images).
- Co-domain: the whole set B. Range ⊆ co-domain.
If n(A) = p and n(B) = q, then A × B has pq pairs and there are 2^(pq) relations from A to B.
A function is a special relation
A relation f from A to B is a function if every element of A has one and only one image in B. We write f : A → B and y = f(x).
- No element of A is left without an arrow.
- No element of A has two arrows.
- Two elements may share the same image. That is allowed.
Step 2 shows a relation that fails (1 has two arrows, 2 has none). Step 3 shows a function.
Vertical-line test
For a real function drawn on a graph, every vertical line must meet the graph at most once (step 4).
Types of real functions and their graphs
- Constant f(x) = c: a flat line. Domain R, range {c}.
- Identity f(x) = x: line through the origin at 45°. Domain = range = R.
- Polynomial f(x) = a₀ + a₁x + … + aₙxⁿ, n a whole number. Example x² − 1: a U-shaped parabola.
- Rational f(x) = p(x)/q(x), q(x) ≠ 0. Example 1/x: two branches, domain R − {0}.
- Modulus f(x) = |x| = x if x ≥ 0, −x if x < 0: a V shape. Range [0, ∞).
- Signum f(x) = |x|/x for x ≠ 0, 0 at x = 0. It gives 1, 0 or −1. Range {−1, 0, 1}.
- Exponential f(x) = aˣ (a > 0, a ≠ 1). Example 2ˣ: always above the x-axis, passes (0, 1). Range (0, ∞).
- Logarithmic f(x) = logₐ x, x > 0: passes (1, 0), grows slowly. Domain (0, ∞), range R.
- Greatest integer f(x) = [x], the largest integer ≤ x. Steps: [2.7] = 2, [−1.2] = −2. Range Z.
In the last step of the 3D pick each one and slide x.
Algebra of real functions
For f, g : X → R:
- (f + g)(x) = f(x) + g(x)
- (f − g)(x) = f(x) − g(x)
- (fg)(x) = f(x) · g(x); (αf)(x) = α f(x)
- (f/g)(x) = f(x)/g(x), only where g(x) ≠ 0
Step 5 builds f + g by stacking heights at each x. The worked example there opens line by line.
Try it
At home: write the names of 4 family members in one column and their birth months in another. Draw arrows. Is 'person → birth month' a function? Is 'month → person' a function? (Hint: can one month have two people? can a month have none?)
In the 3D: in free play, predict [x] at x = −1.5 before you slide. Then check.
Key formulas and definitions
- n(A × B) = n(A) · n(B)
- Number of relations from A to B = 2^(n(A)·n(B))
- |x| = x (x ≥ 0), −x (x < 0)
- sgn x = 1 (x > 0), 0 (x = 0), −1 (x < 0)
- [x] = greatest integer ≤ x
- (f ± g)(x) = f(x) ± g(x), (fg)(x) = f(x)g(x), (f/g)(x) = f(x)/g(x), g(x) ≠ 0
Worked examples
1. If (x + 1, y − 2) = (3, 1), find x and y.
Ordered pairs are equal only when places match: x + 1 = 3 → x = 2; y − 2 = 1 → y = 3.
2. A = {1, 2}, B = {a, b, c}. Write A × B and find n(A × B).
A × B = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)}. n = 2 × 3 = 6.
3. A = {1, 2}. Write A × A × A. How many triplets?
{(1,1,1), (1,1,2), (1,2,1), (1,2,2), (2,1,1), (2,1,2), (2,2,1), (2,2,2)}: 2³ = 8 triplets.
4. R = {(x, x + 3) : x ∈ {0, 1, 2, 3}}. Write R in roster form and find its domain and range.
R = {(0, 3), (1, 4), (2, 5), (3, 6)}. Domain = {0, 1, 2, 3}, range = {3, 4, 5, 6}.
5. Which is a function from {1, 2, 3}? (i) {(1, 4), (2, 4), (3, 5)} (ii) {(1, 4), (1, 5), (3, 5)}
(i) Each input has exactly one image: function. (ii) 1 has two images and 2 has none: not a function (steps 2 and 3).
6. Find the domain and range of f(x) = 1/(x − 2).
Denominator cannot be 0, so x ≠ 2: domain = R − {2}. 1/(x − 2) can be any real number except 0: range = R − {0}.
7. Find [3.9], [−3.9], sgn(−7), |−4| + |2|.
[3.9] = 3. [−3.9] = −4 (the greatest integer not more than −3.9). sgn(−7) = −1. |−4| + |2| = 4 + 2 = 6.
8. f(x) = x and g(x) = x². Find (f + g)(2), (f − g)(2), (fg)(2), (f/g)(2) and the domain of f/g.
(f + g)(2) = 2 + 4 = 6. (f − g)(2) = 2 − 4 = −2. (fg)(2) = 8. (f/g)(2) = 2/4 = 1/2. g(0) = 0, so domain of f/g is R − {0} (step 5).
Common mistakes
- Thinking (a, b) = (b, a). Order matters in ordered pairs.
- Calling a relation not a function because two inputs share one output. Sharing an output is allowed; one input with two outputs is not.
- Using the co-domain as the range. Range is only the images actually used; it can be smaller than B.
- Writing [−2.5] = −2. The greatest integer ≤ −2.5 is −3.