Altanis

4.4The Urysohn Lemma

Updated 20 Aug 2026Chapter (PDF)

The Ursyohn lemma states that for any normal space XX and any pair of closed subsets A,BXA, B \subseteq X, there exists a continuous f:X[a,b]f: X \to [a, b] (for some a,bRa, b \in \bR) such that fAaf|_A \equiv a and fBbf|_B \equiv b.

[4.4.1]Theorem(The Urysohn Lemma)#

Let XX be a normal space, and let A,BA, B be disjoint, closed subsets of XX. Then there is a continuous map

f:X[0,1]f: X \to [0, 1]

for which fA0f|_A \equiv 0 and fB1f|_B \equiv 1.

Before we prove this lemma, we consider a class of numbers known as dyadic rationals, a set of fractions whose denominator is a power of two. Namely, we consider the dyadic rationals contained in [0,1][0, 1]. Let DnD_n be the set of dyadic rationals of order nn contained in [0,1][0, 1] (i.e., pure fractions whose denominator is of the form 2n2^n). For example,

D0={0,1},D1={0,12,1},D2={0,14,12,34,1},.D_0 = \{0, 1\}, \quad D_1 = \left\{0, \frac{1}{2}, 1 \right\}, \quad D_2 = \left\{0, \frac14, \frac12, \frac34, 1 \right\}, \quad \cdots.

Suppose we bisect the interval [0,1][0, 1] nn times. Then the endpoints of bisection correspond exactly with the values in DnD_n, motivating them geometrically. If we bisect the interval a countably infinite number of times (like we do in the proof of, say, Bolzano-Weierstrass), the endpoints yielded correspond exactly with the values in D=nZ+DnD = \bigcup_{n \in \bZ_+} D_n. Crucially, DD is dense in [0,1][0, 1], so the open sets indexed by DD are fine enough to bring about a function that satisfies the hypotheses.

We will bisect [0,1][0, 1] a countably infinite number of times, use the shrinking lemma to force an open set each time we bisect, and index these open sets with the dyadic rationals. Then we will define a map using these open sets that satisfy the conditions of the hypothesis, completing the proof.

Proof.

We start by creating our family of open sets indexed by DD. We start with D0D_0: consider the set U1=XBU_1 = X \setminus B. Then, since AB=0A \cap B = 0, we have that AU1A \subseteq U_1. We have that AA is closed and U1U_1 is open, and so by the shrinking lemma, there is an open set U0U_0 such that

AU0U0U1.A \subseteq U_0 \subseteq \bar{U_0} \subseteq U_1.

Now we move to D1D_1. Note that U0\bar{U_0} is a closed subset of the open set U1U_1, so we apply the shrinking lemma again, yielding a set U1/2U_{1/2} such that

U0U1/2U1/2U1.\bar{U_0} \subseteq U_{1/2} \subseteq \bar{U_{1/2}} \subseteq U_1.

Now we move to D2D_2. Note that U0\bar{U_0} is a closed subset of the open set U1/2U_{1/2}, and that U1/2\bar{U_{1/2}} is a closed subset of the open set U1U_1. Then we have open sets U1/4,U3/4U_{1/4}, U_{3/4} such that

U0U0U1/4U1/4U1/2U1/2U3/4U3/4U1.U_0 \subseteq \overline{U_0} \subseteq U_{1/4} \subseteq \overline{U_{1/4}} \subseteq U_{1/2} \subseteq \overline{U_{1/2}} \subseteq U_{3/4} \subseteq \overline{U_{3/4}} \subseteq U_1.

Repeat this process inductively, yielding the family of open sets {Ur}rD\{U_r\}_{r \in D}. We are now ready to define the continuous function.

Define f:X[0,1]f: X \to [0, 1] by the function

f(x)=inf{rD:xUr}(inf()=1).f(x) = \inf\{r \in D: x \in U_r\} \quad (\inf(\emptyset) = 1).

For any xXx \in X, we identify the smallest dyadic rational rr for which the open set UrU_r contains xx. If no such UrU_r exists, then ff emits 11. Immediately, we note that fA0f|_A \equiv 0, since AU0A \subseteq U_0 and so every element of AA is contained in U0U_0. Conversely, we note that fB1f|_B \equiv 1, since U1BU_1 \subseteq B and so no element of BB is contained in {Ur}\{U_r\}.

Finally, we prove that ff is continuous, completing the proof. We show continuity on the subbasis elements [0,a)[0, a) and (a,1](a, 1] for any a(0,1)a \in (0, 1). Note that if f(x)<af(x) < a if and only if xUrx \in U_r for dyadic rationals rr such that r<ar < a. Thus

f1([0,a))=rD,r<aUr.f^{-1}([0, a)) = \bigcup_{r \in D, r < a} U_r.

Conversely, suppose f(x)>af(x) > a. By density of DD in [0,1][0, 1], we can pick two dyadic rationals r,sr, s such that a<r<s<f(x)a < r < s < f(x). Since s<f(x)s < f(x), we note that xUsx \notin U_s. Since UrUs\bar{U_r} \subseteq U_s, note that xUrx \notin \bar{U_r} as well. Thus

f1((a,1])=rD,r>a(XUr).f^{-1}((a, 1]) = \bigcup_{r \in D, r > a} (X \setminus \bar{U_r}).

Thus the preimage of all subbasis elements are open, meaning ff is continuous. We have completed the proof.

[4.4.2]Remark(Urysohn's Lemma Applies to Any Closed Interval)#

Note the argument involved is invariant under translation and scaling of the codomain. Thus Urysohn's lemma guarantees any continuous map f:X[a,b]f: X \to [a, b] for which fAaf|_A \equiv a and fBbf|_B \equiv b.

[4.4.3]Definition(Separated by a Continuous Function)#

Suppose XX is a topological space and A,BXA, B \subseteq X are subsets. If there exists a continuous function f:X[0,1]f: X \to [0, 1] such that fA0f|_A \equiv 0 and fB1f|_B \equiv 1, then we say that AA and BB can be separated by a continuous function.

[4.4.4]Theorem(Normal iff. Disjoint, Closed Sets Separable by Continuous Function)#

A space XX is normal if and only if, any pair of disjoint, closed sets can be separated by a continuous function.

Proof.

()(\Longrightarrow): This is the statement of Urysohn's Lemma.

()(\Longleftarrow): Suppose any disjoint, closed subsets A,BXA, B \subseteq X can be separated by a continuous function ff. Then note f1([0,1/2])f^{-1}([0, 1/2]) and f1((1/2,1])f^{-1}((-1/2, 1]) are disjoint open neighborhoods for AA and BB.

Note that the shrinking lemma applies to normal spaces, and so the proof for Urysohn's lemma cannot be lifted to regular spaces. That is, the statement that a point and a disjoint, closed set can be separated by a continuous function is false. Instead, we define a subclass of regular spaces for which this is true.

[4.4.5]Definition(Completely Regular)#

A space XX that satisfies the T1T_1 condition is called completely regular if any singleton subset {x0}\{x_0\} and some disjoint, closed set BB can be separated by a continuous function.

Immediately, we note that a completely regular space is regular: if a singleton subset is separated from a disjoint, closed set by a continuous function ff, then f1([0,1/2))f^{-1}([0, 1/2)) and f1((1/2,1])f^{-1}((1/2, 1]) are the desired disjoint, open neighborhoods about the singleton and closed set. Furthermore, we note that a normal space is completely regular, as we simply take one closed set to be a singleton.

This class of spaces is particularly nice as well: the subspace and product operations leave its property intact.

[4.4.6]Theorem(Subspace and Product of Completely Regular Space is Completely Regular)#

Suppose XX is a completely regular space. Then any subspace UXU \subseteq X is also completely regular. Moreover, suppose {Xλ}λΛ\{X_\lambda\}_{\lambda \in \Lambda} is a collection of completely regular spaces. Then the product X=λΛXλX = \prod_{\lambda \in \Lambda} X_\lambda is also completely regular.

Proof.

Note that UU is regular—subspaces of regular spaces are regular—and thus T1T_1. Let x0Ux_0 \in U be any point that is disjoint from the closed set BUB \subseteq U. Since BB is closed in UU, it contains all its limit points in UU and so x0x_0 is not a limit point for BB, meaning x0ClX(B)x_0 \notin \Cl_X(B). Thus x0x_0 is disjoint from the closed set ClX(B)\Cl_X(B), where both objects are treated as elements of XX. By complete regularity, there is a separation by a continuous map f:X[0,1]f: X \to [0, 1]. Then g=fUg = f|_U is a continuous map that separates x0x_0 and ClX(B)U=ClU(B)=B\Cl_X(B) \cap U = \Cl_U(B) = B, making UU completely regular.

The proof for the product being completely regular, like the subspace, is extremely similar to the proof of products being regular, so we omit the proof.

[4.4.7]Remark(The Separation Axioms)#

The separation axioms have alternative names of the form TjT_j. They are organized such that a TjT_j space is automatically TiT_i, and that there exists one TiT_i space that isn't TjT_j (for j>ij > i). They are as follows.

  1. T0\mathbf{T}_0 (Kolmogorov). Any two points are topologically distinguishable.

  2. T1\mathbf{T}_1 (Accessible). Any two points have open neighborhoods that exclude the other point.

  3. T2\mathbf{T}_2 (Hausdorff). Any two points can be separated.

  4. T3\mathbf{T}_3 (Regular). A T1T_1 space for which any point and disjoint, closed set can be separated.

  5. T3.5\mathbf{T}_{3.5} (Completely Regular). A T1T_1 space for which any point and disjoint, closed set can be separated by a continuous function.

  6. T4\mathbf{T}_4 (Normal). A T1T_1 space for which any pair of disjoint, closed sets can be separated.

  7. T5\mathbf{T}_5 (Completely Normal). A T1T_1 space that is normal and has the property that all its subspaces are normal.