Sets and Basic Notation — A Foundation for Mathematics
Sets and Basic Notation
Every branch of mathematics — from calculus to linear algebra to probability — is built on the language of sets. Before you can prove a theorem or solve an analysis problem, you need to speak this language fluently. This post gives you the complete toolkit: notation, operations, key theorems, and exam-ready examples.
🇮🇳 हिंदी में पढ़ेंWhat Is a Set? — Definition and Notation
A set is a well-defined collection of distinct objects, called its elements (or members). We write $a \in A$ to mean "$a$ is an element of $A$", and $a \notin A$ to mean "$a$ is not an element of $A$".
Two ways to describe a set:
Roster (Enumeration) Form — list elements between braces:
$$A = \{1,\,2,\,3,\,4,\,5\}, \qquad B = \{a,\,e,\,i,\,o,\,u\}.$$
Set-Builder (Comprehension) Form — describe by a rule:
$$C = \{x \in \mathbb{Z} : x^2 < 10\} = \{-3,-2,-1,0,1,2,3\}.$$
Standard number sets:
$\mathbb{N} = \{1,2,3,\ldots\}$ |
$\mathbb{Z} = \{\ldots,-2,-1,0,1,2,\ldots\}$ |
$\mathbb{Q}$ (rationals) |
$\mathbb{R}$ (reals) |
$\emptyset$ (empty set)
Subset: $A \subseteq B$ means every element of $A$ is also in $B$. Formally: $x \in A \Rightarrow x \in B$.
Proper subset: $A \subset B$ means $A \subseteq B$ and $A \neq B$.
Equality: $A = B$ means $A \subseteq B$ and $B \subseteq A$.
Power set: $\mathcal{P}(A)$ is the set of all subsets of $A$. If $|A| = n$ (finite), then $|\mathcal{P}(A)| = 2^n$.
Example: $A = \{1,2\}$ $\Rightarrow$ $\mathcal{P}(A) = \bigl\{\emptyset,\{1\},\{2\},\{1,2\}\bigr\}$, so $|\mathcal{P}(A)| = 4 = 2^2$.
Key fact: $\emptyset \subseteq A$ for every set $A$.
Set Operations
∪ Union
$A \cup B = \{x : x \in A \text{ or } x \in B\}$
Everything in either set
∩ Intersection
$A \cap B = \{x : x \in A \text{ and } x \in B\}$
Only what's in both sets
∁ Complement
$A^c = U \setminus A = \{x \in U : x \notin A\}$
Everything in $U$ not in $A$
∖ Set Difference
$A \setminus B = \{x : x \in A,\, x \notin B\}$
In $A$ but not in $B$
⨯ Cartesian Product
$A \times B = \{(a,b) : a \in A,\; b \in B\}$ — If $A,B$ finite: $|A \times B| = |A| \cdot |B|$
For any sets $A, B \subseteq U$:
$$(A \cup B)^c = A^c \cap B^c \qquad \text{and} \qquad (A \cap B)^c = A^c \cup B^c.$$
In general, for an indexed family $\{A_\alpha\}$:
$$\left(\bigcup_{\alpha} A_{\alpha}\right)^c = \bigcap_{\alpha} A_{\alpha}^c, \qquad \left(\bigcap_{\alpha} A_{\alpha}\right)^c = \bigcup_{\alpha} A_{\alpha}^c.$$
Intuition — Sets as Containers
Think of a set as a bag. You can put objects in the bag (elements), combine two bags into one (union), keep only what's in both bags (intersection), or take out everything from one bag that's also in another (set difference). The rules of set theory are just the precise language for describing these intuitive bag operations.
"Not (A or B)" is the same as "not A and not B." If it's not the case that it rains or snows, then it doesn't rain and it doesn't snow. This everyday logic is exactly De Morgan's law $(A \cup B)^c = A^c \cap B^c$.
Similarly: "Not (A and B)" is "not A or not B." If it's not true that you are both tired and hungry, then either you're not tired or you're not hungry (or both).
The power set $\mathcal{P}(A)$ counts all possible sub-selections from $A$. For each element, you either include it or not: 2 choices per element, giving $2^n$ total subsets when $|A|=n$.
समुच्चय (Set) एक सुपरिभाषित संग्रह है जिसमें विशिष्ट वस्तुएँ (अवयव) होती हैं। $a \in A$ का अर्थ है "$a$, समुच्चय $A$ का अवयव है।" समुच्चयों पर संक्रियाएँ — संघ ($\cup$), प्रतिच्छेदन ($\cap$), पूरक ($A^c$), और कार्तीय गुणन ($A \times B$) — गणित की भाषा बनाती हैं। डी मॉर्गन के नियम: $(A \cup B)^c = A^c \cap B^c$ और $(A \cap B)^c = A^c \cup B^c$ — ये परीक्षाओं में अत्यंत महत्त्वपूर्ण हैं।
Solved Examples
Write $A = \{x \in \mathbb{N} : x \leq 5\}$ in roster form. Then list all subsets of $B = \{p, q\}$ and confirm $|\mathcal{P}(B)| = 2^2$.
Solution. Roster form: $A = \{1, 2, 3, 4, 5\}$.
All subsets of $B = \{p, q\}$:
$$\mathcal{P}(B) = \bigl\{\emptyset,\;\{p\},\;\{q\},\;\{p,q\}\bigr\}.$$
Count: $|\mathcal{P}(B)| = 4 = 2^2$. $\checkmark$ $\blacksquare$
Let $U = \{1,2,3,4,5,6,7,8\}$, $A = \{1,2,3,4\}$, $B = \{3,4,5,6\}$. Find: (i) $A \cup B$, (ii) $A \cap B$, (iii) $A^c$, (iv) $A \setminus B$, (v) verify $(A \cup B)^c = A^c \cap B^c$.
(i) $A \cup B = \{1,2,3,4,5,6\}$
(ii) $A \cap B = \{3,4\}$
(iii) $A^c = U \setminus A = \{5,6,7,8\}$
(iv) $A \setminus B = \{1,2\}$ (in $A$, not in $B$)
(v) $(A \cup B)^c = U \setminus \{1,2,3,4,5,6\} = \{7,8\}$.
$B^c = \{1,2,7,8\}$.
$A^c \cap B^c = \{5,6,7,8\} \cap \{1,2,7,8\} = \{7,8\}$. $\checkmark$ $\blacksquare$
Let $A = \{0,1\}$ and $B = \{a,b,c\}$. (i) List $\mathcal{P}(A)$. (ii) Find $A \times B$ and its cardinality. (iii) Is $(0,a) = (a,0)$? Justify.
(i) $\mathcal{P}(A) = \bigl\{\emptyset,\;\{0\},\;\{1\},\;\{0,1\}\bigr\}$; $|\mathcal{P}(A)| = 4 = 2^2$. $\checkmark$
(ii) $A \times B = \{(0,a),(0,b),(0,c),(1,a),(1,b),(1,c)\}$; $|A \times B| = 2 \times 3 = 6$.
(iii) $(0,a) \in A \times B$ but $(a,0) \notin A \times B$ since $a \notin A$. More fundamentally, ordered pairs satisfy $(x_1,y_1) = (x_2,y_2) \Leftrightarrow x_1=x_2 \text{ and } y_1=y_2$. Since $0 \neq a$, we have $(0,a) \neq (a,0)$. $\blacksquare$
For each $n \in \mathbb{N}$, let $A_n = \left(-\dfrac{1}{n},\,\dfrac{1}{n}\right) \subseteq \mathbb{R}$. Find (i) $\displaystyle\bigcup_{n=1}^{\infty} A_n$ and (ii) $\displaystyle\bigcap_{n=1}^{\infty} A_n$. (iii) Using De Morgan's law, find $\displaystyle\left(\bigcap_{n=1}^{\infty} A_n\right)^c$.
(i) Union. Since $A_1 = (-1,1)$ is the largest and each $A_n \subseteq A_{n-1}$ (because $1/n$ decreases as $n$ increases):
$$\bigcup_{n=1}^{\infty} A_n = A_1 = (-1,1).$$
(ii) Intersection. $x \in \bigcap_{n=1}^{\infty} A_n$ iff $|x| < 1/n$ for every $n \in \mathbb{N}$. For any $x \neq 0$, by the Archimedean property $\exists\, N \in \mathbb{N}$ with $1/N < |x|$, so $x \notin A_N$. Only $x = 0$ satisfies $|x| < 1/n$ for all $n$:
$$\bigcap_{n=1}^{\infty} A_n = \{0\}.$$
(iii) De Morgan. By the general De Morgan law for indexed families:
$$\left(\bigcap_{n=1}^{\infty} A_n\right)^c = \bigcup_{n=1}^{\infty} A_n^c = \mathbb{R} \setminus \{0\}.$$
(Direct check: $\{0\}^c = \mathbb{R} \setminus \{0\}$. $\checkmark$) $\blacksquare$
Quick Revision Cards
📊 A — Key Symbols & Formulae
- $a \in A$: membership
- $A \subseteq B$: subset
- $A \cup B$, $A \cap B$, $A^c$, $A \setminus B$
- $|\mathcal{P}(A)| = 2^{|A|}$
- $|A \times B| = |A| \cdot |B|$
- De Morgan: $(A \cup B)^c = A^c \cap B^c$
- $(A \cap B)^c = A^c \cup B^c$
⚙️ B — Edge Cases & Conditions
- $\emptyset \subseteq A$ for every $A$
- $\emptyset \in \mathcal{P}(A)$ always
- $\mathcal{P}(\emptyset) = \{\emptyset\}$ (1 element)
- $A \times B \neq B \times A$ in general
- $A \times \emptyset = \emptyset$
- $A = B$ requires both $A \subseteq B$ and $B \subseteq A$
- Complement depends on universal set $U$
🎯 C — Exam Tips
- 🔵 CSIR NET: Use De Morgan for infinite indexed families
- 🟢 GATE: Prove set equality by showing ⊆ both ways
- 🟠 IIT JAM: $\mathcal{P}(\emptyset)=\{\emptyset\}$ has 1 element, not 0
- 🔴 B.Sc. Raj.: Distinguish $\in$ (membership) from $\subseteq$ (subset)
Common Mistakes
❌ Errors to Avoid
Wrong: "$\{1\} \in \{1,2,3\}$" | Correct: $\{1\} \subseteq \{1,2,3\}$ (subset) and $1 \in \{1,2,3\}$ (membership). The set $\{1\}$ is not the same object as the number $1$.
Wrong: "The power set only contains non-empty subsets." | Correct: $\emptyset \subseteq A$ for every $A$, so $\emptyset \in \mathcal{P}(A)$ always. Also $\mathcal{P}(\emptyset) = \{\emptyset\}$ has exactly one element.
Wrong: "$(1,2) = (2,1)$." | Correct: $(a,b)=(c,d) \Leftrightarrow a=c$ and $b=d$. Order is essential in Cartesian products.
Wrong: Writing $A^c = \{x : x \notin A\}$ without specifying $U$. | Correct: $A^c = \{x \in U : x \notin A\}$. The complement changes completely depending on $U$.
Real-World Applications
Databases (SQL)
UNION, INTERSECT, and EXCEPT in SQL are direct implementations of $\cup$, $\cap$, and $\setminus$. JOIN operations are built on Cartesian products.
Probability Theory
The sample space $\Omega$ is a universal set. Events are subsets. De Morgan: $P(A^c) = 1-P(A)$. The complement rule, addition rule, and conditional probability all use set operations.
Computer Science
Product types (tuples) are Cartesian products; sum types are disjoint unions. $\mathcal{P}(A)$ models all predicates on a type. Python's set implements all these operations natively.
Digital Logic
Boolean algebra (AND, OR, NOT) is isomorphic to set algebra ($\cap$, $\cup$, complement). De Morgan's laws simplify logic gate circuits — a daily tool for electrical engineers.
Summary Table & Key Result
| Concept | Statement / Formula | Condition | Reference |
|---|---|---|---|
| Set | Well-defined collection of distinct objects | Elements are well-defined | Rudin Ch. 1, §1.1 |
| Subset | $A \subseteq B \Leftrightarrow (x \in A \Rightarrow x \in B)$ | Any $A,B$ | Rudin Ch. 1, §1.1 |
| Power Set | $|\mathcal{P}(A)| = 2^n$ | $|A|=n$ finite | Standard |
| Union | $A \cup B = \{x : x \in A \text{ or } x \in B\}$ | $A,B \subseteq U$ | Rudin Ch. 1, §1.1 |
| Intersection | $A \cap B = \{x : x \in A \text{ and } x \in B\}$ | $A,B \subseteq U$ | Rudin Ch. 1, §1.1 |
| De Morgan | $(A \cup B)^c = A^c \cap B^c$ | $A,B \subseteq U$ | Apostol Ch. 1, §1.2 |
| Cartesian Product | $|A \times B| = |A| \cdot |B|$ | $A,B$ finite | Standard |
The Central Result — De Morgan's Laws (General Form):
$$\left(\bigcup_{\alpha \in I} A_{\alpha}\right)^c = \bigcap_{\alpha \in I} A_{\alpha}^c \qquad \text{and} \qquad \left(\bigcap_{\alpha \in I} A_{\alpha}\right)^c = \bigcup_{\alpha \in I} A_{\alpha}^c$$
Set operations satisfy commutativity, associativity, distributivity, and complement laws — forming a Boolean Algebra.
Cross-References & Related Posts
← Prerequisites: None — this is the first post in the series. No prior mathematical knowledge beyond secondary school arithmetic is required.
→ Next Topic: Logic and Proof Methods — The Language of Mathematics; the language built directly on top of set theory developed here.
📖 Further Reading: Rudin, Ch. 1, §§1.1–1.12; Apostol, Ch. 1, §§1.1–1.4; Bartle & Sherbert, Ch. 1.
How did you find this post?
Tap a reaction — counts update in real time across all devices.
Have a question, doubt, or thought about this post? Choose how you want to join the discussion below.
💬 Comment on Telegram — No account neededRequires a free GitHub account — takes 30 seconds to create with just an email address.