Sets and Membership

What does it mean for one object to belong to a collection of objects? This question is simple to ask. Yet it took mathematicians centuries to answer with full rigor. The answer they arrived at — the primitive relation of membership — now underlies nearly all of modern mathematics. Every number, every function, every geometric figure, every mathematical structure of any kind is, in the end, built out of sets. It is built from sets and the membership relation between them. The idea matters because it gives mathematics a single, uniform foundation. Instead of having separate primitive notions for numbers, points, functions, and relations, we can encode all of them as sets. All mathematical statements reduce, in principle, to statements about membership. This unification is not merely aesthetic. It lets us prove things about "arbitrary mathematical objects" by proving things about sets. It also lets us pin down exactly what counts as a legitimate mathematical argument. The big picture is this: we take "set" and "is a member of" (∈\in) as undefined primitive notions. These are governed by axioms — informally here, formally in systems like Zermelo–Fraenkel set theory. They are not governed by definitions in terms of something more basic. From these primitives, together with a handful of basic principles, we build up the entire hierarchy of mathematical objects. Most important among these principles is that sets are determined entirely by their members. This hierarchy includes pairs, relations, functions, numbers, and beyond. This article delivers a careful statement of what a set is. It explains what ∈\in means, and states the fundamental Axiom of Extensionality governing set equality. It also gives worked examples distinguishing sets from their elements. These examples distinguish elements from subsets, and the empty set from sets containing it. It closes by connecting membership to the notions of Set-Builder Notation and Specification and Subsets and Set Inclusion. These topics build directly on the ideas developed here.

Key takeaways
  • A set is a collection of objects, called its elements or members; membership is written a∈Aa \in A.
  • "Set" and "∈\in" are primitive, undefined notions — we describe how they behave via axioms, not via a reduction to simpler concepts.
  • Two sets are equal exactly when they have the same elements — this is the Axiom of Extensionality, and it is what makes "set" a rigorous notion rather than a vague one.
  • Sets can contain sets as elements; a set and its elements are conceptually different levels (a∈Aa \in A is not the same relation as A=AA = A, and {a}≠a\{a\} \ne a in general).
  • The empty set ∅\emptyset has no members at all, and is unique by extensionality.
  • Key idea: everything mathematics needs — pairs, functions, numbers — is eventually built from nothing but sets and the single relation ∈\in between them.

Where this lives today

Set theory built from the primitive notions of "set" and "∈\in" is the working foundation for essentially all of contemporary pure mathematics: real numbers, functions, groups, topological spaces, and measure spaces are all, in careful treatments, defined as particular sets satisfying particular membership-based conditions. In mathematical logic, the membership relation is the sole non-logical primitive of Zermelo–Fraenkel set theory (ZF/ZFC), the dominant formal foundation used to check the consistency and provability of mathematical statements. In computer science, membership underlies the semantics of data types such as finite sets, hash sets, and relational database tables, where "is this record in the table" is literally a membership query; type theory and formal verification systems (e.g., proof assistants like Coq, Lean, and Isabelle) encode analogous membership judgments to check the correctness of proofs and programs. In combinatorics and discrete probability, sample spaces and events are modeled directly as sets with membership determining outcomes, and counting problems reduce to counting elements of explicitly or implicitly described sets. In philosophy of mathematics and logic, the primitive, axiom-governed status of ∈\in is the central case study for what it means for a mathematical notion to be "foundational" rather than reducible to something simpler.

Ask the tutor: Why doesn't Russell's Paradox arise if we only ever form sets by Specification from an existing set, rather than from any arbitrary property?

DefinitionSet and Membership

Set and membership (∈\in) are taken as primitive (undefined) notions of set theory. Informally:

  • A set is a well-determined collection of objects.
  • If AA is a set and aa is an object, the notation
a∈Aa \in A

is read "aa is an element of AA," "aa is a member of AA," or "aa belongs to AA." Its negation is written a∉Aa \notin A. These notions are governed, not defined, by axioms. The single most important governing principle is:

Axiom of Extensionality. For all sets AA and BB,

A=B  ⟺  ∀x (x∈A↔x∈B).A = B \iff \forall x\,(x \in A \leftrightarrow x \in B).

That is, two sets are equal if and only if they have exactly the same elements. In particular, a set is completely determined by what is in it — not by any order, repetition, or manner in which its elements are listed or described.

Basic notation. A finite set with known elements a1,…,ana_1, \dots, a_n is written

{a1,a2,…,an}.\{a_1, a_2, \dots, a_n\}.

The unique set with no elements at all is the empty set, denoted ∅\emptyset or {}\{\}, characterized by:

∀x (x∉∅).\forall x\,(x \notin \emptyset).

Intuition

The word "set" is meant to evoke the ordinary idea of a collection — a bag of marbles, a list of names, a group of numbers — but stripped of all incidental features. A set does not care about the order in which we list its elements, nor whether an element is listed more than once, nor how we happen to describe it. All that matters is which objects belong to it. This is precisely what Extensionality says: {1,2,3}\{1, 2, 3\}, {3,2,1}\{3, 2, 1\}, and {1,1,2,3,3}\{1, 1, 2, 3, 3\} are the very same set, because they all have exactly the elements 11, 22, and 33, and nothing else. A crucial and initially confusing point is that membership (∈\in) is a relation between two objects, not a property of a single object, and it is fundamentally different from the relation of equality between sets. The number 22 can be a member of a set, as in 2∈{1,2,3}2 \in \{1,2,3\}, but 22 itself is not a set of numbers in the same sense — or if we regard 22 as built from sets (as one does formally), it is still a different kind of question whether 2∈A2 \in A versus whether A=2A = 2. Likewise, a set containing one element, like {2}\{2\}, is a different object from the element 22 itself: {2}≠2\{2\} \ne 2, and indeed 2∈{2}2 \in \{2\} but 2∉22 \notin 2 in the usual sense (a number does not contain itself as a member). This distinction between an object and the singleton set containing that object is a common early trap and is examined below. Sets can also contain other sets as elements, and this is where the picture becomes genuinely powerful: since sets can be elements of other sets, we can build layered structures — sets of sets of sets, and so on — entirely out of ∅\emptyset and the membership relation. This is exactly the mechanism used to construct the natural numbers, ordered pairs, and eventually all of standard mathematics from set theory alone.

Figure
Membership vs. containment: A={1,{2,3},4}A = \{1, \{2,3\}, 4\}
A = {1, {2, 3}, 4} 1 4 {2, 3} 2 3 1 ∈ A, 4 ∈ A, {2,3} ∈ A, but 2 ∉ A and 3 ∉ A
TheoremUniqueness of the Empty Set

There is at most one set with no elements. That is, if AA and BB are sets such that

∀x (x∉A)and∀x (x∉B),\forall x\,(x \notin A) \quad \text{and} \quad \forall x\,(x \notin B),

then A=BA = B.

Proof

We use the proof technique of vacuous biconditional verification, combined with the Axiom of Extensionality. By the Axiom of Extensionality (stated in Sets and Membership's definition block above), to show A=BA = B it suffices to show

∀x (x∈A↔x∈B).\forall x\,(x \in A \leftrightarrow x \in B).

Fix an arbitrary object xx. We must show x∈A↔x∈Bx \in A \leftrightarrow x \in B, i.e. both directions of the biconditional. (→\rightarrow) Suppose x∈Ax \in A. But by hypothesis, ∀x (x∉A)\forall x\,(x \notin A), so in particular x∉Ax \notin A — contradicting x∈Ax \in A. Hence the supposition x∈Ax \in A is false for every xx, and so the implication "x∈A→x∈Bx \in A \rightarrow x \in B" is vacuously true (a conditional with a false antecedent is true, regardless of the consequent). (←\leftarrow) Symmetrically, suppose x∈Bx \in B. By hypothesis ∀x (x∉B)\forall x\,(x \notin B), so x∉Bx \notin B, contradicting x∈Bx \in B. Hence x∈Bx \in B is false for every xx, and the implication "x∈B→x∈Ax \in B \rightarrow x \in A" is vacuously true. Since both directions hold vacuously for the arbitrary xx we fixed, we conclude

x∈A↔x∈Bx \in A \leftrightarrow x \in B

holds for every xx — the biconditional is true in each direction, hence true overall, because xx was arbitrary and the argument used no facts about xx beyond its being an arbitrary object. By Extensionality, A=BA = B. ■\blacksquare

∎
CorollaryThe empty set is unique

Since the empty set is postulated to exist (this existence is itself a basic axiom, the Axiom of Empty Set, not proved here but taken as a foundational postulate alongside Extensionality), and by the theorem above any two sets with no elements are equal, we are entitled to speak of the empty set and give it the single name ∅\emptyset.

Worked examples

Example 1 — Distinguishing membership from equality and from subset-like intuition. Let

A={1,2,{1,2},∅}.A = \{1, 2, \{1, 2\}, \emptyset\}.

This is a perfectly legitimate finite set with four elements: the number 11, the number 22, the set {1,2}\{1,2\} (which is itself a two-element set, but here appears as one element of AA), and the empty set ∅\emptyset (which also appears as one element of AA). Let us determine the truth value of several membership statements. 1. 1∈A1 \in A? Yes. The object 11 is explicitly listed as an element of AA. 2. {1,2}∈A\{1,2\} \in A? Yes. The set {1,2}\{1,2\}, taken as a single object, is explicitly listed as an element of AA. This is true even though {1,2}\{1,2\} itself has two elements — what matters for {1,2}∈A\{1,2\} \in A is only whether the object {1,2}\{1,2\} (as a whole) is among the four listed elements of AA, and it is. 3. ∅∈A\emptyset \in A? Yes, for the same reason as (2): ∅\emptyset is explicitly listed. 4. {∅}∈A\{\emptyset\} \in A? No. The object {∅}\{\emptyset\} (the set whose sole element is ∅\emptyset) is not one of the four listed elements 1,2,{1,2},∅1, 2, \{1,2\}, \emptyset of AA. Note carefully: ∅∈A\emptyset \in A is true, but {∅}∈A\{\emptyset\} \in A is a different, false statement — this is exactly the object-versus-singleton distinction flagged in the Intuition section. 5. 3∈A3 \in A? No. The number 33 does not appear among the four listed elements. 6. How many elements does AA have? Exactly 4: namely 11, 22, {1,2}\{1,2\}, and ∅\emptyset. It is a common error to think AA has 1+2+…1 + 2 + \dots elements by "unpacking" {1,2}\{1,2\} — but {1,2}\{1,2\} counts as a single element of AA, since it is one object, regardless of how many elements it itself contains. Membership does not recurse automatically; x∈Ax \in A asks only about the immediate, one-level elements of AA. This example illustrates the essential discipline of set theory: at every stage, one must ask "is this exact object one of the immediate elements of this exact set?" — nothing more, nothing less.

Example 2 — Extensionality resolves apparently different descriptions of "the same" set. Consider the two descriptions:

B={x:x is an integer solution of x2−5x+6=0},B = \{x : x \text{ is an integer solution of } x^2 - 5x + 6 = 0\},
C={2,3}.C = \{2, 3\}.

We claim B=CB = C, using Extensionality, even though BB and CC are given by completely different-looking descriptions (one by a defining property, one by an explicit list — this style of description by a property is formalized later as Set-Builder Notation and Specification, but we can already verify the equality directly here using only the primitive notion of membership). Verification, by Extensionality. We must show ∀x (x∈B↔x∈C)\forall x\,(x \in B \leftrightarrow x \in C). First, solve the equation: x2−5x+6=(x−2)(x−3)=0x^2 - 5x + 6 = (x-2)(x-3) = 0, so the integer solutions are exactly x=2x = 2 and x=3x = 3 (these are the only two roots of a degree-2 polynomial, and both are integers, so both qualify). (→\rightarrow) Suppose x∈Bx \in B. Then xx is an integer with x2−5x+6=0x^2 - 5x + 6 = 0, so (x−2)(x−3)=0(x-2)(x-3)=0, so x=2x = 2 or x=3x = 3 (since a product of real numbers is zero only if a factor is zero). In either case x∈{2,3}=Cx \in \{2,3\} = C. (←\leftarrow) Suppose x∈Cx \in C, i.e. x=2x = 2 or x=3x = 3. If x=2x=2: 22−5(2)+6=4−10+6=02^2 - 5(2) + 6 = 4 - 10 + 6 = 0, and 22 is an integer, so x∈Bx \in B. If x=3x = 3: 32−5(3)+6=9−15+6=03^2 - 5(3) + 6 = 9 - 15 + 6 = 0, and 33 is an integer, so x∈Bx \in B. Either way x∈Bx \in B. Both directions hold for arbitrary xx, so x∈B↔x∈Cx \in B \leftrightarrow x \in C for all xx, and by Extensionality B=CB = C. This is the essential point of Extensionality in practice: two sets that look utterly different in how they are presented are nonetheless the same set the moment they have exactly the same members — no more, no less. Set identity is entirely about membership content, never about the description used to specify the set.

CounterexampleWhy Extensionality, and not merely "same description," is needed

One might be tempted to think two sets are equal only when they arise from the "same" defining description or the "same" list of elements written in the same order — but this is false, and dropping Extensionality (replacing it with a naive "same syntactic description" criterion) breaks basic reasoning about sets. Consider the two sets

D={n∈Z:n is even and 2≤n≤8},E={2,4,6,8}.D = \{n \in \mathbb{Z} : n \text{ is even and } 2 \le n \le 8\}, \qquad E = \{2,4,6,8\}.

These have syntactically different definitions: DD is defined by a property (evenness and a numerical range), while EE is defined by an explicit finite list. If we (incorrectly) required sets to be equal only when given by identical descriptions, we would be forced to conclude D≠ED \ne E, since no purely syntactic matching identifies these two descriptions. But this conclusion is wrong, and it is exactly Extensionality that shows why: the even integers between 22 and 88 inclusive are precisely 2,4,6,82, 4, 6, 8 — a direct check confirms x∈D↔x∈Ex \in D \leftrightarrow x \in E for every xx (verify: 2,4,6,82,4,6,8 are each even and in range, hence in DD; and no other integer in the range [2,8][2,8] is even, hence nothing extra is in DD). So by Extensionality D=ED = E, full stop, regardless of the difference in how they were described. If one instead adopted a hypothetical "set theory" where equality depended on matching descriptions rather than matching elements, then DD and EE would count as different objects even though every mathematician's intuition — and every application, such as summing "DD's elements" versus "EE's elements" — treats them as identical. Substitution of DD for EE in any true statement would then silently fail, breaking basic algebraic manipulation (e.g., ∑x∈Dx\sum_{x \in D} x and ∑x∈Ex\sum_{x \in E} x would not be interchangeable even though both equal 2+4+6+8=202+4+6+8=20). This is precisely why Extensionality — membership-content equality, not description equality — is taken as an axiom: it is the feature that makes "set" behave the way our intuition, and all downstream mathematics, requires.

Scope, edge cases & common traps

SituationCorrect treatmentCommon trap
aa vs. {a}\{a\}Different objects in general: a∈{a}a \in \{a\}, but typically a≠{a}a \ne \{a\}Conflating an object with the singleton set containing it
∅\emptyset vs. {∅}\{\emptyset\}∅\emptyset has 0 elements; {∅}\{\emptyset\} has exactly 1 element (namely ∅\emptyset)Treating {∅}\{\emptyset\} as "still empty"
Repeated listing, e.g. {1,1,2}\{1,1,2\}Equals {1,2}\{1,2\} by Extensionality — repetition doesn't create new elementsThinking {1,1,2}\{1,1,2\} has "three elements"
Order of listing, e.g. {1,2}\{1,2\} vs. {2,1}\{2,1\}Equal sets by Extensionality — sets are unorderedThinking order matters (that's a property of sequences, not sets)
x∈Ax \in A where AA has AA itself as an element (A∈AA \in A)Excluded in standard (ZF-based) set theory by a further axiom (Foundation/Regularity), not discussed in depth hereAssuming self-membership is a routine possibility
Nested sets, e.g. {2,3}∈A\{2,3\} \in A vs. 2∈A2 \in AThese are logically independent statements; neither implies the otherAssuming membership "distributes" over nested sets

The mathematician behind it

Origins · 1 minGeorg Cantor and how this was discovered
GC
Georg Cantor
1845–1918 · founder of set theory, Halle, Germany

Georg Cantor developed the theory of sets in the 1870s–1880s while investigating the convergence of trigonometric (Fourier) series, a problem that led him to consider infinite collections of "exceptional points" and to compare their sizes rigorously. His work forced him to treat infinite collections as completed, well-defined mathematical objects in their own right — the informal ancestor of the modern notion of "set" — and to introduce the comparison of sets by one-to-one correspondence, which in turn revealed that not all infinities are the same size. Cantor's ideas were controversial in his lifetime, resisted by prominent contemporaries such as Leopold Kronecker, but were later vindicated and form the bedrock of set theory as an independent branch of mathematics, eventually formalized rigorously by Ernst Zermelo, Abraham Fraenkel, and others into the axiomatic systems used today.

History
- 1874 — Cantor publishes his first paper showing the real numbers cannot be put in one-to-one correspondence with the natural numbers, an early landmark of set-theoretic reasoning.
- 1878–1883 — Cantor develops the notion of cardinality and the comparison of infinite sets, introducing much of the informal language of "sets" of points.
- 1901 — Bertrand Russell discovers Russell's Paradox, showing that naive, unrestricted set formation (a set of "all sets not containing themselves") leads to contradiction, and that membership must be constrained by axioms.
- 1908 — Ernst Zermelo publishes the first axiomatization of set theory, explicitly listing axioms (including a version of Extensionality) to govern ∈\in and avoid paradox.
- 1922 — Abraham Fraenkel and Thoralf Skolem refine Zermelo's axioms, yielding the Zermelo–Fraenkel (ZF) system that remains the standard foundation for mathematics today.
Is "set" ever formally defined in terms of something simpler?

No — in standard treatments (such as Zermelo–Fraenkel set theory), "set" and the membership relation ∈\in are taken as primitive, undefined notions. Just as geometry once took "point" and "line" as undefined terms governed by axioms, set theory takes "set" and "∈\in" as undefined terms governed by axioms like Extensionality, Pairing, Union, Power Set, and others. We do not define what a set "really is" in some more basic vocabulary; instead we specify, via axioms, what properties the relation ∈\in must satisfy, and everything else about sets is derived logically from those axioms. This is standard practice in axiomatic systems: some notion must be primitive, or the definitions would regress infinitely.

Can a set contain itself as a member?

In the informal picture given here, nothing yet rules this out, but standard set theory (ZF) includes a further axiom, the Axiom of Foundation (Regularity), which implies no set can satisfy A∈AA \in A, and more generally rules out any infinite descending chain ⋯∈A2∈A1∈A0\dots \in A_2 \in A_1 \in A_0. This axiom is not needed to state Extensionality or basic membership facts, and is typically introduced separately once the reader is comfortable with ∈\in itself. Historically, allowing unrestricted self-membership and unrestricted set formation is exactly what led to Russell's Paradox, so modern axiomatic systems are deliberately designed to prevent it.

Is {1,2}\{1,2\} the same object as the ordered pair (1,2)(1,2)?

No. {1,2}={2,1}\{1,2\} = \{2,1\} by Extensionality, since these unordered sets have identical elements regardless of listing order. But the ordered pair (1,2)(1,2) is meant to be different from (2,1)(2,1) — order matters for pairs but not for sets. Ordered pairs are, in fact, typically defined using only sets and membership (for instance via the Kuratowski definition (a,b):={{a},{a,b}}(a,b) := \{\{a\}, \{a,b\}\}), precisely so that order can be recovered from an otherwise order-blind foundation. This construction, however, is a topic in its own right and goes beyond the membership basics covered here.

Does the order or repetition in {a1,…,an}\{a_1, \dots, a_n\} notation matter at all?

Not for the identity of the set itself: by Extensionality, {1,2}={2,1}\{1,2\} = \{2,1\} and {1,1,2}={1,2}\{1,1,2\} = \{1,2\}, since in each case the collections of elements coincide exactly. The listing notation is just a convenient way to describe a set; many different lists can describe the very same set. This is different from data structures like lists or sequences in computer science, where order and repetition are meaningful and distinguishing — sets are deliberately a coarser, order-and-multiplicity-blind notion.

How is the empty set different from "nothing" or "no set at all"?

∅\emptyset is a set — a fully legitimate mathematical object — it simply happens to be the (unique, by the theorem proved above) set that has no elements. This is different from there being no set whatsoever; ∅\emptyset exists and can itself be an element of other sets, e.g. {∅}\{\emptyset\} is a well-defined set with exactly one element. Confusing "the empty set" with "nothing exists" is a common but important error: ∅∈{∅}\emptyset \in \{\emptyset\} is true, while ∅∈∅\emptyset \in \emptyset is false, and both statements are meaningful because ∅\emptyset is a genuine object of the theory.

Why does membership need axioms at all — isn't "collection of objects" clear enough?

Naive, completely unrestricted set formation (allowing any description to define a set) leads to contradictions, most famously Russell's Paradox: consider R={x:x∉x}R = \{x : x \notin x\}. Asking whether R∈RR \in R leads to R∈R↔R∉RR \in R \leftrightarrow R \notin R, an outright logical contradiction. This shows that "collection of objects satisfying any property" cannot be treated as automatically forming a legitimate set. Axiomatic set theory responds by carefully restricting how sets may be formed (e.g., via Specification, applied only to elements of an already-given set, as developed in Set-Builder Notation and Specification), while keeping Extensionality and other structural axioms to govern set identity and construction safely.

What is the relationship between this article and subsets?

Membership (∈\in) is the relation between an object and a set that contains it as one of its immediate elements. Subset (⊆\subseteq) is a derived relation between two sets, defined using membership: A⊆BA \subseteq B means every element of AA is also an element of BB, i.e. ∀x (x∈A→x∈B)\forall x\,(x \in A \to x \in B). So subset-hood is built entirely out of membership, quantified over all elements — the two notions are related but distinct, and the common trap of confusing "∈\in" with "⊆\subseteq" (e.g. thinking 2∈{1,2,3}2 \in \{1,2,3\} and {2}⊆{1,2,3}\{2\} \subseteq \{1,2,3\} are "the same fact") is addressed directly in Subsets and Set Inclusion.

Where this leads