The Timpson Lyceum · General Topology (Point Set Topology)
Relations and Functions – Lecture 4 (Topology)
Overview
This lecture builds the set-theoretic machinery for functions, the second of the two objects (sets being the first) that point-set topology returns to again and again. After a quick review of relations, equivalence relations, partitions, and equivalence classes, we define a function as a special kind of relation and develop the full notation for a function — domain, codomain, image, the function/pre-image of a set, and the constant and identity functions. We then state how functions interact with unions, intersections, and differences (with the recurring subtlety that intersections only behave well one way), and finish by defining and proving one-to-one (injective), onto (surjective), and bijective functions, including a bijection between and that shows two infinite sets can have the same cardinality.
Key Concepts
Relation (review). A relation is just a set of ordered pairs. Writing means .
- is a relation from to iff .
- is a relation on iff . (The empty set is trivially a relation on any .)
Equivalence relation (review). A relation on that is reflexive (), symmetric (), and transitive ( and ). Examples: on , "same height," congruence of triangles, "same parity" on . These capture a notion of being "the same."
Partition. A partition of is a set of mutually disjoint subsets of whose union is — every element lands in exactly one block (like sorting a student body into morning classes).
Equivalence class. For an equivalence relation on and , The set of equivalence classes is always a partition, and every partition arises from some equivalence relation — the two ideas are interchangeable. The bracket notation only makes sense once is known to be an equivalence relation.
Function. A function is a relation in which each left-hand element is paired with exactly one right-hand element. So is a function (two inputs may share an output), but is not (one input, two outputs). Repeated identical pairs collapse, since these are sets.
Function from to — . A relation from to such that for every there exists one and only one with . Key point: a function must use all of (every input gets mapped) but need not use all of .
- Domain: .
- Codomain: .
- Image (range): , the set of values actually produced. Always . Basic texts say "range"; advanced texts (and topology) say "image."
Image of a subset. For , — collect everything the elements of map to.
Pre-image (inverse image). For or , The pre-image is always a set (possibly empty); is only defined for in the codomain. Because every input is used, always — though need not equal .
Constant function. is constant iff there is some with for all .
Identity function. For a set , is given by — every element pairs with itself.
Writing infinite functions. Rather than list pairs, use a rule: , , equivalently .
Behavior under set operations. For with , the image preserves unions but only contains the image of an intersection or difference:
The inequalities become strict exactly when two different inputs share an output. Pre-images behave perfectly — for : and .
Injective / surjective / bijective.
- One-to-one (injective): (equal outputs force equal inputs).
- Onto (surjective): the image is all of , i.e. .
- Bijective: both one-to-one and onto — a perfect pairing of with .
Cardinality. Two sets have the same size (cardinality) iff a bijection exists between them — you pair elements off rather than count. Written . Notably (all "countable"), while is a strictly larger infinity.
Worked Example
Prove that , , is a bijection.
One-to-one. Assume and derive :
Equal outputs force equal inputs, so is injective.
Onto. Given any , solve for to exhibit a pre-image:
Since and , every is hit. Thus is surjective. Being both injective and surjective, is a bijection.
Contrast — a bijection between infinite sets. The map given by pairs , hitting every integer exactly once — proving .
Summary
- A function is a relation pairing every input with exactly one output; must use all of but need not use all of .
- Vocabulary to internalize: domain , codomain , image , and the set-valued pre-image — always defined, always a set, possibly empty.
- Images preserve unions but only satisfy for intersections and differences; pre-images preserve all of union, intersection, and difference — which is why topology works through pre-images.
- Injective: equal outputs force equal inputs. Surjective: image equals the codomain. Bijective: both, giving a perfect pairing.
- To prove a bijection: show , then for arbitrary produce an explicit with .
- Two sets have the same cardinality iff a bijection exists; this makes , , and all the same (countable) size.