Relations and Functions

1. Core Concepts & Intuition

(Imagine a set of people and a set of hobbies. A relation is any rule that links people to hobbies. For example, “likes” is a relation. John likes hiking, Jane likes swimming, and John also likes swimming. This is a valid relation. Now, a function is a special, stricter type of relation. For a relation to be a function, every person must be linked to exactly one hobby. In our example, the “likes” relation is not a function because John is linked to two hobbies. If we had a relation called “favorite hobby”, where each person could only have one, that would be a function.)

2. Formal Definitions, Jargon, and Nuances

A Relation is a set of ordered pairs (x, y), where x is from a set called the domain and y is from a set called the codomain. The set of all actual second elements (y-values) is called the range.

A Function is a special type of relation where every element in the domain is associated with exactly one element in the codomain. This is the “uniqueness” rule.

Types of Relations:

  1. Reflexive: For every element ‘a’ in the domain, (a, a) is in the relation. (e.g., “is equal to”)
  2. Symmetric: If (a, b) is in the relation, then (b, a) must also be in it. (e.g., “is a sibling of”)
  3. Transitive: If (a, b) and (b, c) are in the relation, then (a, c) must be in it. (e.g., “is less than”)

Types of Functions:

  1. One-to-One (Injective): Every element in the codomain is mapped to by at most one element from the domain. (No two inputs share an output).
  2. Onto (Surjective): Every element in the codomain is mapped to by at least one element from the domain. (The range equals the codomain).
  3. Bijective: The function is both one-to-one and onto.

3. Step-by-Step Procedures & Worked Examples

Procedure: Testing if a Relation is a Function

  1. Examine the set of ordered pairs.
  2. Look at the first elements (the x-values) of all the pairs.
  3. If any x-value is repeated and paired with a different y-value, it is not a function.
  4. If all x-values are unique, or if repeated x-values are paired with the same y-value, it is a function.

Example 1 (Not a function): R = {(1, a), (2, b), (1, c)}

  • The x-value ‘1’ is paired with ‘a’ and also with ‘c’. It fails the uniqueness rule.

Example 2 (Is a function): F = {(1, a), (2, b), (3, a)}

  • All x-values (1, 2, 3) are unique. It doesn’t matter that the y-value ‘a’ is repeated. This is a valid function.

Visual Representation (Mapping Diagram)

graph TD
    subgraph Domain
        A[1]
        B[2]
        C[3]
    end
    subgraph Codomain
        D[x]
        E[y]
        F[z]
    end

    A --> D
    B --> E
    C --> E

This Mermaid diagram shows a valid function where multiple inputs can map to the same output, but each input has only one output arrow.

4. The “Exam Brain” Algorithm & Strategic Handbook

Pattern Recognition:

  • Keywords to look for: “ordered pairs”, “maps to”, “domain”, “range”, “one-to-one”, “onto”, “f(x) = …“.
  • Question Formats: “Is this relation a function?”, “What is the domain/range of this function?”, “Determine if the function is injective, surjective, or bijective.”, Graphical questions using the Vertical Line Test.

Mental Algorithm (The Approach):

  1. Identify the Goal: Am I checking if it’s a function, finding its properties (domain/range), or classifying its type (one-to-one, onto)?
  2. Select the Tool:
    • Is it a function? Use the “uniqueness” rule (check for repeated x-values) or the Vertical Line Test on a graph (if a vertical line touches more than one point, it’s not a function).
    • Is it one-to-one? Check if any y-value is repeated for different x-values. Use the Horizontal Line Test on a graph (if a horizontal line touches more than one point, it’s not one-to-one).
    • Is it onto? Check if the range (all possible outputs) is equal to the entire specified codomain.
  3. Execute & Verify: Systematically check the ordered pairs or trace the lines on the graph. For onto functions, ensure every single element of the codomain is accounted for.

5. Common Pitfalls & Exam Traps

  • Trap 1: Mixing up One-to-One and Onto. One-to-one is about unique outputs. Onto is about covering all possible outputs in the codomain. A function can be one, the other, both, or neither.
  • Trap 2: Domain and Codomain vs. Range. The codomain is the set of potential outputs. The range is the set of actual outputs. A function is onto only if the range is identical to the codomain.

6. Practice Exercises (Scaffolded Difficulty)

Exercise 1 (Concept Check)

Does the set of ordered pairs {(a, 1), (b, 2), (c, 3), (a, 4)} represent a function?

Exercise 2 (Application)

Let the function f(x) = x² be defined from the domain of Integers (ℤ) to the codomain of Natural Numbers (ℕ ∪ {0}). Is this function one-to-one? Is it onto?

Exercise 3 (Qualifier-Style Synthesis)

Consider a function f: A → B, where A = {-2, -1, 0, 1, 2} and B = {0, 1, 2, 3, 4}. Which of the following definitions of f(x) creates a bijective (one-to-one and onto) function? (a) f(x) = x + 2 (b) f(x) = x² (c) f(x) = |x| (d) f(x) = x - 2

7. Comprehensive Solutions to Exercises

Solution 1:

No. The input ‘a’ is mapped to two different outputs, 1 and 4. This violates the definition of a function.

Solution 2:

  1. Identify the Goal: Determine if f(x) = x² from ℤ to ℕ ∪ {0} is one-to-one and onto.
  2. Select the Tool: Use the definitions of one-to-one and onto.
  3. Execute & Verify:
    • One-to-one? No. Different inputs can produce the same output. For example, f(-2) = 4 and f(2) = 4. Since two different inputs (-2 and 2) map to the same output (4), it is not one-to-one.
    • Onto? No. The codomain is all natural numbers and zero. The range (the outputs) are only perfect squares {0, 1, 4, 9, 16, …}. The range does not include numbers like 2, 3, 5, 6, etc., which are in the codomain. Therefore, it is not onto.

Solution 3:

(b) f(x) = x² Let’s test each option by applying the function to the domain A to see the resulting range.

  • Goal: Find a function that is both one-to-one (no repeated outputs) and onto (range must equal codomain B).

  • (a) f(x) = x + 2:

    • Outputs: {0, 1, 2, 3, 4}.
    • Range is {0, 1, 2, 3, 4}, which equals the codomain B. So it’s onto.
    • All outputs are unique. So it’s one-to-one.
    • Therefore, this function is bijective.
  • (b) f(x) = x²:

    • Outputs: {4, 1, 0, 1, 4}.
    • Range is {0, 1, 4}. This is not equal to the codomain B. Not onto.
    • Outputs 1 and 4 are repeated. Not one-to-one.
  • (c) f(x) = |x|:

    • Outputs: {2, 1, 0, 1, 2}.
    • Range is {0, 1, 2}. Not onto.
    • Outputs 1 and 2 are repeated. Not one-to-one.
  • (d) f(x) = x - 2:

    • Outputs: {-4, -3, -2, -1, 0}.
    • Range is {-4, -3, -2, -1, 0}. Not equal to codomain B. Not onto.

The correct answer is (a) f(x) = x + 2, as it is the only function that is both one-to-one and onto for the given domain and codomain. Correction: The initial explanation pointed to (b), but the detailed analysis shows (a) is the correct answer. This is a good example of verifying your work!


8. Connections & Further Learning

  • [[Set Theory and Number Systems]]
  • [[Coordinate Geometry and Straight Lines]]
  • [[Polynomials]]