One of the most fundamental theorems in mathematics is the famous Baire category theorem, which never ceases to amaze me. If you are a modern analysis enthusiast like me you probably know the feeling when you are working on a seemingly difficult problem and the solution appears to elude you every time you think about it, and then all of a sudden, snap! “Oh, I can just use the Baire category theorem.”

This post is dedicated to this feeling.

**The Baire category theorem.** Let’s waste no time and jump into the heart of the matter right away.

**Theorem 1.** (Baire) Let be a complete metric space and let be a collection of open and dense subsets of . Then is dense in .

*Proof.* Let be an arbitrary element and let be the open ball with radius and center . (In general, we denote .) It is enough to show that has an element in , since this implies that is dense in . Since

is dense in , it has a point in , that is is nonempty.

is an open set, therefore there exists an such that . Just like before, since

is dense in , it has a point in , that is is nonempty.

is again an open set, thus there exists an such that . We can repeat this process ad infinitum, obtaining a sequence of elements and a sequence of balls such that , and . These properties implies that

holds for all ,

or in other words, is a Cauchy sequence. Our metric space is complete, therefore it converges to some . Due to its construction, , where , and this is what we had to show.

This seemingly innocent theorem gives an immensely powerful tool in mathematics. One of its first corollary, also known as Baire category theorem, is an interesting theorem about the structure of complete metric spaces. To state this, we shall need a few definitions.

**Definition. **Let be a subset of the topological space .**
**(i) is

*nowhere dense*if its closure contains no nonempty open subset of .

(ii) is a set of the

*first category*(or a

*meagre set*) if it is a countable union of nowhere dense sets.

(iii) is a set of the

*second category*if it is not of the first category.

Let’s see some examples first.

**Example.** (i) In the complete metric space , the famous Cantor set is a nowhere dense set, hence it is of the first category. Generalized Cantor sets of positive measure are still nowhere dense.

(ii) The set of rational numbers in is of the first category, since it is a countable union of singletons. It is a set of measure zero, which along with the previous example, hints us that measure and category are not very related.

**Corollary 1.** Let be a complete metric space. Then is a set of the second category.

*Proof. *Suppose that is a sequence of sets of the first category and assume indirectly that . Then is an open and dense set (where denotes the closure of ). But , which is clearly impossible according to Baire’s theorem.

This corollary gives us an another interesting example continuing from example (ii).

**Example.** (iii) The set of irrational numbers is a set of the second category, since , which is a complete metric space.

Now let’s see some interesting applications of the Baire category theorem. First we study strangely behaving functions, not so strangely behaving functions and finally a classical theorem from functional analysis.

**Nowhere differentiable everywhere continuous functions.** A few hundred years ago, mathematicians did not thought about functions as the way we do. The calculus of Newton and Leibniz have brought the rise of differential equations, which played a crucial role in the development of mathematics. Physicists and mathematicians have studied celestial mechanics and all sorts of dynamical systems, where everything was beautiful and infinitely many times differentiable. However, the rise of real analysis brought some, at least at that time, very weird functions. Nowhere continuous functions. Everywhere continuous but nowhere differentiable functions. Functions continuous only at the irrationals. Not everyone were pleased with this, for example the famous Charles Hermite said straight out that

I turn away with fright and horror from this lamentable evil of functions which do not have derivatives.

A few years after Hermite’s time, it turned out that basically most continuous functions are nowhere differentiable. The following theorem with its proof is due to Banach.

**Theorem 2.** (Banach) Let be the Banach space of continuous functions with the supremum norm. Then the set

is a set of the first category in .

*Proof.* Define the set

.

It is clear that . (This union is actually way larger than the class of continuous functions posessing a finite right-sided derivative somewhere.) All we have to show that is nowhere dense, which will imply that is of the first category. To do this, first we show that is closed and then we will see that it does not contain nonempty open sets.

* is closed:* Let be a convergent sequence, assume that it converges to some . Our goal is to show that holds. means that there is an such that

holds for all . By replacing with a subsequence if necessary, we can assume that for some . This way, we have

.

This means that for every , we have

if is large enough. Since was arbitrary, this implies that , therefore is closed.

*There is no nonempty open set in :* Let and let be arbitrary. We will show that there is a such that . Since every continuous function can be approximated with a piecewise linear continuous function with arbitrary precision, we can find such a function such that . Suppose that is the maximum absolute value of the slopes of .

Now define the so-called tent function , where denotes the lower integer part of .

By scaling the tent function, we obtain rapidly oscillating functions taking arbitrarily small value.

Adding a properly scaled tent function to our piecewise linear function will result in a function which is continuous, still close to but its right-hand differences can be arbitrary large. To make this argument more precise, let be an integer so large such that

,

where is the maximum absolute value of the one-sided derivatives of , and define

.

It is easy to see that and .

Now we have that is nowhere dense, therefore is of the first category, and this is what we had to show.

Since is a complete metric space, it follows that there exists a nowhere differentiable everywhere continuous function. Banach’s theorem is one of the simplest method to show an existence of such function, moreover it shows not only existence, it also gives that differentiable functions are in the minority among continuous functions.

Explicit examples were given by Weierstrass. Let . Then the function

is everywhere continuous but nowhere differentiable.

**Continuity set of functions.** Let be a real function. We have seen some interesting examples regarding the connection of continuity and differentiability, and now we shall study the set of continuity. There exists nowhere continuous functions, for example the famous Dirichlet function defined as

Another famous example is the Thomae function (which is also attributed to Riemann sometimes) defined as

Considering the properties of the rational numbers it is easy to see that Thomae’s function is discontinuous at the rationals and continuous at the irrationals. The question is, is there a function which is continuous only at the rationals?

To give a description of the continuity set of a function, we need to introduce two classes of sets.

**Definition.** Let be a topological space and let be a subset of .

(i) is called a set, if it is the countable intersection of open sets.

(ii) is called an set, if it is the countable union of closed sets.

**Example.** (i) The set of rationals is an set, since it is the countable union of singleton sets.

(ii) The set of irrationals is a set, since .

**Theorem 3.** Let be a real function. Then the set

is a subset of the real line.

*Proof.* Define the function

.

We call the *oscillation* of . It is easy to see that for every , the set

is open. Moreover, it is also easy to see that

,

which gives us that the continuity set is indeed a set.

The Baire category theorem gives that the set of rationals is not a set. Indeed if it were, it would follow that the set of irrationals is an set, that is where each is closed. This implies that

from which, since is of the first category, the Baire category theorem gives that at least one of the ‘s contains a nonempty open set but this is impossible, because their union is the set of irrationals.

This gives that there is no function which is continuous only at the rationals. The converse of Theorem 3 is also true, that is for every set there is a function which is continuous only at that set.

**Limits of continuous functions.** If is a pointwise convergent sequence of continuous functions with , then need not be continuous, as the example shows. In this case,

which, albeit not continuous at , not very wild. What can we say about pointwise limits of continuous functions? For René-Louis Baire, study of such functions was the principal motivation for the famous Baire category theorem. He introduced categories of functions which we now call Baire- categories. On a complete metric space the Baire-0 functions are the continuous functions, the Baire-1 functions are the functions which can be obtained as the pointwise limits of continuous functions, the Baire-2 functions are the functions which can be obtained as the pointwise limit of Baire-1 functions and it goes like this ad infinitum. (To be more precise, it goes *way *beyond ad infinitum, but this is not our concern now.)

**Theorem 4.** Let be a pointwise convergent sequence of continuous functions with limit . Then the discontinuity set of

is a set of the first category.

*Proof.* Let and define the sets

.

Since , it is enough to show that is nowhere dense. is closed, therefore we need to show that if is a closed interval of the real line, then is nonempty. To do this, define the sets

.

Since its complement is open, is closed and since the sequence of functions converges pointwise, . If is a closed interval on the real line, then, since , the Baire category theorem implies that there is an such that contains an open interval . This means that

holds for all , which by letting and selecting yields that on . For every , the continuity of implies that if is close enough to , we have

.

Using the triangle inequality, this implies that , that is , and this is what we had to show.

This theorem also shows that the Dirichlet function

cannot be obtained as the pointwise limit of continuous functions. However, as the formula

shows, it can be obtained as the pointwise limit of Baire-1 functions, hence it is a Baire-2 function.

**Zero derivatives.** It is easy to see that if is a polynomial, then its derivatives of sufficiently high order are zero. The Baire category theorem gives a surprising and simple converse.

**Proposition 1. **Let be an entire function and suppose that for every there is an (depending from ) such that , where denotes the -th derivative of . Then is a polynomial.

*Proof.* Define the sets

.

Since is a complete metric space, the Baire category theorem implies that for some the set contains a nonempty open set . That is, for all , which, since is entire, implies that is a polynomial of degree at most .

What if we study infinitely many times differentiable real functions ? The proof what we have just seen fails, because on the real line the class of analytic functions and the class of infinitely many times differentiable functions is not the same. Most importantly, if two infinitely many times differentiable functions coincide on some open set, they are not necessarily the same. However, the real version of Proposition 1 holds.

**Theorem 5. **Let be an infinitely many times differentiable function and suppose that for every there is an (depending from ) such that . Then is a polynomial.

**The principle of uniform boundedness.** Functional analysis has three fundamental theorems, whose importance can not be overstated. These are the Banach-Steinhaus theorem, the open mapping theorem and the Hahn-Banach theorem. In a traditional functional analysis course the first two is done with the aid of the Baire category theorem. We shall see the Banach-Steinhaus theorem (a.k.a. the uniform boundedness principle) now.

**Theorem 6.** (Banach-Steinhaus) Let be a Banach space and let be a normed vector space. Let be a collection of bounded linear transformations , where is an arbitrary set. Then either there exists an such that

,

or there is a dense set such that

holds for all .

*Proof. *Suppose that the collection of transformations is not uniformly bounded in norm and define the set

.

Our goal is to show that this set is dense in our metric space. In order to do that, let

.

Since , it is enough to show that is open and dense, from which the Baire theorem implies the denseness of .

* is open:* Let . By definition, there is a such that . Since the function is continuous, for every there is a such that

holds for all if is small enough, which implies the openness of .

(Or, to summarize this reasoning in a more compact way, we can just say that *“the supremum of continuous functions is lower semicontinuous”.*)

* is dense in :* Let be arbitrary and let be an open ball containing . We need to show that is nonempty. There are two cases.

(i) If holds, then we are done.

(ii) If not, then, since , there is a and an , such that and

.

This implies that , but then the reverse triangle inequality implies

.

Therefore , which, since and were arbitrary, implies that is dense in , and this is what we had to show.

It is worth to note that the Banach-Steinhaus theorem basically says that a collection of transformations behaves in an extreme way regarding their bound. Either they are uniformly bounded or they are very much unbounded.

**Bibliography.
**[1] John C. Oxtoby, Measure and Category, second edition, Springer-Verlag, 1980

[2] Walter Rudin, Real and Complex Analysis, third edition, McGraw-Hill, 1987