MAT257Y1/Unit 3
Unit 3 · Analysis II

Continuity & Connectedness

Continuity gets a definition with no $\varepsilon$ in it: preimages of open sets are open. From there the two great theorems of first-year calculus — extreme value and intermediate value — fall out as one-line consequences of compactness and connectedness.

By the end you can
Why it matters & where it comes from
Why it exists

The preimage definition is the one that generalises. It mentions no distance, so it survives into spaces where there is none, and it makes the interaction between continuity and compactness almost trivial to prove.

In the real world

Uniform continuity is what makes numerical quadrature converge at a rate you can state in advance. The intermediate value theorem is the root-finding guarantee behind bisection. Connectedness is why a continuous deformation cannot tear a domain apart, which underwrites homotopy arguments everywhere.

Story & open questions

Cauchy conflated continuity and uniform continuity in 1821, and the distinction was only isolated by Heine in 1872 — one of the errors that drove the whole rigorisation programme. Weierstrass then produced a function continuous everywhere and differentiable nowhere, ending the assumption that continuity implies smoothness anywhere.

Three definitions of continuity

Theorem They agree

For $f:A\to\mathbb{R}^m$ with $A\subseteq\mathbb{R}^n$ and $a\in A$, the following are equivalent:

(1) For every $\varepsilon>0$ there is $\delta>0$ with $\|f(x)-f(a)\|<\varepsilon$ whenever $x\in A$ and $\|x-a\|<\delta$.
(2) $x_k\to a$ in $A$ implies $f(x_k)\to f(a)$.
(3) If $f$ is continuous at every point, then $f^{-1}(V)$ is open in $A$ for every open $V\subseteq\mathbb{R}^m$.
Proof The cycle
(1) ⇒ (2): given $\varepsilon$, take the $\delta$ from (1); eventually $\|x_k-a\|<\delta$, so $\|f(x_k)-f(a)\|<\varepsilon$.
(2) ⇒ (1): contrapositive. If (1) fails there is $\varepsilon>0$ such that for each $k$ some $x_k$ has $\|x_k-a\|<\tfrac1k$ but $\|f(x_k)-f(a)\|\ge\varepsilon$. Then $x_k\to a$ while $f(x_k)\not\to f(a)$.
(1) ⇔ (3): $f^{-1}(V)$ open means every point of it has a $\delta$-ball mapping into $V$. Taking $V$ to be the $\varepsilon$-ball around $f(a)$ recovers (1) exactly, and conversely every open $V$ contains such a ball around each of its points. ∎
Use the right one for the job. Sequences for concrete counterexamples; $\varepsilon$-$\delta$ when you need a quantitative bound; preimages for anything structural, including every theorem below.

Continuity meets compactness

Theorem Continuous image of a compact set

If $K$ is compact and $f:K\to\mathbb{R}^m$ is continuous, then $f(K)$ is compact.

Let $\{V_\alpha\}$ be an open cover of $f(K)$. Then $\{f^{-1}(V_\alpha)\}$ is an open cover of $K$.
Compactness gives finitely many $f^{-1}(V_{\alpha_1}),\dots,f^{-1}(V_{\alpha_m})$ covering $K$, and then the corresponding $V_{\alpha_i}$ cover $f(K)$. ∎

Three lines, because the preimage definition was chosen to make this easy.

Theorem Extreme value theorem

A continuous $f:K\to\mathbb{R}$ on a nonempty compact $K$ attains a maximum and a minimum.

$f(K)$ is compact in $\mathbb{R}$, hence closed and bounded. So $\sup f(K)$ is finite and, being a limit point or member of a closed set, belongs to $f(K)$. Any preimage is a maximiser; likewise for the infimum.

Theorem Uniform continuity

A continuous $f$ on a compact $K$ is uniformly continuous: one $\delta$ works for every point at once.

Fix $\varepsilon$. Each $a\in K$ has $\delta_a>0$ with $\|f(x)-f(a)\|<\varepsilon/2$ on $B_{\delta_a}(a)$. The balls $B_{\delta_a/2}(a)$ cover $K$.
Extract a finite subcover with centres $a_1,\dots,a_m$ and let $\delta=\tfrac12\min_i\delta_{a_i}>0$ — a minimum of finitely many positive numbers, which is where compactness pays.
If $\|x-y\|<\delta$, then $x$ lies in some $B_{\delta_{a_i}/2}(a_i)$, and $y$ is then within $\delta_{a_i}$ of $a_i$ too. Both $f(x)$ and $f(y)$ are within $\varepsilon/2$ of $f(a_i)$, so within $\varepsilon$ of each other. ∎
Example Compactness is needed

$f(x)=1/x$ on $(0,1]$ is continuous but not uniformly continuous: as $x$ approaches $0$ the required $\delta$ shrinks to nothing. And $f(x)=x^2$ on $\mathbb{R}$ is continuous but not uniformly so. Drop compactness and the theorem dies.

Connectedness

Definition

$A$ is disconnected if $A=(U\cap A)\cup(V\cap A)$ for open $U,V$ with the two pieces nonempty and disjoint. Otherwise $A$ is connected. $A$ is path connected if any two points are joined by a continuous path inside $A$.

Theorem Continuous image of a connected set

If $A$ is connected and $f$ is continuous, $f(A)$ is connected.

A disconnection of $f(A)$ by $U,V$ pulls back to a disconnection of $A$ by $f^{-1}(U),f^{-1}(V)$, which are open by the preimage definition.

Theorem Intermediate value theorem

If $A\subseteq\mathbb{R}^n$ is connected, $f:A\to\mathbb{R}$ is continuous, and $f$ takes values $c<d$, then it takes every value between.

$f(A)$ is a connected subset of $\mathbb{R}$, and the connected subsets of $\mathbb{R}$ are exactly the intervals. An interval containing $c$ and $d$ contains everything between.

Theorem Path connected implies connected

The converse fails. The topologist's sine curve $\{(x,\sin(1/x)):0<x\le1\}$ together with the segment $\{0\}\times[-1,1]$ is connected but not path connected: no path can reach the segment from the curve, because the oscillation never settles.

For open subsets of $\mathbb{R}^n$ the two notions do coincide, which is why the distinction rarely bites in this course.

Common pitfalls

• Claiming $f$ open maps open sets to open sets. Continuity is about preimages; $f(x)=x^2$ maps the open $(-1,1)$ to $[0,1)$.
• Using uniform continuity without a compact domain. On an open or unbounded set it can fail.
• Assuming connected implies path connected. True for open sets in $\mathbb{R}^n$, false in general.
• Proving continuity coordinate by coordinate and stopping. That does work for the target — $f$ is continuous iff each $f_i$ is — but separate continuity in each input variable is much weaker than joint continuity.

Practice

Original problems written for this guide in the style of Spivak and Munkres exercises. Write a full solution before opening the answer.

Practice 1 · Separate versus joint

Show $f(x,y)=\dfrac{xy}{x^2+y^2}$ (with $f(0,0)=0$) is continuous in each variable separately at the origin but not jointly.

Solution
Fixing $y=0$ gives $f(x,0)=0$, continuous in $x$; likewise in $y$. But along $y=x$, $f(x,x)=\tfrac12$ for all $x\ne0$, so the limit at the origin is not $0$.
Practice 2 · Preimage argument

Prove $\{(x,y):x^2+y^2<1\}$ is open using continuity.

Answer
It is the preimage of the open $(-\infty,1)$ under the continuous $(x,y)\mapsto x^2+y^2$, hence open.
Practice 3 · Attainment

Does $f(x)=x$ on $(0,1)$ attain a maximum? Which hypothesis fails?

Answer
No. The domain is bounded but not closed, so not compact, and the extreme value theorem does not apply.
Practice 4 · Uniform continuity fails

Show $f(x)=\sin(1/x)$ is not uniformly continuous on $(0,1]$.

Solution
Take $x_k=\tfrac{1}{2\pi k}$ and $y_k=\tfrac{1}{2\pi k+\pi/2}$. Then $|x_k-y_k|\to0$ but $|f(x_k)-f(y_k)|=1$ always, so no $\delta$ works for $\varepsilon=\tfrac12$.
Practice 5 · Fixed point

Prove a continuous $f:[0,1]\to[0,1]$ has a fixed point.

Solution
Let $g(x)=f(x)-x$, continuous. Then $g(0)=f(0)\ge0$ and $g(1)=f(1)-1\le0$. By the intermediate value theorem $g$ vanishes somewhere, and there $f(x)=x$.
Practice 6 · Connected subsets of the line

Prove a connected subset of $\mathbb{R}$ is an interval.

Solution
If $A$ is not an interval there are $a<c<b$ with $a,b\in A$ and $c\notin A$. Then $(-\infty,c)$ and $(c,\infty)$ disconnect $A$.
Practice 7 · Distance function

For nonempty $S$, show $x\mapsto\operatorname{dist}(x,S)$ is uniformly continuous on all of $\mathbb{R}^n$.

Solution
For any $s\in S$, $\operatorname{dist}(x,S)\le\|x-y\|+\|y-s\|$; taking the infimum over $s$ gives $\operatorname{dist}(x,S)-\operatorname{dist}(y,S)\le\|x-y\|$, and by symmetry the absolute difference is at most $\|x-y\|$. So $\delta=\varepsilon$ works everywhere — no compactness needed, because the function is Lipschitz.
Practice 8 · Image of a connected compact set

What are the possible images of a connected compact $K\subseteq\mathbb{R}^n$ under a continuous real function?

Solution
Exactly the closed bounded intervals $[m,M]$, or a single point. The image is connected (an interval) and compact (closed and bounded), and those two force $[m,M]$.

Expanded topic checklist

Course coverage. This unit is part of the complete MAT257Y1 topic map. It should cover the following items before you move on:

Textbook/source alignment

Use the current UofT MAT257Y1 calendar topics as the coverage spine, and pair lecture notes with Spivak's Calculus on Manifolds or Munkres' Analysis on Manifolds. The exact assigned textbook should still be checked against the instructor syllabus.

Core theorem map

Preimage continuity plus compactness gives compact images, hence extreme values and uniform continuity. Preimage continuity plus connectedness gives the intermediate value theorem. Both patterns are the same two-line argument.

Study routine. Whenever a theorem here is quoted, name which of compactness or connectedness it used. Almost every result in this unit is one of those two properties passed through a continuous map.

Deep practice extensions

Use these after the main practice set. They are designed to force definition-level reasoning, theorem selection, and mixed application rather than routine calculation only.

Extension 1 · Topological definition

State continuity without $\varepsilon$ or $\delta$.

Guide
The preimage of every open set is open.
Extension 2 · What compactness buys

Name two theorems that need a compact domain.

Guide
The extreme value theorem and the upgrade from continuity to uniform continuity. Both fail on $(0,1)$.
Extension 3 · Direction of the image theorems

Do continuous maps preserve compactness forwards or backwards?

Guide
Forwards: images of compact sets are compact. Preimages of compact sets need not be — $\sin^{-1}([-1,1])$ is all of $\mathbb{R}$.
Extension 4 · Connected but not path connected

Give the standard example.

Guide
The topologist's sine curve together with the limiting segment on the $y$-axis. Connected, since the segment is in the closure, but no path reaches it.