Sets and relations
Tuples are ordered collections of elements, whereas sets are unordered.
For example: is different from , but is the same as .
| Symbol | Meaning | Example | 
|---|---|---|
| Empty set | ||
| Universal set | Everything | |
| Singleton set | ||
| Set with elements | ||
| Element of | ||
| Not an element of | ||
| Subset | ||
| Cardinality | ||
| Union | ||
| Intersection | ||
| Cartesian product | ||
| or | Set difference | |
| Complement | ||
| Generalized union (n->m) | ||
| Generalized intersection (n->m) | 
| Symbol | Set | Values | 
|---|---|---|
| Natural numbers | ||
| Integers | ||
| Rational numbers | where | |
| Real numbers | ||
| Complex numbers | where | 
Venn Diagrams
Venn diagrams illustrate concepts like intersections, unions, which is a good way to visualize probabilities. The overlapping regions indicate elements that belong to multiple sets, while non-overlapping regions represent elements unique to specific sets.
In this example, two circles are drawn to represent sets A and B. The overlapping region is labeled as the intersection of sets A and B, denoted by A B.

Relations
For an arbitrary relation on two sets and , it must be a subset of the Cartesian product :
Where the relation describes some relation between the elements of the sets.
We can denote a relationship between two elements and as , and .
Hence, a relation on a single set is a subset of the Cartesian product .
Example
Consider describes the relation where . For :
| Property | Definition | Example | Method of prove | 
|---|---|---|---|
| Reflexive | Pick same element, show both | ||
| Symmetric | Pick and and show both | ||
| Anti-symmetric | Pick and and show | ||
| Transitive | Pick and and show | 
A relation has all the above properties.
Example prove
Show that is reflexive, symmetric and transitive.
Reflexive: Picking any two same number , is a multiple of 3, so .
Symmetric: Consider possible elements in : If (divisible by 3), the symmetric element can be observed to be (also divisible by 3).
Transitive: Consider the possible elements in : If , the element (sum of two multiples of 3 is also a multiple of 3), which implies .
A relation is said to be equivalence if it is reflexive, symmetric, and transitive.
The set of all elements related to a given element is called the equivalence class of , given by:
Example
Consider :
The composition of two relations and is defined as:
Example
Consider and :
We leave out the pair as it does not have a corresponding pair in .
Visualization of relations
A graph where:
- Each node represents an element of the set
- Arrow from node to node exists if is in the relation
Example
Consider :
A matrix representation of a relation where:
- Rows and columns represent elements of the set
- A cell is 1 if is in the relation, 0 otherwise
Example
Consider :