What this chapter is about
This chapter builds directly on your understanding of sets from the previous chapter. Here you learn how to connect elements of one set to elements of another set in a structured way. A relation pairs elements according to some rule, and a function is a special kind of relation where each input gives exactly one output. These ideas form the backbone of all higher mathematics.
Understanding relations and functions is essential because almost every scientific and mathematical model describes how one quantity depends on another. When you say the area of a square depends on its side length, or the cost of petrol depends on the number of litres purchased, you are describing a function. This chapter gives you the precise language and tools to work with such dependencies.
After studying this chapter, you should be able to identify the domain, codomain and range of a relation or function, determine whether a given relation qualifies as a function, work with different types of functions, and perform operations like composition of functions.
Key ideas
- An ordered pair (a, b) is a pair of elements where order matters: (a, b) is different from (b, a) unless a = b.
- The Cartesian product A × B of two sets A and B is the set of all ordered pairs (a, b) where a ∈ A and b ∈ B. If A has m elements and B has n elements, then A × B has m × n elements.
- A relation R from set A to set B is any subset of A × B. The set A is called the domain, B is called the codomain, and the set of all second elements that actually appear in R is called the range.
- A function f from set A to set B (written f: A → B) is a relation where every element of A is related to exactly one element of B. No element of A is left out, and no element of A is paired with two different elements of B.
- The domain of a function is the set of all permissible inputs, and the range is the set of all outputs that actually occur.
- Special types of functions include the identity function f(x) = x, constant functions f(x) = c, polynomial functions, rational functions, and the modulus function f(x) = |x|.
- Algebra of functions: if f and g are real functions with a common domain, then (f + g)(x) = f(x) + g(x), (f − g)(x) = f(x) − g(x), (fg)(x) = f(x) × g(x), and (f/g)(x) = f(x)/g(x) provided g(x) ≠ 0.
Formulas and facts to remember
- Cartesian product: A × B = {(a, b) : a ∈ A and b ∈ B}. The number of elements is n(A) × n(B).
- For any sets, A × B ≠ B × A in general (order matters in ordered pairs).
- A × (B ∪ C) = (A × B) ∪ (A × C) and A × (B ∩ C) = (A × B) ∩ (A × C).
- A relation from A to B can have at most 2^(m×n) subsets if A has m elements and B has n elements.
- A function requires: every element of the domain has an image, and each element of the domain has only one image.
- Domain of f(x) = 1/(x − 2) is all real numbers except x = 2.
- Domain of f(x) = √(x − 3) is all real numbers x ≥ 3.
- Range of f(x) = x² for x ∈ R is [0, ∞).
Worked examples
Example 1: Finding a Cartesian product
Let A = {1, 2} and B = {p, q, r}. Find A × B and state the number of elements.
Solution: A × B consists of all ordered pairs with the first element from A and second from B. A × B = {(1, p), (1, q), (1, r), (2, p), (2, q), (2, r)} Number of elements = n(A) × n(B) = 2 × 3 = 6.
Example 2: Determining whether a relation is a function
A transport company charges fares based on distance. Let A = {5, 10, 15} represent distances in kilometres, and let the fare rule be: fare in rupees = 8 × distance. The relation R pairs each distance with its fare. Is R a function from A to the set of positive real numbers?
Solution: For distance 5 km, fare = 8 × 5 = 40 rupees. For distance 10 km, fare = 8 × 10 = 80 rupees. For distance 15 km, fare = 8 × 15 = 120 rupees. R = {(5, 40), (10, 80), (15, 120)}. Every element of A has exactly one image. Therefore R is a function. Domain = {5, 10, 15}, Range = {40, 80, 120}.
Example 3: Finding the domain of a function
Find the domain of the function f(x) = √(7 − x) + 1/(x − 2).
Solution: For √(7 − x) to be defined, we need 7 − x ≥ 0, which gives x ≤ 7. For 1/(x − 2) to be defined, we need x − 2 ≠ 0, which gives x ≠ 2. Combining both conditions: x ≤ 7 and x ≠ 2. Domain = (−∞, 2) ∪ (2, 7] in interval notation, or {x ∈ R : x ≤ 7 and x ≠ 2}.
Common mistakes
- Confusing ordered pairs with sets: (3, 5) is not the same as (5, 3), but {3, 5} equals {5, 3} → Remember that order matters in ordered pairs but not in sets.
- Thinking every relation is a function → Check that each domain element maps to exactly one codomain element.
- Confusing codomain with range → Codomain is the set where outputs are allowed to land; range is the set of outputs that actually occur.
- Forgetting to exclude values that make denominators zero → Always check where the denominator equals zero and remove those from the domain.
- Writing A × B = B × A → The Cartesian product is not commutative; the pairs differ in order.
Quick revision
- Ordered pair: (a, b) ≠ (b, a) unless a = b.
- A × B has n(A) × n(B) ordered pairs.
- A function assigns exactly one output to each input in the domain.
- Domain is where the function is defined; range is the set of actual outputs.
- For √(expression), the expression inside must be ≥ 0; for 1/(expression), the expression must ≠ 0.
- Algebra of functions: add, subtract, multiply or divide the output values, with common domain.