Sub topic 1
Sets, Elements and Notation
Prerequisites
This chapter assumes you are comfortable with the following:
- Basic arithmetic and simple linear equations.
- Reading word problems that give counts and percentages.
- Whole numbers, and the idea of a variable standing for a number.
You do not need any earlier set theory. This chapter is the first of the series. It sets up the language that every later chapter uses for Venn diagrams and inclusion-exclusion.
Why notation comes first
CAT Quantitative Ability problems on overlapping groups are short word problems. "60 students study Maths, 50 study Physics, 15 study neither." The arithmetic is easy. Most errors come from misreading what each group means. Set notation gives each group a name and each statement a precise meaning, so you can write the problem down without ambiguity.
This chapter covers what a set is, the two ways to write one, how to count its elements, and the common mistakes that cost marks.
What a set is
A set is a collection of distinct objects. Each object in the set is called an element (or member). Two rules define a set:
- Well-defined. For any object, you can say clearly whether it is in the set or not. "The even numbers below 10" is a set. "The tall students in a class" is not, because "tall" is vague.
- Distinct elements. Repeats do not count. The set {1, 2, 2, 3} is the same set as {1, 2, 3}.
Order does not matter either. {1, 2, 3} and {3, 1, 2} are the same set.
Sets are usually named with capital letters such as A, B, C. Elements are usually written in lowercase.
Membership symbols
Two symbols state whether an object belongs to a set.
| Symbol | Meaning | Example |
|---|---|---|
| ∈ | is an element of | 3 ∈ {1, 2, 3} |
| ∉ | is not an element of | 5 ∉ {1, 2, 3} |
Read "x ∈ A" as "x belongs to A".
Two ways to write a set
Roster (listing) notation
Roster notation lists the elements inside braces, separated by commas.
- A = {2, 4, 6, 8}
- B = {a, e, i, o, u}
For a long regular pattern, you may use dots: {1, 2, 3, ..., 100}. Use the dots only when the pattern is obvious.
Set-builder notation
Set-builder notation describes the elements by a rule. The general form is:
{ x : condition on x }
Read the colon (or a vertical bar, written { x | condition }) as "such that".
- A = { x : x is an even integer, 2 ≤ x ≤ 8 } is the same set as {2, 4, 6, 8}.
- C = { x : x is a positive integer divisible by 5, x < 30 } = {5, 10, 15, 20, 25}.
Set-builder notation is useful when the set is too large to list or when the rule is the important part. In a CAT problem, "students who study Maths" is already a set-builder description, written in words.
Converting between the two
The skill that matters is moving between the forms without losing or adding elements. Check the boundary conditions. For { x : x is a positive integer, x² < 50 }, the elements are 1 through 7, because 7² = 49 is below 50 and 8² = 64 is not. Writing the set as {1, ..., 8} is a common slip.
Cardinality: counting elements
The number of elements in a finite set A is written n(A). Some books write |A| or #A. CAT questions normally use n(A).
- If A = {2, 4, 6, 8}, then n(A) = 4.
- If B = {a, e, i, o, u}, then n(B) = 5.
Counting is exactly where the "distinct elements" rule matters. For A = {1, 2, 2, 3, 3, 3}, n(A) = 3, not 6.
Counting integers in a range
Questions often describe a set by a range. Use these checks:
- Integers from a to b inclusive: b − a + 1.
- Integers strictly between a and b: b − a − 1.
- Multiples of k up to N: ⌊N / k⌋ (the integer part of N divided by k).
For example, the number of multiples of 7 from 1 to 100 is ⌊100 / 7⌋ = 14. The number of integers from 15 to 40 inclusive is 40 − 15 + 1 = 26.
Special sets
Some sets appear so often that they have fixed names.
| Set | Meaning |
|---|---|
| ∅ or { } | The empty set, with no elements. n(∅) = 0. |
| ℕ | Natural numbers: 1, 2, 3, ... |
| ℤ | Integers: ..., −2, −1, 0, 1, 2, ... |
| ℚ | Rational numbers |
| ℝ | Real numbers |
Whether ℕ includes 0 depends on the textbook. In CAT problems, the question usually says "positive integers" or "non-negative integers" directly. Read the wording and do not rely on the symbol.
A common mistake is to write the empty set as {∅}. That is a set with one element (the empty set itself), so its cardinality is 1, not 0.
Equal sets and equivalent sets
Two sets are equal if they have exactly the same elements. A = B means every element of A is in B and every element of B is in A.
Two sets are equivalent if they have the same number of elements, even when the elements differ. {1, 2, 3} and {a, b, c} are equivalent but not equal.
Counting problems depend on cardinality, so equivalence matters. Equality matters when you test whether a described group is the same group.
Finite and infinite sets
A set is finite if you can finish counting its elements. It is infinite if you cannot. The set of positive integers is infinite. The set of positive integers below 1000 is finite.
CAT overlap problems use finite sets. Infinite sets appear mainly when a question describes a number set by a property and then asks for a count in a limited range.
Checking notation in code
The Python set type follows the same rules. It stores distinct elements, ignores order, and reports cardinality with len. This is a quick way to test your hand work on small cases.
A = {2, 4, 6, 8}
B = {1, 2, 2, 3}
print(3 in B) # True, like 3 ∈ B
print(5 in B) # False, like 5 ∉ B
print(len(A)) # 4, like n(A)
print(len(B)) # 3, because the repeated 2 is dropped
# Set-builder notation as a comprehension
C = {x for x in range(1, 30) if x % 5 == 0}
print(C) # {5, 10, 15, 20, 25} (order may vary)
print(len(C)) # 5
D = {x for x in range(1, 100) if x * x < 50}
print(max(D), len(D)) # 7 7The comprehension {x for x in range(1, 30) if x % 5 == 0} mirrors { x : x is a positive integer divisible by 5, x < 30 }. Note that range(1, 30) stops before 30, so the upper bound is exclusive.
A worked example
Let A = { x : x is a positive integer, x ≤ 20, x is a multiple of 3 }, and let B = {x : x is a positive integer, x ≤ 20, x is a multiple of 4 }.
- List A in roster form: A = {3, 6, 9, 12, 15, 18}. So n(A) = 6, which matches ⌊20 / 3⌋ = 6.
- List B: B = {4, 8, 12, 16, 20}. So n(B) = 5, which matches ⌊20 / 4⌋ = 5.
- Test membership: 12 ∈ A and 12 ∈ B. But 9 ∈ A and 9 ∉ B.
The number 12 sits in both lists. That is the first hint of an overlap. The next chapters name and count overlaps. For now, notice that you can describe the same objects by a rule or by a list and get the same count either way.
Common errors
- Counting repeats. A set lists each element once. Count distinct elements only.
- Off-by-one in ranges. "From 15 to 40 inclusive" has 26 integers, not 25. "Between 15 and 40" usually excludes both ends and gives 24.
- Confusing ∈ with a subset relation. 3 ∈ A says the element 3 is in A. The symbol for "one set sits inside another" is introduced in the next chapter. Do not use ∈ between two sets.
- Writing {∅} for the empty set. It has one element. Use ∅ or { }.
- Treating a vague group as a set. If a problem's group is not clearly defined, ask what rule decides membership before you count.
Summary of the notation
| Idea | Notation |
|---|---|
| Set named A | A = {1, 2, 3} |
| Element of | 2 ∈ A |
| Not an element of | 5 ∉ A |
| Rule description | { x : condition } |
| Number of elements | n(A) |
| Empty set | ∅ |
Practice
Exercise
Write the set P = { x : x is a positive integer, 3 < x ≤ 12, x is odd } in roster form, and find n(P).
Show answer
The odd integers greater than 3 and at most 12 are 5, 7, 9 and 11. So P = {5, 7, 9, 11} and n(P) = 4. Note that 3 is excluded because the condition is 3 < x, strictly greater.
Exercise
How many positive integers up to 200 are multiples of 6? Then say whether the count would change if the problem asked for multiples of 6 "between 1 and 200 inclusive".
Show answer
The count is ⌊200 / 6⌋ = 33, since 6 × 33 = 198 and 6 × 34 = 204 is too large. The count does not change with "between 1 and 200 inclusive", because neither 1 nor 200 is a multiple of 6.
Exercise
Let S = {1, 2, 3, 3, 4, 4, 4}. What is n(S)? Is {∅} the same as ∅? Give the cardinality of each.
Show answer
Repeats are ignored, so S = {1, 2, 3, 4} and n(S) = 4. {∅} is not the same as ∅. The set {∅} has one element, namely the empty set, so its cardinality is 1. The set ∅ has no elements, so its cardinality is 0.