10a. Functions, continuity

[math] \newcommand{\mathds}{\mathbb}[/math]

This article was automatically generated from a tex file and may contain conversion errors. If permitted, you may login and edit this article to improve the conversion.

We have seen so far the theory of linear maps [math]f:\mathbb R^N\to\mathbb R^M[/math], and [math]f:\mathbb C^N\to\mathbb C^M[/math]. In what follows we develop the theory of maps [math]f:\mathbb R^N\to\mathbb R^M[/math] and [math]f:\mathbb C^N\to\mathbb C^M[/math] in general, in analogy with what we know about the maps [math]f:\mathbb R\to\mathbb R[/math], from Part I of this book, and with what we know about the maps [math]f:\mathbb C\to\mathbb C[/math], from Part II of this book.


We will rely of course as well on the substantial help from the linear algebra that we learned in chapter 9, which more or less solves all our potential questions regarding analysis, when the map [math]f[/math] in question happens to be linear, of the following form:

[[math]] f(x)=Ax [[/math]]


However, things in general will be quite tricky, among others because a map [math]f:\mathbb C\to\mathbb C[/math] can be regarded as a map [math]f:\mathbb R^2\to\mathbb R^2[/math], leading to an obvious dimension mess. So, in order not to mess up things with dimensions, we will first study the real case, that of the maps [math]f:\mathbb R^N\to\mathbb R^M[/math], with minimal reference to the complex numbers, and study the maps [math]f:\mathbb C^N\to\mathbb C^M[/math] only afterwards. And with the remark that this plan, while certainly reasonable, will stumble at some point into some difficulties, coming from the fact that a linear map [math]f:\mathbb R^N\to\mathbb R^N[/math] can have complex eigenvalues, and so staying over [math]\mathbb R[/math] is not enough, for fully understanding it. Welcome to the several variables mess.


But probably enough talking, let us get started. As a first objective, we would like to talk about the continuity, and other basic analytic properties, of the maps [math]f:\mathbb R^N\to\mathbb R^M[/math]. And for this, we will run all the time into the formula of the distance in [math]\mathbb R^N[/math], namely:

[[math]] d(x,y)=\sqrt{\sum_{i=1}^N(x_i-y_i)^2} [[/math]]


In order to avoid using all the time this formula, which quite often can lead into complicated computations, and even into following wrong paths, it is convenient to relax a bit, and take an abstract point of view on all this.


So, let us begin by axiomatizing the properties of the distance [math]d(x,y)[/math] given above, by generalizing what we know in [math]\mathbb R^N[/math]. This leads us into the following notion:

Definition

A metric space is a set [math]X[/math] with a distance function [math]d:X\times X\to\mathbb R_+[/math], having the following properties:

  • [math]d(x,y) \gt 0[/math] if [math]x\neq y[/math], and [math]d(x,x)=0[/math].
  • [math]d(x,y)=d(y,x)[/math].
  • [math]d(x,y)\leq d(x,z)+d(y,z)[/math].

As a basic example, we have [math]\mathbb R^N[/math], as well as any of its subsets [math]X\subset\mathbb R^N[/math]. Indeed, the first two axioms are clear, and for the third axiom, we must prove that:

[[math]] \sqrt{\sum_i(x_i-y_i)^2}\leq \sqrt{\sum_i(x_i-z_i)^2}+\sqrt{\sum_i(y_i-z_i)^2} [[/math]]


But with [math]a=x-z[/math] and [math]b=y-z[/math], this is the same as proving that:

[[math]] \sqrt{\sum_i(a_i+b_i)^2}\leq\sqrt{\sum_i a_i^2}+\sqrt{\sum_i b_i^2} [[/math]]


Now by raising to the square, this is the same as proving that:

[[math]] \left(\sum_ia_ib_i\right)^2\leq\left(\sum_ia_i^2\right)\left(\sum_ib_i^2\right) [[/math]]


But this latter inequality is one of the many equivalent formulations of the Cauchy-Schwarz inequality, that we know from chapter 7, and which follows as well by using the fact that the following function being positive, its discriminant must be negative:

[[math]] f(t)=\sum_i(a_i+tb_i)^2 [[/math]]


As another example, we have [math]\mathbb C^N[/math], as well as any of its subsets [math]X\subset\mathbb C^N[/math]. Indeed, this follows either from [math]\mathbb C^N\simeq\mathbb R^{2N}[/math], which is an isomorphism of metric spaces, or directly, along the lines of the above proof for [math]\mathbb R^N[/math], by making changes where needed. To be more precise, after doing the algebra, we are left with proving the following inequality:

[[math]] \left|\sum_ia_i\bar{b}_i\right|^2\leq\left(\sum_i|a_i|^2\right)\left(\sum_i|b_i|^2\right) [[/math]]


But this is the complex version of the Cauchy-Schwarz inequality, that we know also from chapter 7, and which follows as well directly, by using the fact that the following function, with [math]t\in\mathbb R[/math] and [math]|w|=1[/math], being positive, its discriminant must be negative:

[[math]] f(t)=\sum_i|a_i+twb_i|^2 [[/math]]

Here is now another example, which at first looks new and interesting, but is in fact not new, because it appears as a subspace of some suitable [math]\mathbb R^N[/math]:

Proposition

Given a finite set [math]X[/math], the following function is a metric on it, called discrete metric:

[[math]] d(x,y)=\begin{cases} 1&{\rm if}\ x\neq y\\ 0&{\rm if}\ x=y \end{cases} [[/math]]
This metric space is in fact the [math]N[/math]-simplex, with [math]N=|X|[/math], and can be realized as a subspace of [math]\mathbb R^{N-1}[/math], or, more conveniently, as a subspace of [math]\mathbb R^N[/math].


Show Proof

There are several things going on here, the idea being as follows:


(1) First of all, the axioms from Definition 10.1 are trivially satisfied, and with the main axiom, namely the triangle inequality, basically coming from:

[[math]] 1+1\leq1 [[/math]]


(2) At the level of examples, at [math]|X|=1[/math] we obtain a point, at [math]|X|=2[/math] we obtain a segment, at [math]|X|=3[/math] we obtain an equilateral triangle, at [math]|X|=4[/math] we obtain a regular tetrahedron, and so on. Thus, what we have in general, at [math]|X|=N[/math], is the arbitrary dimensional generalization of this series of geometric objects, called [math]N[/math]-simplex.


(3) In what regards now the geometric generalization of the [math]N[/math]-simplex, our above examples, namely segment, triangle, tetrahedron and so on, suggest to look for an embedding [math]X\subset\mathbb R^{N-1}[/math]. This is something which is certainly possible, but the computations here are quite complicated, involving a lot of trigonometry, as you can check yourself by studying the problem at [math]N=4[/math], that is, parametrizing the regular tetrahedron in [math]\mathbb R^3[/math].


(4) However, mathematics, or perhaps physics, come to the rescue, via the idea “add a dimension, for getting smarter”. Indeed, when looking for an embedding [math]X\subset\mathbb R^N[/math] things drastically simplify, because we can simply take [math]X[/math] to be the standard basis of [math]\mathbb R^N[/math]:

[[math]] X=\{e_1,\ldots,e_N\} [[/math]]


Indeed, we have by definition [math]d(e_i,e_j)=1[/math] for any [math]i\neq j[/math]. So, we solved our embedding problem, just like that, without doing any computations or trigonometry.

Getting back now to Definition 10.1 as it is, the axioms there are satisfied as well for the various spaces of infinite dimensions that we met in chapter 7. Thus, the whole discussion following Definition 10.1 generalizes to arbitrary dimensions. Also, so does Proposition 10.2, to the case of the sets [math]X[/math] of arbitrary cardinality, and with the realization of the corresponding metric space being again by using a standard basis, as follows:

[[math]] X=\{e_x\}_{x\in X}\subset l^2(X) [[/math]]


However, in what follows we will not insist much on these latter examples, because we will be mainly interested, as planned before, in [math]\mathbb R^N,\mathbb C^N[/math] and their subspaces.


Moving ahead now with some theory, and allowing us a bit of slopiness, we have:

Proposition

We can talk about limits inside metric spaces [math]X[/math], by saying that

[[math]] x_n\to x\iff d(x_n,x)\to0 [[/math]]
and we can talk as well about continuous functions [math]f:X\to Y[/math], by requiring that

[[math]] x_n\to x\implies f(x_n)\to f(x) [[/math]]
and with these notions in hand, all the basic results from the cases [math]X=\mathbb R,\mathbb C[/math] extend.


Show Proof

All this is very standard, and we will leave this as an exercise, namely carefully checking what we did so far in this book, in relation with limits and continuity, in the cases [math]X=\mathbb R,\mathbb C[/math], and working out the metric space extensions of this. Of course I can hear you screaming that this is too much work, but believe me, after some thinking, there is in fact not much work to be done. Indeed, all that we have been doing of advanced type requires sums [math]x+y[/math] or multiplication by scalars [math]\lambda x[/math], and such operations being not allowed in the general context of Definition 10.1, we are just left with a handful of trivialities, that you can surely work out, as a quick and instructive exercise.

More interestingly now, we can talk about open and closed sets inside metric spaces [math]X[/math], again in analogy with what we did for [math]X=\mathbb R,\mathbb C[/math], but with a whole lot of interesting new phenomena appearing. So, we will do this in detail. Let us start with:

Definition

Let [math]X[/math] be a metric space.

  • The open balls are the sets [math]B_x(r)=\{y\in X|d(x,y) \lt r\}[/math].
  • The closed balls are the sets [math]\bar{B}_x(r)=\{y\in X|d(x,y)\leq r\}[/math].
  • [math]E\subset X[/math] is called open if for any [math]x\in E[/math] we have a ball [math]B_x(r)\subset E[/math].
  • [math]E\subset X[/math] is called closed if its complement [math]E^c\subset X[/math] is open.

At the level of examples, you can quickly convince yourself, by working out a few of them, that our notions above coincide with the usual ones, that we know well, in the cases [math]X=\mathbb R,\mathbb C[/math]. We will be back to this later, with some general results in this sense, confirming all this. But for the moment, let us work out the basics. We first have the following result, clarifying some terminology issues from Definition 10.4:

Proposition

The open balls are open, and the closed balls are closed.


Show Proof

This might sound a bit as a joke, but it is not one, because this is the kind of thing that we have to duly check. Fortunately, all this is elementary, as follows:


(1) Given an open ball [math]B_x(r)[/math] and a point [math]y\in B_x(r)[/math], by using the triangle inequality we have [math]B_y(r')\subset B_x(r)[/math], with [math]r'=r-d(x,y)[/math]. Thus, [math]B_x(r)[/math] is indeed open.


(2) Given a closed ball [math]\bar{B}_x(r)[/math] and a point [math]y\in B_x(r)^c[/math], by using the triangle inequality we have [math]B_y(r')\subset B_x(r)^c[/math], with [math]r'=d(x,y)-r[/math]. Thus, [math]\bar{B}_x(r)[/math] is indeed closed.

Here is now something more interesting, making the link with our intuitive understanding of the notion of closedness, coming from our experience so far with analysis:

Theorem

For a set [math]E\in X[/math], the following are equivalent:

  • [math]E[/math] is closed in our sense, meaning that [math]E^c[/math] is open.
  • We have [math]x_n\to x,x_n\in E\implies x\in E[/math].


Show Proof

We can prove this by double implication, as follows:


[math](1)\implies(2)[/math] Assume by contradiction [math]x_n\to x,x_n\in E[/math] with [math]x\notin E[/math]. Since we have [math]x\in E^c[/math], which is open, we can pick a ball [math]B_x(r)\subset E^c[/math]. But this contradicts our convergence assumption [math]x_n\to x[/math], so we are done with this implication.


[math](2)\implies(1)[/math] Assume by contradiction that [math]E[/math] is not closed in our sense, meaning that [math]E^c[/math] is not open. Thus, we can find [math]x\in E^c[/math] such that there is no ball [math]B_x(r)\subset E^c[/math]. But with [math]r=1/n[/math] this provides us with a point [math]x_n\in B_x(1/n)\cap E[/math], and since we have [math]x_n\to x[/math], this contradicts our assumption (2). Thus, we are done with this implication too.

Here is another basic theorem about open and closed sets:

Theorem

Let [math]X[/math] be a metric space.

  • If [math]E_i[/math] are open, then [math]\cup_iE_i[/math] is open.
  • If [math]F_i[/math] are closed, then [math]\cap_iF_i[/math] is closed.
  • If [math]E_1,\ldots,E_n[/math] are open, then [math]\cap_iE_i[/math] is open.
  • If [math]F_1,\ldots,F_n[/math] are closed, then [math]\cup_iF_i[/math] is closed.

Moreover, both (3) and (4) can fail for infinite intersections and unions.


Show Proof

We have several things to be proved, the idea being as follows:


(1) This is clear from definitions, because any point [math]x\in\cup_iE_i[/math] must satisfy [math]x\in E_i[/math] for some [math]i[/math], and so has a ball around it belonging to [math]E_i[/math], and so to [math]\cup_iE_i[/math].


(2) This follows from (1), by using the following well-known set theory formula:

[[math]] \left(\bigcup_iE_i\right)^c=\bigcap_iE_i^c [[/math]]


(3) Given an arbitrary point [math]x\in\cap_iE_i[/math], we have [math]x\in E_i[/math] for any [math]i[/math], and so we have a ball [math]B_x(r_i)\subset E_i[/math] for any [math]i[/math]. Now with this in hand, let us set:

[[math]] B=B_x(r_1)\cap\ldots\cap B_x(r_n) [[/math]]


As a first observation, this is a ball around [math]x[/math], [math]B=B_x(r)[/math], of radius given by:

[[math]] r=\min(r_1,\ldots,r_n) [[/math]]


But this ball belongs to all the [math]E_i[/math], and so belongs to their intersection [math]\cap_iE_i[/math]. We conclude that the intersection [math]\cap_iE_i[/math] is open, as desired.


(4) This follows from (3), by using the following well-known set theory formula:

[[math]] \left(\bigcap_iE_i\right)^c=\bigcup_iE_i^c [[/math]]


(5) Finally, in what regards the counterexamples at the end, these can be both found on [math]\mathbb R[/math]. Indeed, for the infinite intersections of open sets, we can use:

[[math]] \bigcap_n\left(-\frac{1}{n}\ ,\ \frac{1}{n}\right)=\{0\} [[/math]]


As for the infinite unions of closed sets, here we can use:

[[math]] \bigcup_n\left[0\,,\,1-\frac{1}{n}\right]=[0,1) [[/math]]


Thus, we are led to the conclusions in the statement.

Finally, still in relation with open and closed sets, we have as well:

Definition

Let [math]X[/math] be a metric space, and [math]E\subset X[/math] be a subset.

  • The interior [math]E^\circ\subset E[/math] is the set of points [math]x\in E[/math] which admit around them open balls [math]B_x(r)\subset E[/math].
  • The closure [math]E\subset\bar{E}[/math] is the set of points [math]x\in X[/math] which appear as limits of sequences [math]x_n\to x[/math], with [math]x\in E[/math].

These notions are quite interesting, because they make sense for any set [math]E[/math]. That is, when [math]E[/math] is open, it is open and end of the story, and when [math]E[/math] is closed, it is closed and end of the story too. In general, however, a set [math]E\subset X[/math] is not open or closed, and what we can best do to it, in order to study it with our tools, is to “squeeze” it, as follows:

[[math]] E^\circ\subset E\subset\bar{E} [[/math]]


In practice now, in order to use the above notions, we need to know a number of things, including that fact that [math]E[/math] open implies [math]E^\circ=E[/math], the fact that [math]E[/math] closed implies [math]\bar{E}=E[/math], and many more such results, not to forget the fact that the closures of the open balls [math]B_r(x)[/math] are the closed balls [math]\bar{B}_x(r)[/math], clarifying an obvious notational issue which appears with respect to Definition 10.4. But all this can be done, and the useful statement here, summarizing all we need to know about interiors and closures, is as follows:

Theorem

Let [math]X[/math] be a metric space, and [math]E\subset X[/math] be a subset.

  • The interior [math]E^\circ\subset E[/math] is the biggest open set contained in [math]E[/math].
  • The closure [math]E\subset\bar{E}[/math] is the smallest closed set containing [math]E[/math].


Show Proof

We have several things to be proved, the idea being as follows:


(1) Let us first prove that the interior [math]E^\circ[/math] is open. For this purpose, pick [math]x\in E^\circ[/math]. We know that we have a ball [math]B_x(r)\subset E[/math], and since this ball is open, it follows that we have [math]B_x(r)\subset E^\circ[/math]. Thus, the interior [math]E^\circ[/math] is open, as claimed.


(2) Let us prove now that the closure [math]\bar{E}[/math] is closed. For this purpose, we will prove that the complement [math]\bar{E}^c[/math] is open. So, pick [math]x\in\bar{E}^c[/math]. Then [math]x[/math] cannot appear as a limit of a sequence [math]x_n\to x[/math] with [math]x_n\in E[/math], so we have a ball [math]B_x(r)\subset \bar{E}^c[/math], as desired.


(3) Finally, the maximality and minimality assertions regarding [math]E^\circ[/math] and [math]\bar{E}[/math] are both routine, coming from definitions, and we will leave them as exercises.

As an application of the theory developed above, and more specifically of the notion of closure from Definition 10.8, we can talk as well about density, as follows:

Definition

We say that a subset [math]E\subset X[/math] is dense when:

[[math]] \bar{E}=X [[/math]]
That is, any point of [math]X[/math] must appear as a limit of points of [math]E[/math].

Obviously, this is something which is in tune with what we know so far from this book, and with the intuitive notion of density. As a basic example, we have [math]\bar{\mathbb Q}=\mathbb R[/math], that we know well from the beginning of this book. As another example, we have the fact that the diagonalizable matrices are dense inside [math]M_N(\mathbb C)[/math], that we know from chapter 9. There are of course many other examples, and we will be back to this, in what follows.

General references

Banica, Teo (2024). "Calculus and applications". arXiv:2401.00911 [math.CO].