Category Depends on the Space
Whether a set is nowhere dense or meager is not determined by the set alone. Both properties use closure and interior, and those may change when the same set is viewed inside a subspace. The rationals make a useful test case: they are dense in the real line, but they also form a topological space in their own right. We will prove that, for subsets of a dense subspace, the nowhere-dense and meager tests agree in the subspace and the ambient space.
Let \((X,\mathcal{T})\) be a topological space and \(Y\subseteq X\). The subspace topology on \(Y\) consists of the sets \(U\cap Y\), where \(U\in\mathcal{T}\). For \(E\subseteq Y\), write \(\overline{E}^{\,Y}\) and \(\operatorname{int}_Y E\) for its closure and interior in \(Y\); without the superscript, closure and interior are taken in \(X\).
For \(E\subseteq Y\), the basic closure formula is \(\overline{E}^{\,Y}=Y\cap\overline{E}\). Indeed, a point \(y\in Y\) is in the left side exactly when every neighborhood of \(y\) in \(Y\) meets \(E\). Such neighborhoods have the form \(U\cap Y\), with \(U\) open in \(X\) and \(y\in U\); since \(E\subseteq Y\), this is equivalent to every open neighborhood \(U\) of \(y\) in \(X\) meeting \(E\).
Dense Subspaces Preserve the Nowhere-Dense Test
Proof. We show that \(\overline{E}^{\,Y}\) has nonempty interior in \(Y\) if and only if \(\overline{E}\) has nonempty interior in \(X\). Suppose first that \(\overline{E}\) contains a nonempty open set \(V\) of \(X\). Density of \(Y\) gives \(V\cap Y\ne\varnothing\), and \(V\cap Y\) is open in \(Y\). The closure formula gives \(V\cap Y\subseteq\overline{E}^{\,Y}\), so the relative closure has nonempty interior.
Conversely, suppose \(\overline{E}^{\,Y}\) has nonempty interior in \(Y\). Then there is an open set \(V\subseteq X\) such that \(V\cap Y\ne\varnothing\) and \(V\cap Y\subseteq\overline{E}^{\,Y}\subseteq\overline{E}\). Because \(Y\) is dense, \(V\cap Y\) is dense in \(V\): every nonempty open subset of \(V\) is also open in \(X\) and therefore meets \(Y\). The set \(\overline{E}\) is closed in \(X\) and contains \(V\cap Y\), so it contains its closure in \(X\), which includes \(V\). Thus \(\overline{E}\) has nonempty interior in \(X\). Taking the negation of this equivalence proves the theorem. \(\square\)
Proof. If \(E\) is a countable union of sets nowhere dense in \(Y\), each of those sets is also nowhere dense in \(X\) by the theorem, so \(E\) is meager in \(X\). Conversely, suppose \(E\) is meager in \(X\), so \(E=\bigcup_{n\in\mathbb{N}}F_n\) with each \(F_n\) nowhere dense in \(X\). Since \(E\subseteq Y\), we have \(E=\bigcup_{n\in\mathbb{N}}(F_n\cap Y)\). Each \(F_n\cap Y\) is nowhere dense in \(Y\): its relative closure is contained in \(Y\cap\overline{F_n}\), whose relative interior is empty by the theorem, since \(F_n\cap Y\) is nowhere dense in \(X\) as a subset of \(F_n\). More directly, the theorem applies to \(F_n\cap Y\), which is nowhere dense in \(X\) because its closure is contained in \(\overline{F_n}\). Hence \(E\) is meager in \(Y\). \(\square\)
The Rationals in the Real Line and in Themselves
We use \(\mathbb{R}\) with its standard topology and \(\mathbb{Q}\subseteq\mathbb{R}\) with the subspace topology. First, \(\mathbb{Q}\) is dense in \(\mathbb{R}\). To verify this, let \(a<b\). Choose \(n\in\mathbb{N}\) with \(n(b-a)>2\), using the Archimedean property. Let \(m\) be the least integer strictly greater than \(na\). Then \(na<m\le na+1<nb\), so \(a<m/n<b\). Thus every nonempty open interval contains a rational.
In fact, every nonempty open interval contains infinitely many rationals. Given an interval and a finite set of \(k\) rationals to avoid, choose \(k+1\) pairwise disjoint nonempty open subintervals inside it. At most \(k\) of these subintervals can contain a point of the finite set, so one subinterval avoids the entire set. The density just proved supplies a rational in that subinterval. Repeating this argument after excluding the rationals already selected produces arbitrarily many distinct rationals. This exclusion step matters: merely choosing a smaller interval around a rational already found would not ensure that a new rational is obtained.
Worked Example: The Rationals Are Meager in Both Spaces
We show that \(\mathbb{Q}\) is meager as a subset of \(\mathbb{R}\), and also meager as a space in its own right.
For each \(q\in\mathbb{Q}\), the singleton \(\{q\}\) is nowhere dense in \(\mathbb{R}\). Its closure is \(\{q\}\), since for each \(x\ne q\) the open interval \((x-|x-q|/2,x+|x-q|/2)\) misses \(q\). Its interior is empty: every open interval containing \(q\) contains a point other than \(q\).
The same singleton is nowhere dense in \(\mathbb{Q}\). Its relative closure is \(\{q\}\), because the real-line open intervals that exclude a given \(x\ne q\) induce relative neighborhoods that also exclude \(q\). Its relative interior is empty because every relative neighborhood of \(q\) contains \(r\in\mathbb{Q}\) with \(r\ne q\), by the density of the rationals in every interval.
The rationals are countable: each is expressible as \(m/n\) for an integer \(m\) and a positive integer \(n\), and the pairs \((m,n)\) can be listed by increasing \(|m|+n\), with only finitely many pairs at each fixed value. Therefore \(\mathbb{Q}\) is a countable union of its singleton sets. Since each singleton is nowhere dense in either space, \(\mathbb{Q}\) is meager in \(\mathbb{R}\) and meager in \(\mathbb{Q}\).
Check: the dense-subspace theorem also applies directly: \(\mathbb{Q}\) is dense in \(\mathbb{R}\), and \(\mathbb{Q}\subseteq\mathbb{Q}\). Thus a subset of \(\mathbb{Q}\) is meager in the rational subspace exactly when it is meager as a subset of \(\mathbb{R}\). In particular, the countable union above verifies meagerness on both sides.
Worked Example: The Whole Rational Space Is Not Nowhere Dense in Itself
Take \(E=\mathbb{Q}\). In \(\mathbb{R}\), its closure is \(\mathbb{R}\), because every nonempty open interval contains a rational. Hence \(\operatorname{int}_{\mathbb{R}}(\overline{\mathbb{Q}})=\mathbb{R}\ne\varnothing\), so \(\mathbb{Q}\) is not nowhere dense in \(\mathbb{R}\).
In the subspace \(\mathbb{Q}\), the closure of the whole space is \(\mathbb{Q}\), and its interior in itself is \(\mathbb{Q}\ne\varnothing\). Thus \(\mathbb{Q}\) is not nowhere dense in \(\mathbb{Q}\) either. This does not conflict with the previous example: being meager means being a countable union of nowhere-dense sets, not being nowhere dense as a whole. Here the pieces are the singleton sets, while their union is not nowhere dense.
Check: the density argument gives \(\overline{\mathbb{Q}}=\mathbb{R}\) in the ambient space; the subspace closure formula gives \(\overline{\mathbb{Q}}^{\,\mathbb{Q}}=\mathbb{Q}\cap\mathbb{R}=\mathbb{Q}\). Both interiors are nonempty, as required for the stated conclusions.
Why the Density Hypothesis Matters
Without density, the relative and ambient tests can differ. Let \(X=\mathbb{R}\), let \(Y=\{0\}\) with the subspace topology, and let \(E=\{0\}\). In \(X\), \(E\) is nowhere dense: its closure is itself and its interior is empty. In \(Y\), however, \(E=Y\), so its relative closure and relative interior are both \(Y\). It is not nowhere dense in \(Y\). This example also distinguishes meagerness: \(E\) is meager in \(X\), but it is not meager in \(Y\). The only nowhere-dense subset of the one-point space \(Y\) is the empty set, so no countable union of nowhere-dense subsets can equal \(Y\).
Worked Example: Rationals in a Bounded Interval
Let \(E=\mathbb{Q}\cap(0,1)\), regarded first as a subset of \(\mathbb{R}\) and then as a subset of \(\mathbb{Q}\). In \(\mathbb{R}\), its closure is \([0,1]\): every point of \([0,1]\) is approached by rationals in \((0,1)\), using density in intervals, and points outside \([0,1]\) have open neighborhoods disjoint from \((0,1)\). Its interior is \((0,1)\), which is nonempty. Therefore \(E\) is not nowhere dense in \(\mathbb{R}\).
In \(\mathbb{Q}\), the closure formula gives \(\overline{E}^{\,\mathbb{Q}}=\mathbb{Q}\cap[0,1]\). Its relative interior contains \(\mathbb{Q}\cap(0,1)\), which is open in \(\mathbb{Q}\) because it equals \((0,1)\cap\mathbb{Q}\), and is nonempty, for example because \(1/2\in E\). Thus \(E\) is not nowhere dense in \(\mathbb{Q}\). The result agrees with the dense-subspace theorem, but the computation also shows explicitly where the relative interior comes from.
Check: \(1/2\in(0,1)\cap\mathbb{Q}\), so the relative interior is indeed nonempty. The ambient closure contains \((0,1)\), and the relative closure contains \(\mathbb{Q}\cap(0,1)\); neither closure has empty interior in its respective space.
Common pitfall. The calculation “\(\mathbb{Q}\) is countable, so it is nowhere dense in \(\mathbb{R}\)” is wrong. Countability gives a countable union of sets, not empty interior of the closure. In fact, \(\overline{\mathbb{Q}}=\mathbb{R}\), so the closure has interior \(\mathbb{R}\). The correct conclusion is that \(\mathbb{Q}\) is meager, because it is a countable union of nowhere-dense singletons. Confusing “meager” with “nowhere dense” loses the distinction between the size of the whole set and the category of its individual pieces.
The dense-subspace result is useful whenever a set is naturally studied inside a dense part of a larger space. For the rationals, it ensures that changing from the ambient real line to the rational subspace does not change which subsets of \(\mathbb{Q}\) are nowhere dense or meager. For a non-dense subspace, the one-point example shows why the relative topology must be checked rather than inferred from the ambient one.
Check Your Understanding
For each question, specify whether closure and interior are taken in the ambient space or in the subspace.
- Let \(Y\) be dense in \(X\) and \(E\subseteq Y\). Prove directly from the definitions that \(E\) is nowhere dense in \(Y\) if and only if it is nowhere dense in \(X\).
- Why is \(\mathbb{Q}\) meager but not nowhere dense in \(\mathbb{R}\)? State the closure and the countable decomposition that establish these two claims.
- Let \(Y=\{0\}\subseteq\mathbb{R}\). Is \(Y\) nowhere dense in \(\mathbb{R}\)? Is it nowhere dense or meager in itself? Explain using relative closure and interior.
- For \(E=\mathbb{Q}\cap(2,3)\), determine whether it is nowhere dense in \(\mathbb{R}\) and in \(\mathbb{Q}\).
- Explain why a dense subspace \(Y\) makes meagerness agree for subsets \(E\subseteq Y\), but why the same conclusion cannot be assumed for an arbitrary subspace.