1. Sets
A set is a well-defined collection of distinct objects, called its elements. "Well-defined" means we can decide for any object whether it belongs to the set. Sets are written in two forms:
- Roster form: list the elements, e.g. \(A = \{1, 2, 3, 4\}\).
- Set-builder form: state the property, e.g. \(A = \{x : x \in \mathbb{N},\ x \le 4\}\).
| Type | Meaning | Example |
|---|---|---|
| Empty (null) set | No elements, written ∅ or { } | \(\{x \in \mathbb{R} : x^2 = -1\}\) |
| Singleton | Exactly one element | {0} |
| Finite / infinite | Countable number of elements, or not | {vowels} / \(\mathbb{N}\) |
| Equal sets | Exactly the same elements | {1, 2} = {2, 1} |
| Equivalent sets | Same number of elements | {a, b} and {1, 2} |
| Subset | \(A \subseteq B\) if every element of A is in B | \(\mathbb{N} \subset \mathbb{Z} \subset \mathbb{Q} \subset \mathbb{R}\) |
| Power set P(A) | Set of all subsets of A | P({a, b}) = {∅, {a}, {b}, {a, b}} |
| Universal set U | The set containing all sets under discussion | \(\mathbb{R}\) for real-number problems |
If \(n(A) = n\), then A has \(2^n\) subsets, so \(n(P(A)) = 2^n\), and \(2^n - 1\) proper subsets. ∅ is a subset of every set, and every set is a subset of itself.
1.1 Intervals
2. Operations on sets

| Operation | Definition |
|---|---|
| Union | \(A \cup B = \{x : x \in A \text{ or } x \in B\}\) |
| Intersection | \(A \cap B = \{x : x \in A \text{ and } x \in B\}\); A, B are disjoint if \(A \cap B = \varnothing\) |
| Difference | \(A - B = \{x : x \in A,\ x \notin B\} = A \cap B'\) |
| Complement | \(A' = U - A = \{x \in U : x \notin A\}\) |
| Symmetric difference | \(A \,\Delta\, B = (A - B) \cup (B - A)\) |
2.1 Laws of algebra of sets
- Commutative: \(A \cup B = B \cup A\), \(A \cap B = B \cap A\).
- Associative: \((A \cup B) \cup C = A \cup (B \cup C)\), and similarly for ∩.
- Distributive: \(A \cup (B \cap C) = (A \cup B) \cap (A \cup C)\), \(A \cap (B \cup C) = (A \cap B) \cup (A \cap C)\).
- Identity and complement: \(A \cup \varnothing = A\), \(A \cap U = A\), \(A \cup A' = U\), \(A \cap A' = \varnothing\), \((A')' = A\).
2.2 Counting with sets
3. Cartesian product
The Cartesian product of A and B is the set of all ordered pairs with first element from A and second from B:
(a, b) = (c, d) only if a = c and b = d. In general \(A \times B \ne B \times A\). Example: A = {1, 2}, B = {x, y} gives A × B = {(1, x), (1, y), (2, x), (2, y)}.
4. Relations
A relation R from A to B is any subset of A × B. If (a, b) ∈ R we write a R b. The domain is the set of first elements, the range the set of second elements, and B is the codomain.
The inverse relation is \(R^{-1} = \{(b, a) : (a, b) \in R\}\).
4.1 Types of relations on a set A
| Type | Condition | Example on \(\mathbb{Z}\) |
|---|---|---|
| Empty | R = ∅ | {(a, b) : a – b = 1/2} |
| Universal | R = A × A | {(a, b) : a – b is an integer} |
| Reflexive | (a, a) ∈ R for every a ∈ A | a ≤ b |
| Symmetric | (a, b) ∈ R ⇒ (b, a) ∈ R | a + b is even |
| Antisymmetric | (a, b), (b, a) ∈ R ⇒ a = b | a ≤ b |
| Transitive | (a, b), (b, c) ∈ R ⇒ (a, c) ∈ R | a < b |
| Equivalence | Reflexive, symmetric and transitive | a – b divisible by 5 |
An equivalence relation splits A into disjoint equivalence classes. For congruence modulo 5 on \(\mathbb{Z}\), there are five classes: remainders 0, 1, 2, 3, 4.
For a set with n elements:
5. Functions
A relation f from A to B is a function (mapping) \(f : A \to B\) if every element of A has exactly one image in B. A is the domain, B the codomain, and \(f(A) = \{f(x) : x \in A\}\) the range, with range ⊆ codomain.
Vertical line test: a graph represents a function of x if no vertical line meets it more than once.

5.1 Types of functions
| Type | Condition | How to test |
|---|---|---|
| One-one (injective) | \(f(x_1) = f(x_2) \Rightarrow x_1 = x_2\) | Horizontal line meets the graph at most once; strictly monotonic functions are one-one |
| Many-one | Two or more elements share an image | Some horizontal line meets the graph more than once |
| Onto (surjective) | Range = codomain | Every y in B has a pre-image |
| Into | Range is a proper subset of the codomain | Some y has no pre-image |
| Bijective | One-one and onto | Only bijections have inverses |
For finite sets with n(A) = m and n(B) = n:
5.2 Standard real functions
| Function | Definition | Domain | Range |
|---|---|---|---|
| Identity | f(x) = x | \(\mathbb{R}\) | \(\mathbb{R}\) |
| Constant | f(x) = c | \(\mathbb{R}\) | {c} |
| Modulus | |x| = x for x ≥ 0, –x for x < 0 | \(\mathbb{R}\) | [0, ∞) |
| Signum | sgn x = 1, 0, –1 for x > 0, x = 0, x < 0 | \(\mathbb{R}\) | {–1, 0, 1} |
| Greatest integer | [x] = greatest integer ≤ x | \(\mathbb{R}\) | \(\mathbb{Z}\) |
| Fractional part | {x} = x – [x] | \(\mathbb{R}\) | [0, 1) |
| Exponential | \(a^x\), a > 0, a ≠ 1 | \(\mathbb{R}\) | (0, ∞) |
| Logarithmic | \(\log_a x\), a > 0, a ≠ 1 | (0, ∞) | \(\mathbb{R}\) |
| Reciprocal | 1/x | \(\mathbb{R} - \{0\}\) | \(\mathbb{R} - \{0\}\) |
| Square root | \(\sqrt{x}\) | [0, ∞) | [0, ∞) |

Examples: [2.7] = 2, [–2.7] = –3, {–2.7} = 0.3. Also \(x - 1 \lt [x] \le x\) and \([x + n] = [x] + n\) for integer n.
5.3 Finding domain and range
- Denominator ≠ 0; expression under an even root ≥ 0; argument of log > 0.
- For the range, write x in terms of y and find the y for which x is real and in the domain.
Example: \(f(x) = \sqrt{\dfrac{x - 2}{3 - x}}\). We need \(\dfrac{x - 2}{3 - x} \ge 0\) with x ≠ 3, giving the domain [2, 3).
Example: range of \(f(x) = \dfrac{x}{1 + x^2}\). Setting \(y = \dfrac{x}{1+x^2}\) gives \(yx^2 - x + y = 0\). For real x (y ≠ 0) the discriminant \(1 - 4y^2 \ge 0\), so \(-\tfrac{1}{2} \le y \le \tfrac{1}{2}\); y = 0 occurs at x = 0. Range: \([-\tfrac{1}{2}, \tfrac{1}{2}]\).
5.4 Even and odd functions
cos x, x2, |x| are even; sin x, x3, sgn x are odd. Every function on a symmetric domain is the sum of an even and an odd part:
5.5 Periodic functions
f is periodic if \(f(x + T) = f(x)\) for all x; the smallest positive T is the period. sin x and cos x have period 2π; tan x has period π; {x} has period 1. The period of \(\sin(ax + b)\) is \(2\pi/|a|\); \(|\sin x|\) and \(\sin^2 x\) have period π.
6. Composition and inverse
For \(f : A \to B\) and \(g : B \to C\), the composite is
Composition is associative but not commutative in general. Example: f(x) = x2, g(x) = x + 1 give \((g \circ f)(x) = x^2 + 1\) but \((f \circ g)(x) = (x + 1)^2\).
If f is a bijection, its inverse \(f^{-1} : B \to A\) satisfies
The graph of \(f^{-1}\) is the mirror image of the graph of f in the line y = x (see \(e^x\) and \(\ln x\) above). Example: f(x) = 2x + 3 on \(\mathbb{R}\) gives \(f^{-1}(x) = \dfrac{x - 3}{2}\).
7. Binary operations
A binary operation * on a set A is a function \(A \times A \to A\). Addition and multiplication are binary operations on \(\mathbb{N}\); subtraction is not (3 – 5 ∉ \(\mathbb{N}\)). * is commutative if a * b = b * a and associative if (a * b) * c = a * (b * c). An identity e satisfies a * e = e * a = a. The number of binary operations on a set with n elements is \(n^{n^2}\).
8. Summary and practice questions
8.1 Key points
- A set with n elements has \(2^n\) subsets; \(n(A \times B) = n(A)\,n(B)\).
- \(n(A \cup B) = n(A) + n(B) - n(A \cap B)\); De Morgan: \((A \cup B)' = A' \cap B'\).
- A relation is a subset of A × B; there are \(2^{mn}\) relations from A to B.
- Equivalence relation = reflexive + symmetric + transitive; it partitions the set into classes.
- A function gives each element of the domain exactly one image. Number of functions = \(n^m\).
- One-one: distinct inputs give distinct outputs. Onto: range = codomain. Only bijections are invertible.
- Domain rules: no zero denominator, even roots of non-negative quantities, logs of positive quantities.
- \((g \circ f)(x) = g(f(x))\); \((g \circ f)^{-1} = f^{-1} \circ g^{-1}\); the graph of \(f^{-1}\) is the reflection of f in y = x.
8.2 Practice questions
Q1. In a class of 60 students, 35 study physics, 30 study chemistry and 12 study both. How many study neither?
- Answer: n(P ∪ C) = 35 + 30 – 12 = 53, so 60 – 53 = 7 study neither.
Q2. A set has 3 elements. How many subsets and proper subsets does it have, and how many elements does P(P(A)) have?
- Answer: \(2^3 = 8\) subsets, 7 proper subsets; \(n(P(P(A))) = 2^8 = 256\).
Q3. If n(A) = 3 and n(B) = 4, find the number of relations from A to B.
- Answer: \(2^{3 \times 4} = 2^{12} = 4096\).
Q4. On \(\mathbb{Z}\), R = {(a, b) : a – b is divisible by 3}. Show that R is an equivalence relation.
- Answer: reflexive: a – a = 0 is divisible by 3. Symmetric: if 3 | (a – b) then 3 | (b – a). Transitive: if 3 | (a – b) and 3 | (b – c) then 3 | (a – c), since a – c = (a – b) + (b – c).
Q5. R = {(1, 1), (2, 2), (3, 3), (1, 2)} on A = {1, 2, 3}. Is it reflexive, symmetric, transitive?
- Answer: reflexive (all (a, a) present) and transitive, but not symmetric ((1, 2) ∈ R, (2, 1) ∉ R).
Q6. If n(A) = 3 and n(B) = 5, find the number of functions and one-one functions from A to B.
- Answer: functions \(5^3 = 125\); one-one \(^5P_3 = 5 \times 4 \times 3 = 60\).
Q7. Find the number of onto functions from a set of 4 elements to a set of 3 elements.
- Answer: \(3^4 - \binom{3}{1}2^4 + \binom{3}{2}1^4 = 81 - 48 + 3 = 36\).
Q8. Find the domain of \(f(x) = \dfrac{1}{\sqrt{x^2 - 5x + 6}}\).
- Answer: need \(x^2 - 5x + 6 = (x - 2)(x - 3) \gt 0\), so \(x \lt 2\) or \(x \gt 3\): domain \((-\infty, 2) \cup (3, \infty)\).
Q9. Is \(f : \mathbb{R} \to \mathbb{R}\), \(f(x) = x^2\), one-one or onto?
- Answer: neither. f(–1) = f(1), so not one-one; negative numbers have no pre-image, so not onto. Restricted to [0, ∞) → [0, ∞) it becomes a bijection with inverse \(\sqrt{x}\).
Q10. If \(f(x) = \dfrac{x}{x - 1}\), x ≠ 1, find \((f \circ f)(x)\).
- Answer: \(f(f(x)) = \dfrac{\frac{x}{x-1}}{\frac{x}{x-1} - 1} = \dfrac{x}{x - (x - 1)} = x\). So f is its own inverse.
© 2026 Winjeet Academy. These notes are for personal study. Copying, reposting or redistribution without permission is not allowed.