{
  "id": "dense-set",
  "title": "Dense Set",
  "lang": "en",
  "source_lang": "en",
  "summary": "A dense set is a subset whose closure is the entire ambient space, so that every nonempty open region contains one of its points.",
  "category": "mathematics",
  "subcategory": "geometry",
  "type": "concept",
  "aliases": [
    "Dense subset",
    "Everywhere dense set"
  ],
  "generated_at": "2026-10-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/dense-set/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/dense-set/",
      "json": "https://aiwiki.page/zh/dense-set.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "In topology, a dense set is a subset of a topological space that meets every nonempty open subset of that space. Informally, its points occur arbitrarily close to every point of the ambient space, although the subset need not contain every point. Density formalizes the possibility of approximation and is fundamental to mathematical analysis. The standard example is the set of rational numbers within the real numbers. (buttenschoen.ca)"
    },
    {
      "heading": "Definition and equivalent formulations",
      "text": "Let \\(X\\) be a topological space and \\(A\\subseteq X\\). The set \\(A\\) is dense in \\(X\\) when its closure equals \\(X\\):\n\n\\[\\overline{A}^{\\,X}=X.\\]\n\nEquivalently, every nonempty open set \\(U\\subseteq X\\) satisfies \\(U\\cap A\\ne\\varnothing\\). In terms of neighborhoods, every neighborhood of every point of \\(X\\) meets \\(A\\). These formulations express the same absence of an open region completely missing \\(A\\). (buttenschoen.ca)\n\nIn a metric space \\((X,d)\\), density has the approximation formulation\n\n\\[\\forall x\\in X\\;\\forall\\varepsilon>0\\; \\exists a\\in A:\\quad d(x,a)<\\varepsilon.\\]\n\nThus every open ball of positive radius meets \\(A\\). Equivalently, each \\(x\\in X\\) is the limit of a sequence of points of \\(A\\): choose \\(a_n\\) with \\(d(x,a_n)<1/n\\). This sequential characterization follows directly from the metric definition; in arbitrary topological spaces, sequences alone need not characterize closure. (buttenschoen.ca)\n\nDensity is always relative to an ambient space and its topology. For \\(A\\subseteq Y\\subseteq X\\), the subspace topology gives\n\n\\[\\overline{A}^{\\,Y}=Y\\cap\\overline{A}^{\\,X}.\\]\n\nConsequently, \\(A\\) is dense in \\(Y\\) precisely when \\(Y\\subseteq\\overline{A}^{\\,X}\\), even if \\(A\\) is not dense in \\(X\\). This is an immediate consequence of the closure definition. (ocw.mit.edu)"
    },
    {
      "heading": "Examples on the real line",
      "text": "The rational numbers \\(\\mathbb Q\\) are dense in the real numbers \\(\\mathbb R\\) with their usual topology. For any \\(x\\in\\mathbb R\\) and \\(\\varepsilon>0\\), choose a positive integer \\(n\\) with \\(1/n<\\varepsilon\\). Then\n\n\\[q=\\frac{\\lfloor nx\\rfloor}{n}\\]\n\nis rational and satisfies \\(0\\le x-q<1/n<\\varepsilon\\). Thus rational approximations can achieve any prescribed positive error tolerance. (buttenschoen.ca)\n\nThe irrational numbers are also dense. A direct deduction from rational density is that \\(\\mathbb Q+\\sqrt2\\) is dense and consists entirely of irrational numbers. Nevertheless, the integers are not dense in \\(\\mathbb R\\), since an interval such as \\((0,1)\\) contains no integer. Both conclusions follow from the open-set criterion. (buttenschoen.ca)\n\nDensity does not mean that a set is large by counting or volume. The rationals form a countable set and have Lebesgue measure zero, yet are dense. Their complement is also dense. Topological density and measure therefore describe different properties: meeting every open interval does not require occupying a positive amount of length. (people.math.harvard.edu)"
    },
    {
      "heading": "Structural properties",
      "text": "Several useful consequences follow directly from the definition:\n\n- Any subset containing a dense subset is itself dense.\n- A closed subset is dense in \\(X\\) exactly when it equals \\(X\\).\n- If \\(A\\) is dense in \\(Y\\), and \\(Y\\) is dense in \\(X\\), then \\(A\\) is dense in \\(X\\).\n- A union containing at least one dense member is dense.\n- Intersections of dense sets need not be dense: \\(\\mathbb Q\\) and \\(\\mathbb R\\setminus\\mathbb Q\\) are dense but disjoint.\n\nThese statements can be checked by applying the open-set criterion or the elementary properties of closure. (buttenschoen.ca)\n\nA finite intersection of open dense sets, however, is open and dense. To see the density of \\(U\\cap V\\), take any nonempty open set \\(W\\). Because \\(U\\) is dense, \\(W\\cap U\\) is nonempty; because \\(U\\) is open, this intersection is open. Density of \\(V\\) then implies \\(W\\cap U\\cap V\\ne\\varnothing\\). The argument extends by induction to any finite number of open dense sets. (buttenschoen.ca)"
    },
    {
      "heading": "Separability and approximation",
      "text": "A space is separable if it has a countable dense subset. Thus \\(\\mathbb R\\) is separable, as is finite-dimensional Euclidean space \\(\\mathbb R^n\\), where \\(\\mathbb Q^n\\) is dense. Every compact metric space is also separable. Separability concerns the existence of a countable collection sufficient to approximate the whole space, rather than the number of points in the space itself. (people.math.harvard.edu)\n\nIn functional analysis, density often concerns spaces whose points are functions. The Weierstrass approximation theorem states that polynomials are dense in the space \\(C([a,b])\\) of real-valued continuous functions, equipped with the supremum norm. Explicitly, for every \\(f\\in C([a,b])\\) and \\(\\varepsilon>0\\), a polynomial \\(p\\) exists such that\n\n\\[\\sup_{x\\in[a,b]}|f(x)-p(x)|<\\varepsilon.\\]\n\nThis is approximation over the entire interval, expressed through uniform convergence, rather than approximation at just one point. (ocw.mit.edu)"
    },
    {
      "heading": "Nowhere density and the Baire theorem",
      "text": "A nowhere dense set \\(A\\) satisfies\n\n\\[\\operatorname{int}(\\overline A)=\\varnothing.\\]\n\nThis is stronger than merely failing to be dense: its closure contains no nonempty open region. A meagre set is a countable union of nowhere dense sets. The distinction allows a set to be dense but meagre, as happens with the rationals in the real line. (buttenschoen.ca)\n\nThe Baire category theorem implies that, in a complete metric space, a countable intersection of open dense sets remains dense. Equivalently, no nonempty open subset can be covered by countably many nowhere dense sets. The openness and completeness assumptions distinguish this result from the unrestricted intersection of dense sets, which may be empty. (ocw.mit.edu)"
    }
  ],
  "links": [
    "topology",
    "topological-space",
    "closure-topology",
    "open-set",
    "neighborhood-topology",
    "metric-space",
    "open-ball",
    "limit",
    "subspace-topology",
    "rational-number",
    "real-number",
    "irrational-number",
    "integer",
    "countable-set",
    "lebesgue-measure",
    "closed-set",
    "separable-space",
    "euclidean-space",
    "compact-space",
    "functional-analysis",
    "polynomial",
    "continuous-function",
    "uniform-convergence",
    "baire-category-theorem",
    "complete-metric-space"
  ],
  "sources": [
    {
      "title": "buttenschoen.ca/MATH725/lops/baire/",
      "url": "https://www.buttenschoen.ca/MATH725/lops/baire/"
    },
    {
      "title": "buttenschoen.ca/MATH725/introduction/approximation/",
      "url": "https://www.buttenschoen.ca/MATH725/introduction/approximation/"
    },
    {
      "title": "ocw.mit.edu/courses/18-102-introduction-to-functional-analysis-spring-2021/8fb8…",
      "url": "https://ocw.mit.edu/courses/18-102-introduction-to-functional-analysis-spring-2021/8fb8d5c170f1613151aca71de21027bc_MIT18_102s21_full_lec.pdf"
    },
    {
      "title": "people.math.harvard.edu/~ctm/home/text/class/harvard/55b/10/html/home/course/co…",
      "url": "https://people.math.harvard.edu/~ctm/home/text/class/harvard/55b/10/html/home/course/course.pdf"
    },
    {
      "title": "ocw.mit.edu/courses/18-100c-real-analysis-fall-2012/0121c471c75eccc715ecbd19e8f…",
      "url": "https://ocw.mit.edu/courses/18-100c-real-analysis-fall-2012/0121c471c75eccc715ecbd19e8f47a10_MIT18_100CF12_l18sum.pdf"
    },
    {
      "title": "ocw.mit.edu/courses/18-102-introduction-to-functional-analysis-spring-2021/1P8R…",
      "url": "https://ocw.mit.edu/courses/18-102-introduction-to-functional-analysis-spring-2021/1P8RSORLvyqFrBQjXKeBj5LCSkjvXxIWy_transcript.pdf"
    }
  ],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}