Tutorials › Topology (Undergraduate) › Zero Sets and Cozero Sets of Continuous Functions

Urysohn's Lemma and the Tietze Extension Theorem · Tutorial 348 of 799

Zero Sets and Cozero Sets of Continuous Functions

Learn how zero sets and cozero sets behave under set operations, and how continuous separation describes closed sets in completely regular spaces.

Advanced 12 min read

What You'll Learn

  • Define zero sets and cozero sets using continuous real-valued functions.
  • Prove formulas for finite unions and intersections of zero sets and cozero sets.
  • Show how countable intersections of zero sets and countable unions of cozero sets arise from a convergent series.
  • Represent every closed set in a completely regular space as an intersection of zero sets.
  • Distinguish that representation from being a single zero set, using a completely regular counterexample.

Zero Sets and Cozero Sets

Continuous real-valued functions turn questions about subsets into questions about function values. Their inverse images of \(\{0\}\) are necessarily closed, while the places where they are nonzero are open. These sets have useful closure properties, but an important distinction is that a closed set in a completely regular space need not be the zero set of one function.

Unless another topology is specified, \(\mathbb{R}\) has its standard topology. Let \(X\) be a topological space and let \(f:X\to\mathbb{R}\) be continuous.

Definition: The zero set of \(f\) is \(Z(f)=\{x\in X:f(x)=0\}=f^{-1}(\{0\})\). Its cozero set is \(U(f)=\{x\in X:f(x)\ne0\}=X\setminus Z(f)\). A zero set is a set of the form \(Z(f)\), and a cozero set is a set of the form \(U(f)\), for some continuous real-valued function \(f\) on \(X\).

Since \(\{0\}\) is closed in \(\mathbb{R}\), continuity implies that \(Z(f)\) is closed. Its complement \(U(f)\) is therefore open. The converses need not hold in an arbitrary space: not every closed set must be a zero set, and not every open set must be a cozero set.

Finite Set Operations

Theorem: If \(f,g:X\to\mathbb{R}\) are continuous, then \(Z(f)\cup Z(g)=Z(fg)\), \(Z(f)\cap Z(g)=Z(|f|+|g|)\), \(U(f)\cap U(g)=U(fg)\), and \(U(f)\cup U(g)=U(|f|+|g|)\).

Proof. Products, absolute values, and sums of continuous real-valued functions are continuous, so each expression on the right defines a zero or cozero set. At a point \(x\), \(f(x)g(x)=0\) holds exactly when \(f(x)=0\) or \(g(x)=0\), proving the first equality. Since both \(|f(x)|\) and \(|g(x)|\) are nonnegative, their sum is zero exactly when both are zero; this proves the second equality. A product \(f(x)g(x)\) is nonzero exactly when both factors are nonzero, proving the third equality. Finally, \(|f(x)|+|g(x)|\) is nonzero exactly when at least one of \(f(x)\) and \(g(x)\) is nonzero, proving the fourth equality. \(\square\)

The constant functions also account for the limiting cases: the constant function \(0\) has zero set \(X\) and cozero set \(\varnothing\); the constant function \(1\) has zero set \(\varnothing\) and cozero set \(X\). Thus finite unions and intersections of zero sets are zero sets, and finite unions and intersections of cozero sets are cozero sets, including when one of the sets involved is empty.

Worked Example: Finite Unions and Intersections

Take \(X=\mathbb{R}\), \(f(t)=t(t-2)\), and \(g(t)=t-1\). Both functions are continuous polynomials. Solving \(f(t)=0\) gives \(t=0\) or \(t=2\), so \(Z(f)=\{0,2\}\). Solving \(g(t)=0\) gives \(Z(g)=\{1\}\). Therefore \(Z(f)\cup Z(g)=\{0,1,2\}\), while \(Z(f)\cap Z(g)=\varnothing\).

The product formula gives \(fg=t(t-2)(t-1)\). Its zeros are exactly \(0,1,2\), as required. For the intersection formula, \(|f(t)|+|g(t)|=0\) requires both summands to be zero. There is no such \(t\), since the zero sets just computed are disjoint. For a direct check, at \(t=0\) the sum is \(0+1=1\); at \(t=1\) it is \(1+0=1\); and at \(t=2\) it is \(0+1=1\). Thus none of these points is in the intersection zero set.

The cozero formulas give \(U(f)\cap U(g)=U(fg)=\mathbb{R}\setminus\{0,1,2\}\), and \(U(f)\cup U(g)=U(|f|+|g|)=\mathbb{R}\), since the two zero sets are disjoint. For example, at \(t=3\), \(f(3)=3\) and \(g(3)=2\), so \(fg=6\ne0\) and \(|f|+|g|=5\ne0\). This verifies that \(3\) belongs to both cozero sets and to their intersection and union.

Countable Intersections and Unions

There is also a useful countable version. The construction combines nonnegative functions in a series whose terms are bounded, so the series converges uniformly. The bound matters: a pointwise sum of continuous functions need not be continuous without additional justification.

Theorem: For any sequence of continuous functions \(f_n:X\to\mathbb{R}\), \(n\in\mathbb{N}\), the countable intersection \(\bigcap_{n=1}^{\infty}Z(f_n)\) is a zero set, and the countable union \(\bigcup_{n=1}^{\infty}U(f_n)\) is a cozero set.

Proof. Put \(h_n(x)=\min(1,|f_n(x)|)\). Each \(h_n\) is continuous, takes values in \([0,1]\), and is zero exactly where \(f_n\) is zero. Define \(g(x)=\sum_{n=1}^{\infty}2^{-n}h_n(x)\). For every \(x\) and \(N\), the tail satisfies \(\left|\sum_{n=N+1}^{\infty}2^{-n}h_n(x)\right|\le\sum_{n=N+1}^{\infty}2^{-n}=2^{-N}\). Thus the partial sums converge uniformly.

For completeness, this uniform limit is continuous: given \(x\in X\) and \(\varepsilon>0\), choose \(N\) so that \(2\cdot2^{-N}<\varepsilon/2\). The \(N\)-term partial sum \(s_N\) is continuous, so there is a neighborhood \(V\) of \(x\) on which \(|s_N(y)-s_N(x)|<\varepsilon/2\). For \(y\in V\), the two tails, at \(x\) and \(y\), contribute at most \(2\cdot2^{-N}<\varepsilon/2\). Consequently \(|g(y)-g(x)|<\varepsilon\), which proves continuity at \(x\).

Every summand in \(g(x)\) is nonnegative. Hence \(g(x)=0\) if and only if \(h_n(x)=0\) for every \(n\), which holds if and only if \(f_n(x)=0\) for every \(n\). Therefore \(Z(g)=\bigcap_{n=1}^{\infty}Z(f_n)\). Taking complements gives \(U(g)=\bigcup_{n=1}^{\infty}U(f_n)\). \(\square\)

Worked Example: A Countable Intersection of Zero Sets

For each \(n\in\mathbb{N}\), define \(f_n(x)=\max(0,|x|-1/n)\) on \(\mathbb{R}\). This is continuous, and \(f_n(x)=0\) exactly when \(|x|\le1/n\). Thus \(Z(f_n)=[-1/n,1/n]\). A real number lies in every one of these intervals exactly when \(|x|\le1/n\) for every positive integer \(n\), which forces \(x=0\). Conversely, \(0\) belongs to every interval. So their intersection is \(\{0\}\).

The theorem represents this intersection as the zero set of \(g(x)=\sum_{n=1}^{\infty}2^{-n}\min(1,\max(0,|x|-1/n))\). At \(x=0\), every term is zero, so \(g(0)=0\). At \(x=1/2\), the terms for \(n=1\) and \(n=2\) are zero, while the \(n=3\) term has inner value \(1/2-1/3=1/6\), which is already less than \(1\). Its weighted contribution is \(2^{-3}(1/6)=1/48\). All other terms are nonnegative, so \(g(1/2)\ge1/48>0\). The same theorem guarantees that no other point has value zero, because the common intersection of the intervals was computed to be exactly \(\{0\}\). This checks the represented set against the original intersection.

The countable statements do not extend indiscriminately to the opposite operations. For example, each singleton \(\{q\}\) in \(\mathbb{R}\) is the zero set of \(x\mapsto x-q\), but \(\mathbb{Q}\) is a countable union of such singletons and is not closed. Thus that union is not a zero set. Likewise, the countable intersection of cozero sets need not be a cozero set: enumerate \(\mathbb{Q}\) as \((q_n)\). Each \(\mathbb{R}\setminus\{q_n\}=U(x\mapsto x-q_n)\) is a cozero set, but their intersection is \(\mathbb{R}\setminus\mathbb{Q}\), which is not open and therefore cannot be a cozero set.

Closed Sets in Completely Regular Spaces

Definition: A space \(X\) is completely regular if, whenever \(F\subseteq X\) is closed and \(x\in X\setminus F\), there is a continuous function \(u:X\to[0,1]\) with \(u(x)=0\) and \(u(y)=1\) for every \(y\in F\).
Theorem: In a completely regular space, every closed set is an intersection of zero sets.

Proof. Fix a closed set \(F\subseteq X\), and let \(\mathcal{G}_F\) be the family of all continuous functions \(v:X\to[0,1]\) such that \(v(y)=0\) for every \(y\in F\). Each \(Z(v)\), for \(v\in\mathcal{G}_F\), contains \(F\), so \(F\subseteq\bigcap_{v\in\mathcal{G}_F}Z(v)\). If \(x\notin F\), complete regularity gives \(u:X\to[0,1]\) with \(u(x)=0\) and \(u=1\) on \(F\). The function \(v=1-u\) belongs to \(\mathcal{G}_F\) and satisfies \(v(x)=1\), so \(x\notin Z(v)\). Hence no point outside \(F\) belongs to the intersection, proving equality. This also handles \(F=X\): the only functions in \(\mathcal{G}_X\) are identically zero, and their zero sets are \(X\), so the intersection is \(X\). If \(F=\varnothing\) and \(X\ne\varnothing\), every point \(z\in X\) is excluded from \(Z(v_z)\), since \(v_z(z)=1\). The zero set \(Z(v_z)\) need not be empty; only the exclusion of \(z\) is needed. If \(X=\varnothing\), the intersection over the empty family of subsets of \(X\) is \(X=\varnothing=F\). \(\square\)

This result asserts an intersection of zero sets, not necessarily one zero set. A single zero set is always a countable intersection of open sets, since \(Z(f)=\bigcap_{n=1}^{\infty}f^{-1}((-1/n,1/n))\). The next example shows that even in a completely regular space a closed set need not have this form.

Worked Example: A Closed Set That Is Not a Zero Set

Let \(I\) be an uncountable set and let \(X=\{0,1\}^{I}\) have the product topology, where each factor \(\{0,1\}\) has the discrete topology. A basic open set restricts finitely many coordinates; such a set is also closed, because each coordinate restriction is both open and closed. We first check complete regularity directly. If \(F\) is closed and \(x\notin F\), the open set \(X\setminus F\) contains a basic open set \(V\) with \(x\in V\subseteq X\setminus F\). Since \(V\) and its complement are open, the function equal to \(0\) on \(V\) and \(1\) on \(X\setminus V\) is continuous. It is \(0\) at \(x\) and \(1\) on \(F\), as required.

Let \(p\in X\) be the point whose every coordinate is \(0\). The singleton \(\{p\}\) is closed: for any \(y\ne p\), some coordinate of \(y\) is \(1\), and the open set restricting that coordinate to \(1\) contains \(y\) but not \(p\). We show that \(\{p\}\) is not a zero set. If \(\{p\}=Z(f)\) for a continuous \(f:X\to\mathbb{R}\), then \(\{p\}=\bigcap_{n=1}^{\infty}f^{-1}((-1/n,1/n))\), a countable intersection of open neighborhoods of \(p\). For each such neighborhood choose a basic open cylinder \(C_n\) containing \(p\) and contained in it. Each \(C_n\) restricts finitely many coordinates, so the union of all coordinates restricted by the \(C_n\) is countable. Since \(I\) is uncountable, choose a coordinate outside that union and let \(y\) have value \(1\) there and \(0\) elsewhere. Then \(y\ne p\), yet \(y\in C_n\) for every \(n\), hence lies in every displayed neighborhood. This contradicts their intersection being \(\{p\}\). Thus \(\{p\}\) is closed but not a zero set, even though it is an intersection of zero sets by the theorem.

A Useful Distinction

In a metric space, a closed set can be represented by one zero set: if \(F\) is nonempty and closed, the function \(x\mapsto\min(1,d(x,F))\), where \(d(x,F)=\inf\{d(x,y):y\in F\}\), is continuous and vanishes exactly on \(F\). The distance function is continuous because the triangle inequality gives \(|d(x,F)-d(z,F)|\le d(x,z)\); closedness ensures that a point outside \(F\) has positive distance from \(F\) in a metric space. The completely regular conclusion is weaker in general: it guarantees an intersection of zero sets, not a single zero set.

Common pitfall. Do not infer that every closed set in a completely regular space is one zero set. The product example gives a specific closed singleton for which this fails. Conversely, do not infer that a countable union of zero sets is a zero set: in \(\mathbb{R}\), the countable union of the zero sets \(\{q\}\), for \(q\in\mathbb{Q}\), is \(\mathbb{Q}\), which is not closed. The valid countable closure statements are that countable intersections of zero sets are zero sets and countable unions of cozero sets are cozero sets.

Check Your Understanding

Use the function definitions and the hypotheses stated in each question.

  1. For continuous \(f,g:X\to\mathbb{R}\), which function has zero set \(Z(f)\cap Z(g)\)? Prove the claim pointwise.
  2. Show that the constant functions give both \(\varnothing\) and \(X\) as zero sets and as cozero sets.
  3. For continuous \(f_n:X\to\mathbb{R}\), explain why the series using \(2^{-n}\min(1,|f_n|)\) detects exactly the points where every \(f_n\) vanishes.
  4. Why does complete regularity give an intersection of zero sets for each closed set, rather than automatically giving one zero set?
  5. Give an example of a countable union of zero sets that is not a zero set in \(\mathbb{R}\).