PYQ Vault

IMAT Mathematics · Sets and Logic

Sets, Intervals and Venn Diagrams

A set is a collection of distinct objects; union, intersection, complement, difference and the Cartesian product build new sets, and Venn diagrams count them.

Why this matters

The 2025 paper asked what the Cartesian product of two sets is. Set notation, intervals, ℝ and ∅ also fill the answer options of recent algebra questions, so you need to read them fluently.

Concept 1 of 4: Sets, elements, subsets and set notation

A set only records which objects are in it: order and repetition do not matter, so {1,2,2}\{1, 2, 2\} and {2,1}\{2, 1\} are the same set. The key distinction is between being an element (one object inside) and being a subset (a smaller set inside).

Definition

A set is a collection of distinct objects, its elements. It can be given by listing, {1,3,5}\{1, 3, 5\}, or by a rule (set-builder notation), {x∈R:x>2}\{x \in \mathbb{R} : x > 2\}.

  • Two sets are equal when they have exactly the same elements.
  • A⊆BA \subseteq B means every element of AA is also in BB. Every set is a subset of itself, and ∅\varnothing is a subset of every set.
  • A set with nn elements has 2n2^n subsets (each element is either in or out).
SymbolRead asExample
x∈Ax \in Ax is an element of A3∈{1,3,5}3 \in \{1, 3, 5\}
x∉Ax \notin Ax is not an element of A2∉{1,3,5}2 \notin \{1, 3, 5\}
A⊆BA \subseteq BA is a subset of B{1,3}⊆{1,3,5}\{1, 3\} \subseteq \{1, 3, 5\}
A⊂BA \subset BA is a proper subset of B (a subset, not equal to B)N⊂Z\mathbb{N} \subset \mathbb{Z}
∅\varnothing or {}\{\}the empty set, with no elementsthe solutions of x2=−1x^2 = -1 in R\mathbb{R}
n(A)n(A) or ∣A∣|A|the number of elements of An({a,b,c})=3n(\{a, b, c\}) = 3
{x∈Z:x>0}\{x \in \mathbb{Z} : x > 0\}the integers x such that x is positivethe set {1,2,3,…}\{1, 2, 3, \ldots\}
Practice this conceptself-check · 4 quick reps

An element is not a subset

2∈{1,2,3}2 \in \{1, 2, 3\} but {2}⊆{1,2,3}\{2\} \subseteq \{1, 2, 3\}. The symbol ∈\in links an object to a set; ⊆\subseteq links a set to a set. Mixing them makes a statement false.

Concept 2 of 4: Union, intersection, difference, complement and Cartesian product

Union collects, intersection keeps what is shared, difference removes, and complement takes everything else in the universe. The Cartesian product is different in kind: it does not combine elements but pairs them up, building a new set of ordered pairs.

Definition

The table uses A={1,2,3,4}A = \{1, 2, 3, 4\}, B={3,4,5}B = \{3, 4, 5\} and the universal set U={1,2,3,4,5,6}U = \{1, 2, 3, 4, 5, 6\}.

  • AA and BB are disjoint when A∩B=∅A \cap B = \varnothing.
  • De Morgan's laws: A∪B‾=A‾∩B‾\overline{A \cup B} = \overline{A} \cap \overline{B} and A∩B‾=A‾∪B‾\overline{A \cap B} = \overline{A} \cup \overline{B}.
  • In the Cartesian product order matters: (1,5)≠(5,1)(1, 5) \ne (5, 1), so A×B≠B×AA \times B \ne B \times A in general, and n(A×B)=n(A)⋅n(B)n(A \times B) = n(A) \cdot n(B).
  • A×AA \times A is often written A2A^2; R×R\mathbb{R} \times \mathbb{R} is the coordinate plane.
OperationSymbolContainsExample
UnionA∪BA \cup Belements in A or in B (or both){1,2,3,4,5}\{1, 2, 3, 4, 5\}
IntersectionA∩BA \cap Belements in both A and B{3,4}\{3, 4\}
DifferenceA∖BA \setminus Belements in A but not in B{1,2}\{1, 2\}
ComplementA‾\overline{A} or AcA^celements of U that are not in A{5,6}\{5, 6\}
Cartesian productA×BA \times Ball ordered pairs (a,b)(a, b) with a∈Aa \in A and b∈Bb \in Bcontains (1,5)(1, 5) but not (5,1)(5, 1); 12 pairs
Practice this conceptself-check · 3 quick reps

The Cartesian product is a set of pairs, not of products

A×BA \times B does not multiply numbers: it lists ordered pairs (a,b)(a, b). It is not the union or the intersection either. Its size is n(A)⋅n(B)n(A) \cdot n(B), and the order inside each pair matters.

Concept 3 of 4: Intervals of real numbers

An interval is every real number between two endpoints, an unbroken piece of the number line. The bracket says whether the endpoint itself is included: square for in, round for out. Solutions of inequalities are written this way, and the answer options of recent papers use it.

Definition

  • A square bracket includes the endpoint; a round bracket excludes it. Some Italian books write ]a,b[]a, b[ for (a,b)(a, b).
  • ±∞\pm\infty is never a number, so it always takes a round bracket.
  • An answer such as x<1x < 1 or x>3x > 3 is a union of intervals: (−∞,1)∪(3,+∞)(-\infty, 1) \cup (3, +\infty). Two conditions that must both hold give an intersection.
  • R=(−∞,+∞)\mathbb{R} = (-\infty, +\infty) means every real number is a solution; ∅\varnothing means none is.
IntervalInequalityEndpoints
[a,b][a, b]a≤x≤ba \le x \le bboth included (closed)
(a,b)(a, b)a<x<ba < x < bboth excluded (open)
[a,b)[a, b)a≤x<ba \le x < ba included, b excluded
(a,b](a, b]a<x≤ba < x \le ba excluded, b included
[a,+∞)[a, +\infty)x≥ax \ge aa included; infinity never is
(−∞,a)(-\infty, a)x<ax < aa excluded
Practice this conceptself-check · 4 quick reps

Round brackets do not mean a smaller set of whole numbers

(1,4)(1, 4) is every real number strictly between 1 and 4, including 1.5 and 3.99. It is not the set {2,3}\{2, 3\}. Only set braces {}\{\} list individual elements.

Concept 4 of 4: Counting with Venn diagrams: inclusion and exclusion

Adding the sizes of two sets counts the shared elements twice, so subtract the overlap once. With three sets the pairwise overlaps are subtracted, but that removes the centre (in all three) once too often, so it is added back.

Definition

  • Two sets: n(A∪B)=n(A)+n(B)−n(A∩B)n(A \cup B) = n(A) + n(B) - n(A \cap B).
  • Elements in neither set: n(U)−n(A∪B)n(U) - n(A \cup B).
  • In A only: n(A)−n(A∩B)n(A) - n(A \cap B).
  • Three sets: add the three sizes, subtract the three pairwise overlaps, add back the triple overlap.
  • With three sets, fill the Venn diagram from the centre outwards: the triple overlap first, then each pair minus the centre, then each set alone.

Inclusion and exclusion

n(A∪B)=n(A)+n(B)−n(A∩B)n(A∪B∪C)=n(A)+n(B)+n(C)−n(A∩B)−n(A∩C)−n(B∩C)+n(A∩B∩C)\begin{aligned} n(A \cup B) &= n(A) + n(B) - n(A \cap B) \\ n(A \cup B \cup C) &= n(A) + n(B) + n(C) - n(A \cap B) - n(A \cap C) - n(B \cap C) + n(A \cap B \cap C) \end{aligned}

Worked example

Of 100 students, 45 take biology, 40 chemistry and 35 physics. 15 take biology and chemistry, 10 biology and physics, 12 chemistry and physics, and 5 take all three. How many take none of the three? How many take biology only?
Practice this conceptself-check · 3 quick reps

Adding the set sizes counts the overlap twice

n(A)+n(B)n(A) + n(B) is the union only when the sets are disjoint. Otherwise subtract n(A∩B)n(A \cap B) once. With three sets, also remember to add back the centre after subtracting the pairs.

Summary — formulas & gotchas at a glance

A revision cheat-sheet for the formulas and gotchas above. Click any concept name to jump back to its full explanation.

Formulas (1)

  • Counting with Venn diagrams: inclusion and exclusion

    Inclusion and exclusion

    n(A∪B)=n(A)+n(B)−n(A∩B)n(A∪B∪C)=n(A)+n(B)+n(C)−n(A∩B)−n(A∩C)−n(B∩C)+n(A∩B∩C)\begin{aligned} n(A \cup B) &= n(A) + n(B) - n(A \cap B) \\ n(A \cup B \cup C) &= n(A) + n(B) + n(C) - n(A \cap B) - n(A \cap C) - n(B \cap C) + n(A \cap B \cap C) \end{aligned}

Reference tables (3)

Sets, elements, subsets and set notation7 rows
SymbolRead asExample
x∈Ax \in Ax is an element of A3∈{1,3,5}3 \in \{1, 3, 5\}
x∉Ax \notin Ax is not an element of A2∉{1,3,5}2 \notin \{1, 3, 5\}
A⊆BA \subseteq BA is a subset of B{1,3}⊆{1,3,5}\{1, 3\} \subseteq \{1, 3, 5\}
A⊂BA \subset BA is a proper subset of B (a subset, not equal to B)N⊂Z\mathbb{N} \subset \mathbb{Z}
∅\varnothing or {}\{\}the empty set, with no elementsthe solutions of x2=−1x^2 = -1 in R\mathbb{R}
n(A)n(A) or ∣A∣|A|the number of elements of An({a,b,c})=3n(\{a, b, c\}) = 3
{x∈Z:x>0}\{x \in \mathbb{Z} : x > 0\}the integers x such that x is positivethe set {1,2,3,…}\{1, 2, 3, \ldots\}
Union, intersection, difference, complement and Cartesian product5 rows
OperationSymbolContainsExample
UnionA∪BA \cup Belements in A or in B (or both){1,2,3,4,5}\{1, 2, 3, 4, 5\}
IntersectionA∩BA \cap Belements in both A and B{3,4}\{3, 4\}
DifferenceA∖BA \setminus Belements in A but not in B{1,2}\{1, 2\}
ComplementA‾\overline{A} or AcA^celements of U that are not in A{5,6}\{5, 6\}
Cartesian productA×BA \times Ball ordered pairs (a,b)(a, b) with a∈Aa \in A and b∈Bb \in Bcontains (1,5)(1, 5) but not (5,1)(5, 1); 12 pairs
Intervals of real numbers6 rows
IntervalInequalityEndpoints
[a,b][a, b]a≤x≤ba \le x \le bboth included (closed)
(a,b)(a, b)a<x<ba < x < bboth excluded (open)
[a,b)[a, b)a≤x<ba \le x < ba included, b excluded
(a,b](a, b]a<x≤ba < x \le ba excluded, b included
[a,+∞)[a, +\infty)x≥ax \ge aa included; infinity never is
(−∞,a)(-\infty, a)x<ax < aa excluded

Watch out for (4)

Drill the past-year questions on this topic

Open the bank with this topic pre-filtered.