A subset of a set S is a set A whose elements all belong to S: A ⊆ S means that for every x, if x ∈ A then x ∈ S. Every set is a subset of itself, and the empty set is a subset of every set.

The collection of all subsets of S is the power set P(S). The power set is ordered by inclusion (A ⊆ B), and this ordering makes P(S) a complete Boolean algebra: meets are intersections, joins are unions, and every subset has a complement.

In a category, subsets generalize to subobjects: a subobject of an object A is an equivalence class of monomorphisms into A. In a topos, subobjects are classified by the subobject classifier Ω — each subobject of A corresponds to a morphism A → Ω, just as each subset of S corresponds to a characteristic function S → {true, false}. When Ω is a Heyting algebra rather than a Boolean algebra, the logic of subobjects becomes intuitionistic.