This section is intended to be a quick review. if you are not already comfortable with the material, then it may be wise to review it before reading any further.
Sets
A set is a well-defined collection of objects that can be described precisely, perhaps by a shared property. For two sets A and B, we say that A is a subset of B and write
if
If A is a subset of B, but
then we write
and say that A is a proper subset of B.
Cartesian Product
For two sets A and B, we denote the Cartesian product of A and B to be
For a finite collection of sets (such that i is bounded by 1 and n), we may write
For an arbitrary collection of sets indexed by a set I, we may write
Relations
A relation (between sets A and B) is a subset of the Cartesian product (of sets A and B). For a relation
if
then we may for convenience write
and say that a and b are related under R. One of the most commonly encountered types of relations is that of a function. A function f with domain A and codomain B, written
is a subset
That is, any a in A cannot be related to two distinct elements in B. In secondary school algebra, one learns that a function (from the Real line to itself) must “pass the vertical line test“ to be a function. This just simply means that any real number cannot be sent to two distinct real numbers under a function. We also use the following notation, which may also be used for relations in general.
Reframed in this notation, the definition of a function is familiar.
The range of f is the set of all b’s in B that are mapped onto by the function.
Just like functions, all relations can be composed. Formally, the composition of relations R and S is defined below. Let R be a relation from A to B and S be a relation from B to C.
All this means is that whenever R(a)=b and S(b)=c then
You may notice that function and relation composition is written “backwards“ relative to how we think about it. This is done to fit with the f(a)=b notation, however some authors write composition the “correct way“.
A function f from A to B is called one-to-one or injective if
It is called onto or surjective if
A function which is both one-to-one and onto is called a one-to-one correspondence or a bijection.
We denote the cardinality of a set A as |A| and we define
if there exists an injection from A to B or if there exists a surjection from B to A. Hence two sets have equal cardinality if there exists a bijection between them. If a set has finitely many elements n, then it is in bijection with the set of positive integers less than or equal to n, and we may say that it has cardinality n.
The identity map on a set A is the function
and is denoted id (when A is understood). Let
and
be functions. g is called a left (resp. right) inverse of f if
Theorem: A function f has a left inverse iff it is injective and a right inverse iff it is onto.
Proof: Exercise.
Equivalence Relations
Consider the following relation on a set A.
We say that ~ is reflexive if
symmetric if
and transitive if
A curious reader is encouraged to consider a finite set A and find a way to represent reflexive and symmetric relations in terms of a binary matrix. How could one interpret matrix multiplication in this context?
A partition of a set A is a collection of disjoint subsets of A such that their union equals A.
Theorem: Every equivalence relation defines a partition and every partition defines an equivalence relation.
Otherwise stated, every equivalence relation is a partition and every partition is an equivalence relation.
Proof: (⟹) Let R be an equivalence relation and for all a’s in A, let the equivalence class of a be the set of all elements which are related to a and denote it [a]. From reflexivity, every a is contained in some equivalence class. Hence the union of all such classes contains A. We also see that by symmetry, if b is in [a], then a is in [b], so [a]=[b] must be true. Suppose that for two elements a and b in A, [a]≠[b] and suppose to the contrary that there exists some c in the intersection of [a] and [b]. By transitivity, a and b must be related, so [a]=[b], which is a contradiction. Then each equivalence class is disjoint.
(⟸) Consider a partition of A into disjoint subsets. We construct a relation R such that for each such subset P and each a and b in P, R contains (a,b) and (b,a). Since every a in A is contained in some subset in the partition, (a,a) is in R, so R is reflexive. If (a,b) is in R, then a and b must be in the same subset P, so naturally a is in the same subset as b and therefore (b,a) is in R. Then R is symmetric. Now suppose that both (a,b) and (b,c) are in R. Then a ,b, and c must all be in the same subset, so (a,c) is in R. Then R is transitive and we may conclude that it is an equivalence relation. □
That sums up the preliminaries section. We may now move on to Algebra….