TH

การดำเนินการของเซต (Set Operations) คือกระบวนการสร้างเซตใหม่จากเซตเดิมที่มีอยู่ โดยอาศัยกฎเกณฑ์ทางคณิตศาสตร์ ซึ่งประกอบด้วย 4 การดำเนินการหลัก ได้แก่ ยูเนียน, อินเตอร์เซกชัน, คอมพลีเมนต์ และ ผลต่าง เปรียบเสมือนการบวก ลบ คูณ หาร ของตัวเลขนั่นเอง

EN

Set Operations are mathematical processes used to construct new sets from existing ones. The four primary operations are Union, Intersection, Complement, and Difference. They function similarly to addition, subtraction, multiplication, and division in arithmetic.

1

ยูเนียน Union ($A \cup B$)

TH

ยูเนียน (Union) ของเซต $A$ และ $B$ คือเซตที่ประกอบด้วยสมาชิกที่อยู่ในเซต $A$ หรือ อยู่ในเซต $B$ หรือ อยู่ในทั้งสองเซต (พูดง่ายๆ คือ "เอาสมาชิกทั้งหมดมารวมกัน" ตัวไหนซ้ำให้เขียนแค่ครั้งเดียว)

$$A \cup B = \{x \mid x \in A \text{ หรือ } x \in B\}$$
EN

The Union of set $A$ and set $B$ is the set containing all elements that are in $A$, or in $B$, or in both. (Simply put, "combine all elements", writing duplicates only once).

$$A \cup B = \{x \mid x \in A \text{ or } x \in B\}$$
Example 1.1

กำหนดให้ $A = \{1, 2, 3\}$ และ $B = \{3, 4, 5\}$ จงหา $A \cup B$

$$ \begin{aligned} A \cup B &= \{1, 2, 3\} \cup \{3, 4, 5\} \\ &= \{1, 2, 3, 4, 5\} \quad \text{(สมาชิก } 3 \text{ เขียนเพียงตัวเดียว)} \end{aligned} $$

Given $A = \{1, 2, 3\}$ and $B = \{3, 4, 5\}$, find $A \cup B$.

$$ \begin{aligned} A \cup B &= \{1, 2, 3\} \cup \{3, 4, 5\} \\ &= \{1, 2, 3, 4, 5\} \quad \text{(The element } 3 \text{ is written only once)} \end{aligned} $$
Example 1.2

กำหนดให้ $X = \{a, b\}$ และ $Y = \{c, d\}$ จงหา $X \cup Y$

$$ \begin{aligned} X \cup Y &= \{a, b\} \cup \{c, d\} \\ &= \{a, b, c, d\} \end{aligned} $$

Given $X = \{a, b\}$ and $Y = \{c, d\}$, find $X \cup Y$.

$$ \begin{aligned} X \cup Y &= \{a, b\} \cup \{c, d\} \\ &= \{a, b, c, d\} \end{aligned} $$
Example 1.3

กำหนดให้ $C = \{1, 2\}$ และ $D = \{1, 2, 3, 4\}$ จงหา $C \cup D$

$$ \begin{aligned} C \cup D &= \{1, 2\} \cup \{1, 2, 3, 4\} \\ &= \{1, 2, 3, 4\} \\ &= D \quad \text{(ถ้า } C \subset D \text{ แล้ว } C \cup D = D \text{)} \end{aligned} $$

Given $C = \{1, 2\}$ and $D = \{1, 2, 3, 4\}$, find $C \cup D$.

$$ \begin{aligned} C \cup D &= \{1, 2\} \cup \{1, 2, 3, 4\} \\ &= \{1, 2, 3, 4\} \\ &= D \quad \text{(If } C \subset D \text{, then } C \cup D = D \text{)} \end{aligned} $$
Example 1.4

กำหนดให้ $A = \{10, 20\}$ จงหา $A \cup \emptyset$

$$ \begin{aligned} A \cup \emptyset &= \{10, 20\} \cup \{\ \} \\ &= \{10, 20\} \\ &= A \end{aligned} $$

Given $A = \{10, 20\}$, find $A \cup \emptyset$.

$$ \begin{aligned} A \cup \emptyset &= \{10, 20\} \cup \{\ \} \\ &= \{10, 20\} \\ &= A \end{aligned} $$
Example 1.5

กำหนดให้ $A = \{x, y, z\}$ จงหา $A \cup A$

$$ \begin{aligned} A \cup A &= \{x, y, z\} \cup \{x, y, z\} \\ &= \{x, y, z\} \\ &= A \end{aligned} $$

Given $A = \{x, y, z\}$, find $A \cup A$.

$$ \begin{aligned} A \cup A &= \{x, y, z\} \cup \{x, y, z\} \\ &= \{x, y, z\} \\ &= A \end{aligned} $$
Example 1.6

กำหนดให้ $E = \{2, 4, 6, \dots\}$ (เซตของจำนวนคู่บวก) และ $O = \{1, 3, 5, \dots\}$ (เซตของจำนวนคี่บวก) จงหา $E \cup O$

$$ \begin{aligned} E \cup O &= \{2, 4, 6, \dots\} \cup \{1, 3, 5, \dots\} \\ &= \{1, 2, 3, 4, 5, 6, \dots\} \\ &= \mathbb{I}^+ \quad \text{(เซตของจำนวนเต็มบวก)} \end{aligned} $$

Given $E = \{2, 4, 6, \dots\}$ (positive even integers) and $O = \{1, 3, 5, \dots\}$ (positive odd integers), find $E \cup O$.

$$ \begin{aligned} E \cup O &= \{2, 4, 6, \dots\} \cup \{1, 3, 5, \dots\} \\ &= \{1, 2, 3, 4, 5, 6, \dots\} \\ &= \mathbb{Z}^+ \quad \text{(Set of positive integers)} \end{aligned} $$
Example 1.7

ให้ $V = \{\text{a, e, i, o, u}\}$ และ $L = \{\text{a, b, c, d, e}\}$ จงหา $V \cup L$

$$ \begin{aligned} V \cup L &= \{\text{a, e, i, o, u}\} \cup \{\text{a, b, c, d, e}\} \\ &= \{\text{a, b, c, d, e, i, o, u}\} \end{aligned} $$

Given $V = \{\text{a, e, i, o, u}\}$ and $L = \{\text{a, b, c, d, e}\}$, find $V \cup L$.

$$ \begin{aligned} V \cup L &= \{\text{a, e, i, o, u}\} \cup \{\text{a, b, c, d, e}\} \\ &= \{\text{a, b, c, d, e, i, o, u}\} \end{aligned} $$
Example 1.8

ให้ $A = [0, 5]$ และ $B = [3, 8]$ จงหา $A \cup B$

$$ \begin{aligned} A \cup B &= [0, 5] \cup [3, 8] \\ &= [0, 8] \quad \text{(รวมช่วงที่ทับซ้อนกันตั้งแต่ 0 ถึง 8)} \end{aligned} $$

Given intervals $A = [0, 5]$ and $B = [3, 8]$, find $A \cup B$.

$$ \begin{aligned} A \cup B &= [0, 5] \cup [3, 8] \\ &= [0, 8] \quad \text{(Combine overlapping intervals from 0 to 8)} \end{aligned} $$
Example 1.9

ให้ $A = (-2, 0)$ และ $B = (2, 4)$ จงหา $A \cup B$

$$ \begin{aligned} A \cup B &= (-2, 0) \cup (2, 4) \\ &\text{(ไม่สามารถรวมเป็นช่วงเดียวได้ จึงเขียนติดกันแบบนี้เลย)} \end{aligned} $$

Given intervals $A = (-2, 0)$ and $B = (2, 4)$, find $A \cup B$.

$$ \begin{aligned} A \cup B &= (-2, 0) \cup (2, 4) \\ &\text{(Cannot be merged into a single interval, kept as is)} \end{aligned} $$
Example 1.10

ให้ $A=\{1,2\}$, $B=\{2,3\}$ และ $C=\{3,4\}$ จงหา $A \cup B \cup C$

$$ \begin{aligned} A \cup B \cup C &= \{1, 2\} \cup \{2, 3\} \cup \{3, 4\} \\ &= \{1, 2, 3\} \cup \{3, 4\} \\ &= \{1, 2, 3, 4\} \end{aligned} $$

Given $A=\{1,2\}$, $B=\{2,3\}$, and $C=\{3,4\}$, find $A \cup B \cup C$.

$$ \begin{aligned} A \cup B \cup C &= \{1, 2\} \cup \{2, 3\} \cup \{3, 4\} \\ &= \{1, 2, 3\} \cup \{3, 4\} \\ &= \{1, 2, 3, 4\} \end{aligned} $$
2

อินเตอร์เซกชัน Intersection ($A \cap B$)

TH

อินเตอร์เซกชัน (Intersection) ของเซต $A$ และ $B$ คือเซตที่ประกอบด้วยสมาชิกที่อยู่ในเซต $A$ และ อยู่ในเซต $B$ พร้อมๆ กัน (พูดง่ายๆ คือ "เอาเฉพาะสมาชิกที่ซ้ำกัน" ของทั้งสองเซต)

$$A \cap B = \{x \mid x \in A \text{ และ } x \in B\}$$
EN

The Intersection of set $A$ and set $B$ is the set containing elements that are in both $A$ and $B$. (Simply put, "take only the common elements").

$$A \cap B = \{x \mid x \in A \text{ and } x \in B\}$$
Example 2.1

กำหนดให้ $A = \{1, 3, 5, 7\}$ และ $B = \{2, 3, 4, 5\}$ จงหา $A \cap B$

$$ \begin{aligned} A \cap B &= \{1, 3, 5, 7\} \cap \{2, 3, 4, 5\} \\ &= \{3, 5\} \quad \text{(เฉพาะสมาชิกที่ปรากฏในทั้งสองเซต)} \end{aligned} $$

Given $A = \{1, 3, 5, 7\}$ and $B = \{2, 3, 4, 5\}$, find $A \cap B$.

$$ \begin{aligned} A \cap B &= \{1, 3, 5, 7\} \cap \{2, 3, 4, 5\} \\ &= \{3, 5\} \quad \text{(Only elements present in both sets)} \end{aligned} $$
Example 2.2

กำหนดให้ $A = \{2, 4, 6\}$ และ $B = \{1, 3, 5\}$ จงหา $A \cap B$

$$ \begin{aligned} A \cap B &= \{2, 4, 6\} \cap \{1, 3, 5\} \\ &= \emptyset \quad \text{(ไม่มีสมาชิกที่ซ้ำกันเลย จึงได้เซตว่าง)} \end{aligned} $$

Given $A = \{2, 4, 6\}$ and $B = \{1, 3, 5\}$, find $A \cap B$.

$$ \begin{aligned} A \cap B &= \{2, 4, 6\} \cap \{1, 3, 5\} \\ &= \emptyset \quad \text{(No common elements results in an empty set)} \end{aligned} $$
Example 2.3

กำหนดให้ $A = \{1, 2, 3\}$ จงหา $A \cap A$

$$ \begin{aligned} A \cap A &= \{1, 2, 3\} \cap \{1, 2, 3\} \\ &= \{1, 2, 3\} \\ &= A \end{aligned} $$

Given $A = \{1, 2, 3\}$, find $A \cap A$.

$$ \begin{aligned} A \cap A &= \{1, 2, 3\} \cap \{1, 2, 3\} \\ &= \{1, 2, 3\} \\ &= A \end{aligned} $$
Example 2.4

กำหนดให้ $X = \{1, 2\}$ และ $Y = \{1, 2, 3, 4\}$ จงหา $X \cap Y$

$$ \begin{aligned} X \cap Y &= \{1, 2\} \cap \{1, 2, 3, 4\} \\ &= \{1, 2\} \\ &= X \quad \text{(ถ้า } X \subset Y \text{ แล้ว } X \cap Y = X \text{)} \end{aligned} $$

Given $X = \{1, 2\}$ and $Y = \{1, 2, 3, 4\}$, find $X \cap Y$.

$$ \begin{aligned} X \cap Y &= \{1, 2\} \cap \{1, 2, 3, 4\} \\ &= \{1, 2\} \\ &= X \quad \text{(If } X \subset Y \text{, then } X \cap Y = X \text{)} \end{aligned} $$
Example 2.5

กำหนดให้ $A = \{10, 20, 30\}$ จงหา $A \cap \emptyset$

$$ \begin{aligned} A \cap \emptyset &= \{10, 20, 30\} \cap \{\ \} \\ &= \emptyset \quad \text{(ไม่มีสมาชิกร่วมกันเลย)} \end{aligned} $$

Given $A = \{10, 20, 30\}$, find $A \cap \emptyset$.

$$ \begin{aligned} A \cap \emptyset &= \{10, 20, 30\} \cap \{\ \} \\ &= \emptyset \quad \text{(No common elements)} \end{aligned} $$
Example 2.6

ให้ $A = \{\text{m, a, t, h}\}$ และ $B = \{\text{s, t, a, r}\}$ จงหา $A \cap B$

$$ \begin{aligned} A \cap B &= \{\text{m, a, t, h}\} \cap \{\text{s, t, a, r}\} \\ &= \{\text{a, t}\} \end{aligned} $$

Given $A = \{\text{m, a, t, h}\}$ and $B = \{\text{s, t, a, r}\}$, find $A \cap B$.

$$ \begin{aligned} A \cap B &= \{\text{m, a, t, h}\} \cap \{\text{s, t, a, r}\} \\ &= \{\text{a, t}\} \end{aligned} $$
Example 2.7

กำหนดให้ $P = \{2, 3, 5, 7, 11, \dots\}$ (เซตของจำนวนเฉพาะ) และ $E = \{2, 4, 6, 8, \dots\}$ (เซตของจำนวนคู่) จงหา $P \cap E$

$$ \begin{aligned} P \cap E &= \{2, 3, 5, \dots\} \cap \{2, 4, 6, \dots\} \\ &= \{2\} \quad \text{(จำนวนเฉพาะที่เป็นจำนวนคู่มีเพียงเลข 2 เท่านั้น)} \end{aligned} $$

Given $P = \{2, 3, 5, 7, 11, \dots\}$ (primes) and $E = \{2, 4, 6, 8, \dots\}$ (evens), find $P \cap E$.

$$ \begin{aligned} P \cap E &= \{2, 3, 5, \dots\} \cap \{2, 4, 6, \dots\} \\ &= \{2\} \quad \text{(The only even prime number is 2)} \end{aligned} $$
Example 2.8

ให้ $A = [0, 5]$ และ $B = [3, 8]$ จงหา $A \cap B$

$$ \begin{aligned} A \cap B &= [0, 5] \cap [3, 8] \\ &= [3, 5] \quad \text{(เฉพาะช่วงที่ทับซ้อนกัน)} \end{aligned} $$

Given intervals $A = [0, 5]$ and $B = [3, 8]$, find $A \cap B$.

$$ \begin{aligned} A \cap B &= [0, 5] \cap [3, 8] \\ &= [3, 5] \quad \text{(Only the overlapping region)} \end{aligned} $$
Example 2.9

ให้ $A = (0, 2)$ และ $B = (4, 6)$ จงหา $A \cap B$

$$ \begin{aligned} A \cap B &= (0, 2) \cap (4, 6) \\ &= \emptyset \quad \text{(ไม่มีส่วนใดซ้อนทับกันเลย)} \end{aligned} $$

Given intervals $A = (0, 2)$ and $B = (4, 6)$, find $A \cap B$.

$$ \begin{aligned} A \cap B &= (0, 2) \cap (4, 6) \\ &= \emptyset \quad \text{(No overlapping region)} \end{aligned} $$
Example 2.10

ให้ $A=\{1,2,3\}$, $B=\{2,3,4\}$ และ $C=\{3,4,5\}$ จงหา $A \cap B \cap C$

$$ \begin{aligned} A \cap B \cap C &= \{1, 2, 3\} \cap \{2, 3, 4\} \cap \{3, 4, 5\} \\ &= \{2, 3\} \cap \{3, 4, 5\} \\ &= \{3\} \quad \text{(ต้องมีอยู่ในทั้ง 3 เซต)} \end{aligned} $$

Given $A=\{1,2,3\}$, $B=\{2,3,4\}$, and $C=\{3,4,5\}$, find $A \cap B \cap C$.

$$ \begin{aligned} A \cap B \cap C &= \{1, 2, 3\} \cap \{2, 3, 4\} \cap \{3, 4, 5\} \\ &= \{2, 3\} \cap \{3, 4, 5\} \\ &= \{3\} \quad \text{(Must exist in all 3 sets)} \end{aligned} $$
3

คอมพลีเมนต์ Complement ($A'$)

TH

คอมพลีเมนต์ (Complement) ของเซต $A$ เขียนแทนด้วย $A'$ คือเซตที่ประกอบด้วยสมาชิกที่อยู่ในเอกภพสัมพัทธ์ ($\mathcal{U}$) แต่ ไม่อยู่ใน เซต $A$ (พูดง่ายๆ คือ "เอาทุกอย่างยกเว้นสมาชิกของ $A$")

$$A' = \{x \mid x \in \mathcal{U} \text{ และ } x \notin A\}$$
EN

The Complement of set $A$, denoted as $A'$, is the set of elements in the Universal set ($\mathcal{U}$) that are not in set $A$. (Simply put, "everything except $A$").

$$A' = \{x \mid x \in \mathcal{U} \text{ and } x \notin A\}$$
Example 3.1

กำหนดให้ $\mathcal{U} = \{1, 2, 3, 4, 5, 6, 7\}$ และ $A = \{2, 4, 6\}$ จงหา $A'$

$$ \begin{aligned} A' &= \{1, 3, 5, 7\} \quad \text{(สมาชิกทั้งหมดใน } \mathcal{U} \text{ ที่ไม่ใช่ } 2, 4, 6\text{)} \end{aligned} $$

Given $\mathcal{U} = \{1, 2, 3, 4, 5, 6, 7\}$ and $A = \{2, 4, 6\}$, find $A'$.

$$ \begin{aligned} A' &= \{1, 3, 5, 7\} \quad \text{(All elements in } \mathcal{U} \text{ except } 2, 4, 6\text{)} \end{aligned} $$
Example 3.2

กำหนดให้ $\mathcal{U} = \{1, 2, 3\}$ จงหา $\mathcal{U}'$ และ $\emptyset'$

$$ \begin{aligned} \mathcal{U}' &= \emptyset \quad \text{(ไม่มีสมาชิกใดเหลืออยู่นอก } \mathcal{U} \text{)}\\ \emptyset' &= \mathcal{U} \quad \text{(ตรงข้ามกับความว่างเปล่า คือทั้งหมด)} \end{aligned} $$

Given $\mathcal{U} = \{1, 2, 3\}$, find $\mathcal{U}'$ and $\emptyset'$.

$$ \begin{aligned} \mathcal{U}' &= \emptyset \quad \text{(Nothing exists outside } \mathcal{U} \text{)}\\ \emptyset' &= \mathcal{U} \quad \text{(The opposite of empty is everything)} \end{aligned} $$
Example 3.3

จาก $\mathcal{U} = \{1, 2, 3, 4\}$ และ $A = \{1, 2\}$ จงหา $(A')'$

$$ \begin{aligned} A' &= \{3, 4\} \\ (A')' &= \{1, 2\} \quad \text{(กลับมาเป็นเซตเดิม)}\\ &= A \end{aligned} $$

Given $\mathcal{U} = \{1, 2, 3, 4\}$ and $A = \{1, 2\}$, find $(A')'$.

$$ \begin{aligned} A' &= \{3, 4\} \\ (A')' &= \{1, 2\} \quad \text{(Returns to original set)}\\ &= A \end{aligned} $$
Example 3.4

ให้ $\mathcal{U} = \mathbb{Z}$ (จำนวนเต็ม) และ $A = \mathbb{Z}^+$ (จำนวนเต็มบวก) จงหา $A'$

$$ \begin{aligned} A' &= \{\dots, -3, -2, -1, 0\} \\ &= \mathbb{Z}^- \cup \{0\} \quad \text{(จำนวนเต็มลบรวมกับศูนย์)} \end{aligned} $$

Given $\mathcal{U} = \mathbb{Z}$ (integers) and $A = \mathbb{Z}^+$ (positive integers), find $A'$.

$$ \begin{aligned} A' &= \{\dots, -3, -2, -1, 0\} \\ &= \mathbb{Z}^- \cup \{0\} \quad \text{(Negative integers union zero)} \end{aligned} $$
Example 3.5

ให้ $\mathcal{U} = \{a, b, c, d, e\}$ และ $X = \{a, e\}$ จงหา $X'$

$$ \begin{aligned} X' &= \{b, c, d\} \end{aligned} $$

Given $\mathcal{U} = \{a, b, c, d, e\}$ and $X = \{a, e\}$, find $X'$.

$$ \begin{aligned} X' &= \{b, c, d\} \end{aligned} $$
Example 3.6

ให้ $\mathcal{U} = \mathbb{R}$ (จำนวนจริงทั้งหมด) และ $A = [0, 5]$ จงหา $A'$

$$ \begin{aligned} A' &= (-\infty, 0) \cup (5, \infty) \\ &\text{(เอาส่วนที่น้อยกว่า 0 หรือมากกว่า 5 และไม่รวม 0, 5)} \end{aligned} $$

Given $\mathcal{U} = \mathbb{R}$ (all real numbers) and $A = [0, 5]$, find $A'$.

$$ \begin{aligned} A' &= (-\infty, 0) \cup (5, \infty) \\ &\text{(Numbers strictly less than 0 or strictly greater than 5)} \end{aligned} $$
Example 3.7

ให้ $\mathcal{U} = \{1, 2, 3, 4, 5\}, A=\{1\}, B=\{2\}$ จงหา $(A \cup B)'$

$$ \begin{aligned} A \cup B &= \{1, 2\} \\ (A \cup B)' &= \{3, 4, 5\} \end{aligned} $$

Given $\mathcal{U} = \{1, 2, 3, 4, 5\}, A=\{1\}, B=\{2\}$, find $(A \cup B)'$.

$$ \begin{aligned} A \cup B &= \{1, 2\} \\ (A \cup B)' &= \{3, 4, 5\} \end{aligned} $$
Example 3.8

กำหนด $\mathcal{U} = \{1, 2, 3, 4, 5, 6\}$, $A = \{1, 3, 5\}$ และ $B = \{2, 4, 6\}$ จงหา $(A \cap B)'$

$$ \begin{aligned} A \cap B &= \emptyset \quad \text{(ไม่มีตัวซ้ำ)} \\ (A \cap B)' &= \emptyset' \\ &= \{1, 2, 3, 4, 5, 6\} = \mathcal{U} \end{aligned} $$

Given $\mathcal{U} = \{1, 2, 3, 4, 5, 6\}$, $A = \{1, 3, 5\}$, and $B = \{2, 4, 6\}$, find $(A \cap B)'$.

$$ \begin{aligned} A \cap B &= \emptyset \quad \text{(No common elements)} \\ (A \cap B)' &= \emptyset' \\ &= \{1, 2, 3, 4, 5, 6\} = \mathcal{U} \end{aligned} $$
Example 3.9

ให้ $\mathcal{U} = \{x \mid x \in \mathbb{I}, 1 \le x \le 10\}$ และ $A = \{x \mid x \text{ หารด้วย } 3 \text{ ลงตัว}\}$ จงหา $A'$

$$ \begin{aligned} \mathcal{U} &= \{1, 2, 3, 4, 5, 6, 7, 8, 9, 10\} \\ A &= \{3, 6, 9\} \\ A' &= \{1, 2, 4, 5, 7, 8, 10\} \end{aligned} $$

Given $\mathcal{U} = \{x \mid x \in \mathbb{Z}, 1 \le x \le 10\}$ and $A = \{x \mid x \text{ is divisible by } 3\}$, find $A'$.

$$ \begin{aligned} \mathcal{U} &= \{1, 2, 3, 4, 5, 6, 7, 8, 9, 10\} \\ A &= \{3, 6, 9\} \\ A' &= \{1, 2, 4, 5, 7, 8, 10\} \end{aligned} $$
Example 3.10

กำหนด $A = \{1, 3\}$ และ $A' = \{2, 4, 6\}$ จงหา $\mathcal{U}$

$$ \begin{aligned} \mathcal{U} &= A \cup A' \\ &= \{1, 3\} \cup \{2, 4, 6\} \\ &= \{1, 2, 3, 4, 6\} \end{aligned} $$

Given $A = \{1, 3\}$ and $A' = \{2, 4, 6\}$, find $\mathcal{U}$.

$$ \begin{aligned} \mathcal{U} &= A \cup A' \\ &= \{1, 3\} \cup \{2, 4, 6\} \\ &= \{1, 2, 3, 4, 6\} \end{aligned} $$
4

ผลต่าง Difference ($A - B$)

TH

ผลต่าง (Difference) ของเซต $A$ และ $B$ (เขียนแทนด้วย $A - B$) คือเซตที่ประกอบด้วยสมาชิกที่อยู่ในเซต $A$ แต่ ไม่อยู่ใน เซต $B$ (พูดง่ายๆ คือ "เอาหน้า ไม่เอาหลัง")

$$A - B = \{x \mid x \in A \text{ และ } x \notin B\}$$
EN

The Difference of set $A$ and set $B$ (denoted as $A - B$) is the set containing elements that are in $A$ but not in $B$. (Simply put, "elements exclusively in the first set").

$$A - B = \{x \mid x \in A \text{ and } x \notin B\}$$
Example 4.1

กำหนดให้ $A = \{1, 2, 3, 4, 5\}$ และ $B = \{3, 4, 5, 6, 7\}$ จงหา $A - B$

$$ \begin{aligned} A - B &= \{1, 2, 3, 4, 5\} - \{3, 4, 5, 6, 7\} \\ &= \{1, 2\} \quad \text{(สมาชิก } 3, 4, 5 \text{ ถูกตัดออกเพราะอยู่ใน } B\text{)} \end{aligned} $$

Given $A = \{1, 2, 3, 4, 5\}$ and $B = \{3, 4, 5, 6, 7\}$, find $A - B$.

$$ \begin{aligned} A - B &= \{1, 2, 3, 4, 5\} - \{3, 4, 5, 6, 7\} \\ &= \{1, 2\} \quad \text{(Elements } 3, 4, 5 \text{ are removed as they exist in } B\text{)} \end{aligned} $$
Example 4.2

กำหนดให้ $X = \{a, b, c, d\}$ และ $Y = \{c, d, e, f\}$ จงหา $Y - X$

$$ \begin{aligned} Y - X &= \{c, d, e, f\} - \{a, b, c, d\} \\ &= \{e, f\} \quad \text{(จะเห็นว่า } X - Y \text{ จะได้ } \{a, b\} \text{ ซึ่งไม่เท่ากัน)} \end{aligned} $$

Given $X = \{a, b, c, d\}$ and $Y = \{c, d, e, f\}$, find $Y - X$.

$$ \begin{aligned} Y - X &= \{c, d, e, f\} - \{a, b, c, d\} \\ &= \{e, f\} \quad \text{(Notice that } X - Y \text{ is } \{a, b\} \text{, which is not equal)} \end{aligned} $$
Example 4.3

กำหนดให้ $A = \{1, 2\}$ และ $B = \{3, 4\}$ จงหา $A - B$

$$ \begin{aligned} A - B &= \{1, 2\} - \{3, 4\} \\ &= \{1, 2\} \\ &= A \quad \text{(ไม่มีตัวใดโดนหักออก)} \end{aligned} $$

Given $A = \{1, 2\}$ and $B = \{3, 4\}$, find $A - B$.

$$ \begin{aligned} A - B &= \{1, 2\} - \{3, 4\} \\ &= \{1, 2\} \\ &= A \quad \text{(No elements are subtracted)} \end{aligned} $$
Example 4.4

กำหนดให้ $A = \{x, y\}$ จงหา $A - A$

$$ \begin{aligned} A - A &= \{x, y\} - \{x, y\} \\ &= \emptyset \quad \text{(โดนหักออกหมดจนไม่เหลือ)} \end{aligned} $$

Given $A = \{x, y\}$, find $A - A$.

$$ \begin{aligned} A - A &= \{x, y\} - \{x, y\} \\ &= \emptyset \quad \text{(All elements are subtracted)} \end{aligned} $$
Example 4.5

กำหนดให้ $A = \{1, 2\}$ และ $B = \{1, 2, 3\}$ จงหา $A - B$

$$ \begin{aligned} A - B &= \{1, 2\} - \{1, 2, 3\} \\ &= \emptyset \quad \text{(สมาชิกของ A ทุกตัวอยู่ใน B หมดแล้ว)} \end{aligned} $$

Given $A = \{1, 2\}$ and $B = \{1, 2, 3\}$, find $A - B$.

$$ \begin{aligned} A - B &= \{1, 2\} - \{1, 2, 3\} \\ &= \emptyset \quad \text{(All elements of A are in B)} \end{aligned} $$
Example 4.6

กำหนดให้ $A = \{a, b, c\}$ จงหา $A - \emptyset$ และ $\emptyset - A$

$$ \begin{aligned} A - \emptyset &= \{a, b, c\} - \{\ \} \\ &= \{a, b, c\} = A \\ \emptyset - A &= \{\ \} - \{a, b, c\} \\ &= \emptyset \quad \text{(เซตตัวตั้งไม่มีสมาชิกอยู่เลย)} \end{aligned} $$

Given $A = \{a, b, c\}$, find $A - \emptyset$ and $\emptyset - A$.

$$ \begin{aligned} A - \emptyset &= \{a, b, c\} - \{\ \} \\ &= \{a, b, c\} = A \\ \emptyset - A &= \{\ \} - \{a, b, c\} \\ &= \emptyset \quad \text{(The first set has no elements)} \end{aligned} $$
Example 4.7

ให้ $A = [0, 5]$ และ $B = (2, 7)$ จงหา $A - B$

$$ \begin{aligned} A - B &= [0, 5] - (2, 7) \\ &= [0, 2] \quad \text{(เนื่องจาก B ไม่รวม 2 ดังนั้น A จึงยังคงมี 2 อยู่)} \end{aligned} $$

Given intervals $A = [0, 5]$ and $B = (2, 7)$, find $A - B$.

$$ \begin{aligned} A - B &= [0, 5] - (2, 7) \\ &= [0, 2] \quad \text{(Since B does not include 2, A still keeps it)} \end{aligned} $$
Example 4.8

ให้ $\mathcal{U} = \{1, 2, 3, 4\}$ และ $A = \{1, 2\}$ จงหา $\mathcal{U} - A$

$$ \begin{aligned} \mathcal{U} - A &= \{1, 2, 3, 4\} - \{1, 2\} \\ &= \{3, 4\} \\ &= A' \quad \text{(ซึ่งมีค่าเท่ากับคอมพลีเมนต์ของ A)} \end{aligned} $$

Given $\mathcal{U} = \{1, 2, 3, 4\}$ and $A = \{1, 2\}$, find $\mathcal{U} - A$.

$$ \begin{aligned} \mathcal{U} - A &= \{1, 2, 3, 4\} - \{1, 2\} \\ &= \{3, 4\} \\ &= A' \quad \text{(Which is equivalent to the complement of A)} \end{aligned} $$
Example 4.9

ให้ $\mathbb{R}$ แทนจำนวนจริงทั้งหมด และ $\mathbb{Q}$ แทนจำนวนตรรกยะ จงอธิบายเซต $\mathbb{R} - \mathbb{Q}$

$$ \begin{aligned} \mathbb{R} - \mathbb{Q} &= \text{เซตของจำนวนจริงที่ไม่ใช่จำนวนตรรกยะ} \\ &= \mathbb{Q}' \quad \text{(เซตของจำนวนอตรรกยะ)} \end{aligned} $$

Let $\mathbb{R}$ be all real numbers and $\mathbb{Q}$ be rational numbers. Describe $\mathbb{R} - \mathbb{Q}$.

$$ \begin{aligned} \mathbb{R} - \mathbb{Q} &= \text{Set of real numbers that are not rational} \\ &= \mathbb{Q}' \quad \text{(Set of irrational numbers)} \end{aligned} $$
Example 4.10

ให้ $A=\{1,2,3\}$, $B=\{2,3,4\}$ และ $C=\{3,4,5\}$ จงหา $A - (B \cup C)$

$$ \begin{aligned} B \cup C &= \{2, 3, 4, 5\} \\ A - (B \cup C) &= \{1, 2, 3\} - \{2, 3, 4, 5\} \\ &= \{1\} \end{aligned} $$

Given $A=\{1,2,3\}$, $B=\{2,3,4\}$, and $C=\{3,4,5\}$, find $A - (B \cup C)$.

$$ \begin{aligned} B \cup C &= \{2, 3, 4, 5\} \\ A - (B \cup C) &= \{1, 2, 3\} - \{2, 3, 4, 5\} \\ &= \{1\} \end{aligned} $$
5

การดำเนินการ 3 เซตขึ้นไป Operations on 3 or More Sets

TH

การดำเนินการกับเซตตั้งแต่ 3 เซตขึ้นไป เช่น $A, B$ และ $C$ สิ่งสำคัญคือ ต้องทำในวงเล็บก่อนเสมอ (ถ้ามี) จากนั้นจึงค่อยดำเนินการเซตที่เหลือตามลำดับ เครื่องหมายที่แตกต่างกัน (เช่น $\cup$ กับ $\cap$ ปะปนกัน) จะส่งผลต่อคำตอบอย่างมาก

EN

For operations involving 3 or more sets, such as $A, B$, and $C$, it is crucial to always evaluate the expressions inside parentheses first. Mixing different operators (like $\cup$ and $\cap$) significantly affects the final result.

Example 5.1

กำหนดให้ $A = \{1, 2, 3, 4, 5\}$, $B = \{3, 4, 5, 6, 7\}$ และ $C = \{1, 3, 5, 7, 9\}$ จงหา $A \cup (B \cap C)$

$$ \begin{aligned} B \cap C &= \{3, 5, 7\} \quad \text{(ทำในวงเล็บก่อน)} \\ A \cup (B \cap C) &= \{1, 2, 3, 4, 5\} \cup \{3, 5, 7\} \\ &= \{1, 2, 3, 4, 5, 7\} \end{aligned} $$

Given $A = \{1, 2, 3, 4, 5\}$, $B = \{3, 4, 5, 6, 7\}$, and $C = \{1, 3, 5, 7, 9\}$, find $A \cup (B \cap C)$.

$$ \begin{aligned} B \cap C &= \{3, 5, 7\} \quad \text{(Evaluate parentheses first)} \\ A \cup (B \cap C) &= \{1, 2, 3, 4, 5\} \cup \{3, 5, 7\} \\ &= \{1, 2, 3, 4, 5, 7\} \end{aligned} $$
Example 5.2

กำหนดให้ $X = \{a, b, c\}$, $Y = \{b, c, d\}$ และ $Z = \{c, d, e\}$ จงหา $(X \cup Y) \cap Z$

$$ \begin{aligned} X \cup Y &= \{a, b, c, d\} \\ (X \cup Y) \cap Z &= \{a, b, c, d\} \cap \{c, d, e\} \\ &= \{c, d\} \end{aligned} $$

Given $X = \{a, b, c\}$, $Y = \{b, c, d\}$, and $Z = \{c, d, e\}$, find $(X \cup Y) \cap Z$.

$$ \begin{aligned} X \cup Y &= \{a, b, c, d\} \\ (X \cup Y) \cap Z &= \{a, b, c, d\} \cap \{c, d, e\} \\ &= \{c, d\} \end{aligned} $$
Example 5.3

ให้ $P = \{1, 2\}$, $Q = \{2, 3, 4\}$ และ $R = \{4, 5\}$ จงหา $P \cap (Q \cup R)$

$$ \begin{aligned} Q \cup R &= \{2, 3, 4, 5\} \\ P \cap (Q \cup R) &= \{1, 2\} \cap \{2, 3, 4, 5\} \\ &= \{2\} \end{aligned} $$

Let $P = \{1, 2\}$, $Q = \{2, 3, 4\}$, and $R = \{4, 5\}$, find $P \cap (Q \cup R)$.

$$ \begin{aligned} Q \cup R &= \{2, 3, 4, 5\} \\ P \cap (Q \cup R) &= \{1, 2\} \cap \{2, 3, 4, 5\} \\ &= \{2\} \end{aligned} $$
Example 5.4

ให้ $A = \{10, 20\}$, $B = \{20, 30\}$ และ $C = \{30, 40\}$ จงหา $(A \cap B) \cup C$

$$ \begin{aligned} A \cap B &= \{20\} \\ (A \cap B) \cup C &= \{20\} \cup \{30, 40\} \\ &= \{20, 30, 40\} \end{aligned} $$

Let $A = \{10, 20\}$, $B = \{20, 30\}$, and $C = \{30, 40\}$, find $(A \cap B) \cup C$.

$$ \begin{aligned} A \cap B &= \{20\} \\ (A \cap B) \cup C &= \{20\} \cup \{30, 40\} \\ &= \{20, 30, 40\} \end{aligned} $$
Example 5.5

กำหนดให้ $M = \{1, 3, 5, 7\}$, $N = \{3, 4, 5\}$ และ $O = \{5, 6, 7\}$ จงหา $M - (N \cup O)$

$$ \begin{aligned} N \cup O &= \{3, 4, 5, 6, 7\} \\ M - (N \cup O) &= \{1, 3, 5, 7\} - \{3, 4, 5, 6, 7\} \\ &= \{1\} \quad \text{(เอาเฉพาะที่มีใน } M \text{ แต่ไม่มีในกลุ่ม } N \cup O\text{)} \end{aligned} $$

Given $M = \{1, 3, 5, 7\}$, $N = \{3, 4, 5\}$, and $O = \{5, 6, 7\}$, find $M - (N \cup O)$.

$$ \begin{aligned} N \cup O &= \{3, 4, 5, 6, 7\} \\ M - (N \cup O) &= \{1, 3, 5, 7\} - \{3, 4, 5, 6, 7\} \\ &= \{1\} \end{aligned} $$
Example 5.6

กำหนดให้ $A = \{2, 4, 6, 8\}$, $B = \{4, 6\}$ และ $C = \{6, 8\}$ จงหา $A - (B \cap C)$

$$ \begin{aligned} B \cap C &= \{6\} \\ A - (B \cap C) &= \{2, 4, 6, 8\} - \{6\} \\ &= \{2, 4, 8\} \end{aligned} $$

Given $A = \{2, 4, 6, 8\}$, $B = \{4, 6\}$, and $C = \{6, 8\}$, find $A - (B \cap C)$.

$$ \begin{aligned} B \cap C &= \{6\} \\ A - (B \cap C) &= \{2, 4, 6, 8\} - \{6\} \\ &= \{2, 4, 8\} \end{aligned} $$
Example 5.7

ให้ $U = \{1, 2, 3, 4\}$, $V = \{3, 4, 5\}$ และ $W = \{5, 6\}$ จงหา $(U - V) \cup W$

$$ \begin{aligned} U - V &= \{1, 2\} \quad \text{(หักตัวที่มีใน } V \text{ ออกไป)} \\ (U - V) \cup W &= \{1, 2\} \cup \{5, 6\} \\ &= \{1, 2, 5, 6\} \end{aligned} $$

Let $U = \{1, 2, 3, 4\}$, $V = \{3, 4, 5\}$, and $W = \{5, 6\}$, find $(U - V) \cup W$.

$$ \begin{aligned} U - V &= \{1, 2\} \\ (U - V) \cup W &= \{1, 2\} \cup \{5, 6\} \\ &= \{1, 2, 5, 6\} \end{aligned} $$
Example 5.8

ให้ $D = \{a, b, c, d\}$, $E = \{c, d, e, f\}$ และ $F = \{d, e\}$ จงหา $(D \cap E) - F$

$$ \begin{aligned} D \cap E &= \{c, d\} \\ (D \cap E) - F &= \{c, d\} - \{d, e\} \\ &= \{c\} \end{aligned} $$

Let $D = \{a, b, c, d\}$, $E = \{c, d, e, f\}$, and $F = \{d, e\}$, find $(D \cap E) - F$.

$$ \begin{aligned} D \cap E &= \{c, d\} \\ (D \cap E) - F &= \{c, d\} - \{d, e\} \\ &= \{c\} \end{aligned} $$
Example 5.9

กำหนดเอกภพสัมพัทธ์ $\mathcal{U} = \{1, 2, 3, 4, 5, 6\}$ และให้ $A=\{1\}, B=\{2\}, C=\{3\}$ จงหา $(A \cup B \cup C)'$

$$ \begin{aligned} A \cup B \cup C &= \{1, 2, 3\} \quad \text{(รวมทั้ง 3 เซตเข้าด้วยกัน)} \\ (A \cup B \cup C)' &= \{1, 2, 3, 4, 5, 6\} - \{1, 2, 3\} \\ &= \{4, 5, 6\} \end{aligned} $$

Given the universal set $\mathcal{U} = \{1, 2, 3, 4, 5, 6\}$ and $A=\{1\}, B=\{2\}, C=\{3\}$, find $(A \cup B \cup C)'$.

$$ \begin{aligned} A \cup B \cup C &= \{1, 2, 3\} \quad \text{(Union of all 3 sets)} \\ (A \cup B \cup C)' &= \{1, 2, 3, 4, 5, 6\} - \{1, 2, 3\} \\ &= \{4, 5, 6\} \end{aligned} $$
Example 5.10

กำหนดให้ $A = \{2, 4, 6, 8\}$, $B = \{3, 6, 9\}$ และ $C = \{1, 2, 6, 7\}$ จงหา $A \cap B \cap C$

$$ \begin{aligned} A \cap B &= \{6\} \\ (A \cap B) \cap C &= \{6\} \cap \{1, 2, 6, 7\} \\ &= \{6\} \quad \text{(นี่คือสมาชิกที่ซ้ำกันทั้ง 3 วง)} \end{aligned} $$

Given $A = \{2, 4, 6, 8\}$, $B = \{3, 6, 9\}$, and $C = \{1, 2, 6, 7\}$, find $A \cap B \cap C$.

$$ \begin{aligned} A \cap B &= \{6\} \\ (A \cap B) \cap C &= \{6\} \cap \{1, 2, 6, 7\} \\ &= \{6\} \quad \text{(Elements common to all 3 sets)} \end{aligned} $$
6

สมบัติของการดำเนินการ Properties of Set Operations

TH

สมบัติของการดำเนินการของเซตมีความคล้ายคลึงกับพีชคณิตของจำนวนจริง ซึ่งสามารถนำไปใช้ในการจัดรูปหรือลดทอนเซตที่ซับซ้อนให้เป็นอย่างง่ายได้ โดยแบ่งเป็นกลุ่มสมบัติต่างๆ ดังนี้:

EN

Properties of set operations are similar to the algebra of real numbers. They can be used to simplify complex set expressions. The properties are grouped as follows:

1. สมบัติการสลับที่ (Commutative Laws)
$$ \begin{aligned} A \cup B &= B \cup A \\ A \cap B &= B \cap A \end{aligned} $$
2. สมบัติการเปลี่ยนหมู่ (Associative Laws)
$$ \begin{aligned} A \cup (B \cup C) &= (A \cup B) \cup C \\ A \cap (B \cap C) &= (A \cap B) \cap C \end{aligned} $$
3. สมบัติการแจกแจง (Distributive Laws)
$$ \begin{aligned} A \cup (B \cap C) &= (A \cup B) \cap (A \cup C) \\ A \cap (B \cup C) &= (A \cap B) \cup (A \cap C) \end{aligned} $$
4. กฎของเอกลักษณ์ (Identity Laws)
$$ \begin{aligned} A \cup \emptyset &= A \\ A \cap \mathcal{U} &= A \end{aligned} $$
5. กฎการครอบงำและซ้ำตัวเดิม (Domination & Idempotent Laws)
$$ \begin{aligned} A \cup \mathcal{U} &= \mathcal{U} \\ A \cap \emptyset &= \emptyset \\ A \cup A &= A \\ A \cap A &= A \end{aligned} $$
6. กฎของคอมพลีเมนต์ (Complement Laws)
$$ \begin{aligned} A \cup A' &= \mathcal{U} \\ A \cap A' &= \emptyset \\ (A')' &= A \\ \mathcal{U}' &= \emptyset \\ \emptyset' &= \mathcal{U} \end{aligned} $$
7. กฎของเดอมอร์แกน (De Morgan's Laws)
$$ \begin{aligned} (A \cup B)' &= A' \cap B' \\ (A \cap B)' &= A' \cup B' \end{aligned} $$
8. สมบัติของผลต่าง (Difference Properties)
$$ \begin{aligned} A - B &= A \cap B' \\ A - (B \cup C) &= (A - B) \cap (A - C) \\ A - (B \cap C) &= (A - B) \cup (A - C) \end{aligned} $$
9. สมบัติการเป็นสับเซต (Subset Properties)
$$ \begin{aligned} A \subset B \\ \quad A \cup B &= B \\ \quad A \cap B &= A \\ \quad A - B &= \emptyset \end{aligned} $$

คำศัพท์ที่น่าสนใจ Key Vocabulary

คำศัพท์คณิตศาสตร์ภาษาอังกฤษ พร้อมรากศัพท์

คำศัพท์ รากศัพท์ / Root ความหมาย / Meaning
Union unio (oneness, unity) ยูเนียน · การนำสมาชิกของเซตมารวมกัน
Intersection inter (between) + secare (to cut) อินเตอร์เซกชัน · ส่วนที่ตัดกัน หรือสมาชิกที่มีร่วมกัน
Complement complere (to fill up) คอมพลีเมนต์ · ส่วนเติมเต็ม (ส่วนที่เหลือในเอกภพสัมพัทธ์)
Difference differre (to set apart) ผลต่าง · สิ่งที่แตกต่างกัน (มีในเซตหน้า แต่ไม่มีในเซตหลัง)
Universal Set universalis (of the whole) เอกภพสัมพัทธ์ · เซตที่กำหนดขอบเขตของสมาชิกทั้งหมดที่กำลังพิจารณา