Skip to main content
\( \definecolor{colordef}{RGB}{249,49,84} \definecolor{colorprop}{RGB}{18,102,241} \)
International Baccalaureate · MYP 4

Sets, Number Sets and Intervals

⌚ ~146 min ▢ 16 blocks ✓ 72 exercises ➣ Prerequisites : Sets and Venn Diagrams, Rational Numbers
I Using Venn Diagrams with Three Sets
Method — Filling a Venn Diagram from Counts
  1. Start with the intersection \(A \cap B\), the region shared by the two sets.
  2. Subtract to obtain the regions “\(A\) only” and “\(B\) only”: \(\Card{A \cap B'} = \Card{A} - \Card{A \cap B}\), and likewise for \(B\).
  3. The region outside both circles holds what is left: \(\Card{U}\) minus the three numbers inside the circles.
  4. If the number of a region is unknown, call it \(x\) and write the number of every other region in terms of \(x\). Once every region is known in terms of \(x\), a total given by the statement, usually \(\Card{U}\), gives an equation in \(x\): the four regions add up to it. This requires every other region to be known, the outside one included; if the statement gives only \(\Card{U}\), \(\Card{A}\) and \(\Card{B}\), with the outside unknown, the regions add up to \(\Card{U}\) whatever \(x\) is, and one more piece of information is needed.
  5. Check that every region holds a whole number of elements, zero or more (or, when the regions hold percentages, a percentage between \(0\) and \(100\)), and that the four regions add up to \(\Card{U}\) (to \(100\pourcent\) when the regions hold percentages).
A survey often asks several questions at once: which of three sports each pupil plays, which of three languages each one studies. The answers describe three sets \(A\), \(B\) and \(C\) of the same universal set. Their Venn diagram has three circles that overlap in pairs, and the counting method of two sets still works, one region after the other.
Report an error
Definition — Three-Set Venn Diagram
Three sets \(A\), \(B\) and \(C\), drawn as three circles that overlap in pairs and share a common central part inside \(U\), divide the diagram into eight regions, numbered here from \(1\) to \(8\). Every element of \(U\) lies in exactly one region.
Figure
Region Set Its elements are
\(1\) \(A \cap B' \cap C'\) in \(A\) only
\(2\) \(A' \cap B \cap C'\) in \(B\) only
\(3\) \(A' \cap B' \cap C\) in \(C\) only
\(4\) \(A \cap B \cap C'\) in \(A\) and \(B\), not in \(C\)
\(5\) \(A \cap B' \cap C\) in \(A\) and \(C\), not in \(B\)
\(6\) \(A' \cap B \cap C\) in \(B\) and \(C\), not in \(A\)
\(7\) \(A \cap B \cap C\) in all three sets
\(8\) \(A' \cap B' \cap C'\) in none of the sets
The regions \(1\), \(2\), \(3\) hold the elements of exactly one set; the regions \(4\), \(5\), \(6\) those of exactly two sets. An intersection of two sets is made of two regions: \(A \cap B\) is made of the regions \(4\) and \(7\).
Example
Let \(U = \{1, 2, 3, \dots, 12\}\), let \(A\) be the set of the even numbers of \(U\), \(B\) the set of the multiples of \(3\) in \(U\), and \(C\) the set of the factors of \(12\). List \(A\), \(B\) and \(C\), then place the twelve elements of \(U\) on a Venn diagram.

\(A = \{2, 4, 6, 8, 10, 12\}\), \(B = \{3, 6, 9, 12\}\) and \(C = \{1, 2, 3, 4, 6, 12\}\). Each element is placed by asking three questions: is it in \(A\)? in \(B\)? in \(C\)?
  • \(6\) and \(12\) belong to the three sets: centre region.
  • Region “\(A\) and \(B\), not \(C\)” stays empty: the even multiples of \(3\) in \(U\), \(6\) and \(12\), are both factors of \(12\). An empty region is still drawn.
  • \(2\) and \(4\) are in \(A\) and \(C\) only; \(3\) is in \(B\) and \(C\) only.
  • \(8\) and \(10\) are in \(A\) only, \(9\) in \(B\) only, \(1\) in \(C\) only; \(5\), \(7\) and \(11\) are in none of the sets.
Figure
Check: \(2 + 1 + 1 + 0 + 2 + 1 + 2 + 3 = 12\) elements.

Definition — Cardinality
\(\Card{A}\) denotes the number of elements in the set \(A\).
Method — Filling a Three-Set Venn Diagram
  1. Start from the centre, the region \(A \cap B \cap C\). If its number is unknown, call it \(x\).
  2. Then the three regions “exactly two”: from each intersection of two sets, subtract the centre; for instance \(\Card{A \cap B \cap C'} = \Card{A \cap B} - \Card{A \cap B \cap C}\).
  3. Then the three regions “one set only”: from each set, subtract the three regions already filled inside its circle.
  4. Finally the outside: \(\Card{U}\) minus the seven numbers inside the circles. When \(x\) is unknown and the outside is given by the statement, this last step gives the equation: the eight regions add up to \(\Card{U}\).
  5. Check that every region holds a whole number of elements, zero or more (or a percentage between \(0\) and \(100\) when the regions hold percentages).
When the statement gives a region directly, such as “\(A\) and \(B\) only”, it is written in its region at once.
Example
In a group of \(50\) pupils, \(24\) study French, \(20\) study Spanish and \(18\) study German. \(8\) study French and Spanish, \(7\) study French and German, \(6\) study Spanish and German (each of these three counts includes the pupils who study all three languages), and \(3\) study all three languages. How many pupils study none of these languages? Exactly one of them? Exactly two of them?

Let \(F\), \(S\) and \(G\) be the sets of the pupils who study French, Spanish and German. The centre holds \(\Card{F \cap S \cap G} = 3\). The regions “exactly two”: $$\Card{F \cap S \cap G'} = 8 - 3 = 5, \quad \Card{F \cap S' \cap G} = 7 - 3 = 4, \quad \Card{F' \cap S \cap G} = 6 - 3 = 3.$$ The regions “one language only”: $$\begin{aligned}[t] \Card{F \cap S' \cap G'} &= 24 - 3 - 5 - 4 = 12 && \text{(subtract the regions of } F \text{ already filled)} \\ \Card{F' \cap S \cap G'} &= 20 - 3 - 5 - 3 = 9 \\ \Card{F' \cap S' \cap G} &= 18 - 3 - 4 - 3 = 8 \end{aligned}$$ Inside the circles: \(12 + 9 + 8 + 5 + 4 + 3 + 3 = 44\) pupils, so \(50 - 44 = 6\) pupils are outside.
Figure
So \(6\) pupils study none of these languages, \(12 + 9 + 8 = 29\) study exactly one, and \(5 + 4 + 3 = 12\) study exactly two. Check: \(6 + 29 + 12 + 3 = 50\).

Example
The members of a sports centre were asked which facilities they had used during the last month. \(45\pourcent\) had used the pool, \(40\pourcent\) the gym and \(30\pourcent\) the courts; \(15\pourcent\) had used the pool and the gym, \(10\pourcent\) the pool and the courts, \(12\pourcent\) the gym and the courts (each of these three percentages includes the members who used all three facilities), and \(20\pourcent\) had used none of them. What percentage of the members had used all three facilities?

Let \(P\), \(G\) and \(C\) be the sets of the members who used the pool, the gym and the courts, and write the percentage of the members in each region. All the members together make \(100\pourcent\). Let \(x\) be the percentage in the centre \(P \cap G \cap C\). The regions “exactly two” hold \(15 - x\), \(10 - x\) and \(12 - x\); then, for the pool only, $$\begin{aligned}[t] 45 - x - (15 - x) - (10 - x) &= 45 - x - 15 + x - 10 + x && \text{(remove the brackets)} \\ &= 20 + x, \end{aligned}$$ and likewise \(40 - x - (15 - x) - (12 - x) = 13 + x\) for the gym only and \(30 - x - (10 - x) - (12 - x) = 8 + x\) for the courts only.
Figure
The eight regions make up all the members: $$\begin{aligned}[t] (20 + x) + (13 + x) + (8 + x) + (15 - x) + (10 - x) + (12 - x) + x + 20 &= 100 && \text{(the regions make up } U\text{)} \\ 98 + x &= 100 && \text{(collect the terms)} \\ x &= 2 && \text{(subtract } 98\text{)} \end{aligned}$$ Check: the regions hold \(22\), \(15\), \(10\), \(13\), \(8\), \(10\), \(2\) and \(20\), which add up to \(100\). So \(2\pourcent\) of the members used all three facilities.

Skills to practice
  • Naming a Region of a Three-Set Diagram
  • Counting in a Three-Set Venn Diagram
II Describing Sets with Set-Builder Notation
Definition — Subset
A set \(A\) is a subset of a set \(B\) if every element in \(A\) is also in \(B\). This is written \(A \subseteq B\). Some books write \(A \subset B\), as in the nesting of the number sets.
  • If at least one element of \(A\) is not in \(B\), then \(A\) is not a subset of \(B\), and this is written \(A \not\subseteq B\).
  • Every set is a subset of itself: \(A \subseteq A\).
  • The empty set is a subset of every set: it has no element outside \(A\), so \(\emptyset \subseteq A\).
Definition — Set-Builder Notation
The set-builder notation is a way to describe a set by giving a rule that its elements must follow. It is written like this:$$\{x \in E \mid \text{condition on } x\}$$ In this notation, \(x\) represents an element from a set \(E\), and the symbol \(\mid\) (or sometimes \(:\)) separates \(x\) from the condition it must meet.
It reads: “the set of all \(x\) in \(E\) such that \(x\) satisfies the condition.”
Example
Let \(E=\{1, 2, 3, 4, 5, 6\}\) be the set of results from rolling a standard six-sided die Figure.
What are the elements of the set \(\{x \in E \mid x \text{ is even}\}\)?

The set \(\{x \in E \mid x \text{ is even}\}\) contains all the even numbers in \(E\). Given \(E = \{1, 2, 3, 4, 5, 6\}\), the even numbers are \(2\), \(4\), and \(6\), so:$$\{x \in E \mid x \text{ is even}\} = \{2, 4, 6\}$$

Skills to practice
  • Checking Membership
  • Listing the Elements and Finding the Rule
  • Checking Subsets in Set-Builder Notation
III Recognising Finite and Infinite Sets
Definition — Finite and Infinite Sets
  • A finite set has a finite number of elements. That is, its elements can all be counted, and the counting comes to an end.
  • An infinite set has an unlimited number of elements; it is not finite.
Example
  • \(\{1, 2, 3\}\) is finite because it has exactly 3 elements.
  • \(\N = \{0, 1, 2, 3, \dots\}\) is infinite because there is no end to counting.
Skills to practice
  • Classifying Sets as Finite or Infinite Sets
  • Counting in Set-Builder Notation
IV Using the Sets of Positive Numbers
Definition — Number Sets
  • The natural numbers, denoted \(\N\), are the counting numbers, starting from zero:$$\N = \{0, 1, 2, 3, 4, 5, 6, \dots\}$$
  • The integers, denoted \(\Z\), are the natural numbers and their opposites (negative, zero, positive):$$\Z = \{\dots, -3, -2, -1, 0, 1, 2, 3, \dots\}$$
  • The terminating decimals (written \(\mathbb{D}\) in some countries) are numbers that can be written as a fraction where the denominator is a power of 10:$$\mathbb{D} = \left\{ \frac{a}{10^n} \mid a \in \Z,\, n \in \N \right\}$$
  • The rational numbers, denoted \(\Q\), are all numbers that can be written as a fraction \(\frac{p}{q}\), where \(p\) and \(q\) are integers and \(q \neq 0\):$$\Q = \left\{ \frac{p}{q} \mid p, q \in \Z,\, q \neq 0 \right\}$$
  • The real numbers, denoted \(\R\), include all points on the number line. A real number that is not rational is called irrational, such as \(\sqrt{2}\) and \(\pi\): the real numbers are the rational numbers and the irrational numbers.
Definition — Positive Numbers
A plus sign written as a superscript keeps only the positive elements of a set of numbers, those greater than \(0\):
  • \(\Z^+\) \(= \{1, 2, 3, \dots\}\), the set of the positive integers;
  • \(\Q^+\) \(= \{x \in \Q \mid x > 0\}\), the set of the positive rational numbers;
  • \(\R^+\) \(= \{x \in \R \mid x > 0\}\), the set of the positive real numbers.
Zero is neither positive nor negative, so \(0 \notin \Z^+\), \(0 \notin \Q^+\) and \(0 \notin \R^+\). The positive integers are the natural numbers other than \(0\).
Example
  • \(7 \in \Z^+\) and \(-7 \notin \Z^+\).
  • \(\frac{2}{3} \in \Q^+\), but \(-\frac{2}{3} \notin \Q^+\), and \(\sqrt{2} \notin \Q^+\) since \(\sqrt{2}\) is not rational.
  • \(\sqrt{2} \in \R^+\) and \(\pi \in \R^+\), but \(0 \notin \R^+\).
Skills to practice
  • Checking Membership in the Sets of Positive Numbers
V Writing Intervals
Definition — Interval
An interval is the set of all real numbers between two endpoints, which may or may not be included in the set, or the set of all real numbers beyond one endpoint (going on without end to \(+\infty\) or to \(-\infty\)), or the set \(\R\) of all real numbers.
Example
The set of all real numbers between \(0\) and \(1\), including \(1\) but not \(0\), is an interval. It is written as \(\{x \in \R \mid 0 < x \leq 1\}\).
Method — Representing Intervals on a Number Line
Intervals are often shown on a number line using these conventions:
  1. An open point (empty circle) or a round bracket means that the endpoint is not included.
  2. A closed point (filled circle) or a square bracket means that the endpoint is included.
  3. An arrow shows that the interval extends indefinitely (to \(+\infty\) or \(-\infty\)).
Example
The number line representation of \(\{x \in \R \mid 0 < x \leq 1\}\) is:
Figure
Definition — Interval Notation
Let \(a\) and \(b\) be two real numbers with \(a < b\).
Interval Notation Set-builder notation Number line representation
\(\CloseBracketLeft a, b \CloseBracketRight\) \(\{x \in \R \mid a \leq x \leq b\}\) Figure
\(\CloseBracketLeft a, b \OpenBracketRight\) \(\{x \in \R \mid a \leq x < b\}\) Figure
\(\OpenBracketLeft a, b \CloseBracketRight\) \(\{x \in \R \mid a < x \leq b\}\) Figure
\(\OpenBracketLeft a, b \OpenBracketRight\) \(\{x \in \R \mid a < x < b\}\) Figure
\(\CloseBracketLeft a, +\infty\OpenBracketRight \) \(\{x \in \R \mid a \leq x\}\) Figure
\(\OpenBracketLeft a, +\infty \OpenBracketRight \) \(\{x \in \R \mid a < x\}\) Figure
\(\OpenBracketLeft -\infty, a\CloseBracketRight\) \(\{x \in \R \mid x \leq a\}\) Figure
\(\OpenBracketLeft -\infty, a\OpenBracketRight\) \(\{x \in \R \mid x < a\}\) Figure
Two Notations for an Excluded Endpoint
An endpoint that is not included is written in one of two ways: with a round bracket, as in \((a, b)\), or with a square bracket turned outwards, as in \(\left]a, b\right[\). Both notations are in use, and they describe the same interval: $$(a, b) = \left]a, b\right[, \qquad [a, b) = \left[a, b\right[, \qquad (a, +\infty) = \left]a, +\infty\right[.$$
Report an error
Infinity Is Not a Number
The symbols \(-\infty\) and \(+\infty\) are not real numbers: they only indicate that the interval goes on without end. That is why the side of \(\infty\) is always excluded, with a round bracket: one writes \([2, +\infty)\), never \([2, +\infty]\).
Report an error
Skills to practice
  • Checking Membership in an Interval
  • Converting Sets and Number Lines to Interval Notation
VI Combining Intervals
Method — Union and Intersection of Two Intervals
To combine two intervals, draw them on the same number line, one above the other.
  • The intersection \(I \cap J\) is the zone covered by both colourings — where the two intervals overlap. It can be empty.
  • The union \(I \cup J\) is the zone covered by at least one colouring. If a gap remains between the two zones — they do not overlap and do not share an endpoint that one of them includes, as in \([0, 1) \cup (1, 2]\) — the union is not an interval and stays written with the symbol \(\cup\).
At each end, check carefully whether the endpoint is included or excluded.
Example
Let \(I = [-1, 4]\) and \(J = (2, +\infty)\). Find \(I \cap J\) and \(I \cup J\).
Figure

On the number line, the two intervals overlap between \(2\) and \(4\).
  • \(I \cap J = (2, 4]\): the endpoint \(2\) is excluded (\(2 \notin J\)), the endpoint \(4\) is included (\(4 \in I\) and \(4 \in J\)).
  • \(I \cup J = [-1, +\infty)\): the two zones together cover everything from \(-1\) onwards, without a gap.

Skills to practice
  • Combining Intervals with Union and Intersection
VII Calculating Absolute Values and Distances
Definition — Absolute Value of a Real Number
The absolute value of a real number \(x\), denoted \(|x|\), is the distance of \(x\) from 0 on the number line.$$|x| = \begin{cases} x & \text{if } x \geq 0 \\ -x & \text{if } x < 0 \end{cases}$$
Example
\(|5| = 5\), \(|-5| = 5\), \(|0| = 0\), \(|\pi - 4| = 4 - \pi\) (since \(\pi \approx 3.14 < 4\)).
Definition — Distance between Two Real Numbers
The distance between two real numbers \(a\) and \(b\) on the number line is given by \(|b-a|\) (which is equal to \(|a-b|\)).
Example
The distance between \(-2\) and \(3\) is \(|3 - (-2)| = |5| = 5\).
Skills to practice
  • Calculating with Absolute Value
  • Calculating the Distance between Real Numbers
VIII Using the Distance to a Centre
Proposition — Distance to a Centre
Let \(a\) and \(r\) be two real numbers with \(r > 0\). The number \(|x - a|\) is the distance from \(x\) to the centre \(a\), so:
  • \(|x - a| = r\) is equivalent to \(x = a - r\) or \(x = a + r\);
  • \(|x - a| \leq r\) is equivalent to \(x \in [a - r, a + r]\);
  • \(|x - a| < r\) is equivalent to \(x \in (a - r, a + r)\).
The interval \([a - r, a + r]\) is the set of the points whose distance from the centre \(a\) is at most the radius \(r\).
Example
The number \(|x + 1| = |x - (-1)|\) is the distance from \(x\) to \(-1\), so the equation \(|x + 1| = 5\) asks for the numbers at a distance \(5\) from \(-1\): $$\begin{aligned}|x + 1| = 5 &\iff x = -1 - 5 \text{ or } x = -1 + 5 &&\text{(centre } -1\text{, distance } 5\text{)}\\ &\iff x = -6 \text{ or } x = 4\end{aligned}$$ The equation has two solutions, \(-6\) and \(4\).
Figure
Example
\(|x-3| \leq 2\) means the distance from \(x\) to 3 is less than or equal to 2. This corresponds to the interval \([3-2, 3+2] = [1, 5]\).
Skills to practice
  • Solving with Distances
IX Going further
Skills to practice
  • Intervals and Absolute Values in Context
  • Investigating Patterns with Absolute Values
  • Quiz