Lecture Notes
Let \(A\) and \(B\) be sets. The Cartesian product of \(A\) and \(B\) is
$$A \times B = \{(a, b) : a \in A,\; b \in B\}.$$An element of \(A \times B\) is an ordered pair: \((a,b) \neq (b,a)\) unless \(a = b\).
Let \(A = \{1, 2\}\) and \(B = \{\alpha, \beta, \gamma\}\). Click any dot in the grid to see its ordered pair:
Click a dot to reveal the ordered pair!
\(|A \times B| = |A| \cdot |B| = 2 \cdot 3 = 6\)
If \(A\) and \(B\) are finite sets, then \(|A \times B| = |A| \cdot |B|\).
The familiar \(xy\)-plane is precisely \(\mathbb{R} \times \mathbb{R} = \mathbb{R}^2\). Every point \((x,y)\) is an ordered pair of real numbers. This is why Cartesian products carry Descartes' name!
A relation from \(A\) to \(B\) is any subset of \(A \times B\). If \((a,b) \in R\), we write \(a\,R\,b\).
The number of distinct relations from \(A\) to \(B\) is \(2^{|A| \cdot |B|}\).
Why? Each ordered pair is either included or not — two choices per pair.
Click to explore three different relations from \(A = \{1,2\}\) to \(B = \{\alpha, \beta, \gamma\}\):
\(\{(1,\alpha),(2,\beta)\}\)
\(\{(1,\gamma),(2,\gamma)\}\)
\(\varnothing\)
Total number of relations: \(2^{2 \cdot 3} = 2^6 = 64\).
If \(B = A\), a relation from \(A\) to \(A\) is called a relation on \(A\).
Define \(a\,R\,b \iff 3 \mid (b - a)\) on \(\mathbb{Z}\). Enter two integers to check:
Number line colored by residue class:
Let \(R\) be a relation on a set \(A\).
Reflexive: \(a\,R\,a\) for all \(a \in A\). — Every element related to itself
Symmetric: \(a\,R\,b \Rightarrow b\,R\,a\). — Goes both ways
Antisymmetric: \(a\,R\,b\) and \(b\,R\,a \Rightarrow a = b\). — Two-way implies equal
Transitive: \(a\,R\,b\) and \(b\,R\,c \Rightarrow a\,R\,c\). — Chains together
Click each property to see a diagram illustrating it:
For \(a\,R\,b \iff 3 \mid (b-a)\) on \(\mathbb{Z}\):
✓ Reflexive \(3 \mid (a - a) = 0\)
✓ Symmetric \(3 \mid (b-a) \Rightarrow 3 \mid (a-b)\)
✓ Transitive \(3 \mid (b-a)\) and \(3 \mid (c-b) \Rightarrow 3 \mid (c-a)\)
✗ Not Antisymmetric \(0\,R\,3\) and \(3\,R\,0\) but \(0 \neq 3\)
A relation that is reflexive, symmetric, and transitive is an equivalence relation.
Equivalence relations formalize the idea of "being the same in some sense."
| Property | Condition | Quantifier |
|---|---|---|
| Reflexive | \(a\,R\,a\) | for all \(a \in A\) |
| Symmetric | \(a\,R\,b \Rightarrow b\,R\,a\) | for all \(a,b \in A\) |
| Transitive | \(a\,R\,b\) and \(b\,R\,c \Rightarrow a\,R\,c\) | for all \(a,b,c \in A\) |
If any one fails, \(R\) is not an equivalence relation.
The set of all elements related to \(a\).
Click a class to highlight its elements. Notice: \([3] = [0]\), \([4] = [1]\), etc.
Click a class above!
Key observation: \([3] = [0]\) since \(3\,R\,0\). Elements in the same class give the same class.
Let \(R\) be an equivalence relation on \(A\). Prove that if \(a\,R\,b\), then \([a] = [b]\).
Hint: Double containment. Use transitivity with \(a\,R\,b\).
A partition of \(A\) is a collection of nonempty, pairwise disjoint subsets whose union is \(A\).
The equivalence classes of an equivalence relation on \(A\) form a partition of \(A\).
Conversely, every partition determines an equivalence relation.
There is a one-to-one correspondence between equivalence relations on \(A\) and partitions of \(A\). Two sides of the same coin!
Operations: \([a] \oplus [b] = [a+b]\), \(\;[a] \odot [b] = [a \cdot b]\).
Choose \(n\) and explore the operation tables. Red cells show zero divisors!
A function \(f : A \to B\) is a relation such that:
1. Every element of \(A\) has some output. — every input mapped
2. No element of \(A\) has more than one output. — unique output
Click each diagram to check whether it represents a valid function:
Injective (one-to-one): \(f(x) = f(y) \Rightarrow x = y\). — No collisions
Surjective (onto): \(\forall y \in B,\; \exists x \in A\) with \(f(x) = y\). — Everything hit
Bijective: Both injective and surjective. — Perfect pairing
Click each example to see its classification:
For finite sets: injection \(\Rightarrow |A| \leq |B|\), surjection \(\Rightarrow |A| \geq |B|\), bijection \(\Rightarrow |A| = |B|\).
Q1: Can there be a surjection from a 2-element set to a 3-element set?
No — not enough inputs to cover all outputs.
Q2: Can there be an injection from a 3-element set to a 2-element set?
No — pigeonhole principle forces a collision.
Exercise 1. Let \(A = \{1,2,3\}\). How many relations on \(A\)? How many reflexive?
Exercise 2. Show \(a\,R\,b \iff a+b\) is even defines an equivalence relation on \(\mathbb{Z}\).
Exercise 3. Prove: if \(a\,R\,b\), then \([a] = [b]\).
Exercise 4. Build addition/multiplication tables for \(\mathbb{Z}_5\). Zero divisors?
Exercise 5. Is \(f(x) = x^2\) on \(\mathbb{R}\) injective? Surjective?
Exercise 6. Show \(f(x) = 2x+3\) is a bijection. Find its inverse.
Exercise 7. Prove: if \(f:A\to B\) and \(g:B\to C\) are injective, then \(g \circ f\) is injective.
Math 205: Real Analysis — Lecture 02