# Lecture 7

## Review

Let $S=\{(x,y,z)\in \mathbb{R}^3:x=1,y=4\}=\{(1,4,z):z\in\mathbb{R}\}$

1. How can we describe the set $S$ geometrically in three-dimensional space?

   Just a line
2. Show that $S$ and $\mathbb{R}$ are in one-to-one correspondence.

    We can find a bijective function $f:S\to \mathbb{R}$
3. Show that for any $(a,b)\in\mathbb{Z}^2$, the set $\{(a,b,z):z\in\mathbb{Z}\}$ is in one-to-one correspondence with $\mathbb{Z}$

    Use **Theorem 2.13** $A$ is countable, $n\in \mathbb{N} \implies A^n=\{(a_{1},...,a_{n}):a_1\in A, a_n\in A\}$, is countable.

## New materials

### Metric spaces

#### Definition 2.15

Let $X$ be a set. A function $d:X\times X\to \mathbb{R}$ is called a distance function or a metric if it satisfies:

1. Positivity: $\forall p,q\in X,p\neq q\implies d(p,q)>0$, and $\forall p\in X,d(p,p)=0$.
2. Symmetry: $\forall p,q\in X, d(p,q)=d(q,p)$.
3. Triangle inequality: $\forall p,q,r\in X$, $d(p,q)\leq d(p,r)+d(r,q)$

We say **$(X,d)$ is a metric space**. If $d$ is understood, $X$ is a metric space.

Examples:

The most important example:

$X\subset \mathbb{R}^k(k\geq 1)$

$d(x,y)=|x-y|$

And other examples: function spaces...

An example from graph theory (not needed for this class):

$d(p,q)$ can be defined by the shortest path fro $p$ to $q$.

#### Definition 2.17

By the *segment* $(a,b)$ we mean the set of all real numbers $x$ such that $a<x<b$.

*segment excludes the bound* $(a,b)$

By the *interval* $[a,b]$ we mean the set of all real numbers $x$ such that $a\leq x\leq b$

* interval include the bound* $[a,b]$

Convex: $E\subset \mathbb{R}^k$ is convex if $\forall x,y\in E,\{\lambda x+(1-\lambda)y:\lambda\in (0,1)\}\subset E$

### Open sets

#### Definition 2.18

Let $(X,d)$ be a metric space.

1. $p\in X,r>0$. The r-neighborhood of $p$ is $B_r(p)=N_r(o)=\{q\in X: d(p,q)<r\}$ (a ball in metric space)
2. $E\subset X$, $p\in X$. We say $p$ is an interior point of $E$ if $\exists r>0$ such that $B_r(p)\subset E$. Notation $E^{\circ}=$set of interior points of $E$
3. $E\subset X$, we say $E$ is **open** if $E\subset E^{\circ}$, i.e. $\forall p\in E, \exists r>0$ such that $B_r(p)\subset E$.

*Note: is follows from definitions that $E^{\circ}\subset E$ is always true.*

Example:

$X=\mathbb{R}^2$($d$ be the euclidean distance) $E=[0,1)\times [0,1)$.

$E^{\circ}=(0,1)\times (0,1)$

So $E=(0,1)\times (0,1)$ is a open set.

#### Theorem 2.19

Let $(X,d)$ be  a metric space, $\forall p\in X,\forall r>0$, $B_r(p)$ is an open set.

*every ball is an open set*

<details>
<summary>Proof</summary>

Let $q\in B_r(p)$.

Let $h=r-d(p,q)$.

Since $q\in B_r(p),h>0$. We claim that $B_h(q)$. Then $d(q,s)<h$, so $d(p,s)\leq d(p,q)+d(q,s)<d(p,q)+h=r$. (using triangle inequality) So $S\in B_r(p)$.

</details>

### Closed sets

1. $E\subset X,p\in X$. We say $p$ is a limit point of $E$ if $\forall r>0, (B_r(p)\cap E)\backslash {p}\neq \phi$.

    Let $E'$ be the set of limit points of $E$.

2. $E$ is closed if $E'\subset E$

Example:

$X=\mathbb{R}^2$, $E=[0,1)\times [0,1)$.

$(1,1)$ is a limit point.

$X=\mathbb{R},E=\{\frac{1}{n},n\in \mathbb{N}\}$

$0$ is the only limit point. $E'=\{0\}$
