---
# System prepended metadata

title: '571: Ch2 Basic Topology'
tags: ['571']

---

571: Ch2 Topology Notes
====
###### tags: `571` `MAT571`

# Euclidean spaces, $\mathbb R^n$ and $\mathbb C^n$

**Definition** A ***[norm](https://en.wikipedia.org/wiki/Normed_vector_space)*** on a real or complex vector space $X$ is a map, $\|\cdot\|:X\to[0,\infty)$ satisfying
* $\|\alpha x\|=|\alpha|\|x\|$ 
* $\|x+y\|\le \|x\|+\|y\|$ (Triangle inequality)
* $\|x\|=0 \iff x=0$ 

**Examples** The absolute value function or modulus on $\mathbb R$ or $\mathbb C$ is a norm. The usual magnitude of a vector in $\mathbb R^n$ given by $\|x\|_2=\bigl(|x_1|^2+\cdots+|x_n|^2\bigr)^{\frac{1}{2}}$ is a norm on $\mathbb R^n$ or $\mathbb C^n$.

A ***distance*** can be defined on a normed v.s. by setting
$$
d(x,y)=\|x-y\|
$$
It is easy to see that $d:X^2\to [0,\infty)$ satisfies 
* $d(x,y)=0\iff x=y$
* $d(x,y)\le d(x,z)+d(z,y)$ (triangle inequality)

**Example** Clearly the 2-norm, $\|\cdot\|_2$ on $\mathbb R^n$ or $\mathbb C^n$ defines the usual Euclidean  notion of distance. 

There are other norms on the Euclidean spaces:
* $\|x\|_1=|x_1|+\cdots+|x_n|$
* $\|x\|_\infty = \max\{|x_i|\mid i=1,2,\ldots,n\}$
* $\|x\|_p=\bigl(|x_1|^p+\cdots+|x_n|^p)^{\frac{1}{p}}$ for $1\leq p$.

All of these play essential roles in analysis. We can also expand from $\mathbb R^n$ and $\mathbb C^n$ to $\mathbb R^\infty$ and $\mathbb C^\infty$. 

**Exercise** Sketch the "unit circle" in each of the $p$-norms in $\mathbb R^2$.

<iframe src="https://www.geogebra.org/calculator/upxrtmvs?embed" width="800" height="600" allowfullscreen style="border: 1px solid #e4e4e4;border-radius: 4px;" frameborder="0"></iframe>

The case we are most familiar with, that is, the case $p=2$, is the most important here. For this case there is extra stucture, namely the ***inner product*** induces the norm and hence introduces both the notion of length and angle.

For $x,y\in \mathbb C^n$, the *standard inner product* is defines as
$$
\langle x,y\rangle = x\bullet y=y^Hx=\sum_{i=1}^n\bar y_i x
$$
Here for a complex matrix $A$, $A^H$ is the conjugate-transpose of $A$, that is $A^H_{i,j}=\bar{A}_{j,i}$. 

I prefer the $\langle x, y\rangle$ notation, sometimes $\langle x \mid y\rangle$, over the $x\bullet y$ notation, so I will use it. The standard inner-product satisfies
* $\langle x, y\rangle =\overline{\langle y, x\rangle}$ (conjugate-symmetry)
* $\langle \alpha x + \beta y, z\rangle = \alpha\langle x,z\rangle+\beta\langle y,z\rangle$ (left-linear)

These together also give right-conjugate-linear. (***sesqui-linear***). For $\mathbb R^n$ these become symmetry and bi-linearity.

The 2-norm is defined by $\|x\|_2^2=\langle x, x\rangle = \sum_{i=1}^n\bar x_i x_i=\sum_{i=1}^n|x_i|^2$. The following fallow easily from the properties of inner-products
* Cauchy-Schwartz Inequality: $|\langle x,y\rangle| \le \|x\|_2\|y\|_2$
* Triangle-Ineqaulity: $\|x+y\|_2\le \|x\|_2+\|y\|_2$


[Notes from a linear algebra class](https://hackmd.io/WAkgbCfQT5m9VeuF6uiKMg?view) describing how the inner-product generates the $2$-norm as well as Cauchy-Schwartz, the parallelogram law, the polarization identity, etc. 

For $1 \leq p \leq \infty$ and $p\neq 2$, different arguments are required to prove the generalization of the triangle-inequality

[Minkowski-Inequality](https://en.wikipedia.org/wiki/Minkowski_inequality): $\|x+y\|_p\le \|x\|_p+\|y\|_p$

A key step is [Young's Inequality](https://en.wikipedia.org/wiki/Young%27s_inequality_for_products): $\prod_{i=1}^n a_i^{p_i}\leq \sum_{i=1}^np_ia_i$ provided $p_1,a_i\in [0,1]$ and $\sum_{i=1}^np_i=1$. 

Note if $p_i\in [0,1]$ and $\sum_{i=1}^np_i=1$, then $\sum_{i=1}^n p_ia_i$ is called a ***convex combination*** of $x_1,\ldots,x_n$. 

**Definition** $f:X\to \mathbb R$ is ***concave*** iff $f(tx+(1-t)y)\ge tf(x)+(1-t)f(y)$.

**Example** The logarithm for base $p>1$ is concave. 

**Exercise** If $f$ is concave and $p_i\in[0,1]$ and $\sum_{i=1}^np_i=1$, then 
$$
f\Bigl(\sum_{i=1}^np_i x_i\Bigr)\ge \sum_{i=1}^n p_i f(x_i)
$$

Hint: Use induction. 

**Corollary** Young's Inequality 

**Proof** Fix $p_i\in[0,1]$ with $\sum_{i=1}^np_i=1$, then as $\log(x)$ is concave
$$
\log\Bigl(\sum_{i=1}^np_i a_i\Bigr)\ge \log\Bigl(\prod_{i=1}^n a_i^{p_i}\Bigr)=\sum_{i=1}^n p_i\log(a_i)
$$
Since $\log(x)$ is increasing
$$
\sum_{i=1}^np_i a_i\ge \prod_{i=1}^n a_i^{p_i}
$$

**Corollary** Arithmetic-Geometric Inequality, $(a_1\cdot a_2\cdots a_n)^{\frac{1}{n}} \leq \frac{a_1+a_2+\cdots+a_n}{n}$. 

Just take $p_i=\frac{1}{n}$. 

Taking $n=2$ we get:

**Corollary** $ab\leq\frac{a^p}{p}+\frac{b^q}{q}$ for $0<a,b$, $1 < p,q$, and $\frac{1}{p}+\frac{1}{q}=1$. 

From above we have $(a^p)^{\frac{1}{p}}(b^q)^{\frac{1}{q}}\leq\frac{1}{p}a^p+\frac{1}{q}b^q$. 

**Corollary** ([Hölder's Inequality](https://en.wikipedia.org/wiki/H%C3%B6lder%27s_inequality)) $\|xy\|_1\le \|x\|_p\|y\|_q$ for $1<p,q$ and $\frac{1}{p}+\frac{1}{q}=1$. 

Note that for $p=q=2$, this is Cauchy-Schwartz.

**Proof** It suffices to prove this in the case that $\|x\|_p=1=\|y\|_q$. To see this replace $x$ and $y$ by $\hat x=\frac{1}{\|x\|_p}x$ and $\hat y=\frac{1}{\|y\|_q}y$, for then we get
$$
\|xy\|_1=\|x\|_p\|y\|_q\|\hat x\hat y\|_1\leq \|x\|_p\|y\|_q\|\hat x\|_p\|\hat y\|_q=\|x\|_p\|y\|_q
$$

This is exactly the same trick used in the proof given of Cauchy-Schwartz. 

So what we must show now is just
$$
\|xy\|_1\leq 1
$$
We have by Young's inequality that $|x_iy_i|\leq \frac{|x_i|^p}{p}+\frac{|y_i|^q}{q}$ and so
$$
\|xy\|_1\leq \frac{\|x\|_p^p}{p}+\frac{\|y\|_q^q}{q}=\frac{1}{p}+\frac{1}{q}=1
$$
as required.

Finally, we can use this to prove Minkowski's Inequality.

**Corollary** $\|x+y\|_p\leq\|x\|_p+\|y\|_p$.

**Proof** This is a computation
$$
\begin{align}
 \|x+y\|_p^p
 &=\sum_{i=1}^n|x_i+y_i|^p\\
 &=\sum_{i=1}^n|x_i+y_i|(|x_i+y_i|)^{p-1}\\
 &\le\sum_{i=1}^n|x_i|(|x_i+y_i|)^{p-1}+\sum_{i=1}^n|y_i|(|x_i+y_i|)^{p-1}\\
 &=\|xz\|_1+\|yz\|_1\text{ where }z_i=|x_i+y_i|^{p-1}\\
 &\le\|x\|_p\|z\|_q+\|y\|_p\|z\|_q\text{ where }\frac{1}{p}+\frac{1}{q}=1\text{ i.e. }q=\frac{p}{p-1}\\
 &=(\|x\|_p+\|y\|_p)\|z\|_q
\end{align}
$$
But $\|z\|_q=\Bigl(\sum_{i=1}^n\bigl(|x_i+y_i|^{p-1}\bigr)^{\frac{p}{p-1}}\bigr)^{\frac{p-1}{p}}=\Bigl(\bigl(\sum_{i=1}^n|x_i+y_i|^p\bigr)^{\frac{1}{p}}\Bigr)^{p-1}=\|x+y\|_p^{p-1}$.

So we have $\|x+y\|_p^p\le (\|x\|_p+\|y\|_p)\|x+y\|_p^{p-1}$ and so $\frac{\|x+y\|_p^p}{\|x+y\|_p^{p-1}}=\|x+y\|_p\le \|x\|_p+\|y\|_p$ as wanted.

# Metric Spaces

Metric spaces are generalizations of the Euclidean spaces, and even more generally, normed vector spaces. 

**Definition** A ***metric space***, $(X,d)$ is a set $X$ together with a *metric* or *distance* function $d:X\times X\to [0,\infty)$ satisfying
* $d(x,y)=0\iff x=y$
* $d(x,y)=d(y,x)$
* $d(x,y)\le d(x,z)+d(z,y)$ (triangle inequality)

The first examples are the Euclidean spaces from the previous section. There are many ways to make new metrics from old ones. 

## Examples of metric spaces other than the Euclidean spaces

**Theorem** If $(X,d)$ is a metric space and $Y$ is a set and $f:Y\to X$ is injective, then $(Y,\rho)$ is a metric where $\rho(a,b)=d(f(a),f(b))$.

**Proof** (Exercise)

**Example** Let $S\subseteq \mathbb R^3$ be a surface or $C\subseteq \mathbb R^3$ a curve, then the metric induced by the embedding of $S$ or $C$ in $\mathbb R^3$ is just the metric of $\mathbb R^3$ restricted to $S$ or $C$ respectively. 

<a id="cpct"></a>

**Example**  Mapping $\mathbb R\cup\{\infty\}$ onto $S_1$ (The unit circle.) This we did when looking at Pythagorian triples. The map is $x\mapsto \Bigl(\frac{2x}{1+x^2},\frac{x^2-1}{x^2+1}\Bigr)$

<iframe src="https://www.geogebra.org/calculator/szsckpcx?embed" width="800" height="600" allowfullscreen style="border: 1px solid #e4e4e4;border-radius: 4px;" frameborder="0"></iframe>

<a id="stereo"></a>

**Example** [Stereographic projection.](https://en.wikipedia.org/wiki/Stereographic_projection) The mapping here is $(x,y)\underset{\phi}{\mapsto} \Bigl(\frac{2x}{1+R},\frac{2y}{1+R},\frac{1-R}{1+R}\Bigr)$, where $R=x^2+y^2=\|(x,y)\|_{2}^2$. This fails to map $(0,0,1)$ (the north pole). To map this add $\infty$ to $\mathbb R^2$, think of it as being an infinitely large circle around the plane. This is a particular case of the **one-point** compactification of a space. 

It turns out that the metric on $\mathbb R^2$ induced by this mapping is given by:

$$
\begin{align}
d(a,b)^2&=\frac{2\langle a-b,a-b\rangle}{(1+\langle a,a\rangle)(1+\langle b,b\rangle)}
=\frac{2(\|a\|_2^2+\|b\|_2^2-2\langle a,b\rangle)}{(1+\|a\|_2^2)(1+\|b\|_2^2)}\\
&=\frac{2\left(\frac{1}{\|b\|_2^2}+\frac{1}{\|a\|_2^2}-\frac{2\langle a,b\rangle}{\|a\|_2^2\|b\|_2^2}\right)}{\frac{1}{\|a\|_2^2\|b\|_2^2}+\frac{1}{\|b\|_2^2}+\frac{1}{\|a\|_2^2}+1}
\end{align}
$$
It is clear that $d(a,b)\to 0$ as both $\|a\|_2\to\infty$ and $\|b\|_2\to\infty$.

We can also map $\mathbb R^2\cup\{\infty\}$ to the closed unit disk, by $(x,y)\underset{\psi}{\mapsto}\Bigl(\frac{x}{r}e^{-\frac{1}{r}},\frac{y}{r}e^{-\frac{1}{r}}\Bigr)$ where $r=\sqrt{R}=(x^2+y^2)^{1/2}=\|(x,y)\|_{2}$

<iframe src="https://www.geogebra.org/calculator/ud9kwgu6?embed" width="800" height="600" allowfullscreen style="border: 1px solid #e4e4e4;border-radius: 4px;" frameborder="0"></iframe>

**Example** ***Discrete space*** Let $X$ be any set and define $d(x,y)=\begin{cases}0&\text{ if }x=y\\1&\text{ if }x\neq y\end{cases}$.

**Example** Undirected graphs. Why not directed graphs? What about weighted graphs?

## Topological notions in metric spaces

**Definition** Let $X=(X,d)$ be a metric space, $x\in X$ and $r>0$. The ***basic open neighborhood*** of $x$ is the set $N_r(x)=\{y\mid d(x,y)<r\}$.

If $X=\mathbb R$, then $N_r(x)=(x-r,x+r)$. If $X=\mathbb R^2$ and the standard Euclidean metric is used, then $N_r(x)$ is an open disk of radius $r$ centered at $x$. If $X=\mathbb R^3$, and the standard metric is used, then, $N_r(x)$ is the open ball of radius $r$ centered at $x$. 

The $N_r(x)$ is often called the open ball at $x$ of radius $r$. Even though in a general metric space, this need not look anything like a ball. The intuition is coming from $\mathbb R^n$.

**Definition** $U\subseteq X$ is ***open*** iff for all $x\in U$, there is an $r>0$ so that $N_r(x)\subseteq U$. 

**Exercise** Prove the basic properties of open sets:
* $X$ is open.
* $\emptyset$ is open.
* If $U_i$ is open for all $i\in I$, then $U=\bigcup_{i\in I}U_i$ is open. (*Open sets are closed under arbitrary unions*.)
* If $U$ and $V$ are open, then $U\cap V$ is open. (*Open sets are closed under finite intersections.*)
* $N_r(x)$ is open for all $r>0$ and $x\in X$. 

**Definition** A set $U\subseteq X$ is ***closed*** iff $U^c$ is open. 

**Exercise** Convert all of the parts of the preceding exercise into statements concerning closed sets.

**Definition** This definition will gather together some important concepts that generalize familiar notions from calculus to metric spaces. Fix a metric space $X=(X,d)$:
1. $x$ is in the ***closure*** of $A$, that is $x\in\text{Cl}(A)$, iff $N_r(x)\cap A\neq\emptyset$ for all $r>0$.
2. $x$ is a ***limit point*** or ***accumulation point*** of $A$ iff $N_r(x)\cap (A-\{x\})\neq\emptyset$ for all $r>0$. The set of all limit points of $A$ is called the ***derived set of $A$*** and is some times denotes $A'$, $\text{Lim}(A)$ and $\text{Acc}(A)$ might also be used.  (Note that it is possible for $x\in \text{Lim}(A)-A$.) 
3. $x$ is an ***isolated point*** of $A$ iff there is $r>0$ so that $N_r(x)\cap A=\{x\}$. In other words, $x\in A$, but $x$ is not a limit point of $A$. The set of isolated points of $S$ is $\text{Iso}(A)$ and $\text{Iso}(A)=A-\text{Lim}(A)=A-A'$.
4. $x$ is an ***interior point*** of $A$ iff for some $r>0$, $N_r(x)\subseteq A$, set $\text{Int}(A)=\{x\in A\mid x\text{ is interior to }A\}$. Clearly, $A$ is open iff $\text{Int(A)}=A$ and $\text{Cl}(A^c)=\text{Int}(A)^c$. 
5. $x$ is an ***exterior point*** of $A$ iff for some $r>0$, $N_r(x)\subseteq A^c$, set $\text{Ext}(A)=\{x\in A\mid x\text{ is interior to }A^c\}$. Clearly, $\text{Ext}(A)=\text{Int}(A^c)$ and $\text{Cl}(A)=\text{Ext}(A)^c$.
6. $x$ is a ***boundary*** point of $A$ iff $A\cap N_r(x)\neq\emptyset\neq A^c\cap N_r(x)$ for all $r>0$. The set of boundary points is denoted $\partial A$. Clearly, 
   \begin{align}
   \partial A=\rm{Cl}(A)\cap\rm{Cl}(A^c)
   &=\begin{cases}
   \text{Ext}(A)^c\cap\text{Int}(A)^c=\bigl(\text{Ext}(A)\cup\text{Int}(A)\bigr)^c\\
   \text{Cl}(A)\cap\text{Int}(A)^c=\rm{Cl}(A)-\rm{Int}(A)
   \end{cases},
   \end{align}
   which is closed, being the intersection of two closed sets. Note that $\text{Cl(A)}=A\cup\partial A=\text{Int}(A)\cup\partial A$ and $\text{Int}(A)=\text{Cl}(A)-\partial A=A-\partial A$.
7. $A$ is ***perfect*** if $A$ is closed, $A\neq\emptyset$, and $A$ has no isolated points. Equivalently we could just write $A=A'$ (or $A=\text{Lim}(A)$.)
8. $A$ is ***bounded*** iff $A\subseteq N_r(x)$ for some $x$ and $r>0$. 
9. $E$ is ***dense*** in $X$ iff every nbhd contains a point from $E$. $E$ is ***nowhere-dense*** iff for all open $O$ there is an $O'\subseteq O$ such that $O'\cap E=\emptyset$, i.e., $E$ is not dense in $O$. Note that $\partial A$ is always closed and nowhere-dense.

Since closed sets are closed under arbitrary intersections, given an $A\subseteq X$, define the ***closure of $A$*** to be the set 
$$
\text{Cl}(A)=\bigcap\{F\subseteq X\mid F\text{ is closed and }A\subseteq F\}.
$$ 
This is the smallest closed set containing $A$. Similarly, 
$$
\text{Int}(A)=\bigcup\{O\subseteq X\mid F\text{ is open and }O\subseteq A\}.
$$
Notice that $\text{Int}(A)\subseteq A\subseteq \text{Cl}(A)$. 

**Exercise** Show that
$$
A\text{ is open }\iff \partial A\subseteq A^c \iff \partial A\cap A=\emptyset
$$ 
and
$$
A\text{ is closed }\iff \partial A\subseteq A \iff \rm{Lim}(A)\subseteq A.
$$
 
Note that there is no direct relationship between $\partial A$ and $\rm{Lim}(A)$. For example, for $S\subseteq \mathbb R$, any isolated point of $S$ is in the boundary of $S$, so $\rm{Iso}(S)\subseteq\partial S-\rm{Lim}(S)$. On the other hand, in a discrete space, $X$, every subset of $X$ is both open and closed so $\partial S=\rm{Lim}(S)=\emptyset$ for all $S\subseteq X$. We do have
$$
\rm{Lim}(A)\cap\rm{Lim}(A^c)\subseteq \partial A=\partial A^c\subseteq \rm{Lim}(A)\cup\rm{Lim}(A^c)
$$

# General Topological Spaces

**Definition** $X=(X,\tau)$ is a ***topological space*** if $\tau$ is a collection of subsets of $X$ satisfying:
1. $X,\emptyset\in\tau$
2. $\tau$ is closed under all unions.
3. $\tau$ is closed under finite intersections.

The set $\tau$ is called the collection of ***open*** subsets of $X$.

We have from results above that any metric space is a topological space since the set of open subsets of a metric space satisfy the required properties. We also have from results above that many different metrics might result in the same topology, for example, the spaces $\mathbb R^k$ with the metric $d_p(x,y)=\|x-y\|_p$ all have the same topology. (**Exercise**)

Some things are implicit by context. If I am discussing $X$ as a topological space it is assumed that a set $\tau$ of open sets is known. Similarly, if $X$ is metric the metric will be denoted $d$ unless otherwise stated.

Note that most of the notions defined above in the metric context are defined in nearly the same way they were defined above 

* closure, interior, exterior, boundary
* limit/accumulation points, isolated points, derived set
* perfect
* dense subset

The one exception from the list above is that of being bounded, this is a genuinely metric notion. The only change is that wherever we have $N_r(x)$ previously, we now just need $x\in O\in\tau$, that is, ***an open neighborhood of $x$***. 

Recall a sequence $(x_i\mid i\in \mathbb{N})$ is denoted $(x_i)_{i\in\mathbb N}$ or just $(x_i)$ for short and this sequence **converges** to $x$, written $\lim_i x_i=x$ or just $x_i\to x$ iff for all open $O$, if $x\in O$, then there is $N\in \mathbb{N}$, such that, for all $n> N$, $x_n\in O$. This is the *topological* version of the usual *($\epsilon$-$\delta$)-definition* for convergence.

There are many important properties for topological spaces, one that we will use most is called the $T_2$ or ***Hausdorff*** property. This states that if $x,y\in X$, then there are open sets $U$ and $V$ with $x\in U$, $y\in V$, and $U\cap V=\emptyset$. We say that any two points can be separated by open sets. 

**Exercise** Every metric space is Hausdorff. 

The following exercise gives one of the most important properties of Hausdorff spaces.

**Exercise** If $(x_i)$ is a series in a $T_2$ space, then $(x_i)$ has at most one limit, that is, if $x_i\to x$ and $x_i\to x'$, then $x=x'$. 

To see that this can fail consider the following.

**Exercise** Consider the topology $\tau$ on $\mathbb R$ given by $\tau=\{\emptyset,\mathbb R\}\cup\{(a,\infty)\mid a\in\mathbb R\}$. 
* Show that this is not Hausdorff. In particular, for $a<b$, there is no open set containing $a$ that misses $b$.  
* Consider the sequence $x_i=\frac{1}{i}$. Show that if $x<0$, then $x_i\to x$, that is, for all open nbhd $O$ of $x$, for all large enough $i$, $x_i\in O$. In fact, in this case, $x_i\in O$ for all $i$. This means, $x$ is a limit of $x_i$ for all $x \le 0$!
* Let $a\in\mathbb R$, show that $\text{Lim}(\{a\})=(-\infty,a)$ and $\text{Cl}(\{a\})=(-\infty,a]$. 

## Subspaces

Given a topological space $(X,\tau)$ and $Y\subset X$, the ***derived*** or ***induced*** or ***subspace topology*** is given by $A\subseteq Y$ is open iff $A=A\cap O$ for some $O\in \tau$. Equivalently, $\tau|_Y=\{Y\cap O\mid O\in\tau\}$. 

If $(X,d)$ is a metric and $Y\subset X$, then $d|_Y:T\times Y\to[0,\infty)$ given by $d|_Y(x,x')=d(x,x')$ for $x,x'\in Y$. Notice that the topology associated to $d|_Y$ is exactly $\tau|_Y$.

**Exercise** If $Y\subseteq X$, then $A\subseteq Y$ is closed in the subspace topology iff $A = A\cap C$ for some closed $C\subseteq X$. In other words, you can use either the closed or open sets to define the subspace topology.

**Example** The induced topology on $\mathbb Z$ from $\mathbb R$ is the discrete topology, $\tau|_{\mathbb Z}={\cal P}(\mathbb Z)$ since each point $\{n\}$ is both open and closed in $\mathbb Z$.

**Example** In the space $(0,\infty)\subset \mathbb R$, the set $(0,1]$ is closed.

We will heavily use this idea of the induced subspace topology when discussing compact and connected sets.

## Closed vs sequentially closed.

A set $A\subseteq X$ is called **sequentially closed** iff whenever $(x_i)$ is a convergent sequence of points from $A$, then $x_i\to x\in A$, that is the limiting value of the sequence is also in $A$.

If $A$ is closed, and $(x_i)$ is a convergent sequence from $A$, then let $x_i\to x$, by definition if $x\in O$, $O$ open, we have $x_i\in O$ for a tail of $x_i$ and hence $O\cap A\neq \emptyset$, so $x\in \text{Cl}(A)$. But then the sequence converges to a point in $A$ and hence $A$ is sequentially closed.

### In metric spaces, sequentially closed implies closed.

For metric spaces the other direction obtains as well. Suppose $A$ is sequentially closed and $x\in\text{Lim}(A)$, then choose $x_i\in N_{1/n}(x)\cap A$ for each $n\in \mathbb{N}$. Clearly, $x_i\to x$ and by sequential closedness, $x\in A$. So $\text{Lim}(A)\subset A$ and hence $A$ is closed inthe topological sense.

**Note**: ***1^st^ countable*** suffices for this argument. $X$ is 1^st^ countable if for all $x\in X$ there is a countable set ${\cal B}_x$ so that if $O$ is an open nbhd of $x$, then there is $U\in {\cal B}_x$ so that $U\subseteq O$. That is, $X$ haa a locally countable base at each $x\in X$. In the preceding, we just used ${\cal B}_x=\{N_{1/n}(x)\mid n=1,2,...\}$. 
 
## Compactness

**Definition** $X$ is ***compact*** iff any *open cover* $\cal O$ of $X$ contains a finite *subcover*.

$\cal O$ is a ***open cover*** of $X$ iff ${\cal O}\subseteq \tau_X$ (is a collection of open sets) and $X\subseteq\bigcup\cal O$. 

There is another sort of useful characterization of compactness. A set $\cal F$ has the ***finite intersection property (fip)*** iff for all finite ${\cal F'}\subset\cal F$, $\bigcap\cal F'\neq\emptyset$. 

**Theorem** $X$ is compact iff every collection of closed sets $\cal F$ with the fip satisfies $\bigcap {\cal F}\neq\emptyset$.

**Exercise** Prove this.

**Definition** $K\subseteq X$ is ***compact*** iff $(K,\tau_X|_K)$, the induced topology on $K$ is compact. 

**Example** $[a,b]\subset\mathbb R$ is compact for any $a<b$ with $a,b\in\mathbb R$.

**Proof** Let $\cal O$ be an open cover of $[a,b]$. We can replace any $O\in \cal O$ with intervals $(c,d)\subseteq O$ to get a new cover by open intervals. If we find a finite subcover by these open intervals, then we have a finite subcover from the original $\cal O$. So assume $\cal O$ is a cover by open intervals. Call $d\le 1$ *good* if there i a finite set of open intervals from $\cal O$ that cover $[a,d]$. Let $d^*=\sup\{d\mid d\text{ is good}\}$. Clearly $d^*\not< 1$ since if so there is an interval containing $d^*$, say $(c,d')$, but then there is a finite set from $\cal O$ containing $c$ and hence $d'\le d^*$, a contradiction. So $d^*=1$, but now let $1\in(c,d)\in\cal O$. The same argument works to cover $[0,c]$ by a finite chain and then $[0,1]$ by adding in $(c,d)$.  
❏ 
Note that the above argument uses the completness of $\mathbb R$. The preceding is an important step to showing that compactness is equivalent to being closed and bounded in the Euclidean spaces. Below there is a second proof of this using sequential compactness.

**Example** You must be careful. No interval in $\mathbb Q$ is compact except for those of the form $[r,r]=\{r\}$, i.e., singletons. One easy way to see this is to note that for any $\alpha<\beta$ from $\mathbb R$, take $x\in(\alpha,\beta)$ irrational, then $(\alpha,\beta)\cap \mathbb Q$ has a sequence with no convergent subsequence, so ***sequential compactness*** fails.

### Compact implies closed in $T_2$ spaces.

Let $K$ be compact and $x\not\in K$. For each $y\in K$ chose open sets $O_y$ and $U_y$ so that $y \in O_y$, $x\in U_y$ and $O_y\cap U_y=\emptyset$. By compactness there is a finite subcover of $K$ given by $O_{y_1},\ldots,O_{y_n}$. Set $O=\bigcup_{i=1}^n O_{y_i}$ and $U=\cap U_{y_i}$. Clearly, $x\in U$, $K\subset O$, and $U\cap O=\emptyset$. This demonstrates that $x\not\in K$ $x$ is separated from $K$ by an open set, and hence $K$ is closed.
❏

### Closed subsets of compact spaces are compact.

This is trivial. Let $\mathscr{O}$ be an open cover of $F\subset K$ where $K$ is compact and $F$ is closed. Then $\mathscr{O}\cup\{F^c\}$ is an open cover of $K$ and hence has a finite subcover $\mathscr{O}'\cup\{F^c\}$. But now $\mathscr{O}'$ is a finite sucover of $F$.
❏

### Compact implies bounded for metric spaces. 

Note that trivially, metric spaces are $T_2$. (From the triangle inequality.) Let $K$ be a compact subset of a metric space. Fix any $\delta>0$ and cover $K$ with $N_\delta(x)$ for $x\in K$. There is a finite subcover $N_\delta(x_i)$ for $i=1,\ldots,n$, this is called a $\delta$-net. For any $x,y\in K$, there is a path $x,x_{i_1},x_{i_2},...,x_{i_m},y$ so that each pair of consecutive points is $<2\delta$ apart. This shows that any 2 points in $K$ are separated by at most $2n\delta$. Hence if $x\in K$, $K\subseteq N_{2n\delta}(x)$, so $K$ is bounded. 
❏

### Heine-Borel Property

We have shown that in a metric space all compact sets are closed and bounded. When does the converse hold?

**Definition** A metric space has the ***Heine-Borel property*** iff all closed and bounded sets are compact. 

**Fact** It is the case that all Euclidean spaces have the Heine-Borel property. This follows from the fact that every "ball" in a Euclidean space is contained in a **$k$-cell** of the form $\prod_{i=1}^n [a_i,b_i]$. It suffices to prove that these $k$-cells are compact as then the set in question is a closed subset of a compact set. This follows immediately from the next section once we have shown that any (finite) closed interval in $\mathbb R$ is compact. 



**Warning** Many very important spaces, that resemble Euclidean spaces are not Heine-Borel spaces. In particular no infinite dimensional normed topological vector space (NVS) is Weierstrass. So $\ell^1$, $\ell^2$, etc. are not Weierstrass. Take the Hilbert space $\ell^2=\{(x_i)_{i\in\mathbb{N}}\mid\sum_{i=1}^\infty |x_i|^2<\infty\}$ for examples. The standard basis here are the vectors $e_i=(0,0,\ldots,0,1,0,\ldots)$ with the 1 in the i^th^ position. These are all on the closed unit sphere $S_{1}({\bf 0})$ which is trivially a closed an bounded set, yet $d(e_i,e_j)^2=||e_i-e_j||^2_2=|1|^2+|-1|^2 = 2$ for all $i\neq j$. Thus $\mathscr{O}=\{N_{1}(e_i)\cap S_1(0)\mid i = 1,2,\ldots\}$ is an open cover of $S_{1}({\bf 0})$ with no finite subcover, since in fact no element of $\mathscr{O}$ can be removed and yet form a cover. This argument works for many such spaces and in fact shows that they are not even $\sigma$-compact.
❏

**Example** Again, a good example to keep in mind is $\mathbb Q$. The only intervals in $\mathbb Q$ that are compact are singletons. So "closed $+$ bounted $\nRightarrow$ compact" in $\mathbb Q$.

### Product spaces.

Given spaces $X$ and $Y$ the space $X\times Y$ is defined by giving the open sets. $O\subseteq X\times Y$ is open iff for all $(x,y)\in O$, there is open $x\in O_x\subseteq X$ and $y\in O_y\subseteq Y$ such that $O_x\times O_y\subseteq O$. Think of $O_x\times O_y$. This same definition generallizes to finite products and even infinite products with a caveat.

Define $p_Y:X\times Y\to Y$ and $p_X:X\times Y\to X$ to be the *trivial* projection functions. The topology on $X\times Y$ is chosen to be the unique smallest topology making all these projection functions continuous.

**Exercise** Let $(X,d_X)$ and $(Y,d_Y)$ be metric spaces. 
* Show that $d^p_{X\times Y}((x,y),(x',y'))=\|(d_X(x,x'),d_Y(y,y')\|_p$ defines a metric on $X\times Y$.
* Explicitly write out $d^2_{X\times Y}$, $d^1_{X\times Y}$,  $d^\infty_{X\times Y}$.
* Show that all of these ***product metrics*** have the same topology, namely, the product topology.

### Finite products of compact spaces are compact.

It is actually the case that arbitrary products of compact spaces are compact, thus for example $\mathbb{I}^{\mathbb{N}}$ (the Hilbert cube) and even $\mathbb{I}^{\mathbb{I}}$ are compact. Here $\mathbb{I}=[0,1]$. **However**, we do not discuss infinite product spaces in this class so I will say no more on this topic.

For finite products $X=\prod_{i=1}^nX_i$ of compact space $X_i$ we argue by induction, hence reducing to simply showing that if $X$ and $Y$ are compact, then so is $X\times Y$. The proof is as follows:

Let $\cal O$ be an open cover of $X\times Y$. For each $x\in X$ get $\{O^x_{i}\mid i = 1\,\ldots,n_x\}\subset \mathscr{O}$ so that $\{p_Y[O^x_i]\mid i=1,\ldots,n_x\}$ is an open cover of $Y$. We get such a finite set since $Y$ is compact.  

Now let $U_x=\bigcap_{i=1}^{n_x}p_X[O_i^x]$. For all $x\in X$, $x\in U_x$ and $U_x$ is open so $\mathscr{U}=\{U_x\mid x\in X\}$ is an open cover of $X$. Since $X$ is compact there is a finite open subcover $\{U_{x_j}\mid j=1,\ldots,m\}$. 

The set $\{O_{i}^{x_j}\mid 0\leq j<m,0\leq i<n_{x_j}\}$ is a finite open subcover of $X\times Y$ as required.

### Compact implies sequentially compact for $T_2$ spaces.

A space $X$ is **sequentially compact** if whenever $(x_i)_i$ is a sequence from $X$, then this sequence has a limit point in $X$, or equivalently, there is a convergent subsequence that converges to a point in $X$.

Suppose $X$ is compact and $(x_i)_i$ has no limit point in $X$, then $\{x_i\mid i\in \mathbb{N}\}$ is closed in $X$. Take $U_i$ so that $x_i\in U_i$ and $U_i\cap U_j=\emptyset$ for $i\neq j$, then $\mathscr{O}=\{X-\{x_i\mid i\in \mathbb{N}\}\}\cup\{U_i\mid i\in \mathbb{N}\}$ is an open subcover of $X$, thus there is a finite open subcover $\{X-\{x_i\mid i\in \mathbb{N}\}\}\cup\{U_{i_j}\mid j=1,\ldots,m\}$, but then $\{U_{i_j}\mid j=1,\ldots,m\}$ is a finite cover of $\{x_i\mid i\in \mathbb{N}\}$ which contradicts our constuction of the $U_i$'s.
❏

### For metric spaces, sequentially compact implies compact.

Assume $X$ is sequentially compact. 

**Theorem** Let $\mathscr{O}$ be an open cover of the sequentially compact metric space $X$. There is a number $\delta>0$ such that for all $x\in X$, there is an $O\in \mathscr{O}$ such that $N_{\delta}(x)\subset O$.

**Proof**: If not build recursively, $x_i$ so that $N_{1/i}(x_i)$ is not contained in any open set from the cover. By sequential compactness there is $x\in X$ and a subsequence $(x_{i_j})_j$ so that $x_{i_j}\to x$. But $x\in O$ for some $O$ in the open cover and for some $\delta>0$, $N_{\delta}(x)\subset O$. Choose $k$ so that $1/{i_k}<\delta/2$, but then $N_{1/{i_k}}(x_{i_k})\subset N_{\delta}(x)\subset O$, contrary to our choice of $x_{i_k}$. 
❏

**Definition** A $\delta$ as in the preceding theorem is called a *Lebesgue number* for the open cover $\mathscr{O}$ 

**Proof (Sequentially compact implies compact):** Now suppose $X$ is metric, sequentially compact, but not compact and choose an open cover $\cal O$ witnessing the failure of compactness. Let $\delta$ be an associated Lebesgue number. Choose $S\subset X$ maximal so that for all $x,x'\in S$, $d_X(x,x')\ge\delta$. $S$ can't be infinite by our assumption of sequential compactness, so let $S=\{x_1,x_2,\ldots,x_n\}$. For all $x\in X$, $N_\delta(x)\cap S\neq\emptyset$, this is what $S$ is maximal means. So for all $x\in X$, $x\in N_\delta(x_i)$ for some $i$. But this means that $\{N_\delta(x_i)\mid i=1,s,\ldots,n\}$ is a cover of $X$. Since for each $i$, $N_\delta(x_i)\subseteq O_i$ for some $O_i\in\cal O$, ${\cal O}'=\{O_i\mid i=1,2,,\ldots,n\}\subseteq\cal O$ is a finite subcover.
❏ 

**Note**: $X$ being ***Lindelöf*** suffices, that is *every cover has a countable subcover*. Clearly, if $X$ is ***2^nd^ countable***, i.e., has a countable base, then it is Lindelöf. 

**Theorem** Every Lindelöf sequentially compact space is compact.

**Proof** Let $\cal O$ be a cover of $X$. Since $X$ is Lindelöf we may assume that ${\cal O}=\{O_i\mid i\in\mathbb N\}$. Let $O'_i=\bigcup_{i=0}^iO_i$. Clearly, $\cal O$ has a finite subcover iff $\cal O'$ is finite. Assume $\cal O'$ is not finite, then we may assume $O'_0\subsetneq O'_1\cdots$. Let $F_i=X-O_i$ so that $F_{i}\supsetneq F_{i+1}$ is a strictly descending sequence of closed sets. $\cal O'$ is a cover of $X$, so $\bigcap_i F_i=\emptyset$. Let $x_i\in F_i-F_{i+1}$. By assumption $x_i\to x$ for some $x\in X$. Since $x_n\in F_i$ for all $n\ge i$ we have $x\in F_i$ as $F_i$ is closed. But this means that $x\in\bigcap_i F_i$. A contradiction!
❏ 

Second proof that closed intervals in $\mathbb R$ are compact.

**Lemma** In $\mathbb R$, $[a,b]$ is compact for any $a<b$ in $\mathbb R$. 

**Proof** Let $\{x_i\}_{i\in\mathbb N}$ be an infinite sequence from $[a,b]$. Define 
$$
  \alpha = \limsup x_i=\inf_{i}\sup_{j\ge i} x_j
$$
**Exercise** Explain why $\alpha$ exists and $\alpha\in[a,b]$. 
 

**Claim** $\alpha$ is a limit point of $\{x_i\}$.
Let $\alpha_i=\sup_{j\ge i}x_j$ so $\alpha\le\cdots\alpha_j\le\alpha_i$ for $i<j$. That is, the $\alpha_i$'s are a descending sequence. If $\alpha=\alpha_i$ for some $i$, then for $\delta>0$ it is clear that $N_\delta(\alpha)\cap\{x_i\}=N_\delta(\alpha_j)$. Since $\alpha_i=\sup_{j\ge i}x_j$ we know $N_\delta(\alpha_j)\cap \{x_j\}_{j\ge i}\neq\emptyset$. Otherwise we get $N_\delta(\alpha)\cap\{\alpha_i\}\neq\emptyset$. From this we can argue in a similar manner to see that $N_\delta(\alpha)\cap\{x_i\}\neq\emptyset$.  

This shows that $[a,b]$ is sequentially compact and since $\mathbb R$ is a metric space it is thus compact. 
❏

## Connectedness

**Definition** 
1. A space $X$ is ***connected*** iff there are not two non-empty open disjoint sets $U$ and $V$ so that $X=U \cup V$. Equivalently, $X$ is connected if the only clopen sets are $X$ and $\emptyset$. 
2. A set $E\subseteq X$ is ***connected*** iff $E$ is connected in the subspace topology.  

**Note** Rudin's definition of $E\subseteq X$ is connected seems slightly different. He defines:
:::info
$E\subseteq X$ is connected iff $E$ is not the union of two separated sets, where $A$ and $B$ are ***separated*** iff $A\cap \text{Cl}(B)=\emptyset=\text{Cl}(A)\cap B$. 

:::

:::spoiler **These two definitions are equivalent.**

* **Connected $\implies$ Rudin-connected**: Suppose $E\subseteq X$ is connected. If $E$ failed to be Rudin-connected, then there is $A$ and $B$ separated so that $E = A\cup B$ where $A\neq\emptyset\neq B$ and $A=E-(\rm{Cl}(B)\cap E)$ and $B=E-(\rm{Cl}(A)\cap E)$. So $A$ and $B$ are non-empty, disjoint, and open in $E$ and $E=A\cup B$, so $E$ is separated in our sense.
* **Rudin-connected $\implies$ connected**: Suppose $E$ is not connected, then there are open $A$ and $B$ so that $A\cap E$ and $B\cap E$ are non-empty, disjoint, and $E=(A\cap E)\cup(B\cap E)$. Clearly, $A\cap\rm{Cl}(B)=\emptyset=\rm{Cl}(A)\cap B$. 

:::
>

**Exercise** (Easy) The only connected subsets of $\mathbb R$ are intervals.

<a id="clconnected"></a>

Some things are easier to prove with the definition of connectedness taken here than the definition Rudin uses. For example:

**Claim** Suppose $E\subseteq X$ is a connected, then $\text{Cl}(E)$ is also connected. 

**Proof** Let $A,B$ be disjoint non-empty open sets in $\text{Cl}(E)$. Consider $A'=E\cap A$ and $B'=E\cap B$. It is clear that $A',B'$ are disjoint non-empty open sets in $E$. Since $E$ is connected, $A'\cup B'\neq E$ and so $A\cup B\neq \text{Cl}(E)$. 
❏ 

The following was used above to see that $A\cap E\neq\emptyset$ given that $A\cap\text{Cl}(E)\neq\emptyset$, and the same for $B$. 

**Fact** Let $O\subseteq X$ be open, then 
$$
O\cap\text{Cl}(E)\neq\emptyset\iff O\cap E\neq\emptyset
$$
($\Longleftarrow$) is trivial since $\text{Cl}(E)\supseteq E$. ($\implies$) is also clear, since if $O\cap E=\emptyset$, then $O\subseteq\text{Ext}(E)=\text{Cl}(E)^c$.
❏

**Example** Again $\mathbb Q$ provides a nice counter example to keep in mind. The only connected subsets of $\mathbb Q$ are singletons. This is because $(\alpha,\beta)\cap \mathbb Q$ is ***clopen*** whenever $\alpha$ and $\beta$ are irrational.

<!--
### Comments about Ch 2 Exercises. (These are from a previous course.)

**Exercise 6:** The exercise assume the space is $T_2$ (Hausdorff), in a non-$T_2$ space the exercise is incorrect.

Partial orders $\langle X,\preceq\rangle$ have a natural topology. Open sets are those that are closed downward under $\preceq$. The basic neighborhood of a point $x$ is $N_x=\{y\mid y\preceq x\}$ and $O\subseteq X$ is open iff for all $x\in O$, $N_x\subseteq O$. So $x\in \bar{A}$ iff $N_x\cap A\neq \emptyset$ and hence $\bar{A}$ is the "upward closure" of $A$. 

Viewing a partial order as a tree makes this concrete. Here $b\prec a$ is represented as a directed edge from $a$ to $b$. The yellow path (branch) is the closure of the singleton $\{d\}$ so in particular singletons are not closed. Each of the points of $a$ and $b$ are limit points of $\{d\}$, for example, if $O$ is any open set containing $b$, then it contains $N_b$ and hence $O\cap (\{d\}-\{b\})\neq \emptyset$ and so $b\in \text{Lim}(\{d\})$. 

```graphviz
digraph hierarchy {

    //nodesep=1.0 // increases the separation between nodes
    
    node [color=Red,fontname=Courier,shape=circle] ; //All nodes will this shape and colour
    edge [color=Blue, style=solid]; //All the lines look like this
    a, b, d [style=filled,color=yellow];
    
    a -> {b c} 
    b -> {d e} 
    c -> {f g} 
        // {rank=same;x000 x001 x0200}  // Put them on the same level
}
```

Now $d$ is not itself a limit point of $\{d\}$ as $N_d=\{d\}$ (since $d$ is a leaf of this tree) and so if $O=N_d$, then $d\in O$, but $O\cap(\{d\}-\{d\})=\emptyset$, so $d\not\in\text{Lim}(\{d\})$. This provides an example where $\text{Lim}(\bar{A})\neq \text{Lim}(A)$. (One of your exercises.)


### DQ Comments

#### Topic 2 DQ 1

1. 2.4(b): Here is a small hint. If $A$ is not finite as per 2.4(a), then recursively build $f:\mathbb{N} \to A$ that is 1-1. This actually requires some of the Axiom of Choice. (See [Dedekind finite](https://en.wikipedia.org/wiki/Dedekind-infinite_set) set.) Now use this $f$ to complete the proof.
2. 2.10 (b (i)-(ii)): This seems fine.
3. 2.11: Verify claims (11 - 14) 
4. Let the $k$-cell be $C = \prod_{i=1}^k[a_i,b_i]$ where $a_i<b_i$. Then let $p_1=(s_1,\ldots,s_k)\in C$ and $p_2=(t_1,\ldots,t_k)\in C$ and $q=\lambda p_1 + (1 - \lambda)p_2$ where $\lambda$ satisfies $0\leq\lambda\leq 1$. You must show $q\in C$.
5. Why is $(a,b)$ open in $\mathbb{R}$ but not $\mathbb{R^2}$. Is $(a,b)$ closed in $\mathbb{R^2}$?
6. Show the Cantor set, $\cal{C}$ is compact. This is really an exercise in closure properties of compact sets. ${\cal C}=\bigcap_{i=1}^\infty E_i$ and each $E_i$ is the union of finitly many finite closed intervals.

#### Topic 2 DQ 2

This is straight forward.
-->
