Week 1: Sets, Relations & Functions
3406 words
17 min read
2026-09-12T00:00:00.000Z
Visual companion
Python
Type and operator map
Python Week 1: the first filter for runtime behavior
View
Revision summary
What this note is really saying
Short form
Number systems, sets, subsets, Cartesian products, equivalence relations, partial orders, and function classifications. # Mathematics I — Week 1: Sets, Relations & Functions ## TL;DR Week 1 is fundamentally about **objects and mappings between objects**: $$ \text{Numbers} \rightarrow \text{Sets} \rightarrow \text{Re...

Mathematics I — Week 1: Sets, Relations & Functions
TL;DR
Week 1 is fundamentally about objects and mappings between objects:
The most exam-important ideas are:
- set notation and operations
- Cartesian product
- relation properties:
- reflexive
- symmetric
- antisymmetric
- transitive
- equivalence relations
- functions:
- domain, codomain, range
- injective / one-one
- surjective / onto
- bijective
If these become intuitive, Week 1 becomes much easier.
1. Number systems
Before sets, IITM starts with the basic hierarchy of numbers.
1.1 Natural numbers
Usually:
Some textbooks include 0 in N, so always check the convention being used.
Think:
Numbers used for counting.
1.2 Whole numbers
{0,1,2,3,…}Natural numbers plus zero.
1.3 Integers
Z={…,−3,−2,−1,0,1,2,3,…}The symbol Z comes from German Zahlen, meaning numbers.
Contains:
- positive integers
- negative integers
- zero
2. Rational numbers
A number is rational if it can be written as
where
The set of rational numbers is:
Examples:
because
and
Decimal characterization
A rational number has a decimal expansion that is either:
- terminating, or
- eventually repeating.
Examples:
3. Irrational numbers
Numbers that cannot be expressed as
for integers p,q with q=0.
Examples:
Their decimal representations are:
- non-terminating
- non-repeating
4. Real numbers
The real numbers contain both rational and irrational numbers:
Hierarchy:
This inclusion chain is worth memorizing.
5. What exactly is a set?
A set is a well-defined collection of distinct objects.
Example:
The objects 1,2,3 are called elements or members of A.
Notation:
means:
2 belongs to A.
Meanwhile,
means:
5 does not belong to A.
6. Sets ignore order
These represent the same set:
Therefore:
Unlike lists or sequences, order is irrelevant.
7. Sets ignore repetitions
{1,1,2,2,3}={1,2,3}.An element is either present or absent.
There isn't a meaningful concept of an element occurring "twice" in an ordinary set.
8. Describing a set
Roster form
Explicitly list elements:
Set-builder form
Describe the property elements satisfy:
Read:
A is the set of all natural numbers x such that x is even and less than 10.
The colon : means such that.
Sometimes a vertical bar is used:
9. Empty set
A set containing no elements is the empty set:
or
Its cardinality is
Important distinction:
Why?
∅ contains zero elements.
But
contains one element, namely the empty set.
Therefore:
This is a classic conceptual trap.
10. Cardinality
The number of elements in a finite set A is written:
or sometimes:
Example:
therefore
11. Subsets
A is a subset of B if every element of A also belongs to B.
Notation:
Formally:
Example:
Then:
12. Every set is a subset of itself
For every set A:
Also:
for every set A.
Why?
To violate
we would need an element that belongs to ∅ but not A.
But ∅ has no elements.
Therefore no counterexample exists.
This idea—something being true because no counterexample can exist—is called vacuous truth.
You'll encounter it repeatedly in mathematics and logic.
13. Proper subset
If
and
then A is a proper subset of B.
Common notation:
Unfortunately, some textbooks use ⊂ merely to mean subset, so pay attention to the convention.
14. Equality of sets
Two sets are equal when they contain exactly the same elements.
iff
and
This is a useful proof technique:
To prove two sets are equal, prove each is a subset of the other.
15. Power set
The power set of A is the set containing all subsets of A.
Notation:
Example:
Its subsets are:
Therefore:
Power-set cardinality
If
then
Why?
For every element, you have two choices:
For n elements:
Example:
implies
16. Union
The union of A and B contains everything belonging to at least one of them.
Example:
then
Note that 3 does not appear twice.
17. Intersection
The intersection contains elements belonging to both sets.
For
we get
18. Disjoint sets
Two sets are disjoint when they share no elements:
Example:
19. Set difference
A−Bcontains elements belonging to A but not B.
Formally:
Example:
then
Notice generally:
In the same example:
So set difference is not commutative.
20. Complement
Suppose U is the universal set.
The complement of A contains everything in U that is not in A:
Example:
then
The universal set matters.
Without specifying the universe, a complement can be ambiguous.
21. Core set identities
These behave surprisingly similarly to algebra.
Commutative laws
A∪B=B∪A A∩B=B∩A.Associative laws
(A∪B)∪C=A∪(B∪C) (A∩B)∩C=A∩(B∩C).Distributive laws
A∩(B∪C)=(A∩B)∪(A∩C)and
Both directions exist.
22. Identity laws
A∪∅=A A∩U=A.23. Domination laws
A∪U=U A∩∅=∅.24. Idempotent laws
A∪A=A A∩A=A."Idempotent" means roughly:
applying an operation again produces no further change.
25. Complement laws
A∪Ac=U A∩Ac=∅.Also:
26. De Morgan's laws
Extremely important:
and
A useful verbal interpretation:
Complement flips OR ↔ AND.
So:
NOT(A or B)
becomes
NOT A and NOT B.
27. Cartesian product
This concept is the bridge from sets → relations → functions.
For sets A and B:
Example:
Then:
Important:
is an ordered pair.
Therefore generally:
Cardinality
If
and
then:
Example:
gives:
28. What is a relation?
A relation from A to B is simply a subset of the Cartesian product:
This definition is crucial.
Suppose:
and
Then:
A possible relation is:
Because:
29. Relation on a set
A relation on A satisfies:
Example:
Define:
This is a relation on A.
30. Reading relation notation
Instead of writing
we sometimes write:
Both mean:
a is related to b under relation R.
Example:
If R means "less than":
means:
31. Reflexive relation
A relation R on A is reflexive if every element is related to itself.
Formally:
Mental model
Every node has a self-loop.
Example:
and
Reflexive?
Yes.
Because all required pairs
exist.
Extra pairs do not hurt reflexivity.
32. Not reflexive
Suppose:
on
It is not reflexive, because:
One missing self-pair is enough.
33. Symmetric relation
R is symmetric when:
Mental model:
Every arrow has a reverse arrow.
If:
symmetry requires:
Self-pairs don't cause problems
For:
its reverse is itself:
So self-pairs automatically satisfy symmetry.
34. Antisymmetric relation
This one causes a lot of confusion.
A relation is antisymmetric if:
Equivalent intuition:
Two different elements cannot have arrows in both directions.
This does not mean:
"not symmetric."
A relation can actually be both symmetric and antisymmetric.
Example:
It is symmetric.
It is also antisymmetric.
Why?
There are no distinct a,b with both directions present.
35. Symmetric vs antisymmetric
This distinction is worth burning into memory:
Symmetric
For every arrow:
you must have:
Antisymmetric
If both:
and
exist, then:
So for distinct elements:
antisymmetry forbids having both directions simultaneously.
36. Transitive relation
R is transitive if:
and
implies:
Mental model:
requires shortcut:
Example:
If:
and
then transitivity requires:
37. The important trap with transitivity
Transitivity only imposes a requirement when a valid two-step chain exists.
Suppose:
There is no chain:
Therefore nothing violates transitivity.
So the relation is vacuously transitive.
Again, absence of a counterexample matters.
38. Equivalence relation
An equivalence relation satisfies all three:
Example:
On integers, define:
if a and b have the same remainder when divided by 3.
For example:
because:
This relation is:
- reflexive
- symmetric
- transitive
therefore it is an equivalence relation.
39. Why "equivalence"?
An equivalence relation formalizes the idea:
Treat these objects as "the same" according to some property.
Example:
Under parity:
Then integers split into:
and
These are equivalence classes.
40. Partial order
Another major relation type is a partial order.
A relation is a partial order when it is:
Compare:
Equivalence relation
R+S+Twhere S= symmetric.
Partial order
R+A+Twhere A= antisymmetric.
A classic example:
on sets.
Why?
Reflexive
A⊆A.Antisymmetric
If
and
then:
Transitive
If
and
then:
41. Relation-property cheat sheet
| Property | Mathematical condition | Mental picture |
|---|---|---|
| Reflexive | aRa for every a | every node loops to itself |
| Symmetric | aRb⇒bRa | every arrow reverses |
| Antisymmetric | aRb∧bRa⇒a=b | no two-way arrows between distinct nodes |
| Transitive | aRb∧bRc⇒aRc | every two-step path has shortcut |
This table is one of the highest-value things to memorize in Week 1.
42. Functions
Now we narrow relations further.
A function
assigns every element of A exactly one element of B.
Here:
- A = domain
- B = codomain
If:
then b is the image of a.
43. Function as a special relation
Remember:
A function is a relation satisfying two additional conditions:
Every domain element must be used
For every:
there must be some:
such that:
Exactly one output per input
You cannot have:
and
with:
44. Many inputs may share one output
This is allowed:
So:
text1 ─┐ ├──> 5 2 ─┘
is perfectly valid.
What is forbidden is:
text┌──> 5 1 ─────┤ └──> 8
because one input gets two outputs.
45. Domain, codomain and range
For:
Domain
All allowed inputs:
Codomain
The declared target set:
Range
Outputs that are actually achieved:
Therefore always:
These are not necessarily equal.
46. Example
Suppose:
with:
Then:
Domain
{1,2,3}Codomain
{a,b,c,d}Range
{a,b}.Notice:
47. One-one / injective function
A function is injective or one-one when distinct inputs produce distinct outputs.
Formally:
Equivalent form:
Mental model:
No output receives arrows from two different inputs.
48. Onto / surjective function
A function is surjective or onto if every element of the codomain gets hit.
Formally:
Equivalent statement:
Mental model:
Nothing in the codomain is left unused.
49. Bijective function
A function is bijective if it is both:
So there is a perfect one-to-one correspondence between domain and codomain.
Example:
with:
This is bijective.
50. Why bijections matter
Bijective functions have inverses.
If:
is bijective, then:
exists.
This becomes important later when Maths 1 reaches inverse functions in Week 5. The official syllabus places functions, exponential functions, composition and inverse functions there.
So Week 1 is already building foundations for Week 5.
51. Fast finite-set tests
Suppose:
If:
then f cannot be injective.
Why?
More inputs than available outputs means at least two inputs must share an output.
This is the pigeonhole principle.
If:
then f cannot be surjective.
Why?
There aren't enough inputs to hit every codomain element.
If:
for finite sets, then:
This shortcut is extremely useful.
52. Week 1 conceptual map
textNUMBERS │ ├── Natural ├── Integer ├── Rational └── Real │ ▼ SETS │ ├── subset ├── power set ├── union/intersection ├── complement └── Cartesian product │ ▼ RELATIONS │ ├── reflexive ├── symmetric ├── antisymmetric └── transitive │ ├── equivalence relation └── partial order │ ▼ FUNCTIONS │ ├── domain ├── codomain ├── range ├── injective ├── surjective └── bijective
That is essentially the conceptual skeleton of Week 1.
53. Things you should be able to do after Week 1
You don't need to memorize every sentence above. You need to be able to perform these operations:
- Convert between roster and set-builder notation.
- Determine subsets and proper subsets.
- Compute A∪B, A∩B, A−B, and Ac.
- Compute power-set size using 2n.
- Construct A×B.
- Recognize whether something is a relation.
- Test a relation for reflexivity.
- Test symmetry.
- Distinguish symmetry from antisymmetry.
- Test transitivity carefully.
- Identify equivalence relations.
- Identify partial orders.
- Decide whether a relation qualifies as a function.
- Find domain, codomain and range.
- Decide whether a function is injective, surjective or bijective.
If you can do those without looking anything up, Week 1 is basically under control.
The one thing I'd memorize verbatim
Reflexive: Symmetric: Antisymmetric: Transitive: aRaaRb⇒bRaaRb∧bRa⇒a=baRb∧bRc⇒aRcAnd:
Those definitions produce a large fraction of the reasoning questions in this part of the course.
Quick Recall & Flashcards
Test your active recall before proceeding to practice problems. Format:
Question :: Answer.- Power Set cardinality of set A with n elements :: 2n
- Cartesian Product cardinality ∣A×B∣ :: ∣A∣×∣B∣
- De Morgan's Law for (A∪B)′ :: A′∩B′
- De Morgan's Law for (A∩B)′ :: A′∪B′
- Equivalence Relation properties :: Reflexive, Symmetric, and Transitive
- Partial Order properties :: Reflexive, Antisymmetric, and Transitive
- Antisymmetric condition :: If (a,b)∈R and (b,a)∈R, then a=b
- Injective (one-to-one) condition :: f(x1)=f(x2)⟹x1=x2
- Surjective (onto) condition :: Range of f = Codomain of f
- Bijective function :: Both Injective and Surjective (invertible)
Practice & Self-Check
Attempt these diagnostic questions to verify your operational understanding.
1
Question 1
Let A={1,2,3,4}. What is the cardinality of the power set P(A)?
MCQ
3 Unit Assessment
A. 4
B. 8
C. 16
D. 32
2
Question 2
A relation R on set S is an equivalence relation if and only if it satisfies which three properties?
MCQ
3 Unit Assessment
A. Reflexive, Symmetric, and Antisymmetric
B. Reflexive, Symmetric, and Transitive
C. Reflexive, Antisymmetric, and Transitive
D. Symmetric, Antisymmetric, and Transitive
3
Question 3
Let f:R→R be defined by f(x)=2x+5. Which of the following describes f?
MCQ
3 Unit Assessment
A. Injective but not surjective
B. Surjective but not injective
C. Bijective (both injective and surjective)
D. Neither injective nor surjective