Skip to content
Gioi Toan
Start learning
Two overlapping Venn circles with a smiling overlap

Notes on Lesson 3: Operations on sets (Maths 10 Chan troi sang tao, Chapter I)

Lesson summary

The union of two sets AA and BB is the set consisting of the elements that belong to AA or belong to BB.

The difference of two sets AA and BB is the set consisting of the elements that belong to AA but do not belong to BB.

The union gathers all the elements of both sets together, each element counted only once.

This content is not yet available in English. It is shown below in the original Vietnamese.

  • Thực hiện được phép hợp, giao, hiệu, phần bù
  • Dùng biểu đồ Ven biểu diễn và giải bài toán thực tiễn

In a class, if you add the number of students who like football to the number who like basketball, you might get a number greater than the class size, because the students who like both have been counted twice. To count correctly and describe such groups of objects precisely, you need operations on sets: union, intersection, difference and complement. This lesson will give you the tools to carry out those operations, to use Venn diagrams to illustrate them, and to apply them to real-life problems.

Practise nowTextbook solutions for this lesson

Key ideas: what do you need to know?

Union and intersection of two sets

  • The union of two sets AA and BB is the set consisting of the elements that belong to AA or belong to BB. Notation A∪BA \cup B.

A∪B={x∣x∈A or x∈B}.A \cup B = \{x \mid x \in A \text{ or } x \in B\}.

  • The intersection of two sets AA and BB is the set consisting of the elements that belong to both AA and BB. Notation A∩BA \cap B.

A∩B={x∣x∈A and x∈B}.A \cap B = \{x \mid x \in A \text{ and } x \in B\}.

  • If AA and BB are two finite sets then

n(A∪B)=n(A)+n(B)−n(A∩B).n(A \cup B) = n(A) + n(B) - n(A \cap B).
In particular, if A∩B=∅A \cap B = \emptyset then n(A∪B)=n(A)+n(B)n(A \cup B) = n(A) + n(B).

  • Example: With A={1;2;3}A = \{1; 2; 3\} and B={2;3;4}B = \{2; 3; 4\}, we have A∪B={1;2;3;4}A \cup B = \{1; 2; 3; 4\} and A∩B={2;3}A \cap B = \{2; 3\}.

In plain words: The union gathers all the elements of both sets together, each element counted only once. The intersection takes the elements that are present in both sets. The formula for counting the elements of a union: since the common part is counted twice when adding n(A)n(A) and n(B)n(B), you must subtract the number of elements of the intersection. When the two sets have no elements in common, the formula becomes a simple addition.

Phrase by phrase
Union of two sets
The set consisting of the elements that belong to at least one of the two sets.Example: {1;2}∪{2;3}={1;2;3}\{1; 2\} \cup \{2; 3\} = \{1; 2; 3\}.
Intersection of two sets
The set consisting of the elements that belong to both sets.Example: {1;2}∩{2;3}={2}\{1; 2\} \cap \{2; 3\} = \{2\}.
n(A∪B)=n(A)+n(B)−n(A∩B)n(A \cup B) = n(A) + n(B) - n(A \cap B)
The formula for the number of elements of the union of two finite sets, subtracting the number of common elements.Example: If n(A)=5n(A)=5, n(B)=7n(B)=7, n(A∩B)=2n(A \cap B)=2 then n(A∪B)=5+7−2=10n(A \cup B)=5+7-2=10.

Common mistakesWhen finding the union, counting shared elements twice, or when finding the intersection, counting elements that belong to only one set. The intersection keeps only the elements that belong to both sets, while the union gathers all elements and counts each element only once.

Common mistakesCounting the number of elements of the union by simply adding the two numbers and answering, forgetting to subtract the shared part: 24+19=4324 + 19 = 43 while the class has only 42 students. You must subtract the number of elements of the intersection.

TipCounting the number of elements of the union of two sets: take the sum of the two numbers and subtract the number of elements of the intersection, because the shared part is counted twice.

Difference and complement of two sets

  • The difference of two sets AA and BB is the set consisting of the elements that belong to AA but do not belong to BB. Notation A∖BA \setminus B.

A∖B={x∣x∈A and x∉B}.A \setminus B = \{x \mid x \in A \text{ and } x \notin B\}.

  • If A⊂EA \subset E then E∖AE \setminus A is called the complement of AA in EE, notation CEAC_E A.

CEA=E∖A={x∣x∈E and x∉A}.C_E A = E \setminus A = \{x \mid x \in E \text{ and } x \notin A\}.

  • In particular CEE=∅C_E E = \emptyset.
  • Example: CZN=Z∖N={…;−3;−2;−1}C_{\mathbb{Z}} \mathbb{N} = \mathbb{Z} \setminus \mathbb{N} = \{\ldots; -3; -2; -1\}. With E={1;2;3;4}E = \{1; 2; 3; 4\} and A={2;4}A = \{2; 4\} then CEA={1;3}C_E A = \{1; 3\}.

In plain words: The difference A∖BA \setminus B means taking the set AA and removing the elements that are in BB. The complement is used only when AA is a subset of EE, in which case the complement is what remains of EE after removing AA. The difference is not symmetric: A∖BA \setminus B is different from B∖AB \setminus A.

Phrase by phrase
Difference of two sets
The set of elements that belong to the first set but not to the second set.Example: {1;2;3}∖{2}={1;3}\{1; 2; 3\} \setminus \{2\} = \{1; 3\}.
complement of AA in EE
The set E∖AE \setminus A, with the condition A⊂EA \subset E.Example: C{1;2;3}{2}={1;3}C_{\{1;2;3\}} \{2\} = \{1; 3\}.
CEE=∅C_E E = \emptyset
The complement of the whole set EE in itself is the empty set.Example: C{1;2}{1;2}=∅C_{\{1;2\}} \{1;2\} = \emptyset.

Common mistakesSuppose that A∖BA \setminus B and B∖AB \setminus A are the same. The difference is not symmetric: {1;2;3}∖{2}={1;3}\{1; 2; 3\} \setminus \{2\} = \{1; 3\} but {2}∖{1;2;3}=∅\{2\} \setminus \{1; 2; 3\} = \emptyset.

Venn diagram

  • A Venn diagram is a drawing that uses closed curves to represent sets. Each set is represented by a region bounded by a closed curve.
  • On a Venn diagram, two sets AA and BB are drawn as two circles (or two curves) that can intersect. Then:

+ The common part of the two circles represents A∩BA \cap B.
+ The whole of the two circles (including the common part) represents A∪BA \cup B.
+ The part that belongs to AA but lies outside BB represents A∖BA \setminus B.

  • If A⊂EA \subset E, the part inside EE but outside AA represents CEAC_E A.
  • Example: Draw two intersecting circles for AA and BB. The overlapping region is A∩BA \cap B, both circles together are A∪BA \cup B, the part that belongs only to AA is A∖BA \setminus B.

In plain words: A Venn diagram helps you picture set operations visually. Imagine each set as a circle. The intersection is where the two circles overlap, the union is both circles, the difference is the part of one circle outside the other. When solving counting problems, drawing a Venn diagram will help you avoid mistakes.

Phrase by phrase
Venn diagram
A drawing that uses closed curves to represent sets and the relationships between sets.Example: Two intersecting circles represent two sets AA and BB.
the common part of the two circles
The region that belongs to both sets, representing the intersection.Example: The overlapping region of the two circles is A∩BA \cap B.
the whole of the two circles
The region that belongs to at least one of the two sets, representing the union.Example: Both circles together are A∪BA \cup B.

TipThe three operations match three words: intersection is "and", union is "or", difference is "and not". Reading the formula aloud helps you remember it right away.

Representing subsets of the real numbers on the number line

  • Common subsets of R\mathbb{R} include: open intervals (a;b)(a; b), closed intervals [a;b][a; b], half-open intervals [a;b)[a; b), (a;b](a; b], (−∞;b](-\infty; b], (−∞;b)(-\infty; b), [a;+∞)[a; +\infty), (a;+∞)(a; +\infty).
  • On the number line, to represent a set, we shade the part that belongs to the set (or cross out the part that does not belong to the set); the part kept is exactly the set to be represented. An endpoint that does not belong to the set is drawn with parentheses, an endpoint that belongs to the set is drawn with square brackets.
  • When finding the intersection of two sets, we represent each set on the number line and cross out the part that does not belong to that set; the part not crossed out in both times is the intersection. When finding the union, we take the part that belongs to at least one of the two sets. When finding the difference A∖BA \setminus B, we take the part that belongs to AA but does not belong to BB.
  • Example: [1;4]∩(2;6)=(2;4][1; 4] \cap (2; 6) = (2; 4]; [1;4]∪(2;6)=[1;6)[1; 4] \cup (2; 6) = [1; 6); [1;4]∖(2;6)=[1;2][1; 4] \setminus (2; 6) = [1; 2].

In plain words: The number line is like a ruler. Each set is a segment on the ruler. To find the intersection, union, difference, draw those segments on top of each other and identify the shared part, the combined part, the separate part. Pay attention to the endpoints: if the set does not include the endpoint, use parentheses; if it does, use square brackets.

Phrase by phrase
open interval (a; b)
The set of real numbers greater than aa and less than bb, not including aa, bb.Example: (1;3)(1; 3) consists of the numbers xx with 1<x<31 < x < 3.
closed interval [a; b]
The set of real numbers greater than or equal to aa and less than or equal to bb, including both aa, bb.Example: [1;3][1; 3] consists of the numbers xx with 1≤x≤31 \le x \le 3.
half-open interval [a; b)
The set of real numbers greater than or equal to aa and less than bb, including aa, not including bb.Example: [1;3)[1; 3) consists of the numbers xx with 1≤x<31 \le x < 3.
endpoint that does not belong to the set
The endpoint of the interval that does not belong to the set, drawn with parentheses.Example: In (2;6)(2; 6), the endpoints 2 and 6 do not belong to the set.

Worked examples

Example 1

Given two sets A={1;3;5;7}A = \{1; 3; 5; 7\} and B={3;5;9}B = \{3; 5; 9\}. Find A∪BA \cup B, A∩BA \cap B, A∖BA \setminus B, B∖AB \setminus A.

Show the solution to example 1

Step 1: Find A∪BA \cup B. Gather every element of AA and of BB, counting a shared element only once: 1;3;5;71; 3; 5; 7 together with 99. So A∪B={1;3;5;7;9}A \cup B = \{1; 3; 5; 7; 9\}.
Why: The union consists of the elements that belong to AA or belong to BB, so 3 and 5, although they appear in both sets, are written only once.
Step 2: Find A∩BA \cap B. The elements that appear in both AA and BB are 3 and 5. So A∩B={3;5}A \cap B = \{3; 5\}.
Step 3: Find A∖BA \setminus B. Take AA and remove the elements that belong to BB, that is remove 3 and 5, leaving 1;71; 7. So A∖B={1;7}A \setminus B = \{1; 7\}.
Step 4: Find B∖AB \setminus A. Take BB and remove 3 and 5, leaving 9. So B∖A={9}B \setminus A = \{9\}.
Why: The difference is not symmetric, A∖BA \setminus B and B∖AB \setminus A are two different sets.
Result: A∪B={1;3;5;7;9}A \cup B = \{1; 3; 5; 7; 9\}; A∩B={3;5}A \cap B = \{3; 5\}; A∖B={1;7}A \setminus B = \{1; 7\}; B∖A={9}B \setminus A = \{9\}.

Example 2

Given the set E={1;2;3;4;5;6;7;8}E = \{1; 2; 3; 4; 5; 6; 7; 8\} and A={2;4;6;8}A = \{2; 4; 6; 8\}. Show that A⊂EA \subset E, then find the complement CEAC_E A.

Show the solution to example 2

Step 1: Check A⊂EA \subset E: the four elements 2, 4, 6, 8 all appear in EE, so AA is a subset of EE.
Step 2: Since A⊂EA \subset E, we can write the complement CEA=E∖AC_E A = E \setminus A, consisting of the elements of EE that do not belong to AA.
Step 3: Remove 2, 4, 6, 8 from EE, leaving 1;3;5;71; 3; 5; 7. So CEA={1;3;5;7}C_E A = \{1; 3; 5; 7\}.
Why: The complement can only be defined when AA lies entirely inside EE; if AA has an element outside EE, then the notation CEAC_E A cannot be used.
Step 4: Check again by counting elements: n(A)+n(CEA)=4+4=8=n(E)n(A) + n(C_E A) = 4 + 4 = 8 = n(E), it matches.
Result: A⊂EA \subset E and CEA={1;3;5;7}C_E A = \{1; 3; 5; 7\}.

Common mistakesWrite CEAC_E A when AA is not a subset of EE. The complement can only be defined when A⊂EA \subset E.

Example 3

Given A={x∈N∣x≤5}A = \{x \in \mathbb{N} \mid x \le 5\} and B={x∈N∣3<x<9}B = \{x \in \mathbb{N} \mid 3 < x < 9\}. List the two sets, then find A∩BA \cap B, A∪BA \cup B, A∖BA \setminus B.

Show the solution to example 3

Step 1: List AA: the natural numbers not greater than 5, namely 0;1;2;3;4;50; 1; 2; 3; 4; 5.
Step 2: List BB: the natural numbers greater than 3 and less than 9, namely 4;5;6;7;84; 5; 6; 7; 8.
Why: The condition 3<x3 < x means 3 does not belong to BB; the condition x<9x < 9 means 9 also does not belong to BB.
Step 3: A∩B={4;5}A \cap B = \{4; 5\}, which are the elements that appear in both sets.
Step 4: A∪B={0;1;2;3;4;5;6;7;8}A \cup B = \{0; 1; 2; 3; 4; 5; 6; 7; 8\}, gathering both sets and counting each number only once.
Step 5: A∖B={0;1;2;3}A \setminus B = \{0; 1; 2; 3\}, which is the part of AA outside BB.
Why: 4 and 5 belong to BB, so they are removed from AA when taking the difference.
Result: A∩B={4;5}A \cap B = \{4; 5\}; A∪B={0;1;2;3;4;5;6;7;8}A \cup B = \{0; 1; 2; 3; 4; 5; 6; 7; 8\}; A∖B={0;1;2;3}A \setminus B = \{0; 1; 2; 3\}.

Example 4

Given A=[−2;3]A = [-2; 3] and B=(1;5)B = (1; 5). Find A∩BA \cap B, A∪BA \cup B, A∖BA \setminus B.

Show the solution to example 4

Step 1: Identify the endpoint of each set. The set AA includes both −2-2 and 33; the set BB excludes both 11 and 55.
Step 2: Find A∩BA \cap B. The intersection is the common part of the two sets, that is, the numbers greater than 1 and not greater than 3. The endpoint 1 is excluded because BB does not include 1; the endpoint 3 is included because AA includes 3. So A∩B=(1;3]A \cap B = (1; 3].
Why: A number that belongs to the intersection must belong to both sets, so if just one set excludes an endpoint, the intersection excludes that endpoint.
Step 3: Find A∪BA \cup B. The union covers from −2-2 to 5, includes −2-2 because AA includes it, and excludes 5 because BB excludes it. So A∪B=[−2;5)A \cup B = [-2; 5).
Step 4: Find A∖BA \setminus B. This is the part of AA that lies outside BB, that is, the numbers from −2-2 to 1. The endpoint 1 is included because 1 does not belong to BB. So A∖B=[−2;1]A \setminus B = [-2; 1].
Result: A∩B=(1;3]A \cap B = (1; 3]; A∪B=[−2;5)A \cup B = [-2; 5); A∖B=[−2;1]A \setminus B = [-2; 1].

TipOn the number line: square brackets mean the endpoint is included, parentheses mean it is excluded. For the intersection, if just one side excludes it, it is excluded; for the union, if just one side includes it, it is included.

Example 5

Given A=(−∞;4)A = (-\infty; 4) and B=[2;+∞)B = [2; +\infty). Find A∩BA \cap B, A∪BA \cup B, A∖BA \setminus B.

Show the solution to example 5

Step 1: Identify the endpoints. The set AA consists of the numbers less than 4, excluding 4; the set BB consists of the numbers greater than or equal to 2, including 2.
Step 2: Find A∩BA \cap B. The intersection is the numbers that are both less than 4 and not less than 2, that is, from 2 to 4. The endpoint 2 is included because BB includes 2; the endpoint 4 is excluded because AA excludes 4. So A∩B=[2;4)A \cap B = [2; 4).
Step 3: Find A∪BA \cup B. The set AA covers every number less than 4, the set BB covers every number from 2 upward; the two parts overlap on [2;4)[2; 4), so the union covers the whole number line. So A∪B=RA \cup B = \mathbb{R}.
Why: Every real number is either less than 4 or not less than 2, so no number is left out.
Step 4: Find A∖BA \setminus B. This is the part of AA that lies outside BB, that is, the numbers less than 2. The endpoint 2 is excluded because 2 belongs to BB. So A∖B=(−∞;2)A \setminus B = (-\infty; 2).
Result: A∩B=[2;4)A \cap B = [2; 4); A∪B=RA \cup B = \mathbb{R}; A∖B=(−∞;2)A \setminus B = (-\infty; 2).

Common mistakesMistaking the endpoint on the number line, for example taking [−2;3]∩(1;5)=[1;3][-2; 3] \cap (1; 5) = [1; 3]. The correct answer is (1;3](1; 3], because the interval (1;5)(1; 5) does not contain 1, so the intersection does not contain 1 either.

Example 6

Class 10C has 42 students. 24 students join the Music club, 19 students join the Sports club, and 9 students join both clubs. How many students in class 10C join at least one club, and how many join no club at all?

Show the solution to example 6

Step 1: Let MM be the set of students who join the Music club, and TT the set of students who join the Sports club. Then M∩TM \cap T is the set of students who join both, which has 9 students.
Step 2: The number of students who join at least one club is the number of elements of M∪TM \cup T. Adding 24 and 19 counts the 9 students who join both twice, so we must subtract them: n(M∪T)=24+19−9=34n(M \cup T) = 24 + 19 - 9 = 34.
Why: On a Venn diagram, the overlapping region of the two circles is counted in both circles, so subtracting it once gives the correct count.
Step 3: The number of students who join no club is the complement of M∪TM \cup T in the set of 42 students: 42−34=842 - 34 = 8.
Step 4: Check with a Venn diagram: Music only has 24−9=1524 - 9 = 15 students, Sports only has 19−9=1019 - 9 = 10 students, both has 9 students, adding them gives 15+10+9=3415 + 10 + 9 = 34, which matches; adding the 8 students outside both gives 34+8=4234 + 8 = 42, which matches the class size.
Result: 34 students join at least one club; 8 students join no club.

Terms

Union
The set consisting of the elements that belong to at least one of the two sets.Example: {1;2}∪{2;3}={1;2;3}\{1; 2\} \cup \{2; 3\} = \{1; 2; 3\}.
Intersection
The set consisting of the elements that belong to both sets.Example: {1;2}∩{2;3}={2}\{1; 2\} \cap \{2; 3\} = \{2\}.
Difference
The set consisting of the elements that belong to the first set but not to the second set.Example: {1;2;3}∖{2}={1;3}\{1; 2; 3\} \setminus \{2\} = \{1; 3\}.
Complement
The difference E∖AE \setminus A when A⊂EA \subset E, denoted CEAC_E A.Example: C{1;2;3}{2}={1;3}C_{\{1;2;3\}} \{2\} = \{1; 3\}.
Venn diagram
A drawing that uses closed curves to represent sets and the relationships between sets.Example: Two intersecting circles represent two sets.
Interval
A subset of R\mathbb{R} that does not include the endpoints, denoted (a;b)(a; b).Example: (1;3)(1; 3) is the set of real numbers greater than 1 and less than 3.
Segment
A subset of R\mathbb{R} that includes both endpoints, denoted [a;b][a; b].Example: [1;3][1; 3] is the set of real numbers from 1 to 3, including 1 and 3.
Half-interval
A subset of R\mathbb{R} that includes only one endpoint, denoted [a;b)[a; b) or (a;b](a; b].Example: [1;3)[1; 3) is the set of real numbers greater than or equal to 1 and less than 3.

Practise this lesson with instant marking and saved progress in the study app. Suggested plan: Class lessons plan, Maths 10.

Practice

Answer each question, then press Check. If you get stuck, open the hints under the question one step at a time.

Question 5 of 6Written answer · Applying

This content is not yet available in English. It is shown below in the original Vietnamese.

Trong số 35 học sinh của lớp 10H, có 20 học sinh thích môn Toán, 16 học sinh thích môn Tiếng Anh và 12 học sinh thích cả hai môn này. Hỏi lớp 10H:
a) Có bao nhiêu học sinh thích ít nhất một trong hai môn Toán và Tiếng Anh?
b) Có bao nhiêu học sinh không thích cả hai môn này?

Do this question in your notebook and show every step. When you finish, press the button below to compare with the mark scheme.

Asking the teacher while practising is for children who have a profile. It is free to turn on: Parent sign-in.