Number Sets and Operations on Sets
Every branch of mathematics you will meet in this course — sequences, functions, calculus, probability — takes place inside some set of numbers, and a huge number of careless errors on an exam come from forgetting which set is in play: dividing by an integer when a real number was required, or quoting a solution that happens not to exist in the set the question restricted you to. This chapter fixes the vocabulary and notation for talking about collections of numbers precisely: the number sets themselves, the symbols used to relate an element to a set and a set to another set, the operations that combine sets, and the interval notation used to describe continuous stretches of the real line. None of this is difficult, but all of it is used, silently, in every later chapter.
Have to hand: a clear diagram convention for number lines and Venn diagrams, and patience with notation — the ideas are simple, the symbols are the entire content of this chapter.
1. The Hierarchy of Number Sets
Mathematics builds its number systems in layers, each one solving a limitation of the layer below it.
The natural numbers, denoted , are the counting numbers (some authors exclude ; in this course unless stated otherwise). They are closed under addition and multiplication, but not under subtraction: has no answer in .
The integers, (from German Zahlen), repair this by adjoining the negative whole numbers: . Now subtraction is always possible, but division is not: has no answer in .
The rational numbers, (from quotient), repair this again:
Every rational number has a decimal expansion that either terminates (e.g. ) or recurs — repeats a finite block of digits forever (e.g. , or ). This is not a coincidence: the long-division algorithm for can only ever produce one of finitely many remainders (), so after at most steps a remainder must repeat, and from that point the digits repeat too.
Rational versus irrational, by decimal expansion. A number is rational if and only if its decimal expansion terminates or recurs. A number whose decimal expansion is infinite and non-recurring is irrational — it cannot be written as for any integers with .
The existence of irrational numbers is itself a fact that needs a demonstration, not just a definition.
Worked example — is irrational. Suppose, for contradiction, that were rational, so that for some integers with no common factor (the fraction is in lowest terms) and . Squaring,
so is even, which forces itself to be even (the square of an odd number is odd). Write . Then
so is even, and hence is even too. But then and are both even, contradicting the assumption that was in lowest terms. The assumption must be false: cannot be written as a ratio of integers, so is irrational. (This style of argument — assume the opposite and derive a contradiction — is developed formally in the next chapter; here it only serves to show that irrational numbers genuinely exist and are not a technicality.)
The set of all rationals together with all irrationals is the real numbers, — every point on the number line. Collecting the hierarchy:
Later in this block (Chapters 13–15) a still larger set, the complex numbers , will be built on top of to give every polynomial a root; it plays no part here.
2. Subsets with a Sign or a Restriction
Several commonly used subsets restrict a number set by sign or by excluding zero. The convention used throughout this course:
- — positive integers (excludes ).
- — negative integers.
- — positive rationals, positive reals (excluding ).
- or — non-negative reals (including ); notation varies by source, so a question that needs it will state its convention explicitly.
- (or ) — the irrational numbers: real numbers that are not rational.
Note that is not a subset of sitting inside the hierarchy above — it is the complement of within , a set operation made precise in Section 4.
3. Set Membership and Subset Relations
A set is a well-defined collection of objects, called its elements. If is an element of a set , we write (read " belongs to " or " is an element of "); if not, . For example, but , and but .
A set is a subset of a set , written , if every element of is also an element of . If in addition (there is at least one element of not in ), is a proper subset of , written . This is exactly the relation used in : every natural number is an integer, but not every integer is natural (e.g. ), so the inclusion is proper at each stage.
The empty set, (or ), is the set with no elements at all. It is a subset of every set, including itself: for any set , vacuously, since there is no element of that could fail to be in .
Sets can be described either by listing their elements, , or by set-builder notation, which states a rule:
read "the set of all in such that and is prime." The colon (sometimes a vertical bar ) separates the variable and its domain from the condition it must satisfy.
4. Operations on Sets
Given two sets and , usually regarded as subsets of some fixed universal set relevant to the problem (for number sets, is typically ), four operations combine or restrict them.
Union, : all elements in , or in , or in both.
Intersection, : all elements in both and .
If , the sets are called disjoint — they share no elements.
Complement, (also written or ): everything in the universal set that is not in .
Set difference, (also written ): elements of that are not in .
Note that and are generally different sets — set difference is not symmetric, unlike union and intersection.
Reading a Venn diagram. With as the rectangle and , as overlapping circles inside it: is everything inside either circle; is only the overlapping lens; is everything outside circle (including outside both circles); is the part of circle outside circle — the crescent, not the lens.
Worked example — a Venn diagram problem. Let , , and . Find , , , and .
- — the even multiples of .
- — every element of together with every element of , counting the overlap only once.
- — the odd numbers in .
- — the even numbers that are not multiples of (remove and from ).
A useful check: for finite sets, , where denotes the number of elements. Here , , , so , matching the eight elements listed above. This counting rule returns in Chapter 11 as the inclusion–exclusion principle.
De Morgan's laws relate complement to union and intersection, and are worth memorising because they are used constantly when negating compound conditions:
In words: "not (in or )" means "not in , and not in "; "not (in and )" means "not in , or not in ."
5. Interval Notation on
A great many sets you will meet are not lists of discrete numbers but entire stretches of the real line, described by an inequality. Interval notation is the shorthand for these.
- — a closed interval: both endpoints included (square bracket = included, solid dot on a number line).
- — an open interval: both endpoints excluded (round bracket = excluded, open circle).
- and — half-open (or half-closed) intervals, with one endpoint included and the other excluded.
- and — unbounded intervals. The symbol is never an endpoint that can be "included," so it always takes a round bracket.
- itself.
The common slip with brackets. and describe different sets even when and are the same two numbers — is missing exactly two points, and , that contains. In a question asking for the domain of , the correct answer is , not , because gives , a perfectly valid real output.
Intervals combine with the same union, intersection and complement operations as any other sets.
Worked example — combining intervals. Let and , both subsets of . Find , , and .
Sketching both on a number line: runs from (included) to (excluded); runs from (excluded) to (included). They overlap between and :
both endpoints excluded, since ( is excluded from ) and ( is excluded from ). The union runs continuously from the leftmost included point to the rightmost included point, since the two intervals overlap (no gap):
with both endpoints now included, since and . Finally keeps only the part of that lies before begins — everything in from onwards (exclusive) is removed, because :
Here the right endpoint is now included, because (since ) and (since excludes ) — removing from does not remove the single point , which never contained.
This last result is the one students most often get wrong, which is why it is worth a second look: set difference does not simply "cut the interval at the same place as the other endpoint and copy its bracket type." Each endpoint of the answer must be checked individually against the definitions of and .
6. Interval Notation versus Inequality Notation
Every interval can equally be written as a compound inequality, and IB exams move freely between the two, so fluency with both is required:
A set defined by a union of disjoint conditions, such as or , is written as a union of intervals since no single interval can express it:
This situation arises constantly when solving inequalities (quadratic inequalities, rational inequalities — Block B) whose solution set is not a single connected stretch of the line.
7. Common Exam Pitfalls
- Treating as including or excluding inconsistently. Different textbooks disagree; state the convention you are using (or follow the one given in the question) and apply it consistently within a single solution.
- Confusing with . is correct; is correct; but is meaningless — a single number cannot be a subset of anything, only an element.
- Swapping bracket types when writing an interval from an inequality. becomes , not — the included endpoint of the inequality must carry a square bracket.
- Getting the endpoint of a set difference wrong. As in the worked example above, requires checking each boundary point individually against both sets' own inclusion rules, not just copying brackets.
- Assuming every real number is "rational or irrational" is itself in doubt. It is a definitional fact, not something to verify case by case — but students sometimes try to classify a number like by decimal inspection alone, which cannot establish irrationality (a calculator only ever shows finitely many digits, which can never distinguish "eventually recurring" from "never recurring").
- Forgetting that always takes a round bracket. Writing is not standard notation; infinity is not a number that an interval can "contain."
Summary
- The number sets nest: , each layer repairing an operation the smaller set could not perform (subtraction, then division, then roots/limits).
- A number is rational exactly when its decimal expansion terminates or recurs; otherwise it is irrational. is irrational, proved by contradiction from the assumption that it equals in lowest terms.
- means is an element of ; means every element of is in ; adds that . The empty set is a subset of every set.
- Set operations: (in either), (in both), (not in , within ), (in but not ). De Morgan: and .
- For finite sets, .
- Interval notation: square brackets include an endpoint, round brackets exclude it; always takes a round bracket. , , , , , cover every bounded or one-sided unbounded case.
- Combining intervals under , , requires checking each resulting endpoint's inclusion individually against the original sets — it cannot be read off by a shortcut.