SubsetA ⊆ B means every element of A is also in B.
A ⊂ B means A ⊆ B and A ≠ B (proper subset).
Key Difference∈ vs ⊆ 2 ∈ {1,2,3} ✓ (element) {2} ⊆ {1,2,3} ✓ (subset) {2} ∈ {1,2,3} ✗ (set is not listed as element)
Set Operations (Reminder)A ∪ B = union (elements in A or B) |
A ∩ B = intersection (elements in A and B) |
A \ B = difference (in A but not B) |
Ā = complement
The Power Set
Definition
The power set𝒫(A) of a set A is the set of all subsets of A.
Equivalently: X ∈ 𝒫(A) ⟺ X ⊆ A
Worked Example
Let A = {1, 2}. List all subsets:
∅ {1} {2} {1,2}
So 𝒫(A) = { ∅, {1}, {2}, {1,2} } and |𝒫(A)| = 4 = 2²
Key Pattern
If |A| = n then |𝒫(A)| = 2ⁿ.
Each element is either included or not → 2 choices per element.
Let A = {a, b, c}. How many elements does 𝒫(A) have?
§2
Cartesian Products
Pairing elements from two or more sets — the foundation of functions and relations.
Cartesian Product: Definition
Definition
The Cartesian product of sets A and B is: A × B = { (a, b) : a ∈ A and b ∈ B }
Each element is an ordered pair. Order matters: (a,b) ≠ (b,a) in general.
Worked Example
Let A = {1, 2}, B = {x, y, z}.
A × B = { (1,x), (1,y), (1,z), (2,x), (2,y), (2,z) }
|A × B| = |A| × |B| = 2 × 3 = 6
Real-World Example
A deck of playing cards = {A,2,…,K} × {♠,♥,♦,♣}.
Each card is an ordered pair (value, suit) → 13 × 4 = 52 cards.
Cartesian Product: Extension & Practice
n-fold Cartesian ProductA₁ × A₂ × … × Aₙ = { (a₁, a₂, …, aₙ) : aᵢ ∈ Aᵢ }
Elements are called n-tuples. The size is |A₁| × |A₂| × … × |Aₙ|.
Car Registration Plates
3 letters followed by 3 digits.
Let L = {A, B, …, Z} (26 letters), D = {0, 1, …, 9} (10 digits).
Plates = L × L × L × D × D × D
Total plates = 26³ × 10³ = 17,576 × 1,000 = 17,576,000
Let A = {0,1} and B = {a,b,c}.
What is |B × A|?
§3
Functions
Functions assign exactly one output to each input — a precise version of what you already know from algebra.
What is a Function?
Definition
A functionf : A → B is a rule that assigns to each element of A exactly one element of B.
• Domain: the set A (all inputs)
• Codomain: the set B (all possible outputs)
• Range: { f(x) : x ∈ A } ⊆ B (outputs actually produced)
Valid Function
Every element of A maps to exactly one element of B.
NOT a Function
An element of A maps to two outputs — this breaks the rule!
Functions: Domain, Codomain, Range
Example 1 — Capital Letters & Loops
Define f : {A,B,…,Z} → ℕ where f(letter) = number of closed loops.
f(A) = 1 f(B) = 2 f(C) = 0 f(O) = 1 f(Q) = 1
Range = {0, 1, 2} (only these values appear, even though codomain is all of ℕ)
Example 2 — Subsets and Cardinality
Let X = {1,2,3,4}. Define g : 𝒫(X) → {0,1,2,3,4} by g(A) = |A|.
For the letter-loops function above, what is the range?
§4
Injective & Surjective Functions
Two key properties that describe how a function maps its domain to its codomain.
Injective (One-to-One) Functions
Definitionf : A → B is injective (one-to-one) if different inputs always give different outputs: x ≠ y ⟹ f(x) ≠ f(y) (equivalently: f(x) = f(y) ⟹ x = y)
Intuition: No two arrows from A land on the same element in B.
Each input maps to a different output
Two inputs (a,b) land on the same output (1)
Surjective (Onto) Functions
Definitionf : A → B is surjective (onto) if every element of B is hit by at least one element of A: ∀ y ∈ B, ∃ x ∈ A such that f(x) = y
Intuition: No element in B is left without an arrow pointing to it. Range = Codomain.
Every element of B is reached
Bottom element of B is never reached
Let f : ℝ → ℝ be defined by f(x) = x². Is f surjective?
Bijective Functions
Definition
A function is bijective (a bijection or one-to-one correspondence) if it is both injective and surjective.
Property
Meaning
Injective
no two inputs share an output
Surjective
every output is reached
Bijective
both — perfect pairing
Why Bijections Matter
A bijection f : A → B tells us |A| = |B|.
This is how mathematicians compare the sizes of infinite sets!
Note: In general g ∘ f ≠ f ∘ g — composition is not commutative!
Let f(x) = x + 3 and g(x) = 2x. What is (g ∘ f)(5)?
Inverse Functions
Definition
Let f : A → B. A function g : B → A is the inverse of f if: g ∘ f = id_A and f ∘ g = id_B
where id_A(x) = x for all x ∈ A. We write g = f⁻¹.
Examplef : ℝ → ℝ, f(x) = 3x − 1
To find f⁻¹, solve y = 3x − 1 for x: x = (y + 1) / 3
So f⁻¹(y) = (y + 1) / 3
Check: f(f⁻¹(y)) = 3·(y+1)/3 − 1 = y ✓
Key Theorem
A function has an inverse if and only if it is bijective.
• Not injective → two inputs share an output, so the inverse can't be a function (which output to go back to?)
• Not surjective → some outputs in B have no pre-image, so the inverse is undefined there.
§6
Functions as Relations
Connecting functions back to Cartesian products — a deeper, more abstract view.
Binary Relations
Definition
A (binary) relation R between sets A and B is any subset of A × B: R ⊆ A × B
We write a R b (or (a,b) ∈ R) to mean "a is related to b".
Familiar Relations
≤ on ℤ: R = {(a,b) : a ≤ b} — e.g. (2,5) ∈ R but (5,2) ∉ R
Divisibility: R = {(a,b) : a divides b} — e.g. (3,12) ∈ R
"Is a friend of" on people — a social network is literally this!
How Many Relations Exist?
The set of all relations between A and B is 𝒫(A × B) — the power set of the Cartesian product.
If |A|=2, |B|=3 then |A×B|=6, so there are 2⁶ = 64 possible relations between A and B.
Functions as Special Relations
Every function is a relation, but with extra rules.
Function as a Relation
A function f : A → B can be represented as a relation (set of ordered pairs): R_f = { (x, f(x)) : x ∈ A } ⊆ A × B
This relation satisfies two special conditions:
1. Total: every x ∈ A appears as a first element in some pair
2. Functional: no x ∈ A appears with two different second elements
Concrete Example
Let f : 𝒫({a,b}) → {0,1,2} where f(S) = |S|.
R_f = { (∅, 0), ({a}, 1), ({b}, 1), ({a,b}, 2) }
This is a subset of 𝒫({a,b}) × {0,1,2}. ✓ Total (all subsets listed) ✓ Functional (each subset has exactly one size)
The Bridge
A relation R ⊆ A × B is a function exactly when it is total and functional.
Relations that are NOT functions: like ≤ — the number 2 relates to 3, 4, 5, … (multiple outputs).
Relations vs Functions — Check Your Understanding
Quick Summary
Every function is a relation, but not every relation is a function.
A relation R ⊆ A × B is a function iff each a ∈ A appears exactly once as a first element.
The set of all relations between A and B is 𝒫(A × B).
Which of these subsets of {1,2} × {a,b,c} represents a function from {1,2} to {a,b,c}?
How many relations exist between A = {0,1} and B = {x,y}?
Pólya's Problem-Solving Framework
Use this every time you tackle an unfamiliar problem!
① Understand the Problem
What are you being asked?
Do you understand every word?
Can you draw a picture or diagram?
Is there enough information?
② Devise a Plan
Try small cases first
Look for a pattern
Work backwards from the answer
Reduce to a known problem
③ Carry Out the Plan
Execute methodically
Check each step
Be willing to revise the plan
④ Look Back
Does the answer make sense?
Can you verify it another way?
What did you learn from this problem?
Can the method generalise?
Practice Problem
Find the domain and range of the function that assigns to each pair of positive integers its first element. Is it injective? Surjective?
Domain: ℤ⁺ × ℤ⁺ (pairs of positive integers).
Range: ℤ⁺ (every positive integer is the first of some pair).
Injective? No — (1,1) and (1,2) both map to 1.
Surjective? Yes — for any n ∈ ℤ⁺, the pair (n,1) maps to n.
Week 6 Summary
What We Covered
Power sets:𝒫(A), |𝒫(A)| = 2ⁿ
Cartesian products: ordered pairs/tuples
Functions: domain, codomain, range
Injective: no two inputs → same output
Surjective: every output is reached
Bijective: both; has an inverse
Composition:(g∘f)(x) = g(f(x))
Inverse: exists iff bijective
Relations: subsets of A×B; functions are special relations
Next Week
Finishing off functions and relations
More on the written assessment (choosing & designing your project)
Introduction to Recursion & Induction
To Prepare
Read Rosen Ch. 2.3 (Functions)
Try: Rosen 2.3 exercises 1–10
Think about your written project topic
Questions?
Email: cue.nguyen@jcu.edu.au · Subject: MA2211 or MA2011 in the title