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 A, B, or R.
Elements are commonly denoted by lowercase letters such as x, y, or z.
Membership notation
The statement that x is an element of A is written as
The symbol ∈ means “belongs to” or “is an element of.”
For example, if 3 belongs to a set A, then one writes
The statement that x is not an element of A is written as
Membership and non-membership are related to the complement of a set. If x is not in A, then x belongs to the complement of A:
Here, Ac denotes everything in the relevant universe that is not in A.
The complement Ac consists of all objects under consideration that do not belong to A.
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.
2. Ways to Describe a Set
A set can be described in several ways. The most common methods are:
Listing its elements.
Describing a condition that determines membership.
Giving a pattern or algebraic formula.
2.1 Listing the elements
A finite set can be written by listing its elements inside curly brackets:
This set contains exactly three elements, so its cardinality is 3:
The order in which elements are listed does not matter. For example,
Repeated elements are also not counted more than once. Thus,
2.2 Describing a set with words
A set can also be specified by describing its members verbally. For example,
A is the set of all real numbers between 0 and 1, inclusive.
In interval notation, this set is written as
The phrase “inclusive” means that both endpoints are included:
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:
This represents the set of positive even integers. The omitted elements continue according to the same pattern:
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
This is read as:
A is the set of all real numbers x such that x=2j for some natural number j.
The colon means “such that.” Some texts use a vertical bar instead:
The colon and vertical bar have the same meaning in this context.
Since j is a natural number, it can be 1,2,3,…. Therefore,
which produces exactly the positive even numbers.
Set-builder notation separates two pieces of information:
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
This is intended to mean:
R is the collection of all objects that are not elements of themselves.
The question is whether R is an element of itself:
There are two possibilities.
Case 1: Assume R∈R
By the definition of R, every element of R must satisfy the condition of not being an element of itself. Therefore,
This contradicts the assumption that R∈R.
Case 2: Assume R∈/R
If R is not an element of itself, then it satisfies the defining condition for membership in R. Therefore,
This also produces a contradiction.
Thus, the statement that R is an element of itself is both forced and forbidden:
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, 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:
Each set is described below.
4.1 Natural numbers
The natural numbers are the positive counting numbers:
In this convention, natural numbers begin with 1, not 0.
Some books include 0 in N. Both conventions are used, so the definition should always be checked. In the present convention,
One reason for excluding 0 is practical: expressions such as
are automatically defined for every n∈N, without needing to state separately that n=0.
Natural numbers are also called counting numbers.
4.2 Integers
The integers include the natural numbers, zero, and the negative counting numbers:
The natural numbers are positive integers, so
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:
Equivalently, because every nonzero integer denominator can be made positive by changing both signs, one may write
Examples include
A number can have more than one rational representation. For example,
The word “rational” is related to “ratio,” because rational numbers are ratios of integers.
Every integer is rational because any integer p can be written as
Consequently,
4.4 Real numbers
The real numbers are denoted by R. Geometrically, they correspond to all points on the real number line.
The real numbers include familiar values such as
The set R contains both rational and irrational numbers. In the development of real analysis, the structure of 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
where set subtraction means “the elements of R that are not in Q.”
Because irrational numbers are the complement of the rational numbers within R, they can also be written as
when the universal set is understood to be R.
Examples include
These numbers cannot be written in the form qp with integers p and q and q=0. Proving that particular numbers such as 2 or π 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
Thus,
for every object x.
The empty set is a subset of every set:
This is because there is no element of ∅ 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 A is a subset of a set B if every element of A is also an element of B:
Some authors use the symbol ⊂ for this general form of containment. In the convention being used here, the symbol ⊂ means that equality is allowed:
means that A is a subset of B, whether or not A=B.
Examples
Every set is a subset of itself:
The natural, integer, rational, and real numbers satisfy
For example, every natural number is an integer, every integer is rational because it can be divided by 1, 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
This means both:
Every element of A belongs to $B.
At least one element of B does not belong to A.
Symbolically,
For example,
because every natural number is an integer, but negative integers and 0 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
The reasoning is as follows:
Every natural number is an integer.
Every integer is rational because 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 π and 2.
Thus, rational numbers are not all real numbers:
The irrational numbers form the part of R outside Q:
7. Proving Set Containment
Set-containment proofs should be carried out at the level of individual elements.
To prove
the standard method is:
Let x be an arbitrary element of A.
Use the assumption that x∈A.
Show that x∈B.
Conclude that every element of A belongs to B.
The arbitrary choice of x is essential. The proof must apply to every possible element of A, 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
The goal is to prove
Let x be an arbitrary element of Bc. By the definition of a complement,
Since A⊆B, every element of A is in B. Therefore, if x is not in B, it cannot be in A:
Again using the definition of a complement,
Thus, every element of Bc belongs to Ac, so
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:
This is known as the subset criterion for set equality.
To prove that A=B, one usually proves two separate statements:
A⊆B.
B⊆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
states that taking the complement twice returns the original set.
First containment
To show
let x∈(Ac)c. By the definition of complement,
If x is not in Ac, then x must be in A. Therefore,
and hence
Second containment
To show
let y∈A. Since A and Ac contain opposite elements,
Therefore, by the definition of a complement,
Thus,
Since both containments hold,
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:
This establishes that the two sets have exactly the same elements, so
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 A and B is written as
An element belongs to the union if it belongs to at least one of the two sets:
The word “or” is inclusive: an element may belong to A, to B, or to both.
Thus, the union contains everything in either set.
9.2 Intersection
The intersection of A and B is written as
An element belongs to the intersection if it belongs to both sets:
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
It can be read as:
The complement of a union is the intersection of the complements.
The second law is
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 set equality proof can be divided into two containment proofs.
First direction
Show that
Let
By the definition of complement,
Membership in A∪B means membership in A or membership in B. Therefore, not belonging to the union means that neither condition holds:
Using complements again,
Therefore,
Since every element of (A∪B)c belongs to Ac∩Bc,
The logical step used here is
In words, “not P or Q” means “not P and not Q.”
Second direction
Show that
Let
By the definition of intersection,
Therefore,
This means that y is not in A or B:
Consequently,
Thus,
Since both containments hold,
10.2 Visual interpretation
In a Venn diagram:
A∪B consists of all regions inside A or B.
(A∪B)c consists of everything outside both circles.
Ac consists of everything outside A.
Bc consists of everything outside B.
Ac∩Bc consists of the region outside both A and B.
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:
and
For sets, the correspondences are:
Union corresponds to “or.”
Intersection corresponds to “and.”
Complement corresponds to negation.
Therefore,
corresponds to negating “x is in A or B,” while
corresponds to negating “x is in both A and B.”
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.