Equality of Sets
Definition (Axiom of Extensionality)
If $A$ and $B$ are sets, then $A$ is equal to $B$ if and only if every element of $A$ is also an element of $B$, and every element of $B$ is also an element of $A$.
This statement is known as the Axiom of Extensionality.
Notation
$A = B \Longleftrightarrow \forall \; x \; (x \in A \Longleftrightarrow x \in B).$
Meaning of the used symbols
Symbol | Meaning |
---|---|
= | is equal to |
$ \Longleftrightarrow $ | if and only if (iff) |
$ \forall $ | for all (universal quantifier) |
$ \in $ | is an element of |
Consequences of the Axiom of Extensionality
From the definition of equality of sets, two important consequences arise:
-
The order of elements within a set does not matter. What matters is the membership of the elements in the set.
-
The repetition of elements within a set does not matter either. Listing the same element more than once does not change the set.
Example
Let $A$ and $B$ be the following sets: $A= \{1, 3, 5, \{7\} \}$ and $B = \{3, \{7\}, 5, 1, 5, \{7\}, 3, 3\}$. Both sets contain exactly the same four elements 1, 3, 5, {7}. Therefore $A = B$.
Negation of the definition
If $A$ and $B$ are sets, then $A$ is not equal to $B$ iff there exists at least one element that belongs to one of the sets but not to the other.
Notation of the negation
$A \neq B \Longleftrightarrow \exists \; x \; \left[(x \in A \wedge x \notin B ) \vee (x \notin A \wedge x \in B)\right].$
Meaning of the used symbols
Symbol | Meaning |
---|---|
$ \neq $ | not equal to |
$ \Longleftrightarrow $ | iff |
$ \exists $ | there exists (existential quantifier) |
$ \in $ | is an element of |
$ \wedge $ | and |
$ \notin $ | is not an element of |
$ \vee $ | (not exclusive) or |
Non-examples of equality of sets
Let $A$ and $B$ be the following sets: $A = \{1, 3, 5\}$ and $B = \{1, 3, \{7\} \}.$ The elements 1 and 3 in set $A$ are also contained in set $B$, but 5 is not contained in set B. Also the element $\{7\}$, which is contained in set $B$, is not contained in set $A$. There are elements, namely $5$ and $\{7\}$, that are only in one set, but not the other, so $A \neq B$.
Let $A$ and $B$ be the following sets: $A = \{1, 2\}$ and $B = \{1, 2, 4\}.$ Every element of set $A$ is in set $B$. Element 4 is contained in set $B$, but not contained in set $A$. There is an element, namely 4, that is only in one set, but not the other, so also in this case, $A \neq B$.
Jargon-free explanation
Think of two sets like two baskets of fruit. The baskets are equal if, when you look inside, they have exactly the same kinds of fruit—no matter how they’re arranged or how many times you count each piece. As long as both baskets contain the same types of fruit, and nothing extra or missing, the baskets are considered the same. If even one type of fruit is in one basket but not the other, the baskets aren’t equal.