Axioms

This chapter contains notes on the foundational underpinnings of set theory.

There are two versions of set theory: (1) naive set theory, and (2) axiomatic set theory. We explore aspects of both theories in the materials that follow. What are the differences? Naive set theory is the version of set theory as originally constructed by the German mathematician Georg Cantor.1 Axiomatic set theory is the version of set theory constructed in response to several paradoxes, the most famous of which is Russell's Paradox. In this chapter, we focus only on naive set theory.

Foundational Axioms

In mathematics, a set is a collection of objects. Those objects might be dogs, people, trees, numbers, values, variables, or more abstractly, propositions. For example, the set of all coins includes nickels, sterling, and yen. The set of all countries includes Japan, Palau, and Uruguay. The set of all integers includes 1 and -117. We can visualize a set as:

Basic sets

Sets can be finite (there are only so many countries), or infinite (there are infinitely many of numbers). Each object in a set is called a member of that set.

Axiom of Extension

The set {1,2,3}\{ 1, 2, 3 \} is the same as the set {2,1,3}\{ 2, 1, 3 \}, and the same set as {2,2,3,1}\{ 2, 2, 3, 1 \}. We can draw this conclusion because of the axiom of extension.

axiom of extension. Two sets are equal if and only if they have the same elements.

In short, the axiom of extension provides that a set is completely determined by what its elements areβ€”it is irrelevant whether the elements are in order, or whether an element is listed more than once.

Axiom of Specification

The axiom of specification, also referred to as Aussonderungsaxiom, provides the following:

axiom of specification. To every set A{A} and to every condition S(x),{S(x),} there exists a set B{B} whose elements are exactly the elements x{x} of A,{A,} for which S(x){S(x)} holds.

Set theorists introduced the axiom of specification to get around some awkward gaps philosophers noticed in the early 1900s. One such gap is Russell's Paradox, discussed in a separate chapter. In essence, without the axiom of specification, we get the conclusion that nothing contains everything.

While we could simply accept this as a Kōan, it causes enough discomfort to warrant an axiom. The axiom of specification, in short, establishes that there exists a set we can specify (e.g., tailor) to a set we desire.

A set that's "tailored" is said to be well-defined. We say that a set is well-defined if, for any given x,{x,} we can determine whether x{x} is a member of the set. For example, the set L={x∈R∣x>4}{L = \{x \in \reals \mid x > 4\}} is a well-defined set. Given any x,{x,} we can determine whether x{x} is a member of L.{L.} x{x} must be a real number, and it must be greater than 4. The set G={1,4,3,9,Ο€,…},{G = \{ 1, 4, 3, 9, \pi, \ldots \},} however, is not a well-defined set. Is 3.2{3.2} a member of G?{G?} We do not have enough conditions to make a determination.

Axiom of Infinity

We state the axiom of infinity as follows:

axiom of infinity. There exists a set containing 0{0} and containing the successor of each of its elements.

The axiom of infinity provides that there is at least one infinite set. This may not seem important or interesting at this point, but it proves to be extremely useful at a later juncture. Of note, the axiom of infinity is an issue in mathematics subject to debate. The hot button is whether the axiom of infinity is necessary.

Set Notation

To help make our future discussions more efficient, let's agree on some basic notation and terminology. First, the notion of logical identity.

logic identity. The expression

a=b \large a = b

means: a{a} and b{b} are symbols for the same object. If a{a} and b{b} are different objects, we write:

a≠b \large a \neq b

Sets can be expressed in a variety of ways:

  • "The set of all integers whose square is between, and includes, one and nine."
  • A={x∈Z:x2≀9}{A = \{ x \in \mathbb{Z} : x^2 \leq 9 \}}
  • B={x∈Z:∣xβˆ£β‰€3}{B = \{ x \in \mathbb{Z} : \lvert x \rvert \leq 3 \}}
  • C={βˆ’3,βˆ’2,βˆ’1,0,1,2,3}{C = \{ -3, -2, -1, 0, 1, 2, 3 \}}

Let's go over these approaches. We denote the notion of set membership with the symbol ∈.{\in.} This is a variant of the lowercase epsilon (Ο΅{\epsilon}), which is the first letter of the Greek word αΌΟƒΟ„ΞΉΛŠ,{ἐστί,} meaning "is."

set membership. Let A{A} be a set. The notation

a∈A a \in A

means: a{a} is an element of A.{A.} If a{a} is not an element of A,{A,} we write:

aβˆ‰A a \notin A

A set may be made more explicit through set roster notation. For instance, {0,1,2}\{ 0, 1, 2 \} is a set containing the elements 0, 1, and 2. If the set has too many elements to list, ellipses may be used. For example, the set of all integers from 0 to 100 may be written as: {0,1,2,…,100}\{ 0, 1, 2, \ldots , 100 \}. Likewise, the set of all positive integers may be written as {1,2,3,…}\{ 1, 2, 3, \ldots \}.

We can also specify sets in set builder notation. Suppose that SS is a set, and P(x)P(x) is a property that elements of SS may or may not satisfy. We can define a new set that contains all the elements of SS such that P(x)P(x) is true:

{x∈S∣P(x)} \{ x \in S \mid P(x) \}

The pipe character, |, is shorthand for "such that." Thus, above notation refers to all the elements of S{S} with the property P(x)P(x). Note that in some mathematical contexts, the phrase "such that" is often abbreviated "s.t." or βˆ‹\ni. Thus, the above set may appear in some texts as:

{x∈Sβˆ‹P(x)},Β or{x∈SΒ s.t.Β P(x)} \{ x \in S \ni P(x) \}, \space \text{or} \\[1em] \{ x \in S \text{ s.t. } P(x) \}

Subsets

Some sets are themselves elements of another set. These sets are called subsets.2 For example, the set of all Herefords is a subset of the set of all cows, and the set of all bonobos is a subset of the set of all great apes. More formally:

subset. Suppose A{A} and B{B} are sets. The set A{A} is a subset of B{B} if, and only if, every element of A{A} is also an element of B.{B.} To denote this relationship, we write:

AβŠ†B A \subseteq B

If AA is not a subset of BB, then we write:

A⊈B A \nsubseteq B

If AβŠ†B{A \subseteq B} is true, then we can infer: For every element x,{x,} if x∈A,{x \in A,} then x∈B.{x \in B.} We describe A{A} and Bβ€²s{B's} relationship with statements such as "A{A} is contained in BB" and "B{B} contains A.{A.}"

AβŠ†Bβ‡”βˆ€x(x∈Aβ‡’x∈B) A \subseteq B \iff \forall x(x \in A \nc x \in B)

If A⊈BA \nsubseteq B is true, then we can infer: There is at least one element xx such that x∈Ax \in A and xβˆ‰Bx \notin B. In other words, if AA is not a subset of BB, then there is at least one element in AA that is not an element of B.{B.}

From the definition above, if we are asked to prove that A{A} is a subset of B,{B,} we must show that if x{x} belongs to A,{A,} then x{x} also belongs to B.{B.} If we are asked to prove that A{A} is not a subset of B,{B,} we must find a single x{x} that belongs to A{A} but does not belong to B.{B.}

The definition above implies that the empty set is a subset of all sets, and a given set is a subset of itself. In other words, for the set A,{A,} the sets βˆ…{\varnothing} and A{A} are subsets of A.{A.} We say that A{A} and βˆ…{\varnothing} are trivial subsets of A.{A.}

This follows directly from the definition. The proposition βˆ…βŠ†A{\varnothing \subseteq A} if, for all xβˆˆβˆ…,{x \in \varnothing,} x∈A.{x \in A.} Because the sufficient condition, xβˆˆβˆ…{x \in \varnothing} is false, it follows that x∈A{x \in A} is true. This is an example of a vacuous proof.

The case of AβŠ†A{A \subseteq A} straightforward. Given that A{A} and A{A} are the same sets, every x∈A{x \in A} implies that x∈A.{x \in A.} Because the sufficient condition is true and the necessary condition is true, it follows that AβŠ†A{A \subseteq A} by definition.

Proper Subsets

If a subset B{B} of A{A} is such that Bβ‰ A{B \neq A} and Bβ‰ βˆ…,{B \neq \varnothing,} then we say that B{B} is called a proper subset of A.{A.} For example, the set of all potatoes is a subset of all root vegetables. It certainly isn't emptyβ€”you've got Yukon Golds, Russet potatoes, Japanese sweet potatoes, LaRette potatoes, and so on. But it also doesn't comprise the entire set of all root vegetables either, because there are other root vegetables: taro, yams, tapioca, turmeric, ginseng, ginger, beets, and so on. Thus, we say that, "Potatoes are a proper subset of root vegetables," and write: taroβŠ‚rootΒ vegetables.{\text{taro} \subset \text{root vegetables}.}

AβŠ‚B⇔[βˆ€x(x∈Aβ‡’x∈B)βˆ§βˆƒx(x∈B∧xβˆ‰A)] A \subset B \iff [\forall x(x \in A \nc x \in B) \land \exists x (x \in B \land x \notin A)]

A subset is a general concept. When we say that A{A} is a "subset" of B,{B,} we allow the possibility of A{A} and B{B} being equal. For example, the set of all aardvarks is a subset of all Orycteropodidae, and the set of all Orycteropodidae is a subset of all Tubulidentata. However, aardvarks comprise all the members of Orycteropodidae, and Orycteropodidae comprise all the members of Tubulidentata. Thus, these sets are all equal, but are also subsets.3

Now, if some extinct species of Orycteropodidae comes back to life or some new species is discovered, then the aardvarks would not comprise all of Orycteropodidae. In that situation, aardvarks are no longer just a subset of Orycteropodidae. We can still refer to aardvarks as a subset of Orycteropodidae, but we are now also permitted to more specifically say that aardvarks are a strict subset (or proper subset) of Orycteropodidae.

strict subset. Suppose A{A} and B{B} are sets. A{A} is a proper subset of B{B} if, and only if, every element of A{A} is in B,{B,} but there is at least one element in BB that is not in AA. If AA is a proper subset of BB, we write:

AβŠ‚B A \subset B

If AβŠ‚B{A \subset B} is true, we can infer: All of the elements of A{A} are elements of BB, but there is at least one element of B{B} that is not an element of A.{A.} We can also infer that all the elements of A{A} have some property in common that separate it from other subsets of B.{B.}

A helpful way to distinguish between the two symbols is noticing how they share similarities to the symbols ≀{\leq} and <.{<.} βŠ†{\subseteq } means "subset or equal" and βŠ‚{\subset} means "subset but not equal;" the former is more general than the latter.

If AβŠ‚BA \subset B is false (i.e., AA is not a proper subset of BB), we write:

AβŠ‚ΜΈB A \not\subset B

If AβŠ‚ΜΈBA \not\subset B is true, then either AβŠ†ΜΈBA \not\subseteq B is true, or AβŠ†BA \subseteq B is true, but no elements in BB are not in AA.

The Empty Set

Some sets have no members. For example, the set of all positive integers greater than their squares is the empty set. If there is even a single element in the set, then the set is not the empty set. Such a set (a set with a single member) is called a singleton.

Importantly, we shouldn't confuse the lack of an element with the lack of a subset. The empty set does have a subsetβ€”the empty set. But the fact that it has a subset does not imply that it has an element. We will see why this is the case shortly.

The empty set is both an interesting and useful concept to have. Proferred by George Boole, the empty set embodies the concept of nothingness. Nothingness is a difficult concept to think about, but as with many things in mathematics, the idea is encapsulatedβ€”abstracted awayβ€”into a single symbol: βˆ….{\varnothing.} The abstraction allows us to reason about nothingness differently. Usually, when we think of filling an empty pint with beer, we tend to think that we are somehow negating the glass's emptiness; sort of "removing" the nothingness inside the pint. βˆ…,{\varnothing,} however, is a member of every set except itself. We cannot remove nothingness from the set of all natural numbersβ€”it's always there.

The empty set is a very useful notion, but it can also be a footgun if we don't use it carefully. To prevent fiascos, we will always denote the empty set with the null symbol: βˆ….{\varnothing.} At no point do we ever write:

{Β Β } \{~~\}

This is equivalent to a spelling mistake in mathematics. Second, the set containing an empty set is not the same as the empty set:

βˆ…β‰ {βˆ…} \varnothing \neq \{ \varnothing \}

Once more, these are two very different things. One is an actual object (βˆ…{\varnothing}), the other is a box containing a single object ({βˆ…}{\{ \varnothing \}}). The empty set can be thought of as representing an empty folder. If we place an empty folder A{A} inside an empty folder B,{B,} then the folder A{A} is no longer empty: It contains a folder. The distinction between elements and subsets is a critical distinction.

Vacuous Truth

The empty set offers an opportunity to revisit the notion of vacuous truth. Here's the question: Suppose we had a set A.{A.} Is the empty set a subset of A?{A?} The tempting answer is "It depends. What's in A?{A?}" Unfortunately, the temptation is wrongβ€”it does not depend. Recall the definition of a subset:

BβŠ†AΒ β‡”Β βˆ€x(x∈Bβ‡’x∈A) B \subseteq A \space \iff \space \forall x(x \in B \nc x \in A)

The key point to consider is the condition x∈B.{x \in B.} Now substitute B{B} with βˆ….{\varnothing.} Is the statement xβˆˆβˆ…{x \in \varnothing} true? Of course not. The empty set is emptyβ€”there's nothing in it. This means that the sufficient condition for the definition of a subset is always false when we consider the empty set as a subset. And what happens when a sufficient condition is false? The conditional proposition is always true! This is a vacuous truth: The empty set is a subset of A.{A.} In fact, the empty set is a subset of every set, including itself (since the condition is still false if we substitute A{A} with βˆ…{\varnothing}).

The notion of vacuous truth may seem strange, but it follows directly from logic. Consider the negation of the definition for a subset:

B⊈AΒ β‡”Β βˆƒx(x∈B∧xβˆ‰A) B \nsubseteq A \space \iff \space \exists x(x \in B \land x \notin A)

In other words, B{B} is not a subset of A{A} if there's an x{x} in A{A} that's not in B.{B.} We know there's nothing in the empty set, so there can never be an x{x} in B{B} that's not in A.{A.} There are no xs{xs} to begin with.

This discussion leads to some helpful points regarding proofs concerning sets:

  1. To prove that AβŠ†B,{A \subseteq B,} show that A{A} and B{B} are just trenchcoats: If x{x} is inside A,{A,} then x{x} is also inside B.{B.}

  2. To prove that A⊈B,{A \nsubseteq B,} find a culprit: There's at least one x{x} inside A{A} that's not inside B.{B.}

If we think a little more carefully about the definition for subsets, we'd realize that this whole idea of the empty set being a subset of itself extends to a more general conclusion:

theorem. For every set S:{S:}

βˆ…βŠ†SΒ Β andSβŠ†S \begin{aligned} &\varnothing \subseteq S ~~\text{and} &S \subseteq S \end{aligned}

Why is this true? Well, we know that since βˆ…{\varnothing} has no members, the sufficient condition for the definition of a subset is always false, so it follows that βˆ…βŠ†S{\varnothing \subseteq S} is always true. Next, by the law of identity, every statement implies itself. Thus, x∈Sβ‡’x∈S.{x \in S \nc x \in S.} This implies that every element of S{S} is an element of S.{S.} And since every element of S{S} is an element of S,{S,} it follows that SβŠ†S.{S \subseteq S.}

Set Identity

Consider the following sets:

A={1,2,3}B={3,2,1}C={2,1,3} A = \{ 1, 2, 3 \}\\ B = \{ 3, 2, 1 \}\\ C = \{ 2, 1, 3 \}

By the axiom of extension, A,{A,} B,{B,} and C{C} all have the same elements. Observing this, we have the following definition:

set identity. Two sets A{A} and B{B} are identical if, and only if, every element of A{A} an element of B,{B,} and every element of B{B} is an element of A.{A.}

A=Bβ‡”βˆ€x(x∈A⇔x∈B) A = B \iff \forall x(x \in A \iff x \in B)

From the definition above, given to sets A{A} and B,{B,} to prove that A{A} is equal to B,{B,} we prove that AβŠ†B{A \subseteq B} and BβŠ†A.{B \subseteq A.}

Cardinality

Suppose we have the following set, called A:{A:}

{a,b,c,d} \{ a, b, c, d \}

How many elements are in this set? There are 4. The number of elements in a set is called the set's cardinality. The term cardinality is derived from the term cardinal number (a number used for counting, rather than ordering). Cardinality plays a special role in both mathematics and programming. For example, in computer science, an uncountable function is a function where no computer program can be written to find all its values. In other words, there are some functions that we, as programmers, cannot write simply because the cardinality of the function's set of outputs is either too large to count or cannot be counted at all.

cardinality. Given a set A,{A,} if there are exactly m{m} elements in A,{A,} where m∈N,{m \in \nat,} then A{A} is a finite set with a cardinality of m.{m.} We denote this fact with:

n(A)=m n(A) = m

The notation n(A){n(A)} is not the only one way to denote cardinality. Some texts denote cardinality with ∣A∣{\lvert A \rvert } and card(A).{\text{card}(A) .} We use n(A),{n(A),} but will switch notations as necessary for clarity. Note that when analyzing cardinality, the axiom of extension applies. The set A={1,1,2}{A = \{ 1, 1, 2 \}} and B={1,2}{B = \{ 1, 2 \}} are the same sets. Thus, both A{A} and B{B} have a cardinality of 2 (i.e., n(A)=n(B)=2.{n(A) = n(B) = 2.})

Another useful fact when handling cardinality: The empty set is the only set with a cardinality of 0:

cardinality of the null. Given a set A,{A,} if n(A)=0,{n(A) = 0,} then A{A} is the empty set, βˆ….{\varnothing.}

Further note that because sets denote the number of elements in a set, for our purposes, we follow the axiom that cardinality can never be negative.4 Because we're discussing set algebra, we are careful to state this axiom explicitly:

positivity of cardinality. Given a set A,{A,} n(A)β‰₯0.{n(A) \geq 0.}

One-to-One Correspondence

When Oliver Twist asked for more gruel, the master grew pale and aimed a blow at Oliver's head. Why? Because at meal time, each child was to receive one, and only one, serving of gruel. Suppose each boy is a member of the set workers,{\text{workers},} and each serving of gruel is a member of the set servings.{\text{servings}.} Then, each element of workers{\text{workers}} gets one, and only one, element of servings.{\text{servings}.} In mathematics, we call this one-to-one correspondence.

one-to-one correspondence. Let A={a1,a2,…,an}{A = \{ a_1, a_2, \ldots, a_n \}} and B={b1,b2,…,bn}{B = \{ b_1, b_2, \ldots, b_n \}} be sets.

A{A} and B{B} are in one-to-one correspondence if there exists a pairing of the elements of A{A} to the elements of B,{B,} such that each a∈A{a \in A} corresponds to one, and only one, b∈B,{b \in B,} and each b∈B{b \in B} corresponds to one, and only one, a∈A.{a \in A.}

Equinumerosity

When a set A{A} and B{B} have the same cardinality, we say that A{A} and B{B} are equinumerous. As we'll see in later chapters, know whether sets are equinumerous is a powerful fact utilized in not just set theory, but many other areas of mathematics.

equinumerosity. Let A{A} and B{B} be sets. A{A} and B{B} have the same cardinality if, and only if, there is a one-to-one correspondence from A{A} to B.{B.} If A{A} and B{B} have the same cardinality, we say that A{A} and B{B} are equinumerous, and write

n(A)=n(B). n(A) = n(B).

Without going into the details now, we can compare the cardinalities of sets with the classical comparison operators. For example, when we write n(A)<n(B){n(A) < n(B)}, we are stating, "Set A{A} is smaller than set B.{B.}" When we write n(A)β‰₯n(B),{n(A) \geq n(B),} we are stating, "Set A{A} is smaller or the same size as set B.{B.}"

Countability

Careful thought into sets reveals that there are some sets we can't count. For example, intuitively, we might think that because there are infinitely many integers, there are infinitely many odd positive integers, so we simply can't count all of the odd positive integers. This intuition, however, is wrong. Why? Because mathematics has a very strict definition of "countable":

countability. A set S{S} is countable if, and only if:

  1. S{S} is finite, or
  2. n(S)=n(Z+).{n(S) = n(\uint^{+}).}

Otherwise, S{S} is uncountable.

If S{S} is an infinite set and countable, we denote the cardinality of S{S} by writing n(S)=β„΅0,{n(S) = \alef_0,} and say "S{S} has cardinality aleph null."

Based on this definition, we can see that the set of odd positive integers, Zodd,{\Z_{\text{odd}},} is a countable set. Why? Consider the function f(n)=2nβˆ’1,{f(n) = 2n - 1,} where n∈Z+.{n \in \uint^{+}.} This function maps the set of positive integers to the set of odd numbers. Now, recall the definition for when two sets are considered equal. They are equal iff there is a one-to-one correspondence between Z+{\uint^{+}} and Zodd.{\Z_{\text{odd}}.} Two sets have one-to-one correspondence if they are both (a) one-to-one and (b) onto.

The first requirement, (a), is satisfied. Suppose that f(n)=f(m).{f(n) = f(m).} From this assumption, it follows that 2nβˆ’1=2mβˆ’1.{2n - 1 = 2m - 1.} It then follows that n=m.{n = m.} This proves that the set is onto.

The second requirement, (b), is satisfied. Let's say there's some odd positive integer s.{s.} Since s{s} is an odd positive integer, it is a positive integer of the form 2kβˆ’1,{2k - 1,} where k∈Z+.{k \in \uint^{+}.} This in turn means that s{s} will always be less than an even positive integer 2k.{2k.} As such, it follows that s=2kβˆ’1=f(k).{s = 2k - 1 = f(k).} And given this fact, no s,{s,} an odd positive integer, can map to even integer. It follows then that the odd positive integers will always map to the positive integers.

Satisfying both (a) and (b), the function f{f} is a one-to-one correspondence from Z+{\uint^{+}} to Zodd.{\Z_{\text{odd}}.} And because it is of one-to-one correspondence, it follows that n(Zodd)=n(Z+).{n(\Z_{\text{odd}}) = n(\uint^{+}).} This satisfies the definition of countability aboveβ€”the set of odd positive integers is countable.

Set Union

Suppose there are two sets, AA and BB. The union of AA and BB, denoted AβˆͺB,{A \cup B,} is the set of all elements of both AA and BB. Visually:

The union of A and B

Venn diagrams are named after the English mathematician John Venn, who introduced their usage in 1881. More formally:

set union. Given sets A{A} and B,{B,} AβˆͺB{A \cup B} is the set of all elements in either A,{A,} B,{B,} or both A{A} and B.{B.}

Big Union Operator

In some cases, we want to express the notion of a union of many sets. For example, suppose we had the sets:

A1={ a1,a2,a3 } A_1 = \set{a_1, a_2, a_3}
A2={ a4,a5,a6 } A_2 = \set{a_4, a_5, a_6}
A3={ a7,a8,a9 } A_3 = \set{a_7, a_8, a_9}

We could express the union of all three of these sets by writing:

A1βˆͺA2βˆͺA3 A_1 \cup A_2 \cup A_3

However, we can also communicate the same idea by writing:

⋃i=1nAi \bigcup\limits_{i=1}^{n} A_i

The big "U" is is colloquially called the "big union" or "big cup" (from its corresponding LaTeX command, \bigcup).

big union. Let A1,A2,…,An{A_1, A_2, \ldots, A_n} be sets. The union of these sets is denoted:

⋃i=1nAi=A1βˆͺA2βˆͺ…βˆͺAn \large \bigcup\limits_{i = 1}^{n} A_i = A_1 \cup A_2 \cup \ldots \cup A_n

Cardinality of Unions

Working with set theory, knowing the size of a union is tremendously useful. However, we must be careful when counting the elements. Because AβˆͺB{A \cup B} consists of all the elements in A,{A,} B,{B,} and the elements in both A{A} and B,{B,} the elements in both A{A} and B{B} are counted twice. Accordingly, we must subtract the intersection of A{A} and B{B} to retrieve the correct cardinality. This is called the principle of inclusion-exclusion:

principle of inclusion-exclusion. Given AβˆͺB,{A \cup B,}

n(AβˆͺB)=n(A)+n(B)βˆ’n(A∩B) n(A \cup B) = n(A) + n(B) - n(A \cap B)

Set Intersection

In the Venn diagram below, the grey region is called the set intersection.

The intersection of A and B

Here is the definition of intersection:

intersection. Let A{A} and B{B} be sets. The intersection of A{A} and B,{B,} denoted

A∩B, A \cap B,

is set of elements that are members of A{A} and members of B.{B.} That is, if

x∈A∩B, x \in A \cap B,

then x∈A{x \in A} and x∈B.{x \in B.}

This is a deceptively simple definition. For example, { 1,2,3 }∩{ 2,3,4 }{\set{1,2,3} \cap \set{2,3,4}} very clearly yields the intersection {2,3}.{\{ 2, 3 \}.} But here's a slighly more devilish one:

{ 1,2,3 }∩{ 3,4,5 }. \set{1,2,3} \cap \set{3,4,5}.

It's very tempting to say the intersection here is 3. The correct answer, however, is

{ 3 } \set{3}

The slip is forgetting the fact that the intersection operation always returns a set. As an aside, because of how long the word "intersection" is, the symbol ∩{\cap} is often read "cap" (again from its corresponding LaTeX command, \cap). For example, the expression

A∩B A \cap B

is often read "A{A} cap B.{B.}"

Big Intersection

Like the union operator, we have some shortcut notation for taking many intersections (the "big cap" operator).

big intersection. Let A1,A2,…,An{A_1, A_2, \ldots, A_n} be sets. The intersection of these sets may be denoted as:

β‹‚i=1nAi=A1∩A2βˆ©β€¦βˆ©An. \large \bigcap\limits_{i = 1}^{n} A_i = A_1 \cap A_2 \cap \ldots \cap A_n.

Cardinalities of Intersections and Unions

Suppose we had the following sets A{A} and B:{B:}

A={2,4,5,6,10,11,14,22}B={1,2,3,5,7,8,11,12,13} \begin{aligned} A &= \{ 2, 4, 5, 6, 10, 11, 14, 22 \} \\ B &= \{ 1, 2, 3, 5, 7, 8, 11, 12, 13 \} \end{aligned}

As a Venn diagram, sets A{A} and B{B} are visualized as such:

An explicit intersection

We see that the union of A{A} and B{B} is:

AβˆͺB={5,2,11} A \cup B = \{ 5, 2, 11 \}

The cardinalities of the sets and the union:

n(A)=8n(B)=9n(AβˆͺB)=14n(A∩B)=3 \begin{aligned} n(A) &= 8 \\ n(B) &= 9 \\ n(A \cup B) &= 14 \\ n(A \cap B) &= 3 \end{aligned}

Notice that the cardinality of the union is not simply n(A)+n(B).{n(A) + n(B).} This is because simply adding n(A){n(A)} and n(B){n(B)} results in counting the elements in the intersection twice. Accordingly, to compute the cardinality of AβˆͺB,{A \cup B,} we must subtract A∩B.{A \cap B.} This yields the following formula:

lemma. Let A{A} and B{B} be non-empty, finite sets. The cardinality of AβˆͺB{A \cup B} is given by the formula:

n(AβˆͺB)=n(A)+n(B)βˆ’n(A∩B) n(A \cup B) = n(A) + n(B) - n(A \cap B)

From the above formula, we can derive a second formula for the cardinality of the intersection:

lemma. Let A{A} and B{B} be non-empty, finite sets. The cardinality of A∩B{A \cap B} is given by the formula:

n(A∩B)=n(A)+n(B)βˆ’n(AβˆͺB) n(A \cap B) = n(A) + n(B) - n(A \cup B)

Disjoint Sets

Some sets have no elements in common, and we call them disjoint. For example, the two sets below are disjoint:

Disjoint sets

Here's an explicit definition:

disjoint sets. Let A{A} and B{B} be sets. If

A∩B=βˆ…, A \cap B = \nil,

then A{A} and B{B} are said to be disjoint. That is, A{A} and B{B} have no elements in common.

Disjoint Union

Say we had the following sets:

A={ a,b,c }B={ 3,5,7 }. \eqs{ A &= \set{a,b,c} \\ B &= \set{3,5,7}. }

The sets A{A} and B{B} have nothing in common. I.e.,

A∩B=βˆ… A \cap B = \nil

What if we want to express the set

{ a,b,c,3,5,7 } \set{a,b,c,3,5,7}

while maintaining the fact that A{A} and B{B} are disjoint? The notation AβˆͺB{A \cup B} doesn't tell us anything about whether A{A} and B{B} are disjoint. Fortunately, we have a special symbol for this, called the disjoint union:

AβŠ”B A \sqcup B

This is simply the union operator, but with the added restriction that its operands A{A} and B{B} must be disjoint.

Set Difference

Let AA and BB both be sets. The difference of AA and BB, denoted Aβˆ–B{A \setminus B} (read "AA set minus BB) is the set of all elements in AA and not in B.B. In other words, Aβˆ–B={x:(x∈A)∧(xβˆ‰B)}.{A \setminus B = \{ x : (x \in A) \land (x \notin B) \}.}

The difference of A and B

More formally:

definition: set difference. Given sets A{A} and B,{B,} > Aβˆ–B{A \setminus B} is the set containing all the elements in A{A} that are not contained in B.{B.}

We say that Aβˆ–B{A \setminus B} is the complement of B{B} with respect to A.{A.}

Complements

The complement of a set S{S} more generally refers to the set of all elements not contained in S.{S.} If we have a defined universal set U{U} and AβŠ‚U,{A \subset U,} then the complement of A{A} is the set of all elements in U{U} that are not inside A.{A.}

definition: complement. Suppose U{U} is the universal set. The complement of the set A,{A,} denoted Aβ€Ύ,{\overline{\rm A},} is the complement of A{A} with respect to U.{U.} Hence:

Aβ€Ύ=Uβˆ–A \overline{\rm A} = U \setminus A

Or, alternatively:

Aβ€Ύ=Uβˆ’A \overline{\rm A} = U - A

Set Identities

Knowing the set operations, it's often helpful to know several set identities by heart to quickly perform deductions. These identities are presented below:

NameIdentity
Identity Law 1A∩U=A{A \cap U = A}
Identity Law 2Aβˆͺβˆ…=A{A \cup \varnothing = A}
Domination Law 1AβˆͺU=U{A \cup U = U}
Domination Law 2Aβˆ©βˆ…=βˆ…{A \cap \varnothing = \varnothing}
Indempotent Law 1AβˆͺA=A{A \cup A = A}
Indempotent Law 1A∩A=A{A \cap A = A}
Complementation Law(Aβ€Ύ)β€Ύ=A{\overline{\rm (\overline{\rm A})} = A}
Commutative Law 1AβˆͺB=BβˆͺA{A \cup B = B \cup A}
Commutative Law 2A∩B=B∩A{A \cap B = B \cap A}
Associative Law 1Aβˆͺ(BβˆͺC)=(AβˆͺB)βˆͺC{A \cup (B \cup C) = (A \cup B) \cup C}
Associative Law 2A∩(B∩C)=(A∩B)∩C{A \cap (B \cap C) = (A \cap B) \cap C}
Distributive Law 1Aβˆͺ(B∩C)=(AβˆͺB)∩(AβˆͺC){A \cup (B \cap C) = (A \cup B) \cap (A \cup C)}
Distributive Law 2A∩(BβˆͺC)=(A∩B)βˆͺ(A∩C){A \cap (B \cup C) = (A \cap B) \cup (A \cap C)}
De Morgan's Law 1A∩Bβ€Ύ=Aβ€ΎβˆͺBβ€Ύ{\overline{\rm A \cap B} = \overline{\rm A} \cup \overline{\rm B}}
De Morgan's Law 2AβˆͺBβ€Ύ=Aβ€Ύβˆ©Bβ€Ύ{\overline{\rm A \cup B} = \overline{\rm A} \cap \overline{\rm B}}
Absorption Law 1Aβˆͺ(A∩B)=A{A \cup (A \cap B) = A}
Absorption Law 2A∩(AβˆͺB)=A{A \cap (A \cup B) = A}
Complement Law 1AβˆͺAβ€Ύ=U{A \cup \overline{\rm A} = U}
Complement Law 2A∩Aβ€Ύ=βˆ…{A \cap \overline{\rm A} = \varnothing}

Symmetric Difference

The symmetric difference between two sets A{A} and B{B} is defined as:

AΞ”B=(Aβˆ–B)βˆͺ(Bβˆ–A) A \Delta B = (A \setminus B) \cup (B \setminus A)

That is to say, the symmetric difference of sets A{A} and B{B} is the set made up of all the elements which are in A{A} or B{B} but not both. We can think of this as akin to the "exclusive or."

The symmetric difference has the following properties:

property iAΞ”B=BΞ”A{A \Delta B = B \Delta A}
property iiAΞ”(BΞ”C)=(AΞ”B)Ξ”C{A \Delta (B \Delta C) = (A \Delta B) \Delta C}
property iiiAΞ”βˆ…=A{A \Delta \varnothing = A}
property ivAΞ”A=βˆ…{A \Delta A = \varnothing}
property vAΞ”Aβ€²=U{A \Delta A' = \mathbb{U}}

Power Sets

A mathematician requested a VISA to enter the United States with his family (him, his wife, and his son). The embassy replied, "Please submit passport photos of your family." Unsure whether multiple persons were supposed to be in each photo, the mathematician took one for every combination. Each on their own, him and his wife, him and his son, his wife and his son, etc. Photos taken, the mathematician returned to the embassy.

The clerk was dumbfounded. After several minutes she said, "There's no one in this photo."

"Yes. That is a photo of the empty set."

This amusing exchange illustrates the notion of a power set. Consider the set B={0,1},{B = \{ 0, 1 \},} the set of binary digits. Using our definition of subsets, what are all the different possible subsets of B?{B?} We can lay them out:

βˆ… \varnothing
{ 0 } \set{0}
{ 1 } \set{1}
{ 0,1 } \set{0,1}

There are four different possible subsets. Suppose we place all these possible subsets in an entirely new set:

{βˆ…,{0},{1},{0,1}} \{ \varnothing, \{ 0 \}, \{ 1 \}, \{ 0, 1 \} \}

We call the set above the power set of B,{B,} and denote as:

P(B)={βˆ…,{0},{1},{0,1}} \mathcal{P}(B) = \{ \varnothing, \{ 0 \}, \{ 1 \}, \{ 0, 1 \} \}

The symbol P{\mathcal{P}} is used in these notes, but other symbols are used throughout mathematics: P,P,β„˜,{\mathscr{P}, \mathbb{P}, \wp,} and a few others. Defining the power set more formally:

power set. Given a set S,{S,} the power set of S{S} is the set of all subsets of the set S.{S.} The power set of S{S} is denoted P(S).{\mathcal{P}(S).}

One peculiar application of the definition above is with the empty set. What is the size of the power set of P(βˆ…)?{\mathcal{P}(\varnothing)?} It is 1, since the only subset of βˆ…{\varnothing} is {βˆ…}.{\{\varnothing\}.} Next, what is the size of the power set of {βˆ…}?{ \{ \varnothing \}?} It is 2, since P({βˆ…})={βˆ…,{βˆ…}}.{\mathcal{P}(\{ \varnothing \}) = \{ \varnothing, \{ \varnothing \} \}.} If we continue this pattern:

n(P(βˆ…))=1n(P(P(βˆ…)))=2n(P(P(P(βˆ…))))=3n(P(P(P(P(βˆ…)))))=4n(P(P(P(P(P(βˆ…))))))=5n(P(P(P(P(P(P(βˆ…)))))))=6n(P(P(P(P(P(P(P(βˆ…))))))))=7n(P(P(P(P(P(P(P(P(βˆ…)))))))))=8n(P(P(P(P(P(P(P(P(P(βˆ…))))))))))=9n(P(P(P(P(P(P(P(P(P(P(βˆ…)))))))))))=10 \begin{aligned} &n(\mathcal{P}(\varnothing)) = 1 \\ &n(\mathcal{P}(\mathcal{P}(\varnothing))) = 2 \\ &n(\mathcal{P}(\mathcal{P}(\mathcal{P}(\varnothing)))) = 3 \\ &n(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\varnothing))))) = 4 \\ &n(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\varnothing)))))) = 5 \\ &n(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\varnothing))))))) = 6 \\ &n(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\varnothing)))))))) = 7 \\ &n(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\varnothing))))))))) = 8 \\ &n(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\varnothing)))))))))) = 9 \\ &n(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\mathcal{P}(\varnothing))))))))))) = 10 \\ \end{aligned}

The pattern above yields to a direct corollary (as well as several other ideas we will explore in the sections on number theory):

corollary. If as set A{A} has n{n} elements, where n∈N,{n \in \nat,} then P(A)=2n.{\mathcal{P}(A) = 2^n.}

The proof of this corollary: Let A{A} be a set. For every subset of A,{A,} there are two possibilities for each element x∈A:{x \in A:} Either (1) x{x} is in the subset, or x{x} is not in the subset. Therefore, it follows that for n{n} elements, there are 2n{2^n} possibilities in making a subset of A.{A.} From the definition of the powerset, it follows that the number of subsets of A{A} is 2n.{2^n.}

Big Unions & Intersections

At this point, we have a much better understanding of basic set theory. We can now introduce the generalized forms of unions and intersections. Because sets comply with the laws of associativity, the sets AβˆͺBβˆͺC{A \cup B \cup C} and A∩B∩C{A \cap B \cap C} are unambiguous. In other words, we don't need parentheses to communicate what we mean. AβˆͺBβˆͺC{A \cup B \cup C} is the same set as (AβˆͺB)βˆͺC{(A \cup B) \cup C} which is the same set as Aβˆͺ(BβˆͺC).{A \cup (B \cup C).} The same goes for A∩B∩C.{A \cap B \cap C.}

For example, suppose A={1,2},{A = \{ 1, 2 \},} B={1,4},{B = \{ 1, 4 \},} and C={1,7}.{C = \{ 1, 7 \}.} Then AβˆͺBβˆͺC={1,2,4,7},{A \cup B \cup C = \{ 1, 2, 4, 7 \},} and A∩B∩C={1}.{A \cap B \cap C = \{ 1 \}.} The set AβˆͺBβˆͺC{A \cup B \cup C} is the set containing all the elements that occur in at least one of A,{A,} B,{B,} and C.{C.} The set A∩B∩C{A \cap B \cap C} contains all the elements in all three of A,{A,} B,{B,} and C.{C.} We can extend this idea to any n{n} number of sets:

From the definition above, it follows that the notation ⋃i=1nAi{\bigcup\limits_{i = 1}^{n} A_i} represents a set. Accordingly, when we write xβˆˆβ‹ƒi=1nAi,{x \in \bigcup\limits_{i = 1}^{n} A_i,} we imply that x{x} is a member of at least one of A1,A2,…,An.{A_1, A_2, \ldots, A_n.} This idea also applies to intersections:

Special Number Sets

Certain number sets are used so frequently in mathematics that we denote them with symbols.

SymbolSet
R\mathbb{R}The set of all real numbers. E.g., {βˆ’2,0,1,Ο€,2,…}\{ -2, 0, 1, \pi, \sqrt{2}, \ldots \}
Rβˆ’\mathbb{R}^-The set of all negative real numbers. E.g., {βˆ’3,βˆ’1,βˆ’117,…}\{ - \sqrt{3}, -1, -117, \ldots \}. This set does not include 0.
R≀0{\R_{\leq 0}}The set of all nonpositive real numbers. This is the set of negative real numbers including 0.
R+\mathbb{R}^+The set of all positive real numbers. E.g., {2,Ο€,e,12,…}\{ 2, \pi, e, \frac{1}{2}, \ldots \}. This set does not include 0.
Rβ‰₯0{\R_{\geq 0}}The set of all nonnegative positive real numbers. This is the set of all positive real numbers including 0.
Q\mathbb{Q}The set of all rational numbers. These are numbers that can be expressed as ab\frac{a}{b}, where aa and bb are integers. E.g., {3,0,βˆ’2,0.75,…}\{ 3, 0, -2, 0.75, \ldots \}.
I\mathbb{I}The set of all irrational numbers. This is the set of all numbers that are not rational numbers. E.g., {βˆ’2,Ο€,Ο•,e,…}\{ - \sqrt{2}, \pi, \phi, e, \ldots \}.
Z\mathbb{Z}The set of all integers. This is the set of what we refer to as the counting numbers, and their negative counterparts. E.g., {β€¦βˆ’3,βˆ’2,βˆ’1,0,1,2,3,…}\{ \ldots -3, -2, -1, 0, 1, 2, 3, \ldots \}.
Zβˆ’\mathbb{Z}^-The set of all negative integers. This is a subset of Z\mathbb{Z}. It consists of all the negative integers. E.g., {βˆ’1,βˆ’2,βˆ’3,…}\{ -1, -2, -3, \ldots \}. This set does not include 0.
Z+\mathbb{Z}^+The set of all positive integers. Another subset of Z\mathbb{Z}. It consists of all the positive integers. E.g., {1,2,3,4,…}\{ 1, 2, 3, 4, \ldots \}. This set does not include 0.
NE{\N_{\mathcal{E}}}The set of all even numbers. This is the set of all integers that can be written in the form 2k2k, where kk is an integer. E.g., {0,2,4,6,8,10}\{ 0, 2, 4, 6, 8, 10 \}.
NO{\N_{\mathcal{O}}}The set of all odd numbers. This is the set of all integers that can be written in the form 2k+12k + 1, where kk is an integer. E.g., {1,3,5,7,9,…}\{ 1, 3, 5, 7, 9, \ldots \}
N\mathbb{N}The set of all natural numbers. This is the set of all counting numbers (equivalent to the set of positive integers). E.g., {1,2,3,4,…}\{ 1, 2, 3, 4, \ldots \}.
P\mathbb{P}The set of all prime numbers. E.g., {2,3,5,7,…}\{ 2, 3, 5, 7, \ldots \}.

Footnotes

  1. When Cantor first introduced set theory, the math community largely ridiculed him. Over time, however, the theory gained big-name mathematicians like David Hilbert. Nevertheless, the ridicule remained and affected Cantor deeply. Comments at the time captured the split: David Hilbert famously said, "No one will drive us from the paradise which Cantor created for us." To which Wittgensteinβ€”a philosopher and one of Hilbert's most formidable opponentsβ€”responded, "If one person can see it as a paradise of mathematicians, why should not another see it as a joke?" ↩

  2. A set consisting of only one member is called a singleton. ↩

  3. In biology, a taxon (an instance of a taxonomy level, e.g., kingdom, phylum, class, etc.) with only one superset is called monotypic. Aardvarks, the Albany pitcher plant, the hyacinth macaw, among others are all monotypic. ↩

  4. Negative cardinality is a concept explored in modern mathematics, but it is beyond the scope of these materials. ↩