Limits and Continuity
Limits
Definitions and Uniqueness
Definition 1. Let $(X, d_X)$ and $(Y, d_Y)$ be two metric spaces. Let $f \colon X \to Y$, $a \in X$, $\ell \in Y$. We say $\lim_{x \to a} f(x) = \ell$ if for every $\epsilon > 0$, there exists $\delta > 0$ such that if $0 < d_X(x, a) < \delta$ then $d_Y(f(x), \ell) < \epsilon$.
Remark 2. We will often be lazy and not distinguish between $d_X$ and $d_Y$, and simply write $(X, d)$ and $(Y, d)$ are metric spaces.
Remark 3. Define $B^*(a, r) = \set{x \in X \st 0 < d(x, a) < r}$ to be the punctured ball with center $a$ and radius $r$. With this notation we see that $\lim_{x \to a} f(x) = \ell$ iff for every $\epsilon > 0$ there exists $\delta > 0$ such that $x \in B^*(a, \delta)$ implies $d(f(x), \ell) < \epsilon$.
Remark 4. In some cases the above definition is silly! For example, if $X = \Z$, with the Euclidean metric, and $f \colon X \to Y$ is any function. Then for any $a \in \Z$, $\ell \in Y$ we have $\lim_{x \to a} f(x) = \ell$.
This happens because every $a \in \Z$ is an isolated point; that is there exists $\delta > 0$ such that $B^*(a, \delta) = \emptyset$.
Proposition 5. If $X = \R^d$ (with the Euclidean metric), then the limit is unique. That is, if $\lim_{x \to a} f(x) = \ell$ and $\lim_{x \to a} f(x) = m$ then $\ell = m$.
Remark 6. When the metric space $X$ or $Y$ is $\R^d$, we will assume the metric is the Euclidean metric, unless explicitly stated otherwise.
Remark 7. More generally, if $X$ is a general metric space, and $a \in X$ is not an isolated point, then if $\lim_{x \to a}$ exists, it is unique.
Problem 8. Let $n \in \N$. For every $a \in \R^d$ show $\lim_{x \to a} \abs{x}^{1/n} = \abs{a}^{1/n}$.
Basic properties
Proposition 9. Suppose $Y = \R^d$, $a \in X$, $f, g \colon X \to \R^d$ are such that $\lim_{x \to a} f(x) = \ell$ and $\lim_{x\to a} g(x) = m$. Then $\lim_{x \to a} f(x) + g(x) = \ell + m$.
Proposition 10. Suppose $Y = \R$, $a \in X$, $f, g \colon X \to \R$ are such that $\lim_{x \to a} f(x) = \ell$ and $\lim_{x\to a} g(x) = m$. Then $\lim_{x \to a} f(x) g(x) = \ell m$.
Proposition 11. Suppose $Y = \R$, $a \in X$, $f, g \colon X \to \R$ are such that $\lim_{x \to a} f(x) = \ell$ and $\lim_{x\to a} g(x) = m$, and $m \neq 0$. Then $\lim_{x \to a} f(x) / g(x) = \ell / m$.
Proposition 12. Suppose $Y = \R^d$, $a \in X$, $f, g \colon X \to \R^d$ are such that $\lim_{x \to a} f(x) = \ell$ and $\lim_{x\to a} g(x) = m$. Then $\lim_{x \to a} f(x) \cdot g(x) = \ell \cdot m$.
Problem 13. Let $A \subseteq X$, and define $\one_A(x) = 1$ if $x \in A$ and $\one_A(x) = 0$ if $x \not\in A$. Show that $\lim_{x \to a} \one_A(x) = \one_A(a)$ if and only if $a \not\in \partial A$.
Update 2026-01-20 Problem 13 originally asked you to show that $\lim_{x \to a} \one_A(x)$ does not exist if and only if $a \in \partial A$. This isn’t quite right; as is an edge case that fails (e.g. $A = \set{0}$).
Example 14. Let $f(x) = 1$ if $x > 0$ and $f(x) = 0$ otherwise. Then $\lim_{x \to 0} f(x)$ does not exist.
One variable limits
Problem 15. Show that $\lim_{x \to 0} 1/x$ does not exist.
Problem 16 (Left and right limits). Let $a \in \R$, and $f \colon \R \to Y$ be some function. Consider the metric spaces $X^{+} = [a, \infty)$ (with the Euclidean metric), and the restricted function $f^{+} \colon X^{+} \to Y$ defined by $f^{+}(x) = f(x)$ for all $x \in X^{+}$. We say $\lim_{x \to a^{+}} f(x) = \ell$ if $\lim_{x \to a} f^{+}(x) = \ell$. Similarly define $X^{-}$ and the function $f^{-}$, and $\lim_{x \to a^{-}}$.
Show that $\lim_{x \to a} f(x) = \ell$ if and only if both $\lim_{x \to a} f^{+}(x) = \ell$ and $\lim_{x \to a} f^{-}(x) = \ell$.
Theorem 17 (Pinching theorem). Let $f, g, h \colon X \to \R$, and suppose for every $x \in X$ we have $f(x) \leq g(x) \leq h(x)$. If $\lim_{x \to a} f(x)$ and $\lim_{x \to a} h(x)$ both exist and are equal, then $\lim_{x \to a} g(x)$ exists and equals $\lim_{x \to a}f(x)$ and $\lim_{x \to a}g(x)$.
Example 18. For any $\alpha > 0$, $\lim_{x \to 0} \abs{x}^\alpha \sin(1/x)$ exists and equals $0$.
Directional limits, and coordinates
Let’s now try and reduce “vector limits” to scalar limits. This can easily be done when the target space has more than one dimension; but some care is required when the domain has more than one dimension.
Proposition 19. Let $Y = \R^d$. Then $\lim\limits_{x \to a} f(x) = \ell$ if and only if for every $i \in \set{1, \dots, d}$ we have $\lim\limits_{x \to a} f_i(x) = \ell_i$.
Remark 20. If $x \in \R^d$ is a vector, we use the convention that $x = (x_1, \dots, x_d)$.
Proposition 21. Let $X = \R^d$, $f \colon X \to Y$, $a \in \R^d$. If $\lim\limits_{x \to a} f(x) = \ell$, then for every non-zero $v \in \R^d$, we have $\lim\limits_{t \to 0} f(a + tv) = \ell$.
Problem 22. Decide whether or not the converse of the previous proposition is true or false. Prove it, or find a counter example.
The extended real line
The conventional way to define a limit at infinity is as follows.
Definition 23. Let $f \colon \R \to Y$. We say $\lim_{x \to \infty} f(x) = \ell$ if for every $\epsilon > 0$ there exists $R > 0$ such that $x > R$ implies $d( f(x) , \ell ) < \epsilon$.
Normally, one would have to supplement this definition with a proof that the limit is unique, and the usual basic properties. The proof is similar, and you can check them if interested. However, there’s also an elegant way to do it quickly and rigorously.
Problem 24. Find a metric on $Z = [-\infty, \infty]$ such a set $U \subseteq Z$ is open if and only if the following hold.
- For every $a \in U$, with $a \neq \pm \infty$, there exists $\epsilon > 0$ such that $(a - \epsilon, a + \epsilon) \subseteq U$.
- If $\infty \in U$, then there exists $R \in \R$ such that $(R, \infty] \subseteq U$.
- If $-\infty \in U$, then there exists $R \in \R$ such that $[-\infty, R) \subseteq U$.
Problem 25. Given the metric on $Z$ in the previous problem, show that $\lim_{x \to \infty} f(x) = \ell$ (in the sense of Definition 23) if and only if $\lim_{x \to \infty} f(x) = \ell$ (in the sense of a limit in the metric space $Z$).
Now as a limit in the metric space $Z$, we have the usual theorems about uniqueness / sums etc., and so we don’t have to reprove them.
Continuity
Definitions and composites
Definition 26. Let $(X, d_X)$, $(Y, d_Y)$ be two metric spaces. We say $f \colon X \to Y$ is continuous at $a$ if $\lim_{x \to a} f(x) = f(a)$.
Definition 27. We say $f \colon X \to Y$ is continuous, if for every $a \in X$, $f$ is continuous at $a$.
Remark 28. Unravelling the definition we see $f$ is continuous at $a$ if and only if for every $\epsilon > 0$ there exists $\delta > 0$ such that $\enclose{horizontalstrike}[mathcolor=red]{ 0 < } d_X(x, a) < \delta$ implies $d_Y(f(x), f(a)) < \epsilon$.
Theorem 29 (Continuity of composites). Let $(X, d_X)$, $(Y, d_Y)$, $(Z, d_Z)$ be three metric spaces, and suppose $f \colon Y \to Z$, $g \colon X \to Y$ are continuous. Then $f \circ g \colon X \to Z$ is continuous.
Proposition 30. Let $f \colon \R^d \to Y$ be a function, $a \in \R^d$. The function $f$ is continuous at $a$ if and only if for every continuous function $\gamma \colon [0, 1] \to \R^d$ with $\gamma(0) = a$, the function $f \circ \gamma \colon [0, 1] \to Y$ is continuous at $0$.
Remark 31. The previous proposition says that $\lim_{x \to a} f(x) = f(a)$, if and only if $\lim_{t \to 0} f(\gamma(t)) = f(a)$ for any continuous function $\gamma$ such that $\gamma(0) = a$. That is, the limit of a function exists, if and only if the limit along every curve also exists and equals the same value.
Problem 32. For each of the following functions defined on $\R^2 - \{(0,0)\}$ determine if the function has a limit as $(x,y)\to (0,0)$. Prove your answer.
- $\displaystyle f(x,y)=\frac{3x^2y^2}{x^2+y^2}$
- $\displaystyle f(x,y)=\frac{xy(x^2-y^2)}{x^4+y^4}$
- $\displaystyle f(x,y)=\frac{x^3y^4}{\abs{x}^5+y^6}$
- $\displaystyle f(x,y)=\frac{x^2y^3}{(x^4+y^6)^{1/3}}$
Basic properties
Proposition 33. Let $T \colon \R^m \to \R^n$ be a linear transformation. Then $T$ is continuous.
Proposition 34. A function $f \colon X \to \R^d$ is continuous if and only if for every $i \in \set{1, \dots, d}$ the coordinate function $f_i \colon X \to \R$ is continuous.
Proposition 35. If $f, g \colon X \to \R^d$ are continuous, then $f + g \colon X \to \R^d$ and $f \cdot g \colon X \to \R$ are continuous.
Corollary 36 (Rational functions). If $f, g \colon \R^d \to \R$ are polynomials in the coordinates (e.g $f(x) = x_1 x_2^3 + x_3^2$), then $f/g$ is continuous wherever $g \neq 0$.
Theorem 37. A function $X \to Y$ is continuous if and only if for every open set $V \subseteq Y$, the set $f^{-1}(V) \subseteq X$ is open.
In Theorem 37, it’s essential we use the inverse image of open sets $f^{-1}(U)$, and not simply the image of open sets $f(U)$. The next result shows why.
Problem 38.
- If $f \colon X \to Y$ is continuous, and $U \subseteq X$ is open, then show that $f(U)$ need not be open.
- Suppose $f \colon X \to Y$ is such that for every open set $U \subseteq X$, the set $f(U) \subseteq Y$ is open. Show that $f$ need not be continuous.
Miscellanea
Definition 39. We say $f \colon X \to Y$ is a homeomorphism if $f$ is bijective and both $f, f^{-1}$ are continuous.
Remark 40. If $f \colon X \to Y$ is continuous and bijective, then $f^{-1} \colon Y \to X$ need not be continuous.
Problem 41. Does there exist a homeomorphism from $\R \to \R^2$?
Remark 42. There does exist a continuous surjective function $f \colon \R \to \R^2$.