In the mathematical fields of general topology and descriptive set theory, a **meagre set** (also called a **meager set** or a **set of first category**) is a set that, considered as a subset of a (usually larger) topological space, is in a precise sense small or negligible.
A topological space T is called **meagre** if it is a meager subset of itself; otherwise, it is called **nonmeagre**.

The meagre subsets of a fixed space form a σ-ideal of subsets; that is, any subset of a meagre set is meagre, and the union of countably many meagre sets is meagre. General topologists use the term Baire space to refer to a broad class of topological spaces on which the notion of meagre set is not trivial (in particular, the entire space is not meagre). Descriptive set theorists mostly study meagre sets as subsets of the real numbers, or more generally any Polish space, and reserve the term Baire space for one particular Polish space.

The complement of a meagre set is a **comeagre set** or **residual set**.
A set that is not meagre is called **nonmeagre** and is said to be of **the second category**.
Note that the notions of a comeagre set and a nonmeagre set are *not* equivalent.

## Definition

Let X be a topological space.

**Definition**: A subset B of a topological space X is called**nowhere dense**or**rare**in X if its closure has empty interior. Equivalently, B is nowhere dense in X if for each open set*U*⊆*X*, the set*B*∩*U*is not dense in U.

Note that a closed subset of X is nowhere dense if and only if its interior in X is empty.

**Definition**: A subset of a topological space X is said to be**meagre in**X, a**meagre sub**X, or of the*set*of**first category**in X if it is a countable union of nowhere dense subsets of X. A subset is of the**second category**or**nonmeagre**in X if it is not of first category in X.

**Definition**: A topological space is called**meagre**(resp.**nonmeagre**) if it is a meagre (resp. nonmeagre) subset of itself.

**Warning**: Note that if S is a subset of X then when we say that S is a meagre subof X then we mean that when S is endowed with the subspace topology (induced by X) then S is a meagre topological space (i.e. S is a meagre subset of S). In contrast, if we say that S is a meagre sub**space**of X then we mean that it is equal to a countable union of nowhere dense subsets of X. The same applies to nonmeager subsets and subspaces.**set**

**Definition**: A subset A of X is**comeagre**in X if its complement*X*∖*A*is meagre in X. Equivalently, it is the intersection of countably many sets with dense interiors.

Note that second category does *not* mean comeagre — a set may be neither meagre nor comeagre (in this case it will be of second category).

## Examples and sufficient conditions

Let T be a topological space.

- Meagre sub
*sets*and sub*spaces*

- A singleton set is always a non-meagre sub
*space*(i.e. it is a non-meagre topological space); but it is a non-meagre sub*set*if and only if it is an isolated point.^{[1]} - Any subset of a meagre set is a meagre set.
^{[2]} - Every nowhere dense subset is a meagre set.
^{[2]} - The union of countably many meagre sets is also a meagre set.
^{[2]} - An countable Hausdorff space without isolated points is meagre.
^{[1]} - Any topological space that contains an isolated point is non-meagre.
^{[1]} - Any discrete space is non-meagre.
^{[1]} - Every Baire space is non-meagre but there exist non-meagre spaces that are not Baire spaces.
^{[1]}- Since complete metric spaces as well as Hausdorff locally compact spaces are Baire spaces, they are also non-meagre spaces.

- The set
*S*= (ℚ × ℚ) ∪ ℝ is a meagre sub*set*of ℝ^{2}even though ℝ is a non-meagre sub*space*(i.e. ℝ is not a meagre topological space).^{[1]} - Because the rational numbers are countable, they are meagre as a subset of the reals and as a space—that is, they do not form a Baire space.
- The Cantor set is meagre as a subset of the reals, but
*not*as a subset of itself, since it is a complete metric space and is thus a Baire space, by the Baire category theorem. - If
*h*:*X*→*X*is a homeomorphism then a subset S of X is meagre if and only if*h*(*S*) is meagre.^{[2]}

- Comeagre subset

- Any superset of a comeagre set is comeagre
- the intersection of countably many comeagre sets is comeagre.
- This follows from the fact that a countable union of countable sets is countable.

### Function spaces

- The set of functions that have a derivative at some point is a meagre set in the space of all continuous functions.
^{[3]}

## Properties

- Banach Category Theorem: In any space X, the union of any countable family of open sets of the first category is of the first category.
^{[4]} - A non-meagre locally convex topological vector space is a barreled space.
^{[1]}

### Meagre subsets and Lebesgue measure

A meagre set need not have measure zero.
There exist nowhere dense subsets (which are thus meagre subsets) that have positive Lebesgue measure.^{[1]}

### Relation to Borel hierarchy

Just as a nowhere dense subset need not be closed, but is always contained in a closed nowhere dense subset (viz, its closure), a meagre set need not be an F_{σ} set (countable union of closed sets), but is always contained in an F_{σ} set made from nowhere dense sets (by taking the closure of each set).

Dually, just as the complement of a nowhere dense set need not be open, but has a dense interior (contains a dense open set), a comeagre set need not be a G_{δ} set (countable intersection of open sets), but contains a dense G_{δ} set formed from dense open sets.

## Banach–Mazur game

Meagre sets have a useful alternative characterization in terms of the Banach–Mazur game.
Let Z be a topological space, 𝒲 be a family of subsets of Z that have nonempty interiors such that every nonempty open set has a subset belonging to 𝒲, and Z be any subset of Z.
Then there is a Banach–Mazur game corresponding to *X*, 𝒲, *Z*.
In the Banach–Mazur game, two players, P and Q, alternately choose successively smaller elements of 𝒲 to produce a sequence *W*_{1} ⊇ *W*_{2} ⊇ *W*_{3} ⋅⋅⋅ .
Player P wins if the intersection of this sequence contains a point in X; otherwise, player Q wins.

**Theorem**: For any 𝒲 meeting the above criteria, player Q has a winning strategy if and only if X is meagre.

## See also

- Baire category theorem
- Baire space
- Generic property, for analogs to residual
- Negligible set, for analogs to meagre
- Nowhere dense set

## Notes

- ^
^{a}^{b}^{c}^{d}^{e}^{f}^{g}^{h}Narici & Beckenstein 2011, pp. 371-423. - ^
^{a}^{b}^{c}^{d}Rudin 1991, p. 43. **^**Banach, S. (1931). "Über die Baire'sche Kategorie gewisser Funktionenmengen".*Studia Math*.**3**(1): 174–179.**^**Oxtoby, John C. (1980). "The Banach Category Theorem".*Measure and Category*(Second ed.). New York: Springer. pp. 62–65. ISBN 0-387-90508-1.

## Bibliography

- Narici, Lawrence; Beckenstein, Edward (2011).
*Topological Vector Spaces*. Pure and applied mathematics (Second ed.). Boca Raton, FL: CRC Press. ISBN 978-1584888666. OCLC 144216834. - Rudin, Walter (1991).
*Functional Analysis*. International Series in Pure and Applied Mathematics.**8**(Second ed.). New York, NY: McGraw-Hill Science/Engineering/Math. ISBN 978-0-07-054236-5. OCLC 21163277.