Topic 6 of 10

Functions

🎯 Learning Objectives

7.1 Definition

🔑 Function

A function is a rule that maps inputs to outputs

Function Notation

x ↦ x² (maps x to x squared)

f(x) = x² (function named f)

f: X → Y (function from set X to set Y)

📋 Requirements for Functions

  1. Defined on entire domain: Every input must have an output
  2. Single-valued: Each input maps to exactly ONE output

These requirements distinguish functions from general relations!

7.2 Key Terminology

Essential Function Components

🔹 Domain

  • The set of all possible inputs
  • domain(f) = X in f: X → Y

🔹 Codomain

  • The set of all possible output values
  • codomain(f) = Y in f: X → Y

🔹 Range

  • The actual set of values the function achieves
  • range(f) ⊆ codomain(f)
  • range(f) = {y | y = f(x) for some x ∈ domain(f)}

Example: f(x) = x²

Domain: ℝ (all real numbers)

Codomain: ℝ (all real numbers)

Range: ℝ≥0 = {r | r ∈ ℝ, r ≥ 0} (only non-negative reals)

Key Insight

Range ≠ Codomain in this case!

The codomain includes negative numbers, but the range doesn't achieve them.

7.3 Functions as Relations

Associated Relation R_f

R_f = {(x, y) | x ∈ domain(f), y = f(x)}

This is a subset of domain(f) × codomain(f)

Example: For sq(x) = x²

R_sq = {(x, y) | x, y ∈ ℝ, y = x²}

Properties of R_f:

  1. Defined on entire domain
  2. Single-valued (one output per input)

🎨 Graphing Connection

When you plot f as a graph, you're actually plotting R_f on coordinate axes!

Each point (x, y) on the graph represents the relationship y = f(x).

7.4 Linear Functions

General Form: f(x) = mx + c

  • m = slope
  • c = y-intercept

Examples

  • f(x) = 3x + 5 (slope = 3, y-intercept = 5)
  • f(x) = -7x + 10 (slope = -7, y-intercept = 10)

Properties:

  • Domain:
  • Codomain:
  • Range: ℝ (line extends from -∞ to +∞)

7.5 Square Root Function

f(x) = √x

⚠️ Convention

By convention, we take the positive square root

Since 5² = (-5)² = 25, we choose √25 = 5 (not -5)

Domain Depends on Codomain

1. If codomain = ℝ (real numbers):

  • Domain: ℝ≥0 (non-negative reals only)
  • Negative numbers don't have real square roots

2. If codomain = ℂ (complex numbers):

  • Domain: ℝ (all real numbers)
  • Complex numbers include √(-1) = i

7.6-7.8 Function Properties

🔹 Injective (One-to-One)

Different inputs → Different outputs

If x₁ ≠ x₂, then f(x₁) ≠ f(x₂)

Examples:

f(x) = 3x + 5 (linear functions are injective)

f(x) = 7x² (f(5) = f(-5) = 175)

🔹 Surjective (Onto)

Range = Codomain

Every element in codomain has a pre-image

Examples:

f(x) = -7x + 10 (with codomain ℝ)

f(x) = 5x² + 3 (can't reach values < 3)

🔹 Bijective (One-to-One Correspondence)

BOTH Injective AND Surjective

Perfect pairing between domain and codomain

Properties:

  • Every x maps to distinct y (injective)
  • Every y has unique pre-image (surjective)
Property Symbol Meaning Test
Injective 1-1 Different inputs → Different outputs If x₁ ≠ x₂ then f(x₁) ≠ f(x₂)
Surjective onto Range = Codomain Every y has pre-image x
Bijective 1-1 & onto Perfect pairing Both injective and surjective

7.9 Bijections and Cardinality

🥎 The Marble Analogy

Problem: Two sacks of marbles - are they equal in number?

Method 1: Count separately

Count each sack individually (tedious, error-prone)

Method 2: Pair simultaneously

Pull one marble from each sack at the same time:

  • If both empty together → equal number (bijection established!)
  • If one empties first → unequal

🌟 For Infinite Sets

Bijections are the ONLY way to prove equal cardinality!

This is how we compare the "sizes" of infinite sets like ℕ, ℤ, ℚ, and ℝ.

Example: Lines vs Points

Question: Are there as many lines as points in ℝ²?

Answer: YES!

  • Every line has form y = mx + c
  • Pair (m, c) uniquely defines a line
  • Bijection: lines ↔ ℝ × ℝ (points in plane)
  • Therefore: Same number of lines as points!

⚠️ Careful!

Must verify it's truly a bijection. Example: two points determine a unique line, BUT many point-pairs determine the SAME line, so point-pairs → lines is NOT a bijection.

🧮 Practice Problems

Problem 1: Function Basics

For the function f(x) = 2x - 3 with domain ℝ and codomain ℝ:

  1. Find f(5) and f(-2)
  2. What is the range of f?
  3. Is the range equal to the codomain?

Solutions:

  1. f(5) = 2(5) - 3 = 7
    f(-2) = 2(-2) - 3 = -7
  2. Range = ℝ (linear function covers all real values)
  3. Yes, range = codomain = ℝ

Problem 2: Injective Functions

Determine if the following functions are injective:

  1. f(x) = x³
  2. g(x) = x² + 1
  3. h(x) = 5x - 7

Solutions:

  1. f(x) = x³ is injective
    If x₁³ = x₂³, then x₁ = x₂ (cube root is unique)
  2. g(x) = x² + 1 is NOT injective
    g(2) = g(-2) = 5 (different inputs, same output)
  3. h(x) = 5x - 7 is injective
    Linear functions (non-constant) are always injective

Problem 3: Surjective Functions

For each function with codomain ℝ, determine if it's surjective:

  1. f(x) = x + 10
  2. g(x) = x² - 4
  3. h(x) = √x (domain: ℝ≥0)

Solutions:

  1. f(x) = x + 10 is surjective
    For any y ∈ ℝ, choose x = y - 10, then f(x) = y
  2. g(x) = x² - 4 is NOT surjective
    Range = [-4, ∞), can't reach values below -4
  3. h(x) = √x is NOT surjective
    Range = [0, ∞), can't reach negative values

Problem 4: Bijective Functions

Which of the following functions f: ℝ → ℝ are bijective?

  1. f(x) = 3x + 1
  2. f(x) = x²
  3. f(x) = x³ - 2

Solutions:

  1. f(x) = 3x + 1 is bijective
    • Injective: Linear with non-zero slope
    • Surjective: Range = ℝ = Codomain
  2. f(x) = x² is NOT bijective
    • Not injective: f(2) = f(-2) = 4
    • Not surjective: Can't reach negative values
  3. f(x) = x³ - 2 is bijective
    • Injective: Cube function is strictly increasing
    • Surjective: Range = ℝ = Codomain