# A Short Introduction to Metric Spaces

The Euclidean Space of dimension $n$ is the $n$-dimensional vector space $\R^n$ together with its usual notion of distance between two points: $d(\vec xn, \vec yn)=\sqrt{\sum_{i=1}^n(x_i-y_i)^2}$. Note that distance, $d$, is just a function $d\colon \R^n\times\R^n\to \R$. This can all be generalized to the idea of "metric spaces." A metric space is a set together with a notion of distance satisfying certain properties. Specifically,

Definition: A metric space is a pair $(M,d)$ where $M$ is a set and $d$ is a function $d\colon M\times M\to\R$ satisfying:

- $d(x,y)\ge0$, for all $x,y\in M$;
- $d(x,y) = 0$ if and only if $x=y$;
- symmetry: $d(x,y)=d(y,x)$, for all $x,y\in M$; and
- the triangle inequality: $d(x,z)\le d(x,y)+d(y,z)$, for all $x,y,z\in M$.

The function $d$ is said to be a metric on $M$.

This web site discusses metric spaces and some of their basic properties. It is assumed that the reader is already familiar with the Calculus, including open and closed intervals, limits, continuity, the Extreme Value Theorem and the Intermediate Value Theorem. Ideally, this will also include some things that are usually encountered in an "advanced calculus" or "introductory analysis" course, most importantly the Least Upper Bound axiom, which is stated here without proof:

Definition: Let $X$ be a subset of $\R$. An upper bound for $X$ is a number $b$ such that $x\le b$ for all $x\in X$. If an upper bound exists for $X$, then $X$ is said to be bounded above. Similarly, a lower bound for $X$ is a number $c$ such that $x\ge c$ for all $x\in X$. If a lower bound exists for $X$, then $X$ is said to be bounded below. If $X$ is bounded both above and below, then $X$ is said to be bounded.

Definition: Let $X$ be a subset of $\R$ that is bounded above. A least upper bound for $X$ is an upper bound $\lambda$ for $X$ such that $\lambda$ is less than every other upper bound for $X$. Similarly, a A greatest lower bound for $X$ is a lower bound $\mu$ for $X$ such that $\mu$ is greater than every other upper bound for $X$.

Theorem (Least Upper Bound Axiom): Every non-empty subset of $R$ that is bounded above has a least upper bound.

Note that it follows easily that every non-empty subset of $\R$ that is bounded below has a greatest lower bound. It is also clear that if a least upper bound exists, then it is unique, and similarly for greatest lower bounds. The least upper bound of a set $X$ is denoted $lub(X)$, and the greatest lower bound is denoted $glb(X)$.

The least upper bound of a set might or might not be an element of that set. For example, the least upper bound of a bounded closed interval $[a,b]$ is $b$, which is an element of the closed interval, while the least upper bound of the the bounded open interval $(a,b)$ is also $b$, which is not in the open interval.

The web site contains the following sections:

- Open and Closed Sets
- Subspaces and Product Spaces
- Limits and Continuity
- Compactness
- Completeness
- Connectedness