1. Home
  2. Explore
  3. Mathematics
  4. Set Theory Foundations

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Set Theory Foundations

Sets and Basic Set Theory

Sets provide the language needed to describe collections of mathematical objects. In real analysis, the primary focus is on subsets of the real numbers, although the same ideas can apply to sets of other objects, such as functions.

Sets are especially important because the real numbers will later be defined through an axiomatic structure, and several of those axioms will be stated using sets.


1. Sets and Elements

A set is a collection of objects. The objects contained in a set are called its elements or members.

  • Sets are commonly denoted by uppercase letters such as AAA, BBB, or RRR.

  • Elements are commonly denoted by lowercase letters such as xxx, yyy, or zzz.

Membership notation

The statement that xxx is an element of AAA is written as

x∈A.x \in A.x∈A.

The symbol ∈\in∈ means “belongs to” or “is an element of.”

For example, if 333 belongs to a set AAA, then one writes

3∈A.3 \in A.3∈A.

The statement that xxx is not an element of AAA is written as

x∉A.x \notin A.x∈/A.

Membership and non-membership are related to the complement of a set. If xxx is not in AAA, then xxx belongs to the complement of AAA:

x∉A⟺x∈Ac.x \notin A \quad \Longleftrightarrow \quad x \in A^c.x∈/A⟺x∈Ac.

Here, AcA^cAc denotes everything in the relevant universe that is not in AAA.

The complement AcA^cAc consists of all objects under consideration that do not belong to AAA.

The meaning of a complement depends on the universal set, or the overall collection of objects being considered. In real analysis, the relevant universe is often R\mathbb{R}R.


2. Ways to Describe a Set

A set can be described in several ways. The most common methods are:

  1. Listing its elements.

  2. Describing a condition that determines membership.

  3. Giving a pattern or algebraic formula.

2.1 Listing the elements

A finite set can be written by listing its elements inside curly brackets:

A={π,e,1}.A = \{\pi,e,1\}.A={π,e,1}.

This set contains exactly three elements, so its cardinality is 333:

∣A∣=3.|A| = 3.∣A∣=3.

The order in which elements are listed does not matter. For example,

{π,e,1}={1,π,e}.\{\pi,e,1\} = \{1,\pi,e\}.{π,e,1}={1,π,e}.

Repeated elements are also not counted more than once. Thus,

{1,2,2,3}={1,2,3}.\{1,2,2,3\} = \{1,2,3\}.{1,2,2,3}={1,2,3}.

2.2 Describing a set with words

A set can also be specified by describing its members verbally. For example,

AAA is the set of all real numbers between 000 and 111, inclusive.

In interval notation, this set is written as

A=[0,1].A = [0,1].A=[0,1].

The phrase “inclusive” means that both endpoints are included:

0∈Aand1∈A.0 \in A \qquad \text{and} \qquad 1 \in A.0∈Aand1∈A.

2.3 Recognizing a pattern

If a set follows an obvious pattern, a few elements may be listed and the pattern may be continued using an ellipsis:

A={2,4,6,8,…}.A = \{2,4,6,8,\ldots\}.A={2,4,6,8,…}.

This represents the set of positive even integers. The omitted elements continue according to the same pattern:

10,12,14,…10,12,14,\ldots10,12,14,…

This notation is useful when the pattern is clear, but a formal description is usually preferable when precision is important.

2.4 Set-builder notation

A set can be described algebraically using set-builder notation. For example, the positive even integers can be written as

A={x∈R:x=2j for some j∈N}.A = \{x \in \mathbb{R} : x = 2j \text{ for some } j \in \mathbb{N}\}.A={x∈R:x=2j for some j∈N}.

This is read as:

AAA is the set of all real numbers xxx such that x=2jx=2jx=2j for some natural number jjj.

The colon means “such that.” Some texts use a vertical bar instead:

A={x∈R∣x=2j for some j∈N}.A = \{x \in \mathbb{R} \mid x = 2j \text{ for some } j \in \mathbb{N}\}.A={x∈R∣x=2j for some j∈N}.

The colon and vertical bar have the same meaning in this context.

Since jjj is a natural number, it can be 1,2,3,…1,2,3,\ldots1,2,3,…. Therefore,

2j=2,4,6,8,…,2j = 2,4,6,8,\ldots,2j=2,4,6,8,…,

which produces exactly the positive even numbers.

Set-builder notation separates two pieces of information:

  • x∈Rx \in \mathbb{R}x∈R identifies the type of object being considered.

  • The condition after the colon or vertical bar determines which objects belong to the set.


3. Russell’s Paradox

The informal idea that a set is simply “any collection of objects” leads to a famous contradiction called Russell’s paradox.

Consider the collection

R={x:x∉x}.R = \{x : x \notin x\}.R={x:x∈/x}.

This is intended to mean:

RRR is the collection of all objects that are not elements of themselves.

The question is whether RRR is an element of itself:

R∈R  ?R \in R \;?R∈R?

There are two possibilities.

Case 1: Assume R∈RR \in RR∈R

By the definition of RRR, every element of RRR must satisfy the condition of not being an element of itself. Therefore,

R∉R.R \notin R.R∈/R.

This contradicts the assumption that R∈RR \in RR∈R.

Case 2: Assume R∉RR \notin RR∈/R

If RRR is not an element of itself, then it satisfies the defining condition for membership in RRR. Therefore,

R∈R.R \in R.R∈R.

This also produces a contradiction.

Thus, the statement that RRR is an element of itself is both forced and forbidden:

R∈RandR∉R.R \in R \quad \text{and} \quad R \notin R.R∈RandR∈/R.

This is Russell’s paradox.

Russell’s paradox shows that not every vaguely described collection can safely be treated as a set.

Modern set theory uses carefully formulated axioms to avoid such contradictions. In elementary real analysis, the sets under consideration are generally subsets of R\mathbb{R}R, so this paradox does not arise in ordinary discussions of real-number sets.


4. Important Sets of Numbers

Real analysis frequently uses several standard collections of numbers. These sets form a chain of containment:

N⊆Z⊆Q⊆R.\mathbb{N} \subseteq \mathbb{Z} \subseteq \mathbb{Q} \subseteq \mathbb{R}.N⊆Z⊆Q⊆R.

Each set is described below.

4.1 Natural numbers

The natural numbers are the positive counting numbers:

N={1,2,3,4,…}.\mathbb{N} = \{1,2,3,4,\ldots\}.N={1,2,3,4,…}.

In this convention, natural numbers begin with 111, not 000.

Some books include 000 in N\mathbb{N}N. Both conventions are used, so the definition should always be checked. In the present convention,

0∉N.0 \notin \mathbb{N}.0∈/N.

One reason for excluding 000 is practical: expressions such as

1n\frac{1}{n}n1​

are automatically defined for every n∈Nn \in \mathbb{N}n∈N, without needing to state separately that n≠0n \neq 0n=0.

Natural numbers are also called counting numbers.

4.2 Integers

The integers include the natural numbers, zero, and the negative counting numbers:

Z={…,−3,−2,−1,0,1,2,3,…}.\mathbb{Z} = \{\ldots,-3,-2,-1,0,1,2,3,\ldots\}.Z={…,−3,−2,−1,0,1,2,3,…}.

The natural numbers are positive integers, so

N⊆Z.\mathbb{N} \subseteq \mathbb{Z}.N⊆Z.

4.3 Rational numbers

A rational number is a number that can be written as a ratio of two integers, with a nonzero denominator.

The rational numbers are represented by Q\mathbb{Q}Q:

Q={pq:p∈Z, q∈Z, q≠0}.\mathbb{Q} = \left\{ \frac{p}{q} : p \in \mathbb{Z},\ q \in \mathbb{Z},\ q \neq 0 \right\}.Q={qp​:p∈Z, q∈Z, q=0}.

Equivalently, because every nonzero integer denominator can be made positive by changing both signs, one may write

Q={pq:p∈Z, q∈N}.\mathbb{Q} = \left\{ \frac{p}{q} : p \in \mathbb{Z},\ q \in \mathbb{N} \right\}.Q={qp​:p∈Z, q∈N}.

Examples include

35,−7=−71,2211=2.\frac{3}{5},\qquad -7=\frac{-7}{1},\qquad \frac{22}{11}=2.53​,−7=1−7​,1122​=2.

A number can have more than one rational representation. For example,

2211=21=2.\frac{22}{11} = \frac{2}{1} = 2.1122​=12​=2.

The word “rational” is related to “ratio,” because rational numbers are ratios of integers.

Every integer is rational because any integer ppp can be written as

p=p1.p = \frac{p}{1}.p=1p​.

Consequently,

Z⊆Q.\mathbb{Z} \subseteq \mathbb{Q}.Z⊆Q.

4.4 Real numbers

The real numbers are denoted by R\mathbb{R}R. Geometrically, they correspond to all points on the real number line.

The real numbers include familiar values such as

0,1,−3,27,π,e,2.0,\quad 1,\quad -3,\quad \frac{2}{7},\quad \pi,\quad e,\quad \sqrt{2}.0,1,−3,72​,π,e,2​.

The set R\mathbb{R}R contains both rational and irrational numbers. In the development of real analysis, the structure of R\mathbb{R}R is studied carefully through axioms and properties of the number line.

The real numbers are not merely the rational numbers. There are real numbers that cannot be expressed as ratios of integers.

4.5 Irrational numbers

An irrational number is a real number that is not rational. The set of irrational numbers can be written as

R∖Q,\mathbb{R} \setminus \mathbb{Q},R∖Q,

where set subtraction means “the elements of R\mathbb{R}R that are not in Q\mathbb{Q}Q.”

Because irrational numbers are the complement of the rational numbers within R\mathbb{R}R, they can also be written as

Qc\mathbb{Q}^cQc

when the universal set is understood to be R\mathbb{R}R.

Examples include

π,e,2.\pi,\qquad e,\qquad \sqrt{2}.π,e,2​.

These numbers cannot be written in the form pq\frac{p}{q}qp​ with integers ppp and qqq and q≠0q \neq 0q=0. Proving that particular numbers such as 2\sqrt{2}2​ or π\piπ are irrational requires additional arguments.

The irrational numbers are not an empty set. In fact, there are many irrational numbers, and they are more numerous than the rational numbers in a precise mathematical sense studied later.

4.6 The empty set

The empty set is the set containing no elements. It is denoted by

∅.\varnothing.∅.

Thus,

x∉∅x \notin \varnothingx∈/∅

for every object xxx.

The empty set is a subset of every set:

∅⊆A.\varnothing \subseteq A.∅⊆A.

This is because there is no element of ∅\varnothing∅ that could violate the condition for subset containment.


5. Subsets and Set Containment

The idea that one set lies inside another is called set containment.

A set AAA is a subset of a set BBB if every element of AAA is also an element of BBB:

A⊆B⟺for every x, x∈A  ⟹  x∈B.A \subseteq B \quad \Longleftrightarrow \quad \text{for every } x,\ x \in A \implies x \in B.A⊆B⟺for every x, x∈A⟹x∈B.

Some authors use the symbol ⊂\subset⊂ for this general form of containment. In the convention being used here, the symbol ⊂\subset⊂ means that equality is allowed:

A⊂BA \subset BA⊂B

means that AAA is a subset of BBB, whether or not A=BA=BA=B.

Examples

Every set is a subset of itself:

A⊆A.A \subseteq A.A⊆A.

The natural, integer, rational, and real numbers satisfy

N⊆Z,Z⊆Q,Q⊆R.\mathbb{N} \subseteq \mathbb{Z}, \qquad \mathbb{Z} \subseteq \mathbb{Q}, \qquad \mathbb{Q} \subseteq \mathbb{R}.N⊆Z,Z⊆Q,Q⊆R.

For example, every natural number is an integer, every integer is rational because it can be divided by 111, and every rational number is real.

Proper subsets

A proper subset is a subset that is strictly smaller in the sense that it does not equal the larger set. It can be written as

A⊊B.A \subsetneq B.A⊊B.

This means both:

  1. Every element of AAA belongs to $B.

  2. At least one element of BBB does not belong to AAA.

Symbolically,

A⊊B⟺A⊆B and ∃y∈B such that y∉A.A \subsetneq B \quad \Longleftrightarrow \quad A \subseteq B \text{ and } \exists y \in B \text{ such that } y \notin A.A⊊B⟺A⊆B and ∃y∈B such that y∈/A.

For example,

N⊊Z\mathbb{N} \subsetneq \mathbb{Z}N⊊Z

because every natural number is an integer, but negative integers and 000 are not natural numbers.

In many situations, only general containment is needed. The distinction between ordinary and proper containment should be made explicit when it matters.


6. The Chain of Standard Number Sets

The definitions of the standard number systems immediately give the containment chain

N⊆Z⊆Q⊆R.\mathbb{N} \subseteq \mathbb{Z} \subseteq \mathbb{Q} \subseteq \mathbb{R}.N⊆Z⊆Q⊆R.

The reasoning is as follows:

  • Every natural number is an integer.

  • Every integer is rational because n=n1n=\frac{n}{1}n=1n​.

  • Every rational number is a point on the real number line and is therefore real.

  • The real numbers also contain irrational numbers such as π\piπ and 2\sqrt{2}2​.

Thus, rational numbers are not all real numbers:

Q⊊R.\mathbb{Q} \subsetneq \mathbb{R}.Q⊊R.

The irrational numbers form the part of R\mathbb{R}R outside Q\mathbb{Q}Q:

R∖Q.\mathbb{R}\setminus\mathbb{Q}.R∖Q.

7. Proving Set Containment

Set-containment proofs should be carried out at the level of individual elements.

To prove

A⊆B,A \subseteq B,A⊆B,

the standard method is:

  1. Let xxx be an arbitrary element of AAA.

  2. Use the assumption that x∈Ax \in Ax∈A.

  3. Show that x∈Bx \in Bx∈B.

  4. Conclude that every element of AAA belongs to BBB.

The arbitrary choice of xxx is essential. The proof must apply to every possible element of AAA, not merely to a particular example.

To prove one set is contained in another, start with an arbitrary element of the first set and prove that it belongs to the second.

Example: Complements reverse containment

Suppose

A⊆B.A \subseteq B.A⊆B.

The goal is to prove

Bc⊆Ac.B^c \subseteq A^c.Bc⊆Ac.

Let xxx be an arbitrary element of BcB^cBc. By the definition of a complement,

x∉B.x \notin B.x∈/B.

Since A⊆BA \subseteq BA⊆B, every element of AAA is in BBB. Therefore, if xxx is not in BBB, it cannot be in AAA:

x∉A.x \notin A.x∈/A.

Again using the definition of a complement,

x∈Ac.x \in A^c.x∈Ac.

Thus, every element of BcB^cBc belongs to AcA^cAc, so

Bc⊆Ac.B^c \subseteq A^c.Bc⊆Ac.

This result is called contravariance of complements: taking complements reverses the direction of containment.


8. Set Equality

Two sets are equal exactly when they contain the same elements. This can be expressed using mutual containment:

A=B⟺A⊆B and B⊆A.A = B \quad \Longleftrightarrow \quad A \subseteq B \text{ and } B \subseteq A.A=B⟺A⊆B and B⊆A.

This is known as the subset criterion for set equality.

To prove that A=BA=BA=B, one usually proves two separate statements:

  1. A⊆BA \subseteq BA⊆B.

  2. B⊆AB \subseteq AB⊆A.

Each direction is proved by taking an arbitrary element from the set on the left and showing that it belongs to the set on the right.

Example: The complement of a complement

The identity

(Ac)c=A(A^c)^c = A(Ac)c=A

states that taking the complement twice returns the original set.

First containment

To show

(Ac)c⊆A,(A^c)^c \subseteq A,(Ac)c⊆A,

let x∈(Ac)cx \in (A^c)^cx∈(Ac)c. By the definition of complement,

x∉Ac.x \notin A^c.x∈/Ac.

If xxx is not in AcA^cAc, then xxx must be in AAA. Therefore,

x∈A,x \in A,x∈A,

and hence

(Ac)c⊆A.(A^c)^c \subseteq A.(Ac)c⊆A.

Second containment

To show

A⊆(Ac)c,A \subseteq (A^c)^c,A⊆(Ac)c,

let y∈Ay \in Ay∈A. Since AAA and AcA^cAc contain opposite elements,

y∉Ac.y \notin A^c.y∈/Ac.

Therefore, by the definition of a complement,

y∈(Ac)c.y \in (A^c)^c.y∈(Ac)c.

Thus,

A⊆(Ac)c.A \subseteq (A^c)^c.A⊆(Ac)c.

Since both containments hold,

(Ac)c=A.(A^c)^c = A.(Ac)c=A.

Equality proof using an if-and-only-if chain

A faster method is to show that an arbitrary element belongs to one set if and only if it belongs to the other:

x∈(Ac)c  ⟺  x∉Ac  ⟺  x∈A.x \in (A^c)^c \iff x \notin A^c \iff x \in A.x∈(Ac)c⟺x∈/Ac⟺x∈A.

This establishes that the two sets have exactly the same elements, so

(Ac)c=A.(A^c)^c = A.(Ac)c=A.

The two-containment method and the if-and-only-if method are equivalent. The first emphasizes the definition of equality, while the second can be more concise.


9. Union and Intersection

Two fundamental operations combine sets: union and intersection.

9.1 Union

The union of AAA and BBB is written as

A∪B.A \cup B.A∪B.

An element belongs to the union if it belongs to at least one of the two sets:

x∈A∪B⟺x∈A or x∈B.x \in A \cup B \quad \Longleftrightarrow \quad x \in A \text{ or } x \in B.x∈A∪B⟺x∈A or x∈B.

The word “or” is inclusive: an element may belong to AAA, to BBB, or to both.

Thus, the union contains everything in either set.

9.2 Intersection

The intersection of AAA and BBB is written as

A∩B.A \cap B.A∩B.

An element belongs to the intersection if it belongs to both sets:

x∈A∩B⟺x∈A and x∈B.x \in A \cap B \quad \Longleftrightarrow \quad x \in A \text{ and } x \in B.x∈A∩B⟺x∈A and x∈B.

The intersection contains only the elements shared by the two sets.

Union versus intersection

  • Union: membership in at least one set; uses “or.”

  • Intersection: membership in both sets; uses “and.”

Therefore, membership in a union is generally easier to satisfy than membership in an intersection.


10. De Morgan’s Laws

De Morgan’s laws describe how complements interact with unions and intersections.

The first law is

(A∪B)c=Ac∩Bc.(A \cup B)^c = A^c \cap B^c.(A∪B)c=Ac∩Bc.

It can be read as:

The complement of a union is the intersection of the complements.

The second law is

(A∩B)c=Ac∪Bc.(A \cap B)^c = A^c \cup B^c.(A∩B)c=Ac∪Bc.

It can be read as:

The complement of an intersection is the union of the complements.

The two laws switch union and intersection when a complement is distributed across an expression.

10.1 Proof of the first De Morgan law

The goal is to prove

(A∪B)c=Ac∩Bc.(A \cup B)^c = A^c \cap B^c.(A∪B)c=Ac∩Bc.

A set equality proof can be divided into two containment proofs.

First direction

Show that

(A∪B)c⊆Ac∩Bc.(A \cup B)^c \subseteq A^c \cap B^c.(A∪B)c⊆Ac∩Bc.

Let

x∈(A∪B)c.x \in (A \cup B)^c.x∈(A∪B)c.

By the definition of complement,

x∉A∪B.x \notin A \cup B.x∈/A∪B.

Membership in A∪BA \cup BA∪B means membership in AAA or membership in BBB. Therefore, not belonging to the union means that neither condition holds:

x∉Aandx∉B.x \notin A \quad \text{and} \quad x \notin B.x∈/Aandx∈/B.

Using complements again,

x∈Acandx∈Bc.x \in A^c \quad \text{and} \quad x \in B^c.x∈Acandx∈Bc.

Therefore,

x∈Ac∩Bc.x \in A^c \cap B^c.x∈Ac∩Bc.

Since every element of (A∪B)c(A \cup B)^c(A∪B)c belongs to Ac∩BcA^c \cap B^cAc∩Bc,

(A∪B)c⊆Ac∩Bc.(A \cup B)^c \subseteq A^c \cap B^c.(A∪B)c⊆Ac∩Bc.

The logical step used here is

¬(P∨Q)  ⟺  (¬P)∧(¬Q).\neg(P \lor Q) \iff (\neg P) \land (\neg Q).¬(P∨Q)⟺(¬P)∧(¬Q).

In words, “not PPP or QQQ” means “not PPP and not QQQ.”

Second direction

Show that

Ac∩Bc⊆(A∪B)c.A^c \cap B^c \subseteq (A \cup B)^c.Ac∩Bc⊆(A∪B)c.

Let

y∈Ac∩Bc.y \in A^c \cap B^c.y∈Ac∩Bc.

By the definition of intersection,

y∈Acandy∈Bc.y \in A^c \quad \text{and} \quad y \in B^c.y∈Acandy∈Bc.

Therefore,

y∉Aandy∉B.y \notin A \quad \text{and} \quad y \notin B.y∈/Aandy∈/B.

This means that yyy is not in AAA or BBB:

y∉A∪B.y \notin A \cup B.y∈/A∪B.

Consequently,

y∈(A∪B)c.y \in (A \cup B)^c.y∈(A∪B)c.

Thus,

Ac∩Bc⊆(A∪B)c.A^c \cap B^c \subseteq (A \cup B)^c.Ac∩Bc⊆(A∪B)c.

Since both containments hold,

(A∪B)c=Ac∩Bc.(A \cup B)^c = A^c \cap B^c.(A∪B)c=Ac∩Bc.

10.2 Visual interpretation

In a Venn diagram:

  • A∪BA \cup BA∪B consists of all regions inside AAA or BBB.

  • (A∪B)c(A \cup B)^c(A∪B)c consists of everything outside both circles.

  • AcA^cAc consists of everything outside AAA.

  • BcB^cBc consists of everything outside BBB.

  • Ac∩BcA^c \cap B^cAc∩Bc consists of the region outside both AAA and BBB.

Thus, both sides describe exactly the same region.

Venn diagrams can help illustrate set identities, but a formal proof should rely on element membership and the definitions of union, intersection, and complement.

10.3 Logical structure behind De Morgan’s laws

The set laws mirror familiar logical laws:

¬(P∨Q)  ⟺  (¬P)∧(¬Q),\neg(P \lor Q) \iff (\neg P)\land(\neg Q),¬(P∨Q)⟺(¬P)∧(¬Q),

and

¬(P∧Q)  ⟺  (¬P)∨(¬Q).\neg(P \land Q) \iff (\neg P)\lor(\neg Q).¬(P∧Q)⟺(¬P)∨(¬Q).

For sets, the correspondences are:

  • Union corresponds to “or.”

  • Intersection corresponds to “and.”

  • Complement corresponds to negation.

Therefore,

(A∪B)c=Ac∩Bc(A \cup B)^c = A^c \cap B^c(A∪B)c=Ac∩Bc

corresponds to negating “xxx is in AAA or BBB,” while

(A∩B)c=Ac∪Bc(A \cap B)^c = A^c \cup B^c(A∩B)c=Ac∪Bc

corresponds to negating “xxx is in both AAA and BBB.”

De Morgan’s laws extend beyond two sets. Similar identities can be established for finite collections of sets, and analogous forms can also be developed for larger, including infinite, collections of sets.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent