Set Notation and Functions
students, in Real Analysis, set notation and functions are the language of almost every idea you will meet π. Before you can prove a theorem about limits, continuity, or convergence, you need to know how to describe collections of objects carefully and how to connect one object to another with a rule. This lesson will help you read, write, and use set notation and functions with confidence.
What you will learn
By the end of this lesson, students, you should be able to:
- understand common set notation and vocabulary,
- describe sets using symbols and words,
- work with functions as special kinds of relations,
- explain domains, codomains, and images,
- use examples from Real Analysis to connect sets and functions to proof.
A strong understanding of these ideas matters because many real analysis statements begin with phrases like βfor every $x \in A$β or βthere exists a function $f : A \to B$.β If you can read those sentences clearly, proofs become much easier π§ .
Sets: the building blocks of analysis
A set is a collection of objects called elements or members. If $x$ is an element of a set $A$, we write $x \in A$. If $x$ is not in $A$, we write $x \notin A$.
For example, the set of even integers can be written as
$$E = \{n \in \mathbb{Z} : n \text{ is even}\}.$$
This means β$E$ is the set of all integers $n$ such that $n$ is even.β The symbol $:$ or the vertical bar $|$ means βsuch that.β
There are several common ways to describe a set:
- Roster form: list the elements, such as $\{1,2,3\}$.
- Set-builder form: describe a rule, such as $\{x \in \mathbb{R} : x > 0\}$.
- Interval notation: for real numbers, such as $(0,\infty)$.
Some special sets appear constantly in analysis:
- $\mathbb{N}$ for natural numbers,
- $\mathbb{Z}$ for integers,
- $\mathbb{Q}$ for rational numbers,
- $\mathbb{R}$ for real numbers,
- $\mathbb{C}$ for complex numbers.
These sets are connected by inclusion, for example $\mathbb{N} \subseteq \mathbb{Z} \subseteq \mathbb{Q} \subseteq \mathbb{R}$.
If every element of $A$ is also an element of $B$, then $A$ is a subset of $B$, written $A \subseteq B$. If $A \subseteq B$ and $A \neq B$, then $A$ is a proper subset of $B$, written $A \subset B$.
A useful example is $A = \{x \in \mathbb{R} : x^2 < 4\}$. This is the same as the interval $(-2,2)$, because the inequality $x^2 < 4$ means $-2 < x < 2$.
Operations on sets and how they work
Real analysis often uses set operations to combine or compare collections.
The union of sets $A$ and $B$ is the set of all elements that are in $A$ or in $B$:
$$A \cup B = \{x : x \in A \text{ or } x \in B\}.$$
The intersection of $A$ and $B$ is the set of all elements common to both:
$$A \cap B = \{x : x \in A \text{ and } x \in B\}.$$
The difference $A \setminus B$ contains elements in $A$ but not in $B$:
$$A \setminus B = \{x : x \in A \text{ and } x \notin B\}.$$
The complement of $A$ depends on a larger set called the universal set. If the universal set is $U$, then the complement of $A$ is
$$A^c = \{x \in U : x \notin A\}.$$
For example, if $U = \mathbb{R}$ and $A = (0,1)$, then
$$A^c = (-\infty,0] \cup [1,\infty).$$
Set operations are useful because many theorems split a problem into cases. For instance, if a function behaves differently on $(-\infty,0)$ and on $[0,\infty)$, then the domain can be written as a union of these sets.
Functions as rules between sets
A function is a rule that assigns each input exactly one output. If $f$ is a function from a set $A$ to a set $B$, we write
$$f : A \to B.$$
Here, $A$ is the domain, and $B$ is the codomain.
For each $x \in A$, the function gives one value written $f(x) \in B$.
It is important that every input in the domain has exactly one output. For example, $f(x) = x^2$ is a function from $\mathbb{R}$ to $\mathbb{R}$ because each real number $x$ has a single square. But the relation defined by $y^2 = x$ is not a function of $x$ alone unless we choose a rule like $f(x) = \sqrt{x}$, which uses only the nonnegative square root.
A function can be described in several ways:
- an explicit formula, such as $f(x) = x^2 + 1$,
- a piecewise definition, such as
$$f(x) = \begin{cases}
$x^2, & x \ge 0, \\$
-x, & x < 0,
$\end{cases}$$$
- a table,
- a graph,
- or a verbal rule.
In analysis, functions are often used to define sequences, limits, and transformations of sets.
Domain, codomain, and image
The domain is the set of allowed inputs. The codomain is the target set where outputs are supposed to live. The image or range of a function is the set of actual outputs:
$$f(A) = \{f(x) : x \in A\}.$$
If $f : A \to B$, then the image is always a subset of $B$, so $f(A) \subseteq B$.
Here is an example. Let $f : \mathbb{R} \to \mathbb{R}$ be given by $f(x) = x^2$.
- The domain is $\mathbb{R}$.
- The codomain is $\mathbb{R}$.
- The image is $[0,\infty)$, because squares are never negative.
This example shows why domain and codomain are not the same as image. The rule $f(x) = x^2$ does not produce every real number, even though the codomain is $\mathbb{R}$.
Sometimes a function is defined on a subset of the reals. For example, the function
$$g(x) = \frac{1}{x}$$
cannot have domain $\mathbb{R}$ because it is undefined at $x = 0$. A correct statement is
$$g : \mathbb{R} \setminus \{0\} \to \mathbb{R}.$$
In real analysis, paying attention to the domain is essential because a theorem about continuity or differentiability only applies where the function is actually defined.
Injections, surjections, and bijections
Functions can be classified by how outputs behave.
A function $f : A \to B$ is injective if different inputs give different outputs. Formally,
$$f(x_1) = f(x_2) \Rightarrow x_1 = x_2.$$
Another way to say this is that if $x_1 \neq x_2$, then $f(x_1) \neq f(x_2)$.
A function is surjective if every element of the codomain is hit by some input. Formally, for every $y \in B$, there exists $x \in A$ such that
$$f(x) = y.$$
A function is bijective if it is both injective and surjective. Bijections are important because they pair each element of one set with exactly one element of another set. This makes it possible to define an inverse function.
For example, if $f : \mathbb{R} \to \mathbb{R}$ is given by $f(x) = 2x+3$, then $f$ is bijective. To solve $y = 2x+3$ for $x$, we get
$$x = \frac{y-3}{2}.$$
So the inverse function is
$$f^{-1}(y) = \frac{y-3}{2}.$$
This kind of reasoning is very common in proofs, especially when you need to show that two descriptions define the same set or that a map has a certain property.
Functions and proof in real analysis
Set notation and functions are not just definitions; they are proof tools π. Many theorems in real analysis are written using quantifiers and sets.
For example, to prove a statement like β$f$ is continuous on $A$,β you must show that for every $a \in A$ and every $\varepsilon > 0$, there exists $\delta > 0$ such that if $x \in A$ and $|x-a| < \delta$, then
$$|f(x)-f(a)| < \varepsilon.$$
This statement uses set language because $x$ and $a$ must lie in the domain, and the proof depends on carefully describing what belongs to what.
Set notation also helps when defining preimages. If $f : A \to B$ and $S \subseteq B$, then the preimage of $S$ under $f$ is
$$f^{-1}(S) = \{x \in A : f(x) \in S\}.$$
This is not always an inverse function. It is a set of inputs whose outputs land in $S$. For example, if $f(x) = x^2$ and $S = [1,4]$, then
$$f^{-1}(S) = [-2,-1] \cup [1,2].$$
This idea is powerful in analysis because many properties are described by preimages of intervals. For instance, the set of points where a function is positive can be written as a preimage:
$$\{x \in A : f(x) > 0\} = f^{-1}((0,\infty)).$$
Conclusion
students, set notation and functions are the foundation of formal reasoning in Real Analysis. Sets let us describe collections precisely, and functions let us express relationships between those collections. When you understand symbols like $\in$, $\subseteq$, $\cup$, $\cap$, and $f : A \to B$, you can read proofs more accurately and write your own with clarity β¨.
These ideas also connect directly to the rest of logic and proof: statements about functions often use quantifiers, and arguments about sets often use direct proof, contradiction, or contrapositive. Mastering this language will make later topics like sequences, continuity, and integration much easier to understand.
Study Notes
- A set is a collection of elements, written with braces such as $\{1,2,3\}$.
- Membership uses $\in$ and $\notin$.
- Subset notation is $A \subseteq B$; proper subset is $A \subset B$.
- Common set operations are union $A \cup B$, intersection $A \cap B$, difference $A \setminus B$, and complement $A^c$.
- A function $f : A \to B$ assigns each input in $A$ exactly one output in $B$.
- The domain is the input set, the codomain is the target set, and the image is $f(A) = \{f(x) : x \in A\}$.
- A function is injective if different inputs give different outputs.
- A function is surjective if every element of the codomain is hit by some input.
- A function is bijective if it is both injective and surjective.
- The preimage of a set $S$ is $f^{-1}(S) = \{x \in A : f(x) \in S\}$.
- In Real Analysis, careful set and function notation makes definitions and proofs precise.
