{
  "id": "algebra-of-sets",
  "title": "Algebra of Sets",
  "lang": "en",
  "source_lang": "en",
  "summary": "The algebra of sets studies set operations and their identities, and the families of sets closed under finite unions and complements.",
  "category": "mathematics",
  "subcategory": "discrete-logic",
  "type": "concept",
  "aliases": [
    "Set algebra",
    "Algebra of subsets",
    "Field of sets"
  ],
  "generated_at": "2026-11-05",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/algebra-of-sets/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/algebra-of-sets/",
      "json": "https://aiwiki.page/zh/algebra-of-sets.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "The algebra of sets is the study of operations on sets, such as union, intersection, and complementation, together with the identities these operations satisfy. The term also denotes a particular mathematical structure: a nonempty family of subsets of a fixed set that is closed under complements and finite unions. These meanings are closely related: the familiar laws of set operations make every such family a concrete Boolean algebra. Set algebras provide a language for set theory, logic, probability, and measure theory."
    },
    {
      "heading": "Basic operations",
      "text": "Fix a set \\(X\\), called the universe or underlying set, and let \\(A,B\\subseteq X\\). Complements are always taken relative to this specified universe.\n\nThe principal operations are:\n\nOperation | Notation | Definition\n[[set-union | Union]] | \\(A\\cup B\\)\n[[set-intersection | Intersection]] | \\(A\\cap B\\)\nComplement | \\(A^c=X\\setminus A\\) | Elements of \\(X\\) not belonging to \\(A\\)\n[[set-difference | Difference]] | \\(A\\setminus B\\)\n[[symmetric-difference | Symmetric difference]] | \\(A\\triangle B\\)\n\nDifference and symmetric difference can be expressed using the other operations:\n\n\\[A\\setminus B=A\\cap B^c,\\]\n\n\\[A\\triangle B=(A\\setminus B)\\cup(B\\setminus A) =(A\\cup B)\\setminus(A\\cap B).\\]\n\nThe empty set \\(\\varnothing\\) contains no elements. The universe \\(X\\) and the empty set serve as the two distinguished constants in the algebra.\n\nSet difference is not generally commutative:\n\n\\[A\\setminus B\\ne B\\setminus A.\\]\n\nSymmetric difference, by contrast, is commutative and associative."
    },
    {
      "heading": "Fundamental identities",
      "text": "The laws of set algebra hold for arbitrary subsets \\(A,B,C\\subseteq X\\).\n\nCommutativity and associativity\n\nUnion and intersection are commutative:\n\n\\[A\\cup B=B\\cup A,\\qquad A\\cap B=B\\cap A.\\]\n\nThey are also associative:\n\n\\[(A\\cup B)\\cup C=A\\cup(B\\cup C),\\]\n\n\\[(A\\cap B)\\cap C=A\\cap(B\\cap C).\\]\n\nAssociativity permits expressions such as \\(A\\cup B\\cup C\\) without specifying parentheses.\n\nDistributivity\n\nEach operation distributes over the other:\n\n\\[A\\cap(B\\cup C)=(A\\cap B)\\cup(A\\cap C),\\]\n\n\\[A\\cup(B\\cap C)=(A\\cup B)\\cap(A\\cup C).\\]\n\nThis symmetry is an important distinction from ordinary numerical arithmetic, where multiplication distributes over addition but addition does not generally distribute over multiplication.\n\nIdentity, domination, and idempotence\n\nThe identity laws are\n\n\\[A\\cup\\varnothing=A,\\qquad A\\cap X=A.\\]\n\nThe domination laws are\n\n\\[A\\cup X=X,\\qquad A\\cap\\varnothing=\\varnothing.\\]\n\nBoth operations satisfy idempotence:\n\n\\[A\\cup A=A,\\qquad A\\cap A=A.\\]\n\nComplements and absorption\n\nComplementation satisfies\n\n\\[A\\cup A^c=X,\\qquad A\\cap A^c=\\varnothing,\\]\n\n\\[(A^c)^c=A.\\]\n\nThe absorption laws are\n\n\\[A\\cup(A\\cap B)=A, \\qquad A\\cap(A\\cup B)=A.\\]\n\nDe Morgan’s laws describe how complements interchange unions and intersections:\n\n\\[(A\\cup B)^c=A^c\\cap B^c,\\]\n\n\\[(A\\cap B)^c=A^c\\cup B^c.\\]\n\nThese identities extend to arbitrary indexed families of subsets:\n\n\\[\\left(\\bigcup_{i\\in I}A_i\\right)^c =\\bigcap_{i\\in I}A_i^c, \\qquad \\left(\\bigcap_{i\\in I}A_i\\right)^c =\\bigcup_{i\\in I}A_i^c.\\]\n\nThe identities remain valid even when a particular family of sets is not closed under the unions or intersections involved.\n\nInclusion and duality\n\nThe inclusion relation is characterized algebraically by\n\n\\[A\\subseteq B \\quad\\Longleftrightarrow\\quad A\\cap B=A \\quad\\Longleftrightarrow\\quad A\\cup B=B.\\]\n\nInclusion is a partial order. Union gives the least upper bound of two sets, while intersection gives their greatest lower bound.\n\nMany identities occur in dual pairs. Exchanging \\(\\cup\\) with \\(\\cap\\) and \\(\\varnothing\\) with \\(X\\) transforms a valid Boolean identity into another valid identity. The two absorption laws, for example, are dual to each other."
    },
    {
      "heading": "Connection with logic",
      "text": "Set identities can be proved by examining membership of an arbitrary element \\(x\\in X\\). The basic correspondences are\n\n\\[x\\in A\\cup B \\quad\\Longleftrightarrow\\quad (x\\in A)\\lor(x\\in B),\\]\n\n\\[x\\in A\\cap B \\quad\\Longleftrightarrow\\quad (x\\in A)\\land(x\\in B),\\]\n\n\\[x\\in A^c \\quad\\Longleftrightarrow\\quad \\neg(x\\in A).\\]\n\nThus union corresponds to disjunction, intersection to conjunction, and complement to negation in classical propositional logic. A set identity can consequently be checked using a truth table for the corresponding logical equivalence.\n\nFor example,\n\n\\[\\begin{aligned} x\\in A\\cap(B\\cup C) &\\Longleftrightarrow (x\\in A)\\land\\bigl((x\\in B)\\lor(x\\in C)\\bigr)\\\\ &\\Longleftrightarrow \\bigl((x\\in A)\\land(x\\in B)\\bigr) \\lor \\bigl((x\\in A)\\land(x\\in C)\\bigr)\\\\ &\\Longleftrightarrow x\\in(A\\cap B)\\cup(A\\cap C). \\end{aligned}\\]\n\nThis correspondence concerns classical set algebra; changing the underlying logic can change which complement identities are available."
    },
    {
      "heading": "An algebra as a family of sets",
      "text": "An algebra of sets on \\(X\\) is a nonempty collection\n\n\\[\\mathcal A\\subseteq\\mathcal P(X),\\]\n\nwhere \\(\\mathcal P(X)\\) is the power set of \\(X\\), satisfying:\n\n- If \\(A\\in\\mathcal A\\), then \\(X\\setminus A\\in\\mathcal A\\).\n- If \\(A,B\\in\\mathcal A\\), then \\(A\\cup B\\in\\mathcal A\\).\n\nThese conditions imply\n\n\\[X,\\varnothing\\in\\mathcal A.\\]\n\nIndeed, choosing any \\(A\\in\\mathcal A\\) gives \\(A\\cup A^c=X\\), whose complement is \\(\\varnothing\\).\n\nThey also imply closure under finite intersections, differences, and symmetric differences. For example,\n\n\\[A\\cap B=(A^c\\cup B^c)^c\\in\\mathcal A.\\]\n\nAn equivalent definition requires \\(X\\in\\mathcal A\\) and closure under differences and finite unions.\n\nThe expression field of sets is another name for this structure. Here “field” does not mean a field in the usual algebraic sense: a field of sets does not generally have multiplicative inverses for its nonzero elements.\n\nExamples\n\nThe smallest algebra. For any \\(X\\),\n\n\\[\\{\\varnothing,X\\}\\]\n\nis an algebra of sets.\n\nThe full power set. The collection \\(\\mathcal P(X)\\) is an algebra containing every subset of \\(X\\).\n\nUnions of partition blocks. Suppose \\(P_1,\\ldots,P_n\\) form a finite partition of \\(X\\): the blocks are nonempty, pairwise disjoint, and have union \\(X\\). All unions of these blocks form an algebra. It has \\(2^n\\) elements.\n\nThe finite–cofinite algebra. If \\(X\\) is infinite, the family\n\n\\[\\mathcal A= \\{A\\subseteq X:A\\text{ is finite or }X\\setminus A\\text{ is finite}\\}\\]\n\nis an algebra. A set whose complement is finite is called cofinite."
    },
    {
      "heading": "Generated algebras and atoms",
      "text": "Given a family \\(\\mathcal C\\subseteq\\mathcal P(X)\\), the algebra generated by \\(\\mathcal C\\) is the smallest algebra containing \\(\\mathcal C\\). It exists because the intersection of all algebras on \\(X\\) containing \\(\\mathcal C\\) is itself an algebra.\n\nIts elements are exactly the sets obtainable from members of \\(\\mathcal C\\) using finitely many unions, intersections, and complements.\n\nFor finitely many generators \\(A_1,\\ldots,A_n\\), consider the sets\n\n\\[E_1\\cap\\cdots\\cap E_n, \\qquad E_i\\in\\{A_i,A_i^c\\}.\\]\n\nThe nonempty sets of this form partition \\(X\\). They are the atoms of the generated algebra: its minimal nonempty members. Every member of the algebra is a unique union of these atoms.\n\nIf there are \\(k\\) nonempty atoms, the generated algebra has exactly \\(2^k\\) members. Since \\(k\\leq 2^n\\), an algebra generated by \\(n\\) sets has at most\n\n\\[2^{2^n}\\]\n\nmembers.\n\nMore generally, every finite algebra of sets is the family of all unions of the blocks of a finite partition. Infinite algebras need not have atoms."
    },
    {
      "heading": "Relation to other algebraic structures",
      "text": "Boolean algebras\n\nA set algebra \\(\\mathcal A\\), equipped with\n\n\\[\\cup,\\quad\\cap,\\quad{}^c,\\quad\\varnothing,\\quad X,\\]\n\nis a Boolean algebra. An abstract Boolean algebra specifies operations satisfying the same identities without requiring its elements to be sets.\n\nStone’s representation theorem states that every Boolean algebra is isomorphic to an algebra of sets. This concerns preservation of the finite Boolean operations; it does not assert that the representing family is closed under arbitrary unions.\n\nBoolean rings and rings of sets\n\nThere is also a ring interpretation:\n\n\\[A+B:=A\\triangle B,\\qquad AB:=A\\cap B.\\]\n\nThe zero element is \\(\\varnothing\\), and, for an algebra on \\(X\\), the multiplicative identity is \\(X\\). Every element satisfies\n\n\\[A+A=\\varnothing,\\qquad A^2=A.\\]\n\nA ring in which every element is multiplicatively idempotent is called a Boolean ring.\n\nA ring of sets is a nonempty family closed under finite unions and set differences. Unlike an algebra on a specified universe \\(X\\), it need not contain \\(X\\). Every algebra of sets is a ring of sets, but the converse requires the additional condition that \\(X\\) belongs to the family."
    },
    {
      "heading": "Finite versus countable closure",
      "text": "An algebra of sets requires closure only under finite unions. A sigma-algebra requires closure under countable unions as well:\n\n\\[A_1,A_2,\\ldots\\in\\mathcal A \\quad\\Longrightarrow\\quad \\bigcup_{n=1}^{\\infty}A_n\\in\\mathcal A.\\]\n\nEvery sigma-algebra is an algebra, but an algebra need not be a sigma-algebra. For example, in the finite–cofinite algebra on the natural numbers, every singleton\n\n\\[\\{2\\},\\{4\\},\\{6\\},\\ldots\\]\n\nbelongs to the algebra, but their union is neither finite nor cofinite.\n\nEvery finite algebra is a sigma-algebra. Any countable collection drawn from a finite algebra has only finitely many distinct members, so its union reduces to a finite union.\n\nClosure requirements also distinguish set algebras from a topology: a topology requires arbitrary unions and finite intersections, but does not generally require complements."
    },
    {
      "heading": "Probability, measures, and computation",
      "text": "In probability theory, the universe is a sample space and subsets represent events. Union describes the occurrence of at least one event, intersection their joint occurrence, and complement nonoccurrence. Modern probability spaces use sigma-algebras so that countable combinations of events remain measurable.\n\nIn measure theory, an algebra often serves as an initial domain for assigning sizes to sets. A nonnegative, countably additive set function on an algebra is a premeasure. Carathéodory’s extension theorem extends a premeasure to a measure on the generated sigma-algebra; under a sigma-finiteness assumption, this extension is unique there. Finite closure of the domain does not by itself imply either finite or countable additivity of a set function.\n\nFor computation, subsets of a finite universe can be represented by bit vectors. Union, intersection, and symmetric difference then become bitwise OR, AND, and XOR. Complement becomes bitwise NOT restricted to the positions representing the chosen universe.\n\nThe same correspondence is expressed by the indicator function\n\n\\[\\mathbf 1_A(x)= \\begin{cases} 1,&x\\in A,\\\\ 0,&x\\notin A. \\end{cases}\\]\n\nPointwise,\n\n\\[\\mathbf 1_{A\\cap B}=\\mathbf 1_A\\mathbf 1_B, \\qquad \\mathbf 1_{A^c}=1-\\mathbf 1_A,\\]\n\n\\[\\mathbf 1_{A\\cup B} =\\mathbf 1_A+\\mathbf 1_B-\\mathbf 1_A\\mathbf 1_B.\\]\n\nSymmetric difference corresponds to addition modulo \\(2\\):\n\n\\[\\mathbf 1_{A\\triangle B} \\equiv\\mathbf 1_A+\\mathbf 1_B\\pmod 2.\\]"
    }
  ],
  "links": [
    "set-mathematics",
    "boolean-algebra",
    "set-theory",
    "set-union",
    "set-intersection",
    "set-difference",
    "symmetric-difference",
    "empty-set",
    "idempotence",
    "de-morgans-laws",
    "subset",
    "partial-order",
    "propositional-logic",
    "truth-table",
    "power-set",
    "field-mathematics",
    "set-partition",
    "isomorphism",
    "ring-mathematics",
    "sigma-algebra",
    "natural-number",
    "topology",
    "probability",
    "probability-space",
    "measure-theory",
    "indicator-function"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}