# Real analysis

 Subject classification: this is a mathematics resource.
 Educational level: this is a secondary education resource.
 Educational level: this is a tertiary (university) resource.

Real analysis is a field in mathematics that focuses on the properties of real numbers, sequences and functions. Included in this branch of mathematics are the concepts of limits and convergence, calculus, and properties of functions such as continuity. It also includes measure theory.

For the purposes of this article, "analysis" will be limited to the generalization and extension of the concepts of calculus, using the concepts of elementary point-set topology.

The reader should be quite familiar with the concepts of calculus, especially limits and continuity. In particular, the reader should be comfortable with the ramifications of the phrase "for every epsilon".

## Open sets

Open sets (and, by extension, closed sets, which are just the complements of open sets) are the fundamental concept of analysis. Analysis and topology are really just the study of open sets.

Before giving the definition of open sets in Euclidean space, we present some examples. Readers who are aware of the general intuitive notion of open sets should find these examples familiar.

### In one dimension

The simplest open sets in 1-dimensional Euclidean space (formally called ${\displaystyle \mathbb {R} ^{1}}$; informally called the real numbers or the "real line") are open intervals. An open interval consists of those numbers lying strictly between two endpoints a and b. In set-theoretic notation:

${\displaystyle \{x\ |\ a

A shorter notation for this set consists of the two endpoints in parentheses:

${\displaystyle (a,b)\,}$

A closed interval (we will have more to say about closed sets later) would include the endpoints. It is commonly denoted with brackets:

${\displaystyle [a,b]=\{x\ |\ a\leq x\leq b\}}$

An interval that includes one endpoint but not the other is called semi-open:

${\displaystyle [a,b)=\{x\ |\ a\leq x
${\displaystyle (c,d]=\{x\ |\ c

When drawing pictures of intervals, those same symbols are typically used:

Need a picture here!

Open intervals are not the only open sets. Any union of open intervals is an open set. For example:

${\displaystyle \bigcup _{N\geq 2}(N,N+1/N)}$

Bizarrely defined sets like the one above are commonly used as examples and counterexamples in analysis and topology.

### In two or more dimensions

In two or more dimensions the situation becomes more complicated, because even simple open sets can come in an endless variety of shapes. The fundamental open set (equivalent to an open interval) is the open neighborhood, also called an open ball. An open neighborhood has a center point and a nonzero radius, and is the set of all points whose distance from the center is strictly less than that radius. In set-theoretic notation:

${\displaystyle \{x\ |\ \|x-C\|

The double-stroke absolute value sign is the norm or the metric distance function. In the common case it is the Euclidean/Pythagorean distance:

${\displaystyle \|a-b\|={\sqrt {(a_{1}-b_{1})^{2}+(a_{2}-b_{2})^{2}}}\,}$ in two dimensions (similarly for higher dimensions)

The double-stroke absolute value sign is similar to the usual absolute value operation, generalized to arbitrary dimensions or other metric spaces.

It is easy to see that, in two dimensions, an open neighborhood is the interior of a circle. It does not include the actual boundary of the circle, because it consists of the points whose distance from ${\displaystyle C}$ is strictly less than ${\displaystyle r}$. This point is crucial—the whole subject of analysis and topology depends on it!

The usual way of depicting a closed set (left) and an open set (right).

To draw a picture of an open neighborhood, use a circle bounded by a dotted line. To make a closed ball, the formula would be:

${\displaystyle \{x\ |\ \|x-C\|\leq r\}\,}$

and the picture would be a solid circle. But open neighborhoods are the important sets from a theoretical standpoint.

## Definition of open set

Here is the proper theoretical definition:

Definition: A set is open if it contains a neighborhood of each of its points.

What this means is that a set ${\displaystyle U}$ is open if, for every point ${\displaystyle x}$ in ${\displaystyle U}$, there is a neighborhood ${\displaystyle N}$ such that ${\displaystyle x\in N}$ and ${\displaystyle N\subseteq U}$. This construction is shown in the diagram at the right.

The point x is in the set U, and U contains a neighborhood (N) of x.

If the point ${\displaystyle x}$ were allowed to lie exactly on the edge of ${\displaystyle U}$, it wouldn't be possible to draw a nonzero neighborhood around ${\displaystyle x}$ that lies in ${\displaystyle U}$. So the important feature of ${\displaystyle U}$'s openness is that none of its points can lie exactly on its edge. Every point in ${\displaystyle U}$ must be some finite distance back from the edge, which makes it possible to draw a neighborhood around it.

## Theorems

Here are a few extremely fundamental and far-reaching theorems. Some of them are surprisingly simple:

Theorem: Neighborhoods are open sets.

Proof: Suppose a neighborhood has center ${\displaystyle C}$ and radius ${\displaystyle r}$. If a point ${\displaystyle x}$ is in that neighborhood, its distance from ${\displaystyle C}$ must be strictly less than ${\displaystyle r}$, call it ${\displaystyle k}$.

${\displaystyle \|x-C\|=k,\ \ \ k

Place a new neighborhood, of radius ${\displaystyle (r-k)/2}$, around ${\displaystyle x}$. Every point in that neighborhood has a distance less than ${\displaystyle k+(r-k)/2}$ from ${\displaystyle C}$. That distance is less than ${\displaystyle r}$, so every point in the new neighborhood is in the original neighborhood, so the new neighborhood lies within the original one.

Theorem: Any union of open sets, including unions of an infinite number of open sets, is an open set.

Proof: If a point ${\displaystyle x}$ lies in the union, it must lie within one of the constituent open sets. There must be a neighborhood of ${\displaystyle x}$ contained in that constituent open set. That neighborhood must be contained in the union.

Theorem: The intersection of two open sets is an open set.

Proof: Let ${\displaystyle X=P_{1}\cap P_{2}}$, and let ${\displaystyle x\in X}$. Then ${\displaystyle x\in P_{1}}$ and ${\displaystyle x\in P_{2}}$. Since ${\displaystyle P_{1}}$ and ${\displaystyle P_{2}}$ are open, there must be neighborhoods ${\displaystyle N_{1}\subseteq P_{1}}$ and ${\displaystyle N_{2}\subseteq P_{2}}$ that contain ${\displaystyle x}$. Whichever of those two neighborhoods has the smaller radius will be a subset of both ${\displaystyle P_{1}}$ and ${\displaystyle P_{2}}$, so it will be a subset of ${\displaystyle X}$.

This theorem can be extended for any finite intersection, but it does not work for infinite intersections. Here is an example:

Let ${\displaystyle P_{i}}$ be an infinite sequence of ever-decreasing open intervals:

${\displaystyle P_{i}=\{x\ |\ -1-1/i

for integer ${\displaystyle i\geq 1}$ The intersection of all of the ${\displaystyle P_{i}}$'s is the closed interval

${\displaystyle [-1,1]\,}$

which is not open.

So the topological rule of thumb is:

Any union of open sets is open.
Any finite intersection of open sets is open

Theorem: The null set (empty set) is open.

Proof: It needs to contain a neighborhood of each of its points. But it has no points.

Theorem: The entire space is open.

Proof: We need a neighborhood of each point in the space. The neighborhood centered on that point, with radius 1, will do the trick.

This means that the real line is open. It is not an open interval, because that interval would have to be "${\displaystyle (-\infty ,\infty )}$", and infinity is not a number. The real line is an open set, because it is:

${\displaystyle \mathbb {R} ^{1}=\bigcup _{n}\ (n-1,n+1)}$

over all integers ${\displaystyle n}$. (Infinite unions are allowed, even though infinity is not a number.)

Theorem: Every open set is a union of neighborhoods.

Proof: It contains a neighborhood of each of its points; those are its constituent neighborhoods.

This means that any open set in the plane, for example, is a union of open circles. (It is also the union of open rectangles, open diamonds, open 5-pointed stars, and so on. This is a consequence of the invariance of the metric in defining a topology.)

In the field of topology, a collection of open sets, whose unions comprise all of the open sets that exist, is called a basis. So what we have just shown is that the open neighborhoods (open intervals, open circles, open spheres, etc.) are a basis for the topology of finite-dimensional Euclidean spaces.

## Closed sets

Definition: A set is closed if its complement is open.

That's all there is to it.

Because of some simple theorems of set theory, including DeMorgan's laws, some of the preceding theorems relating to open sets can be reformulated for closed sets.

Any intersection of closed sets, including the intersection of an infinite number of closed sets, is closed.
Any union of a finite number of closed sets is closed.
The null set is closed.
The entire space (for example, the real line) is closed.

As before, the null set, and the entire real line, are closed sets, but they are not closed intervals.

Exercise: Show that any closed interval ${\displaystyle [a,b]=\{x\ |\ a\leq x\leq b\}}$ is in fact a closed set by this definition.

## Limit points, and the other definition of closed sets

Closed sets are often given a different definition, as sets containing their limit points.

Definition: A point x is a limit point of a set S if every open set containing x has nonempty intersection with S.

Limit points include points "lying on the edge" of a set, whether they are actually in the set or not. The point (x=1, y=0) is on the edge of the unit open disk

${\displaystyle \{x,y\ |\ {\sqrt {x^{2}+y^{2}}}<1\}\,}$

and is a limit point, even though it is not actually in the open disk. It is also a limit point of the unit closed disk

${\displaystyle \{x,y\ |\ {\sqrt {x^{2}+y^{2}}}\leq 1\}\,}$

and is in the closed disk. (We will say more about that phenomenon shortly.)

A wide variety of sets can have limit points. The set of reciprocals of positive integers:

${\displaystyle {\begin{Bmatrix}{\frac {1}{N}}\ |\ N\in \mathbb {N} ^{+}\end{Bmatrix}}\,}$

is neither open nor closed, but it has a limit point at zero.

Why? Because every open set containing zero must contain a neighborhood of zero. That neighborhood, however small it may be, contains 1/N for some integer N.

Limit points get their name from this. Zero is the limit of the sequence ${\displaystyle \{x_{n}=1/n\}\,}$, so it is a limit point of the sequence. Whenever a sequence converges, the point to which it converges is a limit point.

Whenever a set of numbers or points has an infinite number of its elements "pile up" at one point, that point is a limit point.

Another name for a limit point is an accumulation point or a cluster point.

Now we get to another very important characterization of closed sets.

Theorem: A set is closed if and only if it contains all of its limit points.

Proof:

First, let C be a closed set, and x be a limit point of C. We will show that ${\displaystyle x\in C}$. Let ${\displaystyle U={\overline {C}}}$, so U is open.

Assume ${\displaystyle x\notin C}$. Then ${\displaystyle x\in U}$. Since U is open, x has a neighborhood N with ${\displaystyle x\in N\subseteq U}$.
This means that ${\displaystyle N\cap C=\varnothing }$. But x being a limit point of C means that any neighborhood of x intersects C.

Now let C contain all of its limit points, and let ${\displaystyle U={\overline {C}}}$. We will show that U is open, so C is closed.

Let ${\displaystyle x\in U}$. It follows that ${\displaystyle x\notin C}$, and, since C contains all of its limit points, x is not a limit point of C.
Therefore, there must be a neighborhood of x that does not intersect C. That neighborhood must therefore be a subset of U.
So, for every point ${\displaystyle x\in U}$, there is a neighborhood of x also in U, so U is open, so C is closed.