\documentclass{article}
\usepackage{amsmath, amsfonts, amsthm} %imports fancy math packages

\newcommand{\R}{\mathbb{R}} %defines a macro for the reals, so I don't
							%have to type ``\mathbb{R}'' every time.

\title{A short sample \LaTeX\ document}
\author{Chris Staecker}

\begin{document}

\maketitle % prints out the \title and \author stuff


\section*{Mendelson Exercise 2.2.3}
We will show that
\[ d(x,y) \le d'(x,y) \le \sqrt{n} d(x,y), \] % \[ and \] make
								% centered formulas
where $d$ is the ``maximum'' metric on $\R^n$ and $d'$ is the
Euclidean metric on $\R^n$. % $ around things makes mathy formatting

    %blank lines like above make new paragraphs. Otherwise, linebreaks
    %in code do not correspond to line breaks in LaTeX output.
Throughout, we'll use $x$ and $y$ in coordinates:
\begin{align*} %inside here, \\ breaks a line, and the &s get aligned
x &= (x_1, \dots, x_n), \\
y &= (y_1, \dots, y_n).
\end{align*}
First we'll show that $d(x,y) \le d'(x,y)$. We have:
\begin{equation}\label{maxmetric} % ``equation'' is just like \[ and
								% \], but it gets labeled
d(x,y) = \max_{1\le i \le n} |x_i - y_i|.
\end{equation}
Choose some particular $j$ such that $d(x,y) = |x_j - y_j|$. Then we
have
\[ d(x,y) = |x_j - y_j| = \sqrt{|x_j - y_j|^2} \le \sqrt{|x_1 - y_1|^2
  + \dots + |x_n - y_n|^2} = d'(x,y) \]
  
as desired.

Now we'll show that $d'(x,y) \le \sqrt{n} \, d(x,y)$. 
                        %the \, makes a little space-
				%compare this to the first display above
Again, by
(\ref{maxmetric}), choose $j$ such that $d(x,y) = |x_j - y_j|$. Then
we have 
\begin{align*} 
d'(x,y) &= \sqrt{|x_1 - y_1|^2 + \dots + |x_n - y_n|^2} \le
\sqrt{|x_j - y_j|^2 + \dots + |x_j - y_j|^2} \\
&= \sqrt{n|x_j - y_j|^2} =
\sqrt{n} |x_j - y_j| = \sqrt{n} d(x,y)
\end{align*}
as desired.

\section*{Mendelson Exercise 2.3.3}
Let $f:\R^2 \to \R$ be given by $f(x_1,x_2) = x_1 + x_2$. First we
will show that $f$ is continuous with respect to the ``max'' metric
$d$:

Let $\epsilon>0$ be given. We will find some $\delta>0$ such that
\[ \max(|x_1 - y_1|, |x_2 - y_2|) < \delta \implies |f(x_1, x_2) -
f(y_1, y_2)| < \epsilon, \]
which is equivalent to 
\[ \max(|x_1 - y_1|, |x_2 - y_2|) < \delta \implies |x_1 + x_2 -
(y_1 + y_2)| < \epsilon. \]

Note that it is enough to make $|x_1 - y_1| + |x_2 - y_2| < \epsilon$,
since 
\[ |x_1 + x_2 - (y_1 + y_2)| = |x_1 - y_1 + x_2 - y_2| \le |x_1 - y_1|
+ |x_2 - y_2| \]
by the triangle inequality. 

Now we let $\delta = \epsilon / 2$, and then if the max of $|x_1 -
y_1|$ and $|x_2 - y_2|$ is less than $\delta$, we have
\[ |x_i - y_i| < \epsilon/2\]
for both $i=1$ and $i=2$. Then we have
\[ |x_1 + x_2 - (y_1 + y_2)| \le |x_1 - y_1| + |x_2 - y_2| \le
\frac{\epsilon}{2} + \frac{\epsilon}{2} = \epsilon \]
as desired.

Now we will show that $f$ is continuous with respect to the Euclidean
metric $d'$. To avoid doing all the work for this, we'll use a
result of the above exercise, namely that
\[ d(x,y) \le d'(x,y). \]

Let $\epsilon >0$ be given, then we must find $\delta>0$ such that
\[ d'((x_1,x_2),(y_1, y_2)) < \delta \implies |f(x_1, x_2) -
f(y_1,y_2)| < \epsilon. \]
But if $d'((x_1, x_2), (y_1, y_2))< \delta$, we have
\[ d((x_1, x_2), (y_1,y_2)) < \delta \]
automatically. So really we need only find $\delta$ so that
\[ d((x_1,x_2),(y_1, y_2)) < \delta \implies |f(x_1, x_2) -
f(y_1,y_2)| < \epsilon. \]
But this is exactly what we have already done above in showing
continuity of $f$ with respect to $d$, and so we are finished.

\end{document}